Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.ecwid.apiclient.v3.dto.common

interface ExtendedOrderTax : BaseOrderTax {
val includeInPrice: Boolean?
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.ecwid.apiclient.v3.dto.order.result

import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO
import com.ecwid.apiclient.v3.dto.common.*
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO.ModifyKind
import com.ecwid.apiclient.v3.dto.common.BaseOrderTax
import com.ecwid.apiclient.v3.dto.common.OrderedStringToListStringMap
import com.ecwid.apiclient.v3.dto.common.OrderedStringToStringMap
import com.ecwid.apiclient.v3.dto.order.enums.*
import com.ecwid.apiclient.v3.dto.order.request.UpdatedOrder
import java.util.*
Expand Down Expand Up @@ -47,6 +44,7 @@ data class FetchedOrder(
val paymentModule: String? = null,
val paymentParams: OrderedStringToStringMap? = null,
val paymentMessage: String? = null,
val paymentSubtype: String? = null,
val creditCardStatus: CreditCardStatus? = null,
val externalTransactionId: String? = null,
val externalTransactionUrl: String? = null,
Expand Down Expand Up @@ -197,6 +195,7 @@ data class FetchedOrder(
val discounts: List<OrderItemDiscounts>? = null,
val externalReferenceId: String? = null,
val isPreorder: Boolean? = null,
val attributes: List<OrderItemAttributeValue>? = null
)

data class RecurringChargeSettings(
Expand Down Expand Up @@ -228,20 +227,21 @@ data class FetchedOrder(
override val name: String? = null,
override val value: Double? = null,
override val total: Double? = null,
override val includeInPrice: Boolean? = null,
val taxType: OrderItemTaxType? = null,
) : BaseOrderTax
) : ExtendedOrderTax

data class OrderItemTax(
override val name: String? = null,
override val value: Double? = null,
override val total: Double? = null,
val taxOnDiscountedSubtotal: Double? = null,
val taxOnShipping: Double? = null,
val includeInPrice: Boolean? = null,
override val includeInPrice: Boolean? = null,
val sourceTaxRateId: Int? = null,
val sourceTaxRateType: RateType? = null,
val taxType: OrderItemTaxType? = null,
) : BaseOrderTax {
) : ExtendedOrderTax {
enum class RateType {
AUTO,
MANUAL,
Expand All @@ -254,8 +254,9 @@ data class FetchedOrder(
data class HandlingFeeTax(
override val name: String? = null,
override val value: Double? = null,
override val total: Double? = null
) : BaseOrderTax
override val total: Double? = null,
override val includeInPrice: Boolean? = null,
) : ExtendedOrderTax

data class ProductDimensions(
val length: Double? = null,
Expand All @@ -275,6 +276,14 @@ data class FetchedOrder(
val url: String? = null
)

data class OrderItemAttributeValue(
val id: Int? = null,
val name: String? = null,
val nameTranslated: HashMap<String, String>? = null,
val value: String? = null,
val valueTranslated: HashMap<String, String>? = null,
)

data class OrderItemProductFile(
val productFileId: Long? = null,
val maxDownloads: Int? = null,
Expand Down Expand Up @@ -312,6 +321,8 @@ data class FetchedOrder(
val pickupInstruction: String? = null,
val fulfillmentType: FulfillmentType? = null,
val locationId: String? = null,
val localizedLabel: String? = null,
val isShippingLimit: Boolean? = null,
)

data class HandlingFee(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
ReadOnly(FetchedOrder::predictedPackage),
ReadOnly(FetchedOrder::customerGroupId),
ReadOnly(FetchedOrder::ticket),
ReadOnly(FetchedOrder::paymentSubtype),
Ignored(FetchedOrder::createTimestamp),
Ignored(FetchedOrder::updateDate),
Ignored(FetchedOrder::updateTimestamp),
Expand All @@ -157,9 +158,12 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
Ignored(FetchedOrder.DiscountCouponInfo::orderCount),
Ignored(FetchedOrder.DiscountCouponInfo::catalogLimit),
Ignored(FetchedOrder.DiscountCouponInfo::applicationLimit),
ReadOnly(FetchedOrder.BaseOrderItemTax::includeInPrice),
ReadOnly(FetchedOrder.HandlingFeeTax::includeInPrice),
Ignored(FetchedOrder.OrderItem::id),
ReadOnly(FetchedOrder.OrderItem::priceWithoutTax),
ReadOnly(FetchedOrder.OrderItem::files),
ReadOnly(FetchedOrder.OrderItem::attributes),
Ignored(FetchedOrder.OrderItem::imageUrl),
Ignored(FetchedOrder.OrderItem::smallThumbnailUrl),
Ignored(FetchedOrder.OrderItem::hdThumbnailUrl),
Expand All @@ -176,6 +180,8 @@ val nonUpdatablePropertyRules: List<NonUpdatablePropertyRule<*, *>> = listOf(
Ignored(FetchedOrder.PersonInfo::countryName),
Ignored(FetchedOrder.PersonInfo::stateOrProvinceName),
ReadOnly(FetchedOrder.ShippingOption::shippingRateWithoutTax),
ReadOnly(FetchedOrder.ShippingOption::localizedLabel),
ReadOnly(FetchedOrder.ShippingOption::isShippingLimit),
ReadOnly(FetchedOrder.HandlingFee::valueWithoutTax),
ReadOnly(FetchedOrder.Surcharge::totalWithoutTax),
Ignored(FetchedOrder::refundedAmount),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
AllowNullable(FetchedOrder.BaseOrderItemTax::total),
AllowNullable(FetchedOrder.BaseOrderItemTax::value),
AllowNullable(FetchedOrder.BaseOrderItemTax::taxType),
AllowNullable(FetchedOrder.BaseOrderItemTax::includeInPrice),
AllowNullable(FetchedOrder.HandlingFeeTax::name),
AllowNullable(FetchedOrder.HandlingFeeTax::total),
AllowNullable(FetchedOrder.HandlingFeeTax::value),
AllowNullable(FetchedOrder.HandlingFeeTax::includeInPrice),
AllowNullable(FetchedOrder::latestShipDate),
AllowNullable(FetchedOrder::paymentSubtype),
IgnoreNullable(FetchedOrder::publicUid),
IgnoreNullable(FetchedOrder.CreditCardStatus::avsMessage),
IgnoreNullable(FetchedOrder.CreditCardStatus::cvvMessage),
Expand Down Expand Up @@ -92,6 +95,7 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
IgnoreNullable(FetchedOrder.OrderItem::weight),
IgnoreNullable(FetchedOrder.OrderItem::externalReferenceId),
AllowNullable(FetchedOrder.OrderItem::isPreorder),
AllowNullable(FetchedOrder.OrderItem::attributes),
IgnoreNullable(FetchedOrder.OrderItemDiscounts::discountInfo),
IgnoreNullable(FetchedOrder.OrderItemDiscounts::total),
AllowNullable(FetchedOrder.OrderItemOptionFile::id),
Expand Down Expand Up @@ -175,6 +179,8 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
IgnoreNullable(FetchedOrder.ShippingOption::shippingCarrierName),
IgnoreNullable(FetchedOrder.ShippingOption::shippingMethodName),
IgnoreNullable(FetchedOrder.ShippingOption::shippingRate),
AllowNullable(FetchedOrder.ShippingOption::isShippingLimit),
AllowNullable(FetchedOrder.ShippingOption::localizedLabel),
AllowNullable(FetchedOrder.ShippingServiceInfo::carrier),
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierName),
AllowNullable(FetchedOrder.ShippingServiceInfo::carrierServiceCode),
Expand Down Expand Up @@ -290,5 +296,10 @@ val fetchedOrderNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf
AllowNullable(FetchedOrder.ExternalOrderData::externalFulfillment),
AllowNullable(FetchedOrder.ExternalOrderData::refererId),
AllowNullable(FetchedOrder.ExternalOrderData::platformSpecificFields),
AllowNullable(FetchedOrder.ExternalOrderData::refererChannel)
AllowNullable(FetchedOrder.ExternalOrderData::refererChannel),
AllowNullable(FetchedOrder.OrderItemAttributeValue::id),
AllowNullable(FetchedOrder.OrderItemAttributeValue::name),
AllowNullable(FetchedOrder.OrderItemAttributeValue::nameTranslated),
AllowNullable(FetchedOrder.OrderItemAttributeValue::value),
AllowNullable(FetchedOrder.OrderItemAttributeValue::valueTranslated),
)