@missioncontrolio/client 0.0.9 → 0.0.10

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.
Files changed (90) hide show
  1. package/dist/client/autoCancelOrderHandler.d.ts +7 -0
  2. package/dist/client/autoCancelOrderHandler.js +95 -0
  3. package/dist/client/clientBuilder.d.ts +16 -0
  4. package/dist/client/clientBuilder.js +57 -0
  5. package/dist/client/generated/client.d.ts +20 -0
  6. package/{src/client/generated/client.ts → dist/client/generated/client.js} +14 -79
  7. package/dist/client/generated/models/index.d.ts +277 -0
  8. package/dist/client/generated/models/index.js +585 -0
  9. package/dist/client/generated/order/cancelOrder/index.d.ts +8 -0
  10. package/dist/client/generated/order/cancelOrder/index.js +17 -0
  11. package/dist/client/generated/order/claimReservation/index.d.ts +7 -0
  12. package/dist/client/generated/order/claimReservation/index.js +8 -0
  13. package/dist/client/generated/order/claimReservation/item/index.d.ts +8 -0
  14. package/dist/client/generated/order/claimReservation/item/index.js +17 -0
  15. package/dist/client/generated/order/createOrder/index.d.ts +8 -0
  16. package/dist/client/generated/order/createOrder/index.js +17 -0
  17. package/dist/client/generated/order/index.d.ts +25 -0
  18. package/dist/client/generated/order/index.js +32 -0
  19. package/dist/client/generated/order/reportOrder/index.d.ts +8 -0
  20. package/dist/client/generated/order/reportOrder/index.js +17 -0
  21. package/dist/client/generated/partner/index.d.ts +12 -0
  22. package/dist/client/generated/partner/index.js +14 -0
  23. package/dist/client/generated/priceList/index.d.ts +12 -0
  24. package/dist/client/generated/priceList/index.js +14 -0
  25. package/dist/client/generated/product/hasStock/index.d.ts +8 -0
  26. package/dist/client/generated/product/hasStock/index.js +17 -0
  27. package/dist/client/generated/product/index.d.ts +33 -0
  28. package/dist/client/generated/product/index.js +37 -0
  29. package/dist/client/generated/publisher/index.d.ts +12 -0
  30. package/dist/client/generated/publisher/index.js +14 -0
  31. package/dist/client/generated/region/index.d.ts +14 -0
  32. package/dist/client/generated/region/index.js +14 -0
  33. package/dist/client/generated/reservation/index.d.ts +11 -0
  34. package/dist/client/generated/reservation/index.js +25 -0
  35. package/dist/client/generated/reservation/item/cancel/index.d.ts +8 -0
  36. package/dist/client/generated/reservation/item/cancel/index.js +14 -0
  37. package/dist/client/generated/reservation/item/index.d.ts +11 -0
  38. package/dist/client/generated/reservation/item/index.js +20 -0
  39. package/dist/client/missionControlEnvironment.d.ts +6 -0
  40. package/dist/client/missionControlEnvironment.js +21 -0
  41. package/dist/client/missionControlHandlers.d.ts +2 -0
  42. package/dist/client/missionControlHandlers.js +34 -0
  43. package/dist/client/missionControlHeaders.d.ts +3 -0
  44. package/dist/client/missionControlHeaders.js +3 -0
  45. package/dist/client/nonIdempotentPaths.d.ts +1 -0
  46. package/dist/client/nonIdempotentPaths.js +5 -0
  47. package/dist/client/partnerIdHandler.d.ts +8 -0
  48. package/dist/client/partnerIdHandler.js +14 -0
  49. package/dist/index.d.ts +5 -0
  50. package/dist/index.js +3 -0
  51. package/package.json +15 -3
  52. package/.env.local.example +0 -9
  53. package/src/client/autoCancelOrderHandler.ts +0 -135
  54. package/src/client/clientBuilder.ts +0 -139
  55. package/src/client/generated/kiota-lock.json +0 -34
  56. package/src/client/generated/models/index.ts +0 -1723
  57. package/src/client/generated/order/cancelOrder/index.ts +0 -53
  58. package/src/client/generated/order/claimReservation/index.ts +0 -34
  59. package/src/client/generated/order/claimReservation/item/index.ts +0 -53
  60. package/src/client/generated/order/createOrder/index.ts +0 -53
  61. package/src/client/generated/order/index.ts +0 -112
  62. package/src/client/generated/order/reportOrder/index.ts +0 -53
  63. package/src/client/generated/partner/index.ts +0 -55
  64. package/src/client/generated/priceList/index.ts +0 -55
  65. package/src/client/generated/product/hasStock/index.ts +0 -53
  66. package/src/client/generated/product/index.ts +0 -119
  67. package/src/client/generated/publisher/index.ts +0 -55
  68. package/src/client/generated/region/index.ts +0 -63
  69. package/src/client/generated/reservation/index.ts +0 -71
  70. package/src/client/generated/reservation/item/cancel/index.ts +0 -48
  71. package/src/client/generated/reservation/item/index.ts +0 -62
  72. package/src/client/missionControlEnvironment.ts +0 -32
  73. package/src/client/missionControlHandlers.ts +0 -61
  74. package/src/client/missionControlHeaders.ts +0 -10
  75. package/src/client/nonIdempotentPaths.ts +0 -9
  76. package/src/client/partnerIdHandler.ts +0 -33
  77. package/tests/autoCancelOrderHandler.test.ts +0 -263
  78. package/tests/clientBuilder.test.ts +0 -154
  79. package/tests/integration/fixture.ts +0 -50
  80. package/tests/integration/partner.test.ts +0 -32
  81. package/tests/integration/priceList.test.ts +0 -28
  82. package/tests/integration/product.test.ts +0 -30
  83. package/tests/integration/publisher.test.ts +0 -30
  84. package/tests/integration/region.test.ts +0 -36
  85. package/tests/integration/setup.ts +0 -22
  86. package/tests/missionControlEnvironment.test.ts +0 -66
  87. package/tests/missionControlHeaders.test.ts +0 -20
  88. package/tsconfig.json +0 -18
  89. package/vitest.config.ts +0 -8
  90. package/vitest.integration.config.ts +0 -9
@@ -1,1723 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- // Generated by Microsoft Kiota
4
- // @ts-ignore
5
- import { type AdditionalDataHolder, type ApiError, type Guid, type Parsable, type ParseNode, type SerializationWriter } from '@microsoft/kiota-abstractions';
6
-
7
- /**
8
- * Represents the archiving status and metadata of an entity.
9
- */
10
- export interface ArchivingInfo extends Parsable {
11
- /**
12
- * When the entity was archived
13
- */
14
- archivedOnUtc?: Date | null;
15
- /**
16
- * Whether the entity is archived
17
- */
18
- isArchived?: boolean | null;
19
- }
20
- /**
21
- * Browser information of the end consumer that placed the order
22
- */
23
- export interface Browser extends Parsable {
24
- /**
25
- * The value of the Accept-Language header sent by the consumer's browser.
26
- */
27
- acceptLanguage?: string | null;
28
- /**
29
- * The value of the User-Agent header sent by the consumer's browser.
30
- */
31
- userAgent?: string | null;
32
- }
33
- /**
34
- * Request to cancel an order.
35
- */
36
- export interface CancelOrderRequest extends Parsable {
37
- /**
38
- * Request id used when creating the order.
39
- */
40
- originalRequestId?: Guid | null;
41
- }
42
- /**
43
- * Request to send when claiming a reservation
44
- */
45
- export interface ClaimReservationRequest extends Parsable {
46
- /**
47
- * Represents the end consumer who buys a key.
48
- */
49
- endConsumer?: Consumer | null;
50
- /**
51
- * The date the consumer placed the order for a key.
52
- */
53
- invoiceDate?: Date | null;
54
- /**
55
- * Reference of the transaction in the partner's system.
56
- */
57
- partnerReference?: string | null;
58
- /**
59
- * Uniquely identifies this request. Must be unique for each request you make. In case of errors, can be used for resolving.
60
- */
61
- requestId?: Guid | null;
62
- /**
63
- * An ordered list of partner IDs representing the sales channel through which the key is transferredon its way to the end consumer. Each ID in the list corresponds to a partner involvedin the distribution process, and the order of the list reflects the sequence in which the key passesthrough the partners. If the actor sells the key directly to the end consumer, this list can be empty. However, if the actoris a distributor, the partner IDs of the e-tailer(s) or other intermediaries must be provided in the exactorder that the key moves through them before reaching the consumer.
64
- */
65
- salesChannel?: Guid[] | null;
66
- /**
67
- * Represents a sales price including VAT details. Both the price and VAT details are required. One and only one of the VAT details must be set.
68
- */
69
- salesPrice?: SalesPriceRequest | null;
70
- }
71
- /**
72
- * Represents the end consumer who buys a key.
73
- */
74
- export interface Consumer extends Parsable {
75
- /**
76
- * Browser information of the end consumer that placed the order
77
- */
78
- browser?: Browser | null;
79
- /**
80
- * IP-address of the consumer the key will be delivered to.
81
- */
82
- ipAddress?: string | null;
83
- /**
84
- * The language preference of the end consumer (e.g., "en-US", "nl-NL", "en").Redemption instructions will be returned in the specified language if available, or in a suitable fallback language if not.
85
- */
86
- language?: string | null;
87
- /**
88
- * Location of the consumer.
89
- */
90
- location?: Location | null;
91
- }
92
- /**
93
- * Creates a new instance of the appropriate class based on discriminator value
94
- * @param parseNode The parse node to use to read the discriminator value and create the object
95
- * @returns {ArchivingInfo}
96
- */
97
- // @ts-ignore
98
- export function createArchivingInfoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
99
- return deserializeIntoArchivingInfo;
100
- }
101
- /**
102
- * Creates a new instance of the appropriate class based on discriminator value
103
- * @param parseNode The parse node to use to read the discriminator value and create the object
104
- * @returns {Browser}
105
- */
106
- // @ts-ignore
107
- export function createBrowserFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
108
- return deserializeIntoBrowser;
109
- }
110
- /**
111
- * Creates a new instance of the appropriate class based on discriminator value
112
- * @param parseNode The parse node to use to read the discriminator value and create the object
113
- * @returns {CancelOrderRequest}
114
- */
115
- // @ts-ignore
116
- export function createCancelOrderRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
117
- return deserializeIntoCancelOrderRequest;
118
- }
119
- /**
120
- * Creates a new instance of the appropriate class based on discriminator value
121
- * @param parseNode The parse node to use to read the discriminator value and create the object
122
- * @returns {ClaimReservationRequest}
123
- */
124
- // @ts-ignore
125
- export function createClaimReservationRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
126
- return deserializeIntoClaimReservationRequest;
127
- }
128
- /**
129
- * Creates a new instance of the appropriate class based on discriminator value
130
- * @param parseNode The parse node to use to read the discriminator value and create the object
131
- * @returns {Consumer}
132
- */
133
- // @ts-ignore
134
- export function createConsumerFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
135
- return deserializeIntoConsumer;
136
- }
137
- /**
138
- * Creates a new instance of the appropriate class based on discriminator value
139
- * @param parseNode The parse node to use to read the discriminator value and create the object
140
- * @returns {CreateOrderRequest}
141
- */
142
- // @ts-ignore
143
- export function createCreateOrderRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
144
- return deserializeIntoCreateOrderRequest;
145
- }
146
- /**
147
- * Creates a new instance of the appropriate class based on discriminator value
148
- * @param parseNode The parse node to use to read the discriminator value and create the object
149
- * @returns {CreateReservationRequest}
150
- */
151
- // @ts-ignore
152
- export function createCreateReservationRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
153
- return deserializeIntoCreateReservationRequest;
154
- }
155
- /**
156
- * Creates a new instance of the appropriate class based on discriminator value
157
- * @param parseNode The parse node to use to read the discriminator value and create the object
158
- * @returns {Deduction}
159
- */
160
- // @ts-ignore
161
- export function createDeductionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
162
- return deserializeIntoDeduction;
163
- }
164
- /**
165
- * Creates a new instance of the appropriate class based on discriminator value
166
- * @param parseNode The parse node to use to read the discriminator value and create the object
167
- * @returns {HasStockRequest}
168
- */
169
- // @ts-ignore
170
- export function createHasStockRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
171
- return deserializeIntoHasStockRequest;
172
- }
173
- /**
174
- * Creates a new instance of the appropriate class based on discriminator value
175
- * @param parseNode The parse node to use to read the discriminator value and create the object
176
- * @returns {HasStockResponse}
177
- */
178
- // @ts-ignore
179
- export function createHasStockResponseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
180
- return deserializeIntoHasStockResponse;
181
- }
182
- /**
183
- * Creates a new instance of the appropriate class based on discriminator value
184
- * @param parseNode The parse node to use to read the discriminator value and create the object
185
- * @returns {Key}
186
- */
187
- // @ts-ignore
188
- export function createKeyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
189
- return deserializeIntoKey;
190
- }
191
- /**
192
- * Creates a new instance of the appropriate class based on discriminator value
193
- * @param parseNode The parse node to use to read the discriminator value and create the object
194
- * @returns {Location}
195
- */
196
- // @ts-ignore
197
- export function createLocationFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
198
- return deserializeIntoLocation;
199
- }
200
- /**
201
- * Creates a new instance of the appropriate class based on discriminator value
202
- * @param parseNode The parse node to use to read the discriminator value and create the object
203
- * @returns {Money}
204
- */
205
- // @ts-ignore
206
- export function createMoneyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
207
- return deserializeIntoMoney;
208
- }
209
- /**
210
- * Creates a new instance of the appropriate class based on discriminator value
211
- * @param parseNode The parse node to use to read the discriminator value and create the object
212
- * @returns {Order}
213
- */
214
- // @ts-ignore
215
- export function createOrderFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
216
- return deserializeIntoOrder;
217
- }
218
- /**
219
- * Creates a new instance of the appropriate class based on discriminator value
220
- * @param parseNode The parse node to use to read the discriminator value and create the object
221
- * @returns {OrderListResult}
222
- */
223
- // @ts-ignore
224
- export function createOrderListResultFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
225
- return deserializeIntoOrderListResult;
226
- }
227
- /**
228
- * Request to create an order for buying a key.
229
- */
230
- export interface CreateOrderRequest extends Parsable {
231
- /**
232
- * Represents the end consumer who buys a key.
233
- */
234
- endConsumer?: Consumer | null;
235
- /**
236
- * The date the consumer placed the order for a key.
237
- */
238
- invoiceDate?: Date | null;
239
- /**
240
- * Reference of the transaction in the partner's system.
241
- */
242
- partnerReference?: string | null;
243
- /**
244
- * Unique identifier of the product to buy.
245
- */
246
- productId?: Guid | null;
247
- /**
248
- * Unique identifier of the region in which the key is valid.
249
- */
250
- regionId?: Guid | null;
251
- /**
252
- * Uniquely identifies this request. Must be unique for each request you make. In case of errors, can be used for resolving.
253
- */
254
- requestId?: Guid | null;
255
- /**
256
- * An ordered list of partner IDs representing the sales channel through which the key is transferredon its way to the end consumer. Each ID in the list corresponds to a partner involvedin the distribution process, and the order of the list reflects the sequence in which the key passesthrough the partners. If the actor sells the key directly to the end consumer, this list can be empty. However, if the actoris a distributor, the partner IDs of the e-tailer(s) or other intermediaries must be provided in the exactorder that the key moves through them before reaching the consumer.
257
- */
258
- salesChannel?: Guid[] | null;
259
- /**
260
- * Represents a sales price including VAT details. Both the price and VAT details are required. One and only one of the VAT details must be set.
261
- */
262
- salesPrice?: SalesPriceRequest | null;
263
- }
264
- /**
265
- * Creates a new instance of the appropriate class based on discriminator value
266
- * @param parseNode The parse node to use to read the discriminator value and create the object
267
- * @returns {Partner}
268
- */
269
- // @ts-ignore
270
- export function createPartnerFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
271
- return deserializeIntoPartner;
272
- }
273
- /**
274
- * Creates a new instance of the appropriate class based on discriminator value
275
- * @param parseNode The parse node to use to read the discriminator value and create the object
276
- * @returns {PartnerListResult}
277
- */
278
- // @ts-ignore
279
- export function createPartnerListResultFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
280
- return deserializeIntoPartnerListResult;
281
- }
282
- /**
283
- * Creates a new instance of the appropriate class based on discriminator value
284
- * @param parseNode The parse node to use to read the discriminator value and create the object
285
- * @returns {PriceList}
286
- */
287
- // @ts-ignore
288
- export function createPriceListFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
289
- return deserializeIntoPriceList;
290
- }
291
- /**
292
- * Creates a new instance of the appropriate class based on discriminator value
293
- * @param parseNode The parse node to use to read the discriminator value and create the object
294
- * @returns {PriceListItem}
295
- */
296
- // @ts-ignore
297
- export function createPriceListItemFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
298
- return deserializeIntoPriceListItem;
299
- }
300
- /**
301
- * Creates a new instance of the appropriate class based on discriminator value
302
- * @param parseNode The parse node to use to read the discriminator value and create the object
303
- * @returns {ProblemDetails}
304
- */
305
- // @ts-ignore
306
- export function createProblemDetailsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
307
- return deserializeIntoProblemDetails;
308
- }
309
- /**
310
- * Creates a new instance of the appropriate class based on discriminator value
311
- * @param parseNode The parse node to use to read the discriminator value and create the object
312
- * @returns {Product}
313
- */
314
- // @ts-ignore
315
- export function createProductFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
316
- return deserializeIntoProduct;
317
- }
318
- /**
319
- * Creates a new instance of the appropriate class based on discriminator value
320
- * @param parseNode The parse node to use to read the discriminator value and create the object
321
- * @returns {ProductListResult}
322
- */
323
- // @ts-ignore
324
- export function createProductListResultFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
325
- return deserializeIntoProductListResult;
326
- }
327
- /**
328
- * Creates a new instance of the appropriate class based on discriminator value
329
- * @param parseNode The parse node to use to read the discriminator value and create the object
330
- * @returns {Publisher}
331
- */
332
- // @ts-ignore
333
- export function createPublisherFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
334
- return deserializeIntoPublisher;
335
- }
336
- /**
337
- * Creates a new instance of the appropriate class based on discriminator value
338
- * @param parseNode The parse node to use to read the discriminator value and create the object
339
- * @returns {PublisherListResult}
340
- */
341
- // @ts-ignore
342
- export function createPublisherListResultFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
343
- return deserializeIntoPublisherListResult;
344
- }
345
- /**
346
- * Creates a new instance of the appropriate class based on discriminator value
347
- * @param parseNode The parse node to use to read the discriminator value and create the object
348
- * @returns {RedemptionInstruction}
349
- */
350
- // @ts-ignore
351
- export function createRedemptionInstructionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
352
- return deserializeIntoRedemptionInstruction;
353
- }
354
- /**
355
- * Creates a new instance of the appropriate class based on discriminator value
356
- * @param parseNode The parse node to use to read the discriminator value and create the object
357
- * @returns {Region}
358
- */
359
- // @ts-ignore
360
- export function createRegionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
361
- return deserializeIntoRegion;
362
- }
363
- /**
364
- * Creates a new instance of the appropriate class based on discriminator value
365
- * @param parseNode The parse node to use to read the discriminator value and create the object
366
- * @returns {RegionListResult}
367
- */
368
- // @ts-ignore
369
- export function createRegionListResultFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
370
- return deserializeIntoRegionListResult;
371
- }
372
- /**
373
- * Creates a new instance of the appropriate class based on discriminator value
374
- * @param parseNode The parse node to use to read the discriminator value and create the object
375
- * @returns {ReportOrderRequest}
376
- */
377
- // @ts-ignore
378
- export function createReportOrderRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
379
- return deserializeIntoReportOrderRequest;
380
- }
381
- /**
382
- * Creates a new instance of the appropriate class based on discriminator value
383
- * @param parseNode The parse node to use to read the discriminator value and create the object
384
- * @returns {Reservation}
385
- */
386
- // @ts-ignore
387
- export function createReservationFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
388
- return deserializeIntoReservation;
389
- }
390
- /**
391
- * Request to send to create a reservation.
392
- */
393
- export interface CreateReservationRequest extends Parsable {
394
- /**
395
- * Unique identifier of the product to reserve.
396
- */
397
- productId?: Guid | null;
398
- /**
399
- * Unique identifier of the region in which the key is valid.
400
- */
401
- regionId?: Guid | null;
402
- }
403
- /**
404
- * Creates a new instance of the appropriate class based on discriminator value
405
- * @param parseNode The parse node to use to read the discriminator value and create the object
406
- * @returns {SalesPriceRequest}
407
- */
408
- // @ts-ignore
409
- export function createSalesPriceRequestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
410
- return deserializeIntoSalesPriceRequest;
411
- }
412
- /**
413
- * Creates a new instance of the appropriate class based on discriminator value
414
- * @param parseNode The parse node to use to read the discriminator value and create the object
415
- * @returns {VatDetail}
416
- */
417
- // @ts-ignore
418
- export function createVatDetailFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record<string, (node: ParseNode) => void>) {
419
- return deserializeIntoVatDetail;
420
- }
421
- /**
422
- * Represents a deduction applied to a sale, such as a fee or discount.A deduction can reduce the total sale amount or represent an additional charge,depending on the type. Common examples include payment fees, affiliate fees, or promotional discounts.
423
- */
424
- export interface Deduction extends Parsable {
425
- /**
426
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
427
- */
428
- amount?: Money | null;
429
- /**
430
- * The name or description of the deduction.This is only required when the deduction type is MissionControl.Domain.Sales.Values.DeductionType.Other.It allows you to specify a custom deduction that does not fit into predefined categories.
431
- */
432
- name?: string | null;
433
- /**
434
- * The type of the deduction. Possible values are:1 = "Other", 2 = "PaymentFee", and 3 = "AffiliateFee".The deduction type defines the nature of the fee or discount.If the type is set to Other, a custom Name must be provided.
435
- */
436
- type?: number | null;
437
- }
438
- /**
439
- * The deserialization information for the current model
440
- * @param ArchivingInfo The instance to deserialize into.
441
- * @returns {Record<string, (node: ParseNode) => void>}
442
- */
443
- // @ts-ignore
444
- export function deserializeIntoArchivingInfo(archivingInfo: Partial<ArchivingInfo> | undefined = {}) : Record<string, (node: ParseNode) => void> {
445
- return {
446
- "archivedOnUtc": n => { archivingInfo.archivedOnUtc = n.getDateValue(); },
447
- "isArchived": n => { archivingInfo.isArchived = n.getBooleanValue(); },
448
- }
449
- }
450
- /**
451
- * The deserialization information for the current model
452
- * @param Browser The instance to deserialize into.
453
- * @returns {Record<string, (node: ParseNode) => void>}
454
- */
455
- // @ts-ignore
456
- export function deserializeIntoBrowser(browser: Partial<Browser> | undefined = {}) : Record<string, (node: ParseNode) => void> {
457
- return {
458
- "acceptLanguage": n => { browser.acceptLanguage = n.getStringValue(); },
459
- "userAgent": n => { browser.userAgent = n.getStringValue(); },
460
- }
461
- }
462
- /**
463
- * The deserialization information for the current model
464
- * @param CancelOrderRequest The instance to deserialize into.
465
- * @returns {Record<string, (node: ParseNode) => void>}
466
- */
467
- // @ts-ignore
468
- export function deserializeIntoCancelOrderRequest(cancelOrderRequest: Partial<CancelOrderRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
469
- return {
470
- "originalRequestId": n => { cancelOrderRequest.originalRequestId = n.getGuidValue(); },
471
- }
472
- }
473
- /**
474
- * The deserialization information for the current model
475
- * @param ClaimReservationRequest The instance to deserialize into.
476
- * @returns {Record<string, (node: ParseNode) => void>}
477
- */
478
- // @ts-ignore
479
- export function deserializeIntoClaimReservationRequest(claimReservationRequest: Partial<ClaimReservationRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
480
- return {
481
- "endConsumer": n => { claimReservationRequest.endConsumer = n.getObjectValue<Consumer>(createConsumerFromDiscriminatorValue); },
482
- "invoiceDate": n => { claimReservationRequest.invoiceDate = n.getDateValue(); },
483
- "partnerReference": n => { claimReservationRequest.partnerReference = n.getStringValue(); },
484
- "requestId": n => { claimReservationRequest.requestId = n.getGuidValue(); },
485
- "salesChannel": n => { claimReservationRequest.salesChannel = n.getCollectionOfPrimitiveValues<Guid>("string"); },
486
- "salesPrice": n => { claimReservationRequest.salesPrice = n.getObjectValue<SalesPriceRequest>(createSalesPriceRequestFromDiscriminatorValue); },
487
- }
488
- }
489
- /**
490
- * The deserialization information for the current model
491
- * @param Consumer The instance to deserialize into.
492
- * @returns {Record<string, (node: ParseNode) => void>}
493
- */
494
- // @ts-ignore
495
- export function deserializeIntoConsumer(consumer: Partial<Consumer> | undefined = {}) : Record<string, (node: ParseNode) => void> {
496
- return {
497
- "browser": n => { consumer.browser = n.getObjectValue<Browser>(createBrowserFromDiscriminatorValue); },
498
- "ipAddress": n => { consumer.ipAddress = n.getStringValue(); },
499
- "language": n => { consumer.language = n.getStringValue(); },
500
- "location": n => { consumer.location = n.getObjectValue<Location>(createLocationFromDiscriminatorValue); },
501
- }
502
- }
503
- /**
504
- * The deserialization information for the current model
505
- * @param CreateOrderRequest The instance to deserialize into.
506
- * @returns {Record<string, (node: ParseNode) => void>}
507
- */
508
- // @ts-ignore
509
- export function deserializeIntoCreateOrderRequest(createOrderRequest: Partial<CreateOrderRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
510
- return {
511
- "endConsumer": n => { createOrderRequest.endConsumer = n.getObjectValue<Consumer>(createConsumerFromDiscriminatorValue); },
512
- "invoiceDate": n => { createOrderRequest.invoiceDate = n.getDateValue(); },
513
- "partnerReference": n => { createOrderRequest.partnerReference = n.getStringValue(); },
514
- "productId": n => { createOrderRequest.productId = n.getGuidValue(); },
515
- "regionId": n => { createOrderRequest.regionId = n.getGuidValue(); },
516
- "requestId": n => { createOrderRequest.requestId = n.getGuidValue(); },
517
- "salesChannel": n => { createOrderRequest.salesChannel = n.getCollectionOfPrimitiveValues<Guid>("string"); },
518
- "salesPrice": n => { createOrderRequest.salesPrice = n.getObjectValue<SalesPriceRequest>(createSalesPriceRequestFromDiscriminatorValue); },
519
- }
520
- }
521
- /**
522
- * The deserialization information for the current model
523
- * @param CreateReservationRequest The instance to deserialize into.
524
- * @returns {Record<string, (node: ParseNode) => void>}
525
- */
526
- // @ts-ignore
527
- export function deserializeIntoCreateReservationRequest(createReservationRequest: Partial<CreateReservationRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
528
- return {
529
- "productId": n => { createReservationRequest.productId = n.getGuidValue(); },
530
- "regionId": n => { createReservationRequest.regionId = n.getGuidValue(); },
531
- }
532
- }
533
- /**
534
- * The deserialization information for the current model
535
- * @param Deduction The instance to deserialize into.
536
- * @returns {Record<string, (node: ParseNode) => void>}
537
- */
538
- // @ts-ignore
539
- export function deserializeIntoDeduction(deduction: Partial<Deduction> | undefined = {}) : Record<string, (node: ParseNode) => void> {
540
- return {
541
- "amount": n => { deduction.amount = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
542
- "name": n => { deduction.name = n.getStringValue(); },
543
- "type": n => { deduction.type = n.getNumberValue(); },
544
- }
545
- }
546
- /**
547
- * The deserialization information for the current model
548
- * @param HasStockRequest The instance to deserialize into.
549
- * @returns {Record<string, (node: ParseNode) => void>}
550
- */
551
- // @ts-ignore
552
- export function deserializeIntoHasStockRequest(hasStockRequest: Partial<HasStockRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
553
- return {
554
- "productId": n => { hasStockRequest.productId = n.getGuidValue(); },
555
- "regionId": n => { hasStockRequest.regionId = n.getGuidValue(); },
556
- }
557
- }
558
- /**
559
- * The deserialization information for the current model
560
- * @param HasStockResponse The instance to deserialize into.
561
- * @returns {Record<string, (node: ParseNode) => void>}
562
- */
563
- // @ts-ignore
564
- export function deserializeIntoHasStockResponse(hasStockResponse: Partial<HasStockResponse> | undefined = {}) : Record<string, (node: ParseNode) => void> {
565
- return {
566
- "hasStock": n => { hasStockResponse.hasStock = n.getBooleanValue(); },
567
- }
568
- }
569
- /**
570
- * The deserialization information for the current model
571
- * @param Key The instance to deserialize into.
572
- * @returns {Record<string, (node: ParseNode) => void>}
573
- */
574
- // @ts-ignore
575
- export function deserializeIntoKey(key: Partial<Key> | undefined = {}) : Record<string, (node: ParseNode) => void> {
576
- return {
577
- "reference": n => { key.reference = n.getStringValue(); },
578
- "value": n => { key.value = n.getStringValue(); },
579
- }
580
- }
581
- /**
582
- * The deserialization information for the current model
583
- * @param Location The instance to deserialize into.
584
- * @returns {Record<string, (node: ParseNode) => void>}
585
- */
586
- // @ts-ignore
587
- export function deserializeIntoLocation(location: Partial<Location> | undefined = {}) : Record<string, (node: ParseNode) => void> {
588
- return {
589
- "city": n => { location.city = n.getStringValue(); },
590
- "countryCode": n => { location.countryCode = n.getStringValue(); },
591
- "region": n => { location.region = n.getStringValue(); },
592
- }
593
- }
594
- /**
595
- * The deserialization information for the current model
596
- * @param Money The instance to deserialize into.
597
- * @returns {Record<string, (node: ParseNode) => void>}
598
- */
599
- // @ts-ignore
600
- export function deserializeIntoMoney(money: Partial<Money> | undefined = {}) : Record<string, (node: ParseNode) => void> {
601
- return {
602
- "currencyCode": n => { money.currencyCode = n.getStringValue(); },
603
- "value": n => { money.value = n.getNumberValue(); },
604
- }
605
- }
606
- /**
607
- * The deserialization information for the current model
608
- * @param Order The instance to deserialize into.
609
- * @returns {Record<string, (node: ParseNode) => void>}
610
- */
611
- // @ts-ignore
612
- export function deserializeIntoOrder(order: Partial<Order> | undefined = {}) : Record<string, (node: ParseNode) => void> {
613
- return {
614
- "created": n => { order.created = n.getDateValue(); },
615
- "id": n => { order.id = n.getGuidValue(); },
616
- "key": n => { order.key = n.getObjectValue<Key>(createKeyFromDiscriminatorValue); },
617
- "msrp": n => { order.msrp = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
618
- "partnerId": n => { order.partnerId = n.getGuidValue(); },
619
- "partnerReference": n => { order.partnerReference = n.getStringValue(); },
620
- "productId": n => { order.productId = n.getGuidValue(); },
621
- "productName": n => { order.productName = n.getStringValue(); },
622
- "publisherId": n => { order.publisherId = n.getGuidValue(); },
623
- "redemptionInstruction": n => { order.redemptionInstruction = n.getObjectValue<RedemptionInstruction>(createRedemptionInstructionFromDiscriminatorValue); },
624
- "regionId": n => { order.regionId = n.getGuidValue(); },
625
- "regionName": n => { order.regionName = n.getStringValue(); },
626
- "requestId": n => { order.requestId = n.getGuidValue(); },
627
- "statusId": n => { order.statusId = n.getNumberValue(); },
628
- "statusText": n => { order.statusText = n.getStringValue(); },
629
- }
630
- }
631
- /**
632
- * The deserialization information for the current model
633
- * @param OrderListResult The instance to deserialize into.
634
- * @returns {Record<string, (node: ParseNode) => void>}
635
- */
636
- // @ts-ignore
637
- export function deserializeIntoOrderListResult(orderListResult: Partial<OrderListResult> | undefined = {}) : Record<string, (node: ParseNode) => void> {
638
- return {
639
- "pageCount": n => { orderListResult.pageCount = n.getNumberValue(); },
640
- "result": n => { orderListResult.result = n.getCollectionOfObjectValues<Order>(createOrderFromDiscriminatorValue); },
641
- "totalCount": n => { orderListResult.totalCount = n.getNumberValue(); },
642
- }
643
- }
644
- /**
645
- * The deserialization information for the current model
646
- * @param Partner The instance to deserialize into.
647
- * @returns {Record<string, (node: ParseNode) => void>}
648
- */
649
- // @ts-ignore
650
- export function deserializeIntoPartner(partner: Partial<Partner> | undefined = {}) : Record<string, (node: ParseNode) => void> {
651
- return {
652
- "hubSpotUrl": n => { partner.hubSpotUrl = n.getStringValue(); },
653
- "id": n => { partner.id = n.getGuidValue(); },
654
- "name": n => { partner.name = n.getStringValue(); },
655
- }
656
- }
657
- /**
658
- * The deserialization information for the current model
659
- * @param PartnerListResult The instance to deserialize into.
660
- * @returns {Record<string, (node: ParseNode) => void>}
661
- */
662
- // @ts-ignore
663
- export function deserializeIntoPartnerListResult(partnerListResult: Partial<PartnerListResult> | undefined = {}) : Record<string, (node: ParseNode) => void> {
664
- return {
665
- "pageCount": n => { partnerListResult.pageCount = n.getNumberValue(); },
666
- "result": n => { partnerListResult.result = n.getCollectionOfObjectValues<Partner>(createPartnerFromDiscriminatorValue); },
667
- "totalCount": n => { partnerListResult.totalCount = n.getNumberValue(); },
668
- }
669
- }
670
- /**
671
- * The deserialization information for the current model
672
- * @param PriceList The instance to deserialize into.
673
- * @returns {Record<string, (node: ParseNode) => void>}
674
- */
675
- // @ts-ignore
676
- export function deserializeIntoPriceList(priceList: Partial<PriceList> | undefined = {}) : Record<string, (node: ParseNode) => void> {
677
- return {
678
- "prices": n => { priceList.prices = n.getCollectionOfObjectValues<PriceListItem>(createPriceListItemFromDiscriminatorValue); },
679
- "productId": n => { priceList.productId = n.getGuidValue(); },
680
- }
681
- }
682
- /**
683
- * The deserialization information for the current model
684
- * @param PriceListItem The instance to deserialize into.
685
- * @returns {Record<string, (node: ParseNode) => void>}
686
- */
687
- // @ts-ignore
688
- export function deserializeIntoPriceListItem(priceListItem: Partial<PriceListItem> | undefined = {}) : Record<string, (node: ParseNode) => void> {
689
- return {
690
- "countryCode": n => { priceListItem.countryCode = n.getStringValue(); },
691
- "msrp": n => { priceListItem.msrp = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
692
- }
693
- }
694
- /**
695
- * The deserialization information for the current model
696
- * @param ProblemDetails The instance to deserialize into.
697
- * @returns {Record<string, (node: ParseNode) => void>}
698
- */
699
- // @ts-ignore
700
- export function deserializeIntoProblemDetails(problemDetails: Partial<ProblemDetails> | undefined = {}) : Record<string, (node: ParseNode) => void> {
701
- return {
702
- "detail": n => { problemDetails.detail = n.getStringValue(); },
703
- "instance": n => { problemDetails.instance = n.getStringValue(); },
704
- "status": n => { problemDetails.status = n.getNumberValue(); },
705
- "title": n => { problemDetails.title = n.getStringValue(); },
706
- "type": n => { problemDetails.type = n.getStringValue(); },
707
- }
708
- }
709
- /**
710
- * The deserialization information for the current model
711
- * @param Product The instance to deserialize into.
712
- * @returns {Record<string, (node: ParseNode) => void>}
713
- */
714
- // @ts-ignore
715
- export function deserializeIntoProduct(product: Partial<Product> | undefined = {}) : Record<string, (node: ParseNode) => void> {
716
- return {
717
- "allowedRegions": n => { product.allowedRegions = n.getCollectionOfPrimitiveValues<Guid>("string"); },
718
- "canBeReserved": n => { product.canBeReserved = n.getBooleanValue(); },
719
- "id": n => { product.id = n.getGuidValue(); },
720
- "msrp": n => { product.msrp = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
721
- "name": n => { product.name = n.getStringValue(); },
722
- "platformId": n => { product.platformId = n.getNumberValue(); },
723
- "platformName": n => { product.platformName = n.getStringValue(); },
724
- "productTypeDescription": n => { product.productTypeDescription = n.getStringValue(); },
725
- "productTypeId": n => { product.productTypeId = n.getNumberValue(); },
726
- "publisherId": n => { product.publisherId = n.getGuidValue(); },
727
- "releaseDate": n => { product.releaseDate = n.getDateValue(); },
728
- }
729
- }
730
- /**
731
- * The deserialization information for the current model
732
- * @param ProductListResult The instance to deserialize into.
733
- * @returns {Record<string, (node: ParseNode) => void>}
734
- */
735
- // @ts-ignore
736
- export function deserializeIntoProductListResult(productListResult: Partial<ProductListResult> | undefined = {}) : Record<string, (node: ParseNode) => void> {
737
- return {
738
- "pageCount": n => { productListResult.pageCount = n.getNumberValue(); },
739
- "result": n => { productListResult.result = n.getCollectionOfObjectValues<Product>(createProductFromDiscriminatorValue); },
740
- "totalCount": n => { productListResult.totalCount = n.getNumberValue(); },
741
- }
742
- }
743
- /**
744
- * The deserialization information for the current model
745
- * @param Publisher The instance to deserialize into.
746
- * @returns {Record<string, (node: ParseNode) => void>}
747
- */
748
- // @ts-ignore
749
- export function deserializeIntoPublisher(publisher: Partial<Publisher> | undefined = {}) : Record<string, (node: ParseNode) => void> {
750
- return {
751
- "id": n => { publisher.id = n.getGuidValue(); },
752
- "imageUrl": n => { publisher.imageUrl = n.getStringValue(); },
753
- "name": n => { publisher.name = n.getStringValue(); },
754
- }
755
- }
756
- /**
757
- * The deserialization information for the current model
758
- * @param PublisherListResult The instance to deserialize into.
759
- * @returns {Record<string, (node: ParseNode) => void>}
760
- */
761
- // @ts-ignore
762
- export function deserializeIntoPublisherListResult(publisherListResult: Partial<PublisherListResult> | undefined = {}) : Record<string, (node: ParseNode) => void> {
763
- return {
764
- "pageCount": n => { publisherListResult.pageCount = n.getNumberValue(); },
765
- "result": n => { publisherListResult.result = n.getCollectionOfObjectValues<Publisher>(createPublisherFromDiscriminatorValue); },
766
- "totalCount": n => { publisherListResult.totalCount = n.getNumberValue(); },
767
- }
768
- }
769
- /**
770
- * The deserialization information for the current model
771
- * @param RedemptionInstruction The instance to deserialize into.
772
- * @returns {Record<string, (node: ParseNode) => void>}
773
- */
774
- // @ts-ignore
775
- export function deserializeIntoRedemptionInstruction(redemptionInstruction: Partial<RedemptionInstruction> | undefined = {}) : Record<string, (node: ParseNode) => void> {
776
- return {
777
- "languageCode": n => { redemptionInstruction.languageCode = n.getStringValue(); },
778
- "text": n => { redemptionInstruction.text = n.getStringValue(); },
779
- }
780
- }
781
- /**
782
- * The deserialization information for the current model
783
- * @param Region The instance to deserialize into.
784
- * @returns {Record<string, (node: ParseNode) => void>}
785
- */
786
- // @ts-ignore
787
- export function deserializeIntoRegion(region: Partial<Region> | undefined = {}) : Record<string, (node: ParseNode) => void> {
788
- return {
789
- "archiveInfo": n => { region.archiveInfo = n.getObjectValue<ArchivingInfo>(createArchivingInfoFromDiscriminatorValue); },
790
- "countries": n => { region.countries = n.getCollectionOfPrimitiveValues<string>("string"); },
791
- "id": n => { region.id = n.getGuidValue(); },
792
- "name": n => { region.name = n.getStringValue(); },
793
- }
794
- }
795
- /**
796
- * The deserialization information for the current model
797
- * @param RegionListResult The instance to deserialize into.
798
- * @returns {Record<string, (node: ParseNode) => void>}
799
- */
800
- // @ts-ignore
801
- export function deserializeIntoRegionListResult(regionListResult: Partial<RegionListResult> | undefined = {}) : Record<string, (node: ParseNode) => void> {
802
- return {
803
- "pageCount": n => { regionListResult.pageCount = n.getNumberValue(); },
804
- "result": n => { regionListResult.result = n.getCollectionOfObjectValues<Region>(createRegionFromDiscriminatorValue); },
805
- "totalCount": n => { regionListResult.totalCount = n.getNumberValue(); },
806
- }
807
- }
808
- /**
809
- * The deserialization information for the current model
810
- * @param ReportOrderRequest The instance to deserialize into.
811
- * @returns {Record<string, (node: ParseNode) => void>}
812
- */
813
- // @ts-ignore
814
- export function deserializeIntoReportOrderRequest(reportOrderRequest: Partial<ReportOrderRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
815
- return {
816
- "endConsumer": n => { reportOrderRequest.endConsumer = n.getObjectValue<Consumer>(createConsumerFromDiscriminatorValue); },
817
- "invoiceDate": n => { reportOrderRequest.invoiceDate = n.getDateValue(); },
818
- "partnerReference": n => { reportOrderRequest.partnerReference = n.getStringValue(); },
819
- "productId": n => { reportOrderRequest.productId = n.getGuidValue(); },
820
- "regionId": n => { reportOrderRequest.regionId = n.getGuidValue(); },
821
- "requestId": n => { reportOrderRequest.requestId = n.getGuidValue(); },
822
- "salesChannel": n => { reportOrderRequest.salesChannel = n.getCollectionOfPrimitiveValues<Guid>("string"); },
823
- "salesPrice": n => { reportOrderRequest.salesPrice = n.getObjectValue<SalesPriceRequest>(createSalesPriceRequestFromDiscriminatorValue); },
824
- }
825
- }
826
- /**
827
- * The deserialization information for the current model
828
- * @param Reservation The instance to deserialize into.
829
- * @returns {Record<string, (node: ParseNode) => void>}
830
- */
831
- // @ts-ignore
832
- export function deserializeIntoReservation(reservation: Partial<Reservation> | undefined = {}) : Record<string, (node: ParseNode) => void> {
833
- return {
834
- "expires": n => { reservation.expires = n.getDateValue(); },
835
- "id": n => { reservation.id = n.getGuidValue(); },
836
- "statusDescription": n => { reservation.statusDescription = n.getStringValue(); },
837
- "statusId": n => { reservation.statusId = n.getNumberValue(); },
838
- }
839
- }
840
- /**
841
- * The deserialization information for the current model
842
- * @param SalesPriceRequest The instance to deserialize into.
843
- * @returns {Record<string, (node: ParseNode) => void>}
844
- */
845
- // @ts-ignore
846
- export function deserializeIntoSalesPriceRequest(salesPriceRequest: Partial<SalesPriceRequest> | undefined = {}) : Record<string, (node: ParseNode) => void> {
847
- return {
848
- "deductions": n => { salesPriceRequest.deductions = n.getCollectionOfObjectValues<Deduction>(createDeductionFromDiscriminatorValue); },
849
- "priceIncludingVat": n => { salesPriceRequest.priceIncludingVat = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
850
- "vatDetail": n => { salesPriceRequest.vatDetail = n.getObjectValue<VatDetail>(createVatDetailFromDiscriminatorValue); },
851
- }
852
- }
853
- /**
854
- * The deserialization information for the current model
855
- * @param VatDetail The instance to deserialize into.
856
- * @returns {Record<string, (node: ParseNode) => void>}
857
- */
858
- // @ts-ignore
859
- export function deserializeIntoVatDetail(vatDetail: Partial<VatDetail> | undefined = {}) : Record<string, (node: ParseNode) => void> {
860
- return {
861
- "amount": n => { vatDetail.amount = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
862
- "priceExcludingVat": n => { vatDetail.priceExcludingVat = n.getObjectValue<Money>(createMoneyFromDiscriminatorValue); },
863
- "rate": n => { vatDetail.rate = n.getNumberValue(); },
864
- }
865
- }
866
- /**
867
- * Request to send to check if a product has stock.
868
- */
869
- export interface HasStockRequest extends Parsable {
870
- /**
871
- * Identifier of the product to buy.
872
- */
873
- productId?: Guid | null;
874
- /**
875
- * Identifier of the region.
876
- */
877
- regionId?: Guid | null;
878
- }
879
- /**
880
- * Response to a has stock request.
881
- */
882
- export interface HasStockResponse extends Parsable {
883
- /**
884
- * If set to true, the product has stock. If false, the product does not have stock.
885
- */
886
- hasStock?: boolean | null;
887
- }
888
- /**
889
- * An activation key for a product.
890
- */
891
- export interface Key extends Parsable {
892
- /**
893
- * External reference for the key. This value can be used for support purposes by the consumer, so they don't have to share the actual key.
894
- */
895
- reference?: string | null;
896
- /**
897
- * Value of the key, i.e. the actual activation key. Only filled in the response to a 'buy key' API call.
898
- */
899
- value?: string | null;
900
- }
901
- /**
902
- * Location of the consumer.
903
- */
904
- export interface Location extends Parsable {
905
- /**
906
- * City of the consumer.
907
- */
908
- city?: string | null;
909
- /**
910
- * ISO 3166-1 Alpha-2 code of the country of the consumer
911
- */
912
- countryCode?: string | null;
913
- /**
914
- * Region of the consumer. This can be a state, province or similar.
915
- */
916
- region?: string | null;
917
- }
918
- /**
919
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
920
- */
921
- export interface Money extends Parsable {
922
- /**
923
- * The three-letter ISO 4217 currency code that specifies the currency of the monetary value,such as "USD" for US Dollars or "EUR" for Euros.
924
- */
925
- currencyCode?: string | null;
926
- /**
927
- * The numeric amount of the monetary value. This represents the actual value in the specified currency.For example, 100.00 for 100 units of the CurrencyCode.
928
- */
929
- value?: number | null;
930
- }
931
- /**
932
- * Details of an order.
933
- */
934
- export interface Order extends Parsable {
935
- /**
936
- * Date/time this order was created.
937
- */
938
- created?: Date | null;
939
- /**
940
- * Unique identifier of the order.
941
- */
942
- id?: Guid | null;
943
- /**
944
- * An activation key for a product.
945
- */
946
- key?: Key | null;
947
- /**
948
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
949
- */
950
- msrp?: Money | null;
951
- /**
952
- * Id of the partner that placed the order.
953
- */
954
- partnerId?: Guid | null;
955
- /**
956
- * Reference provided by the partner when ordering the key.
957
- */
958
- partnerReference?: string | null;
959
- /**
960
- * Id of the ordered product.
961
- */
962
- productId?: Guid | null;
963
- /**
964
- * Name of the ordered product.
965
- */
966
- productName?: string | null;
967
- /**
968
- * Id of the publisher where the order was placed.
969
- */
970
- publisherId?: Guid | null;
971
- /**
972
- * Represents information about how to redeem a purchased key.
973
- */
974
- redemptionInstruction?: RedemptionInstruction | null;
975
- /**
976
- * Id of the region for which a key was ordered.
977
- */
978
- regionId?: Guid | null;
979
- /**
980
- * Name of the region for which a key was ordered.
981
- */
982
- regionName?: string | null;
983
- /**
984
- * Id of the request that created this order, as assigned by the partner.
985
- */
986
- requestId?: Guid | null;
987
- /**
988
- * Status of the order. Possible values:1 - Open, 2 - Fulfilled, 3 - Cancelled
989
- */
990
- statusId?: number | null;
991
- /**
992
- * Text representation of the current status of the order, for human readability only.
993
- */
994
- statusText?: string | null;
995
- }
996
- export interface OrderListResult extends Parsable {
997
- /**
998
- * The pageCount property
999
- */
1000
- pageCount?: number | null;
1001
- /**
1002
- * The result property
1003
- */
1004
- result?: Order[] | null;
1005
- /**
1006
- * The totalCount property
1007
- */
1008
- totalCount?: number | null;
1009
- }
1010
- /**
1011
- * A reseller of keys to either end consumers or other partners.
1012
- */
1013
- export interface Partner extends Parsable {
1014
- /**
1015
- * Optional HubSpot url
1016
- */
1017
- hubSpotUrl?: string | null;
1018
- /**
1019
- * Unique identifier for the partner
1020
- */
1021
- id?: Guid | null;
1022
- /**
1023
- * Name of the partner
1024
- */
1025
- name?: string | null;
1026
- }
1027
- export interface PartnerListResult extends Parsable {
1028
- /**
1029
- * The pageCount property
1030
- */
1031
- pageCount?: number | null;
1032
- /**
1033
- * The result property
1034
- */
1035
- result?: Partner[] | null;
1036
- /**
1037
- * The totalCount property
1038
- */
1039
- totalCount?: number | null;
1040
- }
1041
- /**
1042
- * List of prices for a product.
1043
- */
1044
- export interface PriceList extends Parsable {
1045
- /**
1046
- * List of prices per country.
1047
- */
1048
- prices?: PriceListItem[] | null;
1049
- /**
1050
- * Id of the product this list applies to.
1051
- */
1052
- productId?: Guid | null;
1053
- }
1054
- /**
1055
- * Defines the price for a product in a country. If Msrp is NULL, no Msrp data is available for this country.
1056
- */
1057
- export interface PriceListItem extends Parsable {
1058
- /**
1059
- * Country in which this price applies.
1060
- */
1061
- countryCode?: string | null;
1062
- /**
1063
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
1064
- */
1065
- msrp?: Money | null;
1066
- }
1067
- export interface ProblemDetails extends AdditionalDataHolder, ApiError, Parsable {
1068
- /**
1069
- * The detail property
1070
- */
1071
- detail?: string | null;
1072
- /**
1073
- * The instance property
1074
- */
1075
- instance?: string | null;
1076
- /**
1077
- * The status property
1078
- */
1079
- status?: number | null;
1080
- /**
1081
- * The title property
1082
- */
1083
- title?: string | null;
1084
- /**
1085
- * The type property
1086
- */
1087
- type?: string | null;
1088
- }
1089
- /**
1090
- * A product for which activation keys are sold.
1091
- */
1092
- export interface Product extends Parsable {
1093
- /**
1094
- * Id's of the regions where this product is allowed.
1095
- */
1096
- allowedRegions?: Guid[] | null;
1097
- /**
1098
- * Indicates whether keys for this product can be reserved. The reserve API can only be used for products where this is true.
1099
- */
1100
- canBeReserved?: boolean | null;
1101
- /**
1102
- * Unique identifier.
1103
- */
1104
- id?: Guid | null;
1105
- /**
1106
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
1107
- */
1108
- msrp?: Money | null;
1109
- /**
1110
- * Name of the product.
1111
- */
1112
- name?: string | null;
1113
- /**
1114
- * Defines values for gaming platforms.
1115
- */
1116
- platformId?: number | null;
1117
- /**
1118
- * Human readable description of the platform. Do not use this for programmatic purposes.
1119
- */
1120
- platformName?: string | null;
1121
- /**
1122
- * Human-readable description of the product type.
1123
- */
1124
- productTypeDescription?: string | null;
1125
- /**
1126
- * Type of the product.
1127
- */
1128
- productTypeId?: number | null;
1129
- /**
1130
- * Identifier of the publisher of the product.
1131
- */
1132
- publisherId?: Guid | null;
1133
- /**
1134
- * Date the product is released.
1135
- */
1136
- releaseDate?: Date | null;
1137
- }
1138
- export interface ProductListResult extends Parsable {
1139
- /**
1140
- * The pageCount property
1141
- */
1142
- pageCount?: number | null;
1143
- /**
1144
- * The result property
1145
- */
1146
- result?: Product[] | null;
1147
- /**
1148
- * The totalCount property
1149
- */
1150
- totalCount?: number | null;
1151
- }
1152
- /**
1153
- * Company publishing digital products.
1154
- */
1155
- export interface Publisher extends Parsable {
1156
- /**
1157
- * Unique id of the publisher
1158
- */
1159
- id?: Guid | null;
1160
- /**
1161
- * Image of the Publisher
1162
- */
1163
- imageUrl?: string | null;
1164
- /**
1165
- * Name of the publisher
1166
- */
1167
- name?: string | null;
1168
- }
1169
- export interface PublisherListResult extends Parsable {
1170
- /**
1171
- * The pageCount property
1172
- */
1173
- pageCount?: number | null;
1174
- /**
1175
- * The result property
1176
- */
1177
- result?: Publisher[] | null;
1178
- /**
1179
- * The totalCount property
1180
- */
1181
- totalCount?: number | null;
1182
- }
1183
- /**
1184
- * Represents information about how to redeem a purchased key.
1185
- */
1186
- export interface RedemptionInstruction extends Parsable {
1187
- /**
1188
- * The language or culture code of the redemption instructions, e.g. "en-US", "fr-FR" or "en".
1189
- */
1190
- languageCode?: string | null;
1191
- /**
1192
- * Description of how to redeem the key, in plain text format.
1193
- */
1194
- text?: string | null;
1195
- }
1196
- /**
1197
- * A region in which keys can be sold.
1198
- */
1199
- export interface Region extends Parsable {
1200
- /**
1201
- * Represents the archiving status and metadata of an entity.
1202
- */
1203
- archiveInfo?: ArchivingInfo | null;
1204
- /**
1205
- * ISO 3166-1 alpha-2 country codes that are part of the region. Please be aware that multiple regions can have the same country code, they are not mutally exclusive.
1206
- */
1207
- countries?: string[] | null;
1208
- /**
1209
- * Unique identifier for the region.
1210
- */
1211
- id?: Guid | null;
1212
- /**
1213
- * Name of the region.
1214
- */
1215
- name?: string | null;
1216
- }
1217
- export interface RegionListResult extends Parsable {
1218
- /**
1219
- * The pageCount property
1220
- */
1221
- pageCount?: number | null;
1222
- /**
1223
- * The result property
1224
- */
1225
- result?: Region[] | null;
1226
- /**
1227
- * The totalCount property
1228
- */
1229
- totalCount?: number | null;
1230
- }
1231
- /**
1232
- * Request to send when reporting an order. No key will be delivered by this API.
1233
- */
1234
- export interface ReportOrderRequest extends Parsable {
1235
- /**
1236
- * Represents the end consumer who buys a key.
1237
- */
1238
- endConsumer?: Consumer | null;
1239
- /**
1240
- * The date the consumer placed the order for a key.
1241
- */
1242
- invoiceDate?: Date | null;
1243
- /**
1244
- * Reference of the transaction in the partner's system.
1245
- */
1246
- partnerReference?: string | null;
1247
- /**
1248
- * Unique Identifier of the product sold.
1249
- */
1250
- productId?: Guid | null;
1251
- /**
1252
- * Unique identifier of the region in which the sold key is valid.
1253
- */
1254
- regionId?: Guid | null;
1255
- /**
1256
- * Uniquely identifies this request. Must be unique for each request you make. In case of errors, can be used for resolving.
1257
- */
1258
- requestId?: Guid | null;
1259
- /**
1260
- * An ordered list of partner IDs representing the sales channel through which the key is transferredon its way to the end consumer. Each ID in the list corresponds to a partner involvedin the distribution process, and the order of the list reflects the sequence in which the key passesthrough the partners. If the actor sells the key directly to the end consumer, this list can be empty. However, if the actoris a distributor, the partner IDs of the e-tailer(s) or other intermediaries must be provided in the exactorder that the key moves through them before reaching the consumer.
1261
- */
1262
- salesChannel?: Guid[] | null;
1263
- /**
1264
- * Represents a sales price including VAT details. Both the price and VAT details are required. One and only one of the VAT details must be set.
1265
- */
1266
- salesPrice?: SalesPriceRequest | null;
1267
- }
1268
- /**
1269
- * Reservation for a product's key.
1270
- */
1271
- export interface Reservation extends Parsable {
1272
- /**
1273
- * Date/time when the reservation expires and cannot be claimed.
1274
- */
1275
- expires?: Date | null;
1276
- /**
1277
- * Unique identifier of the reservation.
1278
- */
1279
- id?: Guid | null;
1280
- /**
1281
- * Human readable description of the status. Do not use this for programmatic purposes.
1282
- */
1283
- statusDescription?: string | null;
1284
- /**
1285
- * Id of the status of the reservation. Possible values:1 = AwaitingClaim2 = Claimed3 = Cancelled4 = Expired
1286
- */
1287
- statusId?: number | null;
1288
- }
1289
- /**
1290
- * Represents a sales price including VAT details. Both the price and VAT details are required. One and only one of the VAT details must be set.
1291
- */
1292
- export interface SalesPriceRequest extends Parsable {
1293
- /**
1294
- * A list of common deductions that occurred during the sale.These deductions may include various fees or discounts applied to the sale, such as payment processing fees,affiliate commissions, or other adjustments.Use this collection to register any additional charges or reductions that affect the final sale amount.
1295
- */
1296
- deductions?: Deduction[] | null;
1297
- /**
1298
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
1299
- */
1300
- priceIncludingVat?: Money | null;
1301
- /**
1302
- * Represents the VAT (Value Added Tax) details associated with a sales price.The MissionControl.Application.Sales.Dto.Partner.VatDetail.Rate, MissionControl.Application.Sales.Dto.Partner.VatDetail.Amount, and MissionControl.Application.Sales.Dto.Partner.VatDetail.PriceExcludingVat properties are interdependent.When one of these properties is provided, the other two will be automatically calculated.Only one property should be set explicitly in any given request; setting more than one will result in a validation error.
1303
- */
1304
- vatDetail?: VatDetail | null;
1305
- }
1306
- /**
1307
- * Serializes information the current object
1308
- * @param ArchivingInfo The instance to serialize from.
1309
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1310
- * @param writer Serialization writer to use to serialize this model
1311
- */
1312
- // @ts-ignore
1313
- export function serializeArchivingInfo(writer: SerializationWriter, archivingInfo: Partial<ArchivingInfo> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1314
- if (!archivingInfo || isSerializingDerivedType) { return; }
1315
- writer.writeDateValue("archivedOnUtc", archivingInfo.archivedOnUtc);
1316
- writer.writeBooleanValue("isArchived", archivingInfo.isArchived);
1317
- }
1318
- /**
1319
- * Serializes information the current object
1320
- * @param Browser The instance to serialize from.
1321
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1322
- * @param writer Serialization writer to use to serialize this model
1323
- */
1324
- // @ts-ignore
1325
- export function serializeBrowser(writer: SerializationWriter, browser: Partial<Browser> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1326
- if (!browser || isSerializingDerivedType) { return; }
1327
- writer.writeStringValue("acceptLanguage", browser.acceptLanguage);
1328
- writer.writeStringValue("userAgent", browser.userAgent);
1329
- }
1330
- /**
1331
- * Serializes information the current object
1332
- * @param CancelOrderRequest The instance to serialize from.
1333
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1334
- * @param writer Serialization writer to use to serialize this model
1335
- */
1336
- // @ts-ignore
1337
- export function serializeCancelOrderRequest(writer: SerializationWriter, cancelOrderRequest: Partial<CancelOrderRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1338
- if (!cancelOrderRequest || isSerializingDerivedType) { return; }
1339
- writer.writeGuidValue("originalRequestId", cancelOrderRequest.originalRequestId);
1340
- }
1341
- /**
1342
- * Serializes information the current object
1343
- * @param ClaimReservationRequest The instance to serialize from.
1344
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1345
- * @param writer Serialization writer to use to serialize this model
1346
- */
1347
- // @ts-ignore
1348
- export function serializeClaimReservationRequest(writer: SerializationWriter, claimReservationRequest: Partial<ClaimReservationRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1349
- if (!claimReservationRequest || isSerializingDerivedType) { return; }
1350
- writer.writeObjectValue<Consumer>("endConsumer", claimReservationRequest.endConsumer, serializeConsumer);
1351
- writer.writeDateValue("invoiceDate", claimReservationRequest.invoiceDate);
1352
- writer.writeStringValue("partnerReference", claimReservationRequest.partnerReference);
1353
- writer.writeGuidValue("requestId", claimReservationRequest.requestId);
1354
- writer.writeCollectionOfPrimitiveValues<Guid>("salesChannel", claimReservationRequest.salesChannel);
1355
- writer.writeObjectValue<SalesPriceRequest>("salesPrice", claimReservationRequest.salesPrice, serializeSalesPriceRequest);
1356
- }
1357
- /**
1358
- * Serializes information the current object
1359
- * @param Consumer The instance to serialize from.
1360
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1361
- * @param writer Serialization writer to use to serialize this model
1362
- */
1363
- // @ts-ignore
1364
- export function serializeConsumer(writer: SerializationWriter, consumer: Partial<Consumer> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1365
- if (!consumer || isSerializingDerivedType) { return; }
1366
- writer.writeObjectValue<Browser>("browser", consumer.browser, serializeBrowser);
1367
- writer.writeStringValue("ipAddress", consumer.ipAddress);
1368
- writer.writeStringValue("language", consumer.language);
1369
- writer.writeObjectValue<Location>("location", consumer.location, serializeLocation);
1370
- }
1371
- /**
1372
- * Serializes information the current object
1373
- * @param CreateOrderRequest The instance to serialize from.
1374
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1375
- * @param writer Serialization writer to use to serialize this model
1376
- */
1377
- // @ts-ignore
1378
- export function serializeCreateOrderRequest(writer: SerializationWriter, createOrderRequest: Partial<CreateOrderRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1379
- if (!createOrderRequest || isSerializingDerivedType) { return; }
1380
- writer.writeObjectValue<Consumer>("endConsumer", createOrderRequest.endConsumer, serializeConsumer);
1381
- writer.writeDateValue("invoiceDate", createOrderRequest.invoiceDate);
1382
- writer.writeStringValue("partnerReference", createOrderRequest.partnerReference);
1383
- writer.writeGuidValue("productId", createOrderRequest.productId);
1384
- writer.writeGuidValue("regionId", createOrderRequest.regionId);
1385
- writer.writeGuidValue("requestId", createOrderRequest.requestId);
1386
- writer.writeCollectionOfPrimitiveValues<Guid>("salesChannel", createOrderRequest.salesChannel);
1387
- writer.writeObjectValue<SalesPriceRequest>("salesPrice", createOrderRequest.salesPrice, serializeSalesPriceRequest);
1388
- }
1389
- /**
1390
- * Serializes information the current object
1391
- * @param CreateReservationRequest The instance to serialize from.
1392
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1393
- * @param writer Serialization writer to use to serialize this model
1394
- */
1395
- // @ts-ignore
1396
- export function serializeCreateReservationRequest(writer: SerializationWriter, createReservationRequest: Partial<CreateReservationRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1397
- if (!createReservationRequest || isSerializingDerivedType) { return; }
1398
- writer.writeGuidValue("productId", createReservationRequest.productId);
1399
- writer.writeGuidValue("regionId", createReservationRequest.regionId);
1400
- }
1401
- /**
1402
- * Serializes information the current object
1403
- * @param Deduction The instance to serialize from.
1404
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1405
- * @param writer Serialization writer to use to serialize this model
1406
- */
1407
- // @ts-ignore
1408
- export function serializeDeduction(writer: SerializationWriter, deduction: Partial<Deduction> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1409
- if (!deduction || isSerializingDerivedType) { return; }
1410
- writer.writeObjectValue<Money>("amount", deduction.amount, serializeMoney);
1411
- writer.writeStringValue("name", deduction.name);
1412
- writer.writeNumberValue("type", deduction.type);
1413
- }
1414
- /**
1415
- * Serializes information the current object
1416
- * @param HasStockRequest The instance to serialize from.
1417
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1418
- * @param writer Serialization writer to use to serialize this model
1419
- */
1420
- // @ts-ignore
1421
- export function serializeHasStockRequest(writer: SerializationWriter, hasStockRequest: Partial<HasStockRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1422
- if (!hasStockRequest || isSerializingDerivedType) { return; }
1423
- writer.writeGuidValue("productId", hasStockRequest.productId);
1424
- writer.writeGuidValue("regionId", hasStockRequest.regionId);
1425
- }
1426
- /**
1427
- * Serializes information the current object
1428
- * @param HasStockResponse The instance to serialize from.
1429
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1430
- * @param writer Serialization writer to use to serialize this model
1431
- */
1432
- // @ts-ignore
1433
- export function serializeHasStockResponse(writer: SerializationWriter, hasStockResponse: Partial<HasStockResponse> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1434
- if (!hasStockResponse || isSerializingDerivedType) { return; }
1435
- writer.writeBooleanValue("hasStock", hasStockResponse.hasStock);
1436
- }
1437
- /**
1438
- * Serializes information the current object
1439
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1440
- * @param Key The instance to serialize from.
1441
- * @param writer Serialization writer to use to serialize this model
1442
- */
1443
- // @ts-ignore
1444
- export function serializeKey(writer: SerializationWriter, key: Partial<Key> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1445
- if (!key || isSerializingDerivedType) { return; }
1446
- writer.writeStringValue("reference", key.reference);
1447
- writer.writeStringValue("value", key.value);
1448
- }
1449
- /**
1450
- * Serializes information the current object
1451
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1452
- * @param Location The instance to serialize from.
1453
- * @param writer Serialization writer to use to serialize this model
1454
- */
1455
- // @ts-ignore
1456
- export function serializeLocation(writer: SerializationWriter, location: Partial<Location> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1457
- if (!location || isSerializingDerivedType) { return; }
1458
- writer.writeStringValue("city", location.city);
1459
- writer.writeStringValue("countryCode", location.countryCode);
1460
- writer.writeStringValue("region", location.region);
1461
- }
1462
- /**
1463
- * Serializes information the current object
1464
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1465
- * @param Money The instance to serialize from.
1466
- * @param writer Serialization writer to use to serialize this model
1467
- */
1468
- // @ts-ignore
1469
- export function serializeMoney(writer: SerializationWriter, money: Partial<Money> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1470
- if (!money || isSerializingDerivedType) { return; }
1471
- writer.writeStringValue("currencyCode", money.currencyCode);
1472
- writer.writeNumberValue("value", money.value);
1473
- }
1474
- /**
1475
- * Serializes information the current object
1476
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1477
- * @param Order The instance to serialize from.
1478
- * @param writer Serialization writer to use to serialize this model
1479
- */
1480
- // @ts-ignore
1481
- export function serializeOrder(writer: SerializationWriter, order: Partial<Order> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1482
- if (!order || isSerializingDerivedType) { return; }
1483
- writer.writeDateValue("created", order.created);
1484
- writer.writeGuidValue("id", order.id);
1485
- writer.writeObjectValue<Key>("key", order.key, serializeKey);
1486
- writer.writeObjectValue<Money>("msrp", order.msrp, serializeMoney);
1487
- writer.writeGuidValue("partnerId", order.partnerId);
1488
- writer.writeStringValue("partnerReference", order.partnerReference);
1489
- writer.writeGuidValue("productId", order.productId);
1490
- writer.writeStringValue("productName", order.productName);
1491
- writer.writeGuidValue("publisherId", order.publisherId);
1492
- writer.writeObjectValue<RedemptionInstruction>("redemptionInstruction", order.redemptionInstruction, serializeRedemptionInstruction);
1493
- writer.writeGuidValue("regionId", order.regionId);
1494
- writer.writeStringValue("regionName", order.regionName);
1495
- writer.writeGuidValue("requestId", order.requestId);
1496
- writer.writeNumberValue("statusId", order.statusId);
1497
- }
1498
- /**
1499
- * Serializes information the current object
1500
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1501
- * @param OrderListResult The instance to serialize from.
1502
- * @param writer Serialization writer to use to serialize this model
1503
- */
1504
- // @ts-ignore
1505
- export function serializeOrderListResult(writer: SerializationWriter, orderListResult: Partial<OrderListResult> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1506
- if (!orderListResult || isSerializingDerivedType) { return; }
1507
- }
1508
- /**
1509
- * Serializes information the current object
1510
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1511
- * @param Partner The instance to serialize from.
1512
- * @param writer Serialization writer to use to serialize this model
1513
- */
1514
- // @ts-ignore
1515
- export function serializePartner(writer: SerializationWriter, partner: Partial<Partner> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1516
- if (!partner || isSerializingDerivedType) { return; }
1517
- }
1518
- /**
1519
- * Serializes information the current object
1520
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1521
- * @param PartnerListResult The instance to serialize from.
1522
- * @param writer Serialization writer to use to serialize this model
1523
- */
1524
- // @ts-ignore
1525
- export function serializePartnerListResult(writer: SerializationWriter, partnerListResult: Partial<PartnerListResult> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1526
- if (!partnerListResult || isSerializingDerivedType) { return; }
1527
- }
1528
- /**
1529
- * Serializes information the current object
1530
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1531
- * @param PriceList The instance to serialize from.
1532
- * @param writer Serialization writer to use to serialize this model
1533
- */
1534
- // @ts-ignore
1535
- export function serializePriceList(writer: SerializationWriter, priceList: Partial<PriceList> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1536
- if (!priceList || isSerializingDerivedType) { return; }
1537
- writer.writeCollectionOfObjectValues<PriceListItem>("prices", priceList.prices, serializePriceListItem);
1538
- writer.writeGuidValue("productId", priceList.productId);
1539
- }
1540
- /**
1541
- * Serializes information the current object
1542
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1543
- * @param PriceListItem The instance to serialize from.
1544
- * @param writer Serialization writer to use to serialize this model
1545
- */
1546
- // @ts-ignore
1547
- export function serializePriceListItem(writer: SerializationWriter, priceListItem: Partial<PriceListItem> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1548
- if (!priceListItem || isSerializingDerivedType) { return; }
1549
- writer.writeStringValue("countryCode", priceListItem.countryCode);
1550
- writer.writeObjectValue<Money>("msrp", priceListItem.msrp, serializeMoney);
1551
- }
1552
- /**
1553
- * Serializes information the current object
1554
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1555
- * @param ProblemDetails The instance to serialize from.
1556
- * @param writer Serialization writer to use to serialize this model
1557
- */
1558
- // @ts-ignore
1559
- export function serializeProblemDetails(writer: SerializationWriter, problemDetails: Partial<ProblemDetails> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1560
- if (!problemDetails || isSerializingDerivedType) { return; }
1561
- writer.writeStringValue("detail", problemDetails.detail);
1562
- writer.writeStringValue("instance", problemDetails.instance);
1563
- writer.writeNumberValue("status", problemDetails.status);
1564
- writer.writeStringValue("title", problemDetails.title);
1565
- writer.writeStringValue("type", problemDetails.type);
1566
- writer.writeAdditionalData(problemDetails.additionalData);
1567
- }
1568
- /**
1569
- * Serializes information the current object
1570
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1571
- * @param Product The instance to serialize from.
1572
- * @param writer Serialization writer to use to serialize this model
1573
- */
1574
- // @ts-ignore
1575
- export function serializeProduct(writer: SerializationWriter, product: Partial<Product> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1576
- if (!product || isSerializingDerivedType) { return; }
1577
- writer.writeCollectionOfPrimitiveValues<Guid>("allowedRegions", product.allowedRegions);
1578
- writer.writeBooleanValue("canBeReserved", product.canBeReserved);
1579
- writer.writeObjectValue<Money>("msrp", product.msrp, serializeMoney);
1580
- writer.writeNumberValue("platformId", product.platformId);
1581
- writer.writeGuidValue("publisherId", product.publisherId);
1582
- }
1583
- /**
1584
- * Serializes information the current object
1585
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1586
- * @param ProductListResult The instance to serialize from.
1587
- * @param writer Serialization writer to use to serialize this model
1588
- */
1589
- // @ts-ignore
1590
- export function serializeProductListResult(writer: SerializationWriter, productListResult: Partial<ProductListResult> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1591
- if (!productListResult || isSerializingDerivedType) { return; }
1592
- }
1593
- /**
1594
- * Serializes information the current object
1595
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1596
- * @param Publisher The instance to serialize from.
1597
- * @param writer Serialization writer to use to serialize this model
1598
- */
1599
- // @ts-ignore
1600
- export function serializePublisher(writer: SerializationWriter, publisher: Partial<Publisher> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1601
- if (!publisher || isSerializingDerivedType) { return; }
1602
- writer.writeStringValue("imageUrl", publisher.imageUrl);
1603
- writer.writeStringValue("name", publisher.name);
1604
- }
1605
- /**
1606
- * Serializes information the current object
1607
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1608
- * @param PublisherListResult The instance to serialize from.
1609
- * @param writer Serialization writer to use to serialize this model
1610
- */
1611
- // @ts-ignore
1612
- export function serializePublisherListResult(writer: SerializationWriter, publisherListResult: Partial<PublisherListResult> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1613
- if (!publisherListResult || isSerializingDerivedType) { return; }
1614
- }
1615
- /**
1616
- * Serializes information the current object
1617
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1618
- * @param RedemptionInstruction The instance to serialize from.
1619
- * @param writer Serialization writer to use to serialize this model
1620
- */
1621
- // @ts-ignore
1622
- export function serializeRedemptionInstruction(writer: SerializationWriter, redemptionInstruction: Partial<RedemptionInstruction> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1623
- if (!redemptionInstruction || isSerializingDerivedType) { return; }
1624
- writer.writeStringValue("languageCode", redemptionInstruction.languageCode);
1625
- writer.writeStringValue("text", redemptionInstruction.text);
1626
- }
1627
- /**
1628
- * Serializes information the current object
1629
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1630
- * @param Region The instance to serialize from.
1631
- * @param writer Serialization writer to use to serialize this model
1632
- */
1633
- // @ts-ignore
1634
- export function serializeRegion(writer: SerializationWriter, region: Partial<Region> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1635
- if (!region || isSerializingDerivedType) { return; }
1636
- writer.writeObjectValue<ArchivingInfo>("archiveInfo", region.archiveInfo, serializeArchivingInfo);
1637
- }
1638
- /**
1639
- * Serializes information the current object
1640
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1641
- * @param RegionListResult The instance to serialize from.
1642
- * @param writer Serialization writer to use to serialize this model
1643
- */
1644
- // @ts-ignore
1645
- export function serializeRegionListResult(writer: SerializationWriter, regionListResult: Partial<RegionListResult> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1646
- if (!regionListResult || isSerializingDerivedType) { return; }
1647
- }
1648
- /**
1649
- * Serializes information the current object
1650
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1651
- * @param ReportOrderRequest The instance to serialize from.
1652
- * @param writer Serialization writer to use to serialize this model
1653
- */
1654
- // @ts-ignore
1655
- export function serializeReportOrderRequest(writer: SerializationWriter, reportOrderRequest: Partial<ReportOrderRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1656
- if (!reportOrderRequest || isSerializingDerivedType) { return; }
1657
- writer.writeObjectValue<Consumer>("endConsumer", reportOrderRequest.endConsumer, serializeConsumer);
1658
- writer.writeDateValue("invoiceDate", reportOrderRequest.invoiceDate);
1659
- writer.writeStringValue("partnerReference", reportOrderRequest.partnerReference);
1660
- writer.writeGuidValue("productId", reportOrderRequest.productId);
1661
- writer.writeGuidValue("regionId", reportOrderRequest.regionId);
1662
- writer.writeGuidValue("requestId", reportOrderRequest.requestId);
1663
- writer.writeCollectionOfPrimitiveValues<Guid>("salesChannel", reportOrderRequest.salesChannel);
1664
- writer.writeObjectValue<SalesPriceRequest>("salesPrice", reportOrderRequest.salesPrice, serializeSalesPriceRequest);
1665
- }
1666
- /**
1667
- * Serializes information the current object
1668
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1669
- * @param Reservation The instance to serialize from.
1670
- * @param writer Serialization writer to use to serialize this model
1671
- */
1672
- // @ts-ignore
1673
- export function serializeReservation(writer: SerializationWriter, reservation: Partial<Reservation> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1674
- if (!reservation || isSerializingDerivedType) { return; }
1675
- writer.writeDateValue("expires", reservation.expires);
1676
- writer.writeGuidValue("id", reservation.id);
1677
- writer.writeNumberValue("statusId", reservation.statusId);
1678
- }
1679
- /**
1680
- * Serializes information the current object
1681
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1682
- * @param SalesPriceRequest The instance to serialize from.
1683
- * @param writer Serialization writer to use to serialize this model
1684
- */
1685
- // @ts-ignore
1686
- export function serializeSalesPriceRequest(writer: SerializationWriter, salesPriceRequest: Partial<SalesPriceRequest> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1687
- if (!salesPriceRequest || isSerializingDerivedType) { return; }
1688
- writer.writeCollectionOfObjectValues<Deduction>("deductions", salesPriceRequest.deductions, serializeDeduction);
1689
- writer.writeObjectValue<Money>("priceIncludingVat", salesPriceRequest.priceIncludingVat, serializeMoney);
1690
- writer.writeObjectValue<VatDetail>("vatDetail", salesPriceRequest.vatDetail, serializeVatDetail);
1691
- }
1692
- /**
1693
- * Serializes information the current object
1694
- * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
1695
- * @param VatDetail The instance to serialize from.
1696
- * @param writer Serialization writer to use to serialize this model
1697
- */
1698
- // @ts-ignore
1699
- export function serializeVatDetail(writer: SerializationWriter, vatDetail: Partial<VatDetail> | undefined | null = {}, isSerializingDerivedType: boolean = false) : void {
1700
- if (!vatDetail || isSerializingDerivedType) { return; }
1701
- writer.writeObjectValue<Money>("amount", vatDetail.amount, serializeMoney);
1702
- writer.writeObjectValue<Money>("priceExcludingVat", vatDetail.priceExcludingVat, serializeMoney);
1703
- writer.writeNumberValue("rate", vatDetail.rate);
1704
- }
1705
- /**
1706
- * Represents the VAT (Value Added Tax) details associated with a sales price.The MissionControl.Application.Sales.Dto.Partner.VatDetail.Rate, MissionControl.Application.Sales.Dto.Partner.VatDetail.Amount, and MissionControl.Application.Sales.Dto.Partner.VatDetail.PriceExcludingVat properties are interdependent.When one of these properties is provided, the other two will be automatically calculated.Only one property should be set explicitly in any given request; setting more than one will result in a validation error.
1707
- */
1708
- export interface VatDetail extends Parsable {
1709
- /**
1710
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
1711
- */
1712
- amount?: Money | null;
1713
- /**
1714
- * Represents a monetary value in a specified currency. This type encapsulates both the numeric value and thecurrency code, forming a complete monetary representation. It is typically used for handling prices,financial calculations, or currency-specific amounts. The Value and CurrencyCodeproperties must be provided for this type to have a meaningful monetary representation.
1715
- */
1716
- priceExcludingVat?: Money | null;
1717
- /**
1718
- * The VAT rate as a percentage (e.g., 20.5 for a 20.5% VAT rate).
1719
- */
1720
- rate?: number | null;
1721
- }
1722
- /* tslint:enable */
1723
- /* eslint-enable */