Skip to content

Commit b754075

Browse files
ECWID-155668 Add "updateShippingOption" method to ecwid-java-api-client - (feat) extract 'rateType' to separated enum
1 parent 0356f31 commit b754075

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.ecwid.apiclient.v3.dto.profile.enums
2+
3+
@Suppress("unused")
4+
enum class RateType {
5+
ABSOLUTE,
6+
PERCENT
7+
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/request/UpdatedShippingOption.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ data class UpdatedShippingOption(
5454
)
5555

5656
data class FlatRate(
57-
val rateType: String? = null,
57+
val rateType: RateType? = null,
5858
val rate: Double? = null,
5959
)
6060

src/main/kotlin/com/ecwid/apiclient/v3/dto/profile/result/FetchedShippingOption.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ data class FetchedShippingOption(
5555
)
5656

5757
data class FlatRate(
58-
val rateType: String? = null,
58+
val rateType: RateType? = null,
5959
val rate: Double? = null,
6060
)
6161

0 commit comments

Comments
 (0)