@channelpayments/node-sdk 1.183.0 → 1.184.0

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 (43) hide show
  1. package/dist/cjs/models/BillingAddressDto.d.ts +56 -0
  2. package/dist/cjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +16 -18
  3. package/dist/cjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
  4. package/dist/cjs/models/CheckoutSessionBaseEntity.js +127 -0
  5. package/dist/cjs/models/CheckoutSessionEntity.d.ts +11 -5
  6. package/dist/cjs/models/CheckoutSessionEntity.js +4 -2
  7. package/dist/cjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
  8. package/dist/cjs/models/CheckoutSessionItemBaseEntity.js +69 -0
  9. package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
  10. package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
  11. package/dist/cjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
  12. package/dist/cjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
  13. package/dist/cjs/models/TransactionEntity.d.ts +3 -3
  14. package/dist/cjs/models/TransactionEntity.js +3 -3
  15. package/dist/cjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
  16. package/dist/cjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +14 -14
  17. package/dist/cjs/models/index.d.ts +4 -2
  18. package/dist/cjs/models/index.js +4 -2
  19. package/dist/cjs/runtime.js +1 -1
  20. package/dist/mjs/models/BillingAddressDto.d.ts +56 -0
  21. package/dist/mjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +12 -14
  22. package/dist/mjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
  23. package/dist/mjs/models/CheckoutSessionBaseEntity.js +120 -0
  24. package/dist/mjs/models/CheckoutSessionEntity.d.ts +11 -5
  25. package/dist/mjs/models/CheckoutSessionEntity.js +4 -2
  26. package/dist/mjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
  27. package/dist/mjs/models/CheckoutSessionItemBaseEntity.js +63 -0
  28. package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
  29. package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
  30. package/dist/mjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
  31. package/dist/mjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
  32. package/dist/mjs/models/TransactionEntity.d.ts +3 -3
  33. package/dist/mjs/models/TransactionEntity.js +3 -3
  34. package/dist/mjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
  35. package/dist/mjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +9 -9
  36. package/dist/mjs/models/index.d.ts +4 -2
  37. package/dist/mjs/models/index.js +4 -2
  38. package/dist/mjs/runtime.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/cjs/models/BuyerAddressDto.d.ts +0 -56
  41. package/dist/cjs/models/PaymentMethodBaseEntity.d.ts +0 -136
  42. package/dist/mjs/models/BuyerAddressDto.d.ts +0 -56
  43. package/dist/mjs/models/PaymentMethodBaseEntity.d.ts +0 -136
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ import type { AvailablePaymentMethodEntity } from './AvailablePaymentMethodEntity';
8
+ import type { CheckoutSessionItemBaseEntity } from './CheckoutSessionItemBaseEntity';
9
+ import type { TagEntity } from './TagEntity';
10
+ /**
11
+ *
12
+ * @export
13
+ * @interface CheckoutSessionBaseEntity
14
+ */
15
+ export interface CheckoutSessionBaseEntity {
16
+ /**
17
+ * The id of the checkout session.
18
+ * @type {string}
19
+ * @memberof CheckoutSessionBaseEntity
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * The merchant ID of the checkout session.
24
+ * @type {string}
25
+ * @memberof CheckoutSessionBaseEntity
26
+ */
27
+ merchantId: string;
28
+ /**
29
+ * The UI mode of the checkout session.
30
+ * @type {string}
31
+ * @memberof CheckoutSessionBaseEntity
32
+ */
33
+ uiMode: CheckoutSessionBaseEntityUiModeEnum;
34
+ /**
35
+ * The status of the checkout session.
36
+ * @type {string}
37
+ * @memberof CheckoutSessionBaseEntity
38
+ */
39
+ status: CheckoutSessionBaseEntityStatusEnum;
40
+ /**
41
+ * The currency of the checkout session.
42
+ * @type {string}
43
+ * @memberof CheckoutSessionBaseEntity
44
+ */
45
+ currency: string;
46
+ /**
47
+ * The total of the checkout session.
48
+ * @type {number}
49
+ * @memberof CheckoutSessionBaseEntity
50
+ */
51
+ total: number;
52
+ /**
53
+ * The subtotal of the checkout session.
54
+ * @type {number}
55
+ * @memberof CheckoutSessionBaseEntity
56
+ */
57
+ subtotal: number;
58
+ /**
59
+ * The fees total of the checkout session.
60
+ * @type {number}
61
+ * @memberof CheckoutSessionBaseEntity
62
+ */
63
+ feesTotal: number;
64
+ /**
65
+ * The taxes total of the checkout session.
66
+ * @type {number}
67
+ * @memberof CheckoutSessionBaseEntity
68
+ */
69
+ taxTotal: number;
70
+ /**
71
+ * The discount total of the checkout session.
72
+ * @type {number}
73
+ * @memberof CheckoutSessionBaseEntity
74
+ */
75
+ discountTotal: number;
76
+ /**
77
+ * The shipping total of the checkout session.
78
+ * @type {number}
79
+ * @memberof CheckoutSessionBaseEntity
80
+ */
81
+ shippingTotal: number;
82
+ /**
83
+ * The available payment methods of the checkout session.
84
+ * @type {Array<AvailablePaymentMethodEntity>}
85
+ * @memberof CheckoutSessionBaseEntity
86
+ */
87
+ availablePaymentMethods: Array<AvailablePaymentMethodEntity>;
88
+ /**
89
+ * The items of the checkout session.
90
+ * @type {Array<CheckoutSessionItemBaseEntity>}
91
+ * @memberof CheckoutSessionBaseEntity
92
+ */
93
+ items?: Array<CheckoutSessionItemBaseEntity>;
94
+ /**
95
+ * The URL to redirect to after the checkout session is completed.
96
+ * @type {string}
97
+ * @memberof CheckoutSessionBaseEntity
98
+ */
99
+ successRedirectUrl: string;
100
+ /**
101
+ * The URL to redirect to after the checkout session is canceled.
102
+ * @type {string}
103
+ * @memberof CheckoutSessionBaseEntity
104
+ */
105
+ cancelRedirectUrl: string;
106
+ /**
107
+ * The country of the checkout session.
108
+ * @type {string}
109
+ * @memberof CheckoutSessionBaseEntity
110
+ */
111
+ country: string;
112
+ /**
113
+ * The expiration date of the checkout session.
114
+ * @type {Date}
115
+ * @memberof CheckoutSessionBaseEntity
116
+ */
117
+ expiresAt?: Date;
118
+ /**
119
+ * The expiration date of the checkout session.
120
+ * @type {Date}
121
+ * @memberof CheckoutSessionBaseEntity
122
+ */
123
+ expiredAt?: Date;
124
+ /**
125
+ * If the session can be extended or not.
126
+ * @type {boolean}
127
+ * @memberof CheckoutSessionBaseEntity
128
+ */
129
+ canExtend: boolean;
130
+ /**
131
+ * The reason why the checkout session expired.
132
+ * @type {string}
133
+ * @memberof CheckoutSessionBaseEntity
134
+ */
135
+ expiredReason?: string;
136
+ /**
137
+ * The descriptive labels or keywords that will be assigned to the transaction associated with the checkout session.
138
+ * @type {Array<TagEntity>}
139
+ * @memberof CheckoutSessionBaseEntity
140
+ */
141
+ tags?: Array<TagEntity>;
142
+ /**
143
+ * Indicates whether the session can store payment details for future transactions.
144
+ * @type {boolean}
145
+ * @memberof CheckoutSessionBaseEntity
146
+ */
147
+ canStore?: boolean;
148
+ /**
149
+ * The buyer ID of the checkout session.
150
+ * @type {string}
151
+ * @memberof CheckoutSessionBaseEntity
152
+ */
153
+ buyerId?: string;
154
+ /**
155
+ * The external buyer ID of the checkout session.
156
+ * @type {string}
157
+ * @memberof CheckoutSessionBaseEntity
158
+ */
159
+ externalBuyerId?: string;
160
+ }
161
+ /**
162
+ * @export
163
+ */
164
+ export declare const CheckoutSessionBaseEntityUiModeEnum: {
165
+ readonly Hosted: "HOSTED";
166
+ readonly Embedded: "EMBEDDED";
167
+ };
168
+ export type CheckoutSessionBaseEntityUiModeEnum = typeof CheckoutSessionBaseEntityUiModeEnum[keyof typeof CheckoutSessionBaseEntityUiModeEnum];
169
+ /**
170
+ * @export
171
+ */
172
+ export declare const CheckoutSessionBaseEntityStatusEnum: {
173
+ readonly Pending: "PENDING";
174
+ readonly Processing: "PROCESSING";
175
+ readonly Expired: "EXPIRED";
176
+ readonly Completed: "COMPLETED";
177
+ };
178
+ export type CheckoutSessionBaseEntityStatusEnum = typeof CheckoutSessionBaseEntityStatusEnum[keyof typeof CheckoutSessionBaseEntityStatusEnum];
179
+ /**
180
+ * Check if a given object implements the CheckoutSessionBaseEntity interface.
181
+ */
182
+ export declare function instanceOfCheckoutSessionBaseEntity(value: object): boolean;
183
+ export declare function CheckoutSessionBaseEntityFromJSON(json: any): CheckoutSessionBaseEntity;
184
+ export declare function CheckoutSessionBaseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutSessionBaseEntity;
185
+ export declare function CheckoutSessionBaseEntityToJSON(value?: CheckoutSessionBaseEntity | null): any;
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Channel Payments API
5
+ *
6
+ * NOTE: This class is auto generated. Do not edit the class manually.
7
+ *
8
+ */
9
+ import { exists, removeNullUndefined } from '../runtime';
10
+ import { AvailablePaymentMethodEntityFromJSON, AvailablePaymentMethodEntityToJSON, } from './AvailablePaymentMethodEntity';
11
+ import { CheckoutSessionItemBaseEntityFromJSON, CheckoutSessionItemBaseEntityToJSON, } from './CheckoutSessionItemBaseEntity';
12
+ import { TagEntityFromJSON, TagEntityToJSON, } from './TagEntity';
13
+ /**
14
+ * @export
15
+ */
16
+ export const CheckoutSessionBaseEntityUiModeEnum = {
17
+ Hosted: 'HOSTED',
18
+ Embedded: 'EMBEDDED'
19
+ };
20
+ /**
21
+ * @export
22
+ */
23
+ export const CheckoutSessionBaseEntityStatusEnum = {
24
+ Pending: 'PENDING',
25
+ Processing: 'PROCESSING',
26
+ Expired: 'EXPIRED',
27
+ Completed: 'COMPLETED'
28
+ };
29
+ /**
30
+ * Check if a given object implements the CheckoutSessionBaseEntity interface.
31
+ */
32
+ export function instanceOfCheckoutSessionBaseEntity(value) {
33
+ let isInstance = true;
34
+ isInstance = isInstance && "sessionId" in value;
35
+ isInstance = isInstance && "merchantId" in value;
36
+ isInstance = isInstance && "uiMode" in value;
37
+ isInstance = isInstance && "status" in value;
38
+ isInstance = isInstance && "currency" in value;
39
+ isInstance = isInstance && "total" in value;
40
+ isInstance = isInstance && "subtotal" in value;
41
+ isInstance = isInstance && "feesTotal" in value;
42
+ isInstance = isInstance && "taxTotal" in value;
43
+ isInstance = isInstance && "discountTotal" in value;
44
+ isInstance = isInstance && "shippingTotal" in value;
45
+ isInstance = isInstance && "availablePaymentMethods" in value;
46
+ isInstance = isInstance && "successRedirectUrl" in value;
47
+ isInstance = isInstance && "cancelRedirectUrl" in value;
48
+ isInstance = isInstance && "country" in value;
49
+ isInstance = isInstance && "canExtend" in value;
50
+ return isInstance;
51
+ }
52
+ export function CheckoutSessionBaseEntityFromJSON(json) {
53
+ return CheckoutSessionBaseEntityFromJSONTyped(json, false);
54
+ }
55
+ export function CheckoutSessionBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
56
+ if ((json === undefined) || (json === null)) {
57
+ return json;
58
+ }
59
+ const typed = {
60
+ 'sessionId': json['sessionId'],
61
+ 'merchantId': json['merchantId'],
62
+ 'uiMode': json['uiMode'],
63
+ 'status': json['status'],
64
+ 'currency': json['currency'],
65
+ 'total': json['total'],
66
+ 'subtotal': json['subtotal'],
67
+ 'feesTotal': json['feesTotal'],
68
+ 'taxTotal': json['taxTotal'],
69
+ 'discountTotal': json['discountTotal'],
70
+ 'shippingTotal': json['shippingTotal'],
71
+ 'availablePaymentMethods': (json['availablePaymentMethods'].map(AvailablePaymentMethodEntityFromJSON)),
72
+ 'items': !exists(json, 'items') ? undefined : (json['items'].map(CheckoutSessionItemBaseEntityFromJSON)),
73
+ 'successRedirectUrl': json['successRedirectUrl'],
74
+ 'cancelRedirectUrl': json['cancelRedirectUrl'],
75
+ 'country': json['country'],
76
+ 'expiresAt': !exists(json, 'expiresAt') ? undefined : (new Date(json['expiresAt'])),
77
+ 'expiredAt': !exists(json, 'expiredAt') ? undefined : (new Date(json['expiredAt'])),
78
+ 'canExtend': json['canExtend'],
79
+ 'expiredReason': !exists(json, 'expiredReason') ? undefined : json['expiredReason'],
80
+ 'tags': !exists(json, 'tags') ? undefined : (json['tags'].map(TagEntityFromJSON)),
81
+ 'canStore': !exists(json, 'canStore') ? undefined : json['canStore'],
82
+ 'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
83
+ 'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
84
+ };
85
+ return removeNullUndefined(typed);
86
+ }
87
+ export function CheckoutSessionBaseEntityToJSON(value) {
88
+ if (value === undefined) {
89
+ return undefined;
90
+ }
91
+ if (value === null) {
92
+ return null;
93
+ }
94
+ return {
95
+ 'sessionId': value.sessionId,
96
+ 'merchantId': value.merchantId,
97
+ 'uiMode': value.uiMode,
98
+ 'status': value.status,
99
+ 'currency': value.currency,
100
+ 'total': value.total,
101
+ 'subtotal': value.subtotal,
102
+ 'feesTotal': value.feesTotal,
103
+ 'taxTotal': value.taxTotal,
104
+ 'discountTotal': value.discountTotal,
105
+ 'shippingTotal': value.shippingTotal,
106
+ 'availablePaymentMethods': (value.availablePaymentMethods.map(AvailablePaymentMethodEntityToJSON)),
107
+ 'items': value.items === undefined ? undefined : (value.items.map(CheckoutSessionItemBaseEntityToJSON)),
108
+ 'successRedirectUrl': value.successRedirectUrl,
109
+ 'cancelRedirectUrl': value.cancelRedirectUrl,
110
+ 'country': value.country,
111
+ 'expiresAt': value.expiresAt === undefined ? undefined : (value.expiresAt.toISOString()),
112
+ 'expiredAt': value.expiredAt === undefined ? undefined : (value.expiredAt.toISOString()),
113
+ 'canExtend': value.canExtend,
114
+ 'expiredReason': value.expiredReason,
115
+ 'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntityToJSON)),
116
+ 'canStore': value.canStore,
117
+ 'buyerId': value.buyerId,
118
+ 'externalBuyerId': value.externalBuyerId,
119
+ };
120
+ }
@@ -140,23 +140,29 @@ export interface CheckoutSessionEntity {
140
140
  */
141
141
  tags?: Array<TagEntity>;
142
142
  /**
143
- *
144
- * @type {string}
143
+ * Indicates whether the session can store payment details for future transactions.
144
+ * @type {boolean}
145
145
  * @memberof CheckoutSessionEntity
146
146
  */
147
- redirectUrl?: string;
147
+ canStore?: boolean;
148
148
  /**
149
- *
149
+ * The buyer ID of the checkout session.
150
150
  * @type {string}
151
151
  * @memberof CheckoutSessionEntity
152
152
  */
153
153
  buyerId?: string;
154
154
  /**
155
- *
155
+ * The external buyer ID of the checkout session.
156
156
  * @type {string}
157
157
  * @memberof CheckoutSessionEntity
158
158
  */
159
159
  externalBuyerId?: string;
160
+ /**
161
+ *
162
+ * @type {string}
163
+ * @memberof CheckoutSessionEntity
164
+ */
165
+ redirectUrl?: string;
160
166
  /**
161
167
  *
162
168
  * @type {string}
@@ -79,9 +79,10 @@ export function CheckoutSessionEntityFromJSONTyped(json, ignoreDiscriminator) {
79
79
  'canExtend': json['canExtend'],
80
80
  'expiredReason': !exists(json, 'expiredReason') ? undefined : json['expiredReason'],
81
81
  'tags': !exists(json, 'tags') ? undefined : (json['tags'].map(TagEntityFromJSON)),
82
- 'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
82
+ 'canStore': !exists(json, 'canStore') ? undefined : json['canStore'],
83
83
  'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
84
84
  'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
85
+ 'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
85
86
  'externalTransactionId': !exists(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
86
87
  'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
87
88
  };
@@ -116,9 +117,10 @@ export function CheckoutSessionEntityToJSON(value) {
116
117
  'canExtend': value.canExtend,
117
118
  'expiredReason': value.expiredReason,
118
119
  'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntityToJSON)),
119
- 'redirectUrl': value.redirectUrl,
120
+ 'canStore': value.canStore,
120
121
  'buyerId': value.buyerId,
121
122
  'externalBuyerId': value.externalBuyerId,
123
+ 'redirectUrl': value.redirectUrl,
122
124
  'externalTransactionId': value.externalTransactionId,
123
125
  'secCode': value.secCode,
124
126
  };
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ /**
8
+ *
9
+ * @export
10
+ * @interface CheckoutSessionItemBaseEntity
11
+ */
12
+ export interface CheckoutSessionItemBaseEntity {
13
+ /**
14
+ * The id of the checkout session item.
15
+ * @type {string}
16
+ * @memberof CheckoutSessionItemBaseEntity
17
+ */
18
+ itemId: string;
19
+ /**
20
+ * The id of the checkout session.
21
+ * @type {string}
22
+ * @memberof CheckoutSessionItemBaseEntity
23
+ */
24
+ sessionId: string;
25
+ /**
26
+ * The description of the checkout session item.
27
+ * @type {string}
28
+ * @memberof CheckoutSessionItemBaseEntity
29
+ */
30
+ description: string;
31
+ /**
32
+ * The quantity of the checkout session item.
33
+ * @type {number}
34
+ * @memberof CheckoutSessionItemBaseEntity
35
+ */
36
+ quantity: number;
37
+ /**
38
+ * The unit price of the checkout session item.
39
+ * @type {number}
40
+ * @memberof CheckoutSessionItemBaseEntity
41
+ */
42
+ unitPrice: number;
43
+ /**
44
+ * The total of the checkout session item.
45
+ * @type {number}
46
+ * @memberof CheckoutSessionItemBaseEntity
47
+ */
48
+ total: number;
49
+ /**
50
+ * The subtotal of the checkout session item.
51
+ * @type {number}
52
+ * @memberof CheckoutSessionItemBaseEntity
53
+ */
54
+ subtotal?: number;
55
+ /**
56
+ * The discount total of the checkout session item.
57
+ * @type {number}
58
+ * @memberof CheckoutSessionItemBaseEntity
59
+ */
60
+ discountTotal?: number;
61
+ /**
62
+ * The taxes total of the checkout session item.
63
+ * @type {number}
64
+ * @memberof CheckoutSessionItemBaseEntity
65
+ */
66
+ taxTotal?: number;
67
+ /**
68
+ * The fees total of the checkout session item.
69
+ * @type {number}
70
+ * @memberof CheckoutSessionItemBaseEntity
71
+ */
72
+ feesTotal?: number;
73
+ }
74
+ /**
75
+ * Check if a given object implements the CheckoutSessionItemBaseEntity interface.
76
+ */
77
+ export declare function instanceOfCheckoutSessionItemBaseEntity(value: object): boolean;
78
+ export declare function CheckoutSessionItemBaseEntityFromJSON(json: any): CheckoutSessionItemBaseEntity;
79
+ export declare function CheckoutSessionItemBaseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutSessionItemBaseEntity;
80
+ export declare function CheckoutSessionItemBaseEntityToJSON(value?: CheckoutSessionItemBaseEntity | null): any;
@@ -0,0 +1,63 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Channel Payments API
5
+ *
6
+ * NOTE: This class is auto generated. Do not edit the class manually.
7
+ *
8
+ */
9
+ import { exists, removeNullUndefined } from '../runtime';
10
+ /**
11
+ * Check if a given object implements the CheckoutSessionItemBaseEntity interface.
12
+ */
13
+ export function instanceOfCheckoutSessionItemBaseEntity(value) {
14
+ let isInstance = true;
15
+ isInstance = isInstance && "itemId" in value;
16
+ isInstance = isInstance && "sessionId" in value;
17
+ isInstance = isInstance && "description" in value;
18
+ isInstance = isInstance && "quantity" in value;
19
+ isInstance = isInstance && "unitPrice" in value;
20
+ isInstance = isInstance && "total" in value;
21
+ return isInstance;
22
+ }
23
+ export function CheckoutSessionItemBaseEntityFromJSON(json) {
24
+ return CheckoutSessionItemBaseEntityFromJSONTyped(json, false);
25
+ }
26
+ export function CheckoutSessionItemBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
27
+ if ((json === undefined) || (json === null)) {
28
+ return json;
29
+ }
30
+ const typed = {
31
+ 'itemId': json['itemId'],
32
+ 'sessionId': json['sessionId'],
33
+ 'description': json['description'],
34
+ 'quantity': json['quantity'],
35
+ 'unitPrice': json['unitPrice'],
36
+ 'total': json['total'],
37
+ 'subtotal': !exists(json, 'subtotal') ? undefined : json['subtotal'],
38
+ 'discountTotal': !exists(json, 'discountTotal') ? undefined : json['discountTotal'],
39
+ 'taxTotal': !exists(json, 'taxTotal') ? undefined : json['taxTotal'],
40
+ 'feesTotal': !exists(json, 'feesTotal') ? undefined : json['feesTotal'],
41
+ };
42
+ return removeNullUndefined(typed);
43
+ }
44
+ export function CheckoutSessionItemBaseEntityToJSON(value) {
45
+ if (value === undefined) {
46
+ return undefined;
47
+ }
48
+ if (value === null) {
49
+ return null;
50
+ }
51
+ return {
52
+ 'itemId': value.itemId,
53
+ 'sessionId': value.sessionId,
54
+ 'description': value.description,
55
+ 'quantity': value.quantity,
56
+ 'unitPrice': value.unitPrice,
57
+ 'total': value.total,
58
+ 'subtotal': value.subtotal,
59
+ 'discountTotal': value.discountTotal,
60
+ 'taxTotal': value.taxTotal,
61
+ 'feesTotal': value.feesTotal,
62
+ };
63
+ }
@@ -34,6 +34,18 @@ export interface CreateCheckoutSessionPaymentMethodDto {
34
34
  * @memberof CreateCheckoutSessionPaymentMethodDto
35
35
  */
36
36
  expirationDate?: string;
37
+ /**
38
+ * The ID of the stored payment method to use. Must be unset if number, expirationDate, and securityCode are provided.
39
+ * @type {string}
40
+ * @memberof CreateCheckoutSessionPaymentMethodDto
41
+ */
42
+ paymentMethodId?: string;
43
+ /**
44
+ * Whether or not to store the payment method for future use.
45
+ * @type {boolean}
46
+ * @memberof CreateCheckoutSessionPaymentMethodDto
47
+ */
48
+ store?: boolean;
37
49
  /**
38
50
  * The routing number of the ACH transaction. Must be unset if method is CARD.
39
51
  * @type {string}
@@ -42,6 +42,8 @@ export function CreateCheckoutSessionPaymentMethodDtoFromJSONTyped(json, ignoreD
42
42
  'number': !exists(json, 'number') ? undefined : json['number'],
43
43
  'securityCode': !exists(json, 'securityCode') ? undefined : json['securityCode'],
44
44
  'expirationDate': !exists(json, 'expirationDate') ? undefined : json['expirationDate'],
45
+ 'paymentMethodId': !exists(json, 'paymentMethodId') ? undefined : json['paymentMethodId'],
46
+ 'store': !exists(json, 'store') ? undefined : json['store'],
45
47
  'abaNumber': !exists(json, 'abaNumber') ? undefined : json['abaNumber'],
46
48
  'accountNumber': !exists(json, 'accountNumber') ? undefined : json['accountNumber'],
47
49
  'accountType': !exists(json, 'accountType') ? undefined : json['accountType'],
@@ -60,6 +62,8 @@ export function CreateCheckoutSessionPaymentMethodDtoToJSON(value) {
60
62
  'number': value.number,
61
63
  'securityCode': value.securityCode,
62
64
  'expirationDate': value.expirationDate,
65
+ 'paymentMethodId': value.paymentMethodId,
66
+ 'store': value.store,
63
67
  'abaNumber': value.abaNumber,
64
68
  'accountNumber': value.accountNumber,
65
69
  'accountType': value.accountType,
@@ -4,7 +4,7 @@
4
4
  * NOTE: This class is auto generated. Do not edit the class manually.
5
5
  *
6
6
  */
7
- import type { BuyerAddressDto } from './BuyerAddressDto';
7
+ import type { BillingAddressDto } from './BillingAddressDto';
8
8
  import type { CreateCheckoutSessionPaymentMethodDto } from './CreateCheckoutSessionPaymentMethodDto';
9
9
  /**
10
10
  *
@@ -37,11 +37,11 @@ export interface CreateCheckoutSessionTransactionDto {
37
37
  */
38
38
  email: string;
39
39
  /**
40
- * The address of the account holder.
41
- * @type {BuyerAddressDto}
40
+ * The billing address.
41
+ * @type {BillingAddressDto}
42
42
  * @memberof CreateCheckoutSessionTransactionDto
43
43
  */
44
- address: BuyerAddressDto;
44
+ billingAddress: BillingAddressDto;
45
45
  /**
46
46
  * The payment method used for the checkout session.
47
47
  * @type {CreateCheckoutSessionPaymentMethodDto}
@@ -7,7 +7,7 @@
7
7
  *
8
8
  */
9
9
  import { removeNullUndefined } from '../runtime';
10
- import { BuyerAddressDtoFromJSON, BuyerAddressDtoToJSON, } from './BuyerAddressDto';
10
+ import { BillingAddressDtoFromJSON, BillingAddressDtoToJSON, } from './BillingAddressDto';
11
11
  import { CreateCheckoutSessionPaymentMethodDtoFromJSON, CreateCheckoutSessionPaymentMethodDtoToJSON, } from './CreateCheckoutSessionPaymentMethodDto';
12
12
  /**
13
13
  * Check if a given object implements the CreateCheckoutSessionTransactionDto interface.
@@ -18,7 +18,7 @@ export function instanceOfCreateCheckoutSessionTransactionDto(value) {
18
18
  isInstance = isInstance && "givenName" in value;
19
19
  isInstance = isInstance && "familyName" in value;
20
20
  isInstance = isInstance && "email" in value;
21
- isInstance = isInstance && "address" in value;
21
+ isInstance = isInstance && "billingAddress" in value;
22
22
  isInstance = isInstance && "paymentMethod" in value;
23
23
  return isInstance;
24
24
  }
@@ -34,7 +34,7 @@ export function CreateCheckoutSessionTransactionDtoFromJSONTyped(json, ignoreDis
34
34
  'givenName': json['givenName'],
35
35
  'familyName': json['familyName'],
36
36
  'email': json['email'],
37
- 'address': BuyerAddressDtoFromJSON(json['address']),
37
+ 'billingAddress': BillingAddressDtoFromJSON(json['billingAddress']),
38
38
  'paymentMethod': CreateCheckoutSessionPaymentMethodDtoFromJSON(json['paymentMethod']),
39
39
  };
40
40
  return removeNullUndefined(typed);
@@ -51,7 +51,7 @@ export function CreateCheckoutSessionTransactionDtoToJSON(value) {
51
51
  'givenName': value.givenName,
52
52
  'familyName': value.familyName,
53
53
  'email': value.email,
54
- 'address': BuyerAddressDtoToJSON(value.address),
54
+ 'billingAddress': BillingAddressDtoToJSON(value.billingAddress),
55
55
  'paymentMethod': CreateCheckoutSessionPaymentMethodDtoToJSON(value.paymentMethod),
56
56
  };
57
57
  }
@@ -4,9 +4,9 @@
4
4
  * NOTE: This class is auto generated. Do not edit the class manually.
5
5
  *
6
6
  */
7
- import type { PaymentMethodBaseEntity } from './PaymentMethodBaseEntity';
8
7
  import type { TagEntity } from './TagEntity';
9
8
  import type { TransactionFeeDetailsEntity } from './TransactionFeeDetailsEntity';
9
+ import type { TransactionPaymentInstrumentBaseEntity } from './TransactionPaymentInstrumentBaseEntity';
10
10
  /**
11
11
  *
12
12
  * @export
@@ -81,10 +81,10 @@ export interface TransactionEntity {
81
81
  secCode?: TransactionEntitySecCodeEnum;
82
82
  /**
83
83
  * The payment method of the transaction.
84
- * @type {PaymentMethodBaseEntity}
84
+ * @type {TransactionPaymentInstrumentBaseEntity}
85
85
  * @memberof TransactionEntity
86
86
  */
87
- paymentMethod?: PaymentMethodBaseEntity;
87
+ paymentMethod?: TransactionPaymentInstrumentBaseEntity;
88
88
  /**
89
89
  * The raw response code of the transaction.
90
90
  * @type {string}
@@ -7,9 +7,9 @@
7
7
  *
8
8
  */
9
9
  import { exists, removeNullUndefined } from '../runtime';
10
- import { PaymentMethodBaseEntityFromJSON, PaymentMethodBaseEntityToJSON, } from './PaymentMethodBaseEntity';
11
10
  import { TagEntityFromJSON, TagEntityToJSON, } from './TagEntity';
12
11
  import { TransactionFeeDetailsEntityFromJSON, TransactionFeeDetailsEntityToJSON, } from './TransactionFeeDetailsEntity';
12
+ import { TransactionPaymentInstrumentBaseEntityFromJSON, TransactionPaymentInstrumentBaseEntityToJSON, } from './TransactionPaymentInstrumentBaseEntity';
13
13
  /**
14
14
  * @export
15
15
  */
@@ -90,7 +90,7 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
90
90
  'feeDetails': !exists(json, 'feeDetails') ? undefined : (json['feeDetails'].map(TransactionFeeDetailsEntityFromJSON)),
91
91
  'currency': !exists(json, 'currency') ? undefined : json['currency'],
92
92
  'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
93
- 'paymentMethod': !exists(json, 'paymentMethod') ? undefined : PaymentMethodBaseEntityFromJSON(json['paymentMethod']),
93
+ 'paymentMethod': !exists(json, 'paymentMethod') ? undefined : TransactionPaymentInstrumentBaseEntityFromJSON(json['paymentMethod']),
94
94
  'rawResponseCode': !exists(json, 'rawResponseCode') ? undefined : json['rawResponseCode'],
95
95
  'rawResponseDescription': !exists(json, 'rawResponseDescription') ? undefined : json['rawResponseDescription'],
96
96
  'avsResponseCode': !exists(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
@@ -140,7 +140,7 @@ export function TransactionEntityToJSON(value) {
140
140
  'feeDetails': value.feeDetails === undefined ? undefined : (value.feeDetails.map(TransactionFeeDetailsEntityToJSON)),
141
141
  'currency': value.currency,
142
142
  'secCode': value.secCode,
143
- 'paymentMethod': PaymentMethodBaseEntityToJSON(value.paymentMethod),
143
+ 'paymentMethod': TransactionPaymentInstrumentBaseEntityToJSON(value.paymentMethod),
144
144
  'rawResponseCode': value.rawResponseCode,
145
145
  'rawResponseDescription': value.rawResponseDescription,
146
146
  'avsResponseCode': value.avsResponseCode,