@passly-nl/data 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/adapter/OrderAdapter.ts +1 -0
- package/src/dto/order/OrderDto.ts +12 -2
- package/src/types/order.ts +5 -0
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export class OrderAdapter {
|
|
|
17
17
|
optional(data.payment_provider, OrderAdapter.parseOrderPaymentProvider),
|
|
18
18
|
optional(data.platform_cost, PaymentAdapter.parseCost)!,
|
|
19
19
|
optional(data.refunded_total, PaymentAdapter.parseCost)!,
|
|
20
|
+
data.refund_status,
|
|
20
21
|
optional(data.sub_total, PaymentAdapter.parseCost)!,
|
|
21
22
|
optional(data.total, PaymentAdapter.parseCost)!,
|
|
22
23
|
data.url,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { dto } from '@basmilius/http-client';
|
|
2
2
|
import type { DateTime } from 'luxon';
|
|
3
3
|
import type { BuyerDto, CostDto, EventDto, MarketingAttributionDto, OrderLineDto, OrderPaymentProviderDto, PublicShopDto, TransactionDto } from '#data/dto';
|
|
4
|
-
import type { OrderOrigin, OrderType } from '#data/types';
|
|
4
|
+
import type { OrderOrigin, OrderRefundStatus, OrderType } from '#data/types';
|
|
5
5
|
|
|
6
6
|
@dto
|
|
7
7
|
export class OrderDto {
|
|
@@ -85,6 +85,14 @@ export class OrderDto {
|
|
|
85
85
|
this.#refundedTotal = value;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
get refundStatus(): OrderRefundStatus {
|
|
89
|
+
return this.#refundStatus;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
set refundStatus(value: OrderRefundStatus) {
|
|
93
|
+
this.#refundStatus = value;
|
|
94
|
+
}
|
|
95
|
+
|
|
88
96
|
get subTotal(): CostDto {
|
|
89
97
|
return this.#subTotal;
|
|
90
98
|
}
|
|
@@ -167,6 +175,7 @@ export class OrderDto {
|
|
|
167
175
|
#paymentProvider: OrderPaymentProviderDto | null;
|
|
168
176
|
#platformCost: CostDto;
|
|
169
177
|
#refundedTotal: CostDto;
|
|
178
|
+
#refundStatus: OrderRefundStatus;
|
|
170
179
|
#subTotal: CostDto;
|
|
171
180
|
#total: CostDto;
|
|
172
181
|
#url: string;
|
|
@@ -177,7 +186,7 @@ export class OrderDto {
|
|
|
177
186
|
#transaction: TransactionDto | null;
|
|
178
187
|
#attribution: MarketingAttributionDto | null;
|
|
179
188
|
|
|
180
|
-
constructor(id: string, code: string, origin: OrderOrigin, type: OrderType, createdOn: DateTime, discountAmount: CostDto | null, discountCodeApplied: string | null, paymentProvider: OrderPaymentProviderDto | null, platformCost: CostDto, refundedTotal: CostDto, subTotal: CostDto, total: CostDto, url: string, buyer: BuyerDto | null, event: EventDto | null, lines: OrderLineDto[] | null, shop: PublicShopDto | null, transaction: TransactionDto | null, attribution: MarketingAttributionDto | null) {
|
|
189
|
+
constructor(id: string, code: string, origin: OrderOrigin, type: OrderType, createdOn: DateTime, discountAmount: CostDto | null, discountCodeApplied: string | null, paymentProvider: OrderPaymentProviderDto | null, platformCost: CostDto, refundedTotal: CostDto, refundStatus: OrderRefundStatus, subTotal: CostDto, total: CostDto, url: string, buyer: BuyerDto | null, event: EventDto | null, lines: OrderLineDto[] | null, shop: PublicShopDto | null, transaction: TransactionDto | null, attribution: MarketingAttributionDto | null) {
|
|
181
190
|
this.#id = id;
|
|
182
191
|
this.#code = code;
|
|
183
192
|
this.#origin = origin;
|
|
@@ -188,6 +197,7 @@ export class OrderDto {
|
|
|
188
197
|
this.#paymentProvider = paymentProvider;
|
|
189
198
|
this.#platformCost = platformCost;
|
|
190
199
|
this.#refundedTotal = refundedTotal;
|
|
200
|
+
this.#refundStatus = refundStatus;
|
|
191
201
|
this.#subTotal = subTotal;
|
|
192
202
|
this.#total = total;
|
|
193
203
|
this.#url = url;
|