Skip to content

Commit

Permalink
Merge pull request #312 from Ecwid/ECWID-124677-oe2-gift-cards
Browse files Browse the repository at this point in the history
ECWID-124677 OE2: Send Order Data to Calculation and Display Changes:
  • Loading branch information
kitty-ecwid authored Aug 4, 2023
2 parents 360ec2c + 8d90e9e commit b584c59
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ data class OrderForCalculate(
val shippingOption: ShippingOption? = null,
val handlingFee: HandlingFee? = null,
val paymentOptionsDetails: PaymentOption? = null,
val giftCardCode: String? = null,
val giftCardId: Int? = null,
val giftCardTransactionOrderId: Int? = null,
) : ApiRequestDTO {

data class DiscountInfo(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ data class FetchedOrder(
val totalBeforeGiftCardRedemption: Double? = null,
val giftCardDoubleSpending: Boolean? = null,
val giftCardCode: String? = null,
val giftCardId: Int? = null,

val total: Double? = null,
val totalWithoutTax: Double? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
ReadOnly(FetchedOrder::orderExtraFields),
ReadOnly(FetchedOrder::giftCardCode),
ReadOnly(FetchedOrder::giftCardDoubleSpending),
ReadOnly(FetchedOrder::giftCardId),
ReadOnly(FetchedOrder::giftCardRedemption),
ReadOnly(FetchedOrder::totalBeforeGiftCardRedemption),
ReadOnly(FetchedOrder::totalWithoutTax),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
AllowNullable(FetchedOrder::fulfillmentStatus),
AllowNullable(FetchedOrder::giftCardCode),
AllowNullable(FetchedOrder::giftCardDoubleSpending),
AllowNullable(FetchedOrder::giftCardId),
AllowNullable(FetchedOrder::giftCardRedemption),
AllowNullable(FetchedOrder::globalReferer),
AllowNullable(FetchedOrder::handlingFee),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ val orderForCalculateNullablePropertyRules: List<NullablePropertyRule<*, *>> = l
IgnoreNullable(OrderForCalculate::discountInfo),
IgnoreNullable(OrderForCalculate::email),
AllowNullable(OrderForCalculate::handlingFee),
AllowNullable(OrderForCalculate::giftCardCode),
AllowNullable(OrderForCalculate::giftCardId),
AllowNullable(OrderForCalculate::giftCardTransactionOrderId),
IgnoreNullable(OrderForCalculate::ipAddress),
IgnoreNullable(OrderForCalculate::items),
AllowNullable(OrderForCalculate::paymentOptionsDetails),
Expand Down

0 comments on commit b584c59

Please sign in to comment.