From 565671e5668a7437d127340d13a9b8a8dfbc611f Mon Sep 17 00:00:00 2001 From: Alexander Blake Date: Wed, 13 Nov 2024 16:38:35 +0400 Subject: [PATCH] =?UTF-8?q?ECWID-152638=20OE2:=20add=20tax=20fields=20to?= =?UTF-8?q?=20ecwid-java-api-client=20=E2=80=94=20added?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt | 3 +++ .../com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt | 3 +++ .../com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt | 3 +++ .../v3/rule/nullablepropertyrules/FetchedOrderRules.kt | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt index 76af5e35..45729922 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/converter/FetchedOrder.kt @@ -93,6 +93,9 @@ fun FetchedOrder.toUpdated(): UpdatedOrder { paymentReference = paymentReference, loyalty = loyalty?.toUpdated(), customerFiscalCode = customerFiscalCode, + electronicInvoicePecEmail = electronicInvoicePecEmail, + electronicInvoiceSdiCode = electronicInvoiceSdiCode, + b2b_b2c = b2b_b2c, ) } diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt index cdca867a..d7898a7d 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/UpdatedOrder.kt @@ -97,6 +97,9 @@ data class UpdatedOrder( val paymentReference: String? = null, val loyalty: Loyalty? = null, val customerFiscalCode: String? = null, + val electronicInvoicePecEmail: String? = null, + val electronicInvoiceSdiCode: String? = null, + val b2b_b2c: String? = null, ) : ApiUpdatedDTO { diff --git a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt index db85e017..c1456e22 100644 --- a/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt +++ b/src/main/kotlin/com/ecwid/apiclient/v3/dto/order/result/FetchedOrder.kt @@ -119,6 +119,9 @@ data class FetchedOrder( val shippingLabelAvailableForShipment: Boolean = false, val loyalty: Loyalty? = null, val customerFiscalCode: String? = null, + val electronicInvoicePecEmail: String? = null, + val electronicInvoiceSdiCode: String? = null, + val b2b_b2c: String? = null, ) : ApiFetchedDTO, ApiResultDTO { diff --git a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt index b50d999c..1f084748 100644 --- a/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt +++ b/src/test/kotlin/com/ecwid/apiclient/v3/rule/nullablepropertyrules/FetchedOrderRules.kt @@ -321,4 +321,7 @@ val fetchedOrderNullablePropertyRules: List> = listOf AllowNullable(FetchedOrder.LoyaltyRedemption::amount), AllowNullable(FetchedOrder.LoyaltyRedemption::cancelled), AllowNullable(FetchedOrder::customerFiscalCode), + AllowNullable(FetchedOrder::electronicInvoicePecEmail), + AllowNullable(FetchedOrder::electronicInvoiceSdiCode), + AllowNullable(FetchedOrder::b2b_b2c), )