Skip to content

Commit

Permalink
ECWID-137410 ecwid-java-api-client: add customerGroupId to order enti…
Browse files Browse the repository at this point in the history
…ties — added
  • Loading branch information
qblake committed Mar 29, 2024
1 parent ce111c8 commit 7e44ac6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fun FetchedOrder.toUpdated(): UpdatedOrder {

customerId = customerId,
customerGroup = customerGroup,
customerGroupId = customerGroupId,
acceptMarketing = acceptMarketing,

total = total,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ data class OrderForCalculate(
val email: String? = null,
val ipAddress: String? = null,
val customerId: Int? = null,
val customerGroupId: Int? = null,
val customerTaxExempt: Boolean? = null,
val customerTaxId: String? = null,
val reversedTaxApplied: Boolean? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ data class UpdatedOrder(

val customerId: Int? = null,
val customerGroup: String? = null,
val customerGroupId: Int? = null,
val acceptMarketing: Boolean? = null,

val total: Double? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ data class FetchedOrder(

val customerId: Int? = null, // TODO Figure out how to test
val customerGroup: String? = null,
val customerGroupId: Long? = null,
val customerGroupId: Int? = null,
val acceptMarketing: Boolean? = null,

val giftCardRedemption: Double? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.ecwid.apiclient.v3.rule.NullablePropertyRule.IgnoreNullable
val orderForCalculateNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
IgnoreNullable(OrderForCalculate::billingPerson),
IgnoreNullable(OrderForCalculate::customerId),
AllowNullable(OrderForCalculate::customerGroupId),
AllowNullable(OrderForCalculate::customerTaxId),
AllowNullable(OrderForCalculate::customerTaxExempt),
AllowNullable(OrderForCalculate::customSurcharges),
Expand Down
1 change: 1 addition & 0 deletions src/test/kotlin/com/ecwid/apiclient/v3/util/OrderUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fun generateTestOrder(): UpdatedOrder {
externalTransactionId = randomAlphanumeric(16),

customerGroup = "Group " + randomAlphanumeric(8),
customerGroupId = randomId(),
acceptMarketing = randomBoolean(),

total = totalPrice,
Expand Down

0 comments on commit 7e44ac6

Please sign in to comment.