File tree Expand file tree Collapse file tree
src/main/kotlin/com/ecwid/apiclient/v3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ fun FetchedOrder.toUpdated(): UpdatedOrder {
9797 electronicInvoiceSdiCode = electronicInvoiceSdiCode,
9898 commercialRelationshipScheme = commercialRelationshipScheme,
9999 lang = lang,
100+ storeCredit = storeCredit?.toUpdated(),
100101 )
101102}
102103
@@ -346,3 +347,18 @@ fun FetchedOrder.LoyaltyRedemption.toUpdated(): UpdatedOrder.LoyaltyRedemption {
346347 cancelled = this .cancelled,
347348 )
348349}
350+
351+ fun FetchedOrder.StoreCredit.toUpdated (): UpdatedOrder .StoreCredit {
352+ return UpdatedOrder .StoreCredit (
353+ redemption = this .redemption?.toUpdated(),
354+ balance = this .balance,
355+ )
356+ }
357+
358+ fun FetchedOrder.StoreCreditRedemption.toUpdated (): UpdatedOrder .StoreCreditRedemption {
359+ return UpdatedOrder .StoreCreditRedemption (
360+ id = this .id,
361+ amount = this .amount,
362+ cancelled = this .cancelled,
363+ )
364+ }
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ data class UpdatedOrder(
104104 @JsonFieldName(" b2b_b2c" )
105105 val commercialRelationshipScheme : CommercialRelationshipScheme ? = null ,
106106 val lang : String? = null ,
107+ val storeCredit : StoreCredit ? = null ,
107108
108109) : ApiUpdatedDTO {
109110
@@ -380,6 +381,17 @@ data class UpdatedOrder(
380381 val cancelled : Boolean? = null ,
381382 )
382383
384+ data class StoreCredit (
385+ val redemption : StoreCreditRedemption ? = null ,
386+ val balance : Double? = null
387+ )
388+
389+ data class StoreCreditRedemption (
390+ val id : String? = null ,
391+ val amount : Double? = null ,
392+ val cancelled : Boolean? = null ,
393+ )
394+
383395 companion object {
384396 const val FACEBOOK_ORDER_REFERENCE_ID = " FACEBOOK"
385397 }
You can’t perform that action at this time.
0 commit comments