@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,56 @@
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 BillingAddressDto
11
+ */
12
+ export interface BillingAddressDto {
13
+ /**
14
+ * The city of the account holder address.
15
+ * @type {string}
16
+ * @memberof BillingAddressDto
17
+ */
18
+ city: string;
19
+ /**
20
+ * The street address of the account holder.
21
+ * @type {string}
22
+ * @memberof BillingAddressDto
23
+ */
24
+ streetAddress: string;
25
+ /**
26
+ * The postal code of the account holder address.
27
+ * @type {string}
28
+ * @memberof BillingAddressDto
29
+ */
30
+ postalCode: string;
31
+ /**
32
+ * The country code of the account holder address.
33
+ * @type {string}
34
+ * @memberof BillingAddressDto
35
+ */
36
+ countryCode?: string;
37
+ /**
38
+ * The state code of the account holder address.
39
+ * @type {string}
40
+ * @memberof BillingAddressDto
41
+ */
42
+ subdivisionCode?: string;
43
+ /**
44
+ * The second line of the street address of the account holder.
45
+ * @type {string}
46
+ * @memberof BillingAddressDto
47
+ */
48
+ streetAddress2?: string;
49
+ }
50
+ /**
51
+ * Check if a given object implements the BillingAddressDto interface.
52
+ */
53
+ export declare function instanceOfBillingAddressDto(value: object): boolean;
54
+ export declare function BillingAddressDtoFromJSON(json: any): BillingAddressDto;
55
+ export declare function BillingAddressDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingAddressDto;
56
+ export declare function BillingAddressDtoToJSON(value?: BillingAddressDto | null): any;
@@ -8,41 +8,39 @@
8
8
  *
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.instanceOfBuyerAddressDto = instanceOfBuyerAddressDto;
12
- exports.BuyerAddressDtoFromJSON = BuyerAddressDtoFromJSON;
13
- exports.BuyerAddressDtoFromJSONTyped = BuyerAddressDtoFromJSONTyped;
14
- exports.BuyerAddressDtoToJSON = BuyerAddressDtoToJSON;
11
+ exports.instanceOfBillingAddressDto = instanceOfBillingAddressDto;
12
+ exports.BillingAddressDtoFromJSON = BillingAddressDtoFromJSON;
13
+ exports.BillingAddressDtoFromJSONTyped = BillingAddressDtoFromJSONTyped;
14
+ exports.BillingAddressDtoToJSON = BillingAddressDtoToJSON;
15
15
  const runtime_1 = require("../runtime");
16
16
  /**
17
- * Check if a given object implements the BuyerAddressDto interface.
17
+ * Check if a given object implements the BillingAddressDto interface.
18
18
  */
19
- function instanceOfBuyerAddressDto(value) {
19
+ function instanceOfBillingAddressDto(value) {
20
20
  let isInstance = true;
21
- isInstance = isInstance && "streetAddress" in value;
22
21
  isInstance = isInstance && "city" in value;
23
- isInstance = isInstance && "subdivision" in value;
22
+ isInstance = isInstance && "streetAddress" in value;
24
23
  isInstance = isInstance && "postalCode" in value;
25
- isInstance = isInstance && "countryCode" in value;
26
24
  return isInstance;
27
25
  }
28
- function BuyerAddressDtoFromJSON(json) {
29
- return BuyerAddressDtoFromJSONTyped(json, false);
26
+ function BillingAddressDtoFromJSON(json) {
27
+ return BillingAddressDtoFromJSONTyped(json, false);
30
28
  }
31
- function BuyerAddressDtoFromJSONTyped(json, ignoreDiscriminator) {
29
+ function BillingAddressDtoFromJSONTyped(json, ignoreDiscriminator) {
32
30
  if ((json === undefined) || (json === null)) {
33
31
  return json;
34
32
  }
35
33
  const typed = {
36
- 'streetAddress': json['streetAddress'],
37
34
  'city': json['city'],
38
- 'subdivision': json['subdivision'],
35
+ 'streetAddress': json['streetAddress'],
39
36
  'postalCode': json['postalCode'],
40
- 'countryCode': json['countryCode'],
37
+ 'countryCode': !(0, runtime_1.exists)(json, 'countryCode') ? undefined : json['countryCode'],
38
+ 'subdivisionCode': !(0, runtime_1.exists)(json, 'subdivisionCode') ? undefined : json['subdivisionCode'],
41
39
  'streetAddress2': !(0, runtime_1.exists)(json, 'streetAddress2') ? undefined : json['streetAddress2'],
42
40
  };
43
41
  return (0, runtime_1.removeNullUndefined)(typed);
44
42
  }
45
- function BuyerAddressDtoToJSON(value) {
43
+ function BillingAddressDtoToJSON(value) {
46
44
  if (value === undefined) {
47
45
  return undefined;
48
46
  }
@@ -50,11 +48,11 @@ function BuyerAddressDtoToJSON(value) {
50
48
  return null;
51
49
  }
52
50
  return {
53
- 'streetAddress': value.streetAddress,
54
51
  'city': value.city,
55
- 'subdivision': value.subdivision,
52
+ 'streetAddress': value.streetAddress,
56
53
  'postalCode': value.postalCode,
57
54
  'countryCode': value.countryCode,
55
+ 'subdivisionCode': value.subdivisionCode,
58
56
  'streetAddress2': value.streetAddress2,
59
57
  };
60
58
  }
@@ -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,127 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Channel Payments API
6
+ *
7
+ * NOTE: This class is auto generated. Do not edit the class manually.
8
+ *
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.CheckoutSessionBaseEntityStatusEnum = exports.CheckoutSessionBaseEntityUiModeEnum = void 0;
12
+ exports.instanceOfCheckoutSessionBaseEntity = instanceOfCheckoutSessionBaseEntity;
13
+ exports.CheckoutSessionBaseEntityFromJSON = CheckoutSessionBaseEntityFromJSON;
14
+ exports.CheckoutSessionBaseEntityFromJSONTyped = CheckoutSessionBaseEntityFromJSONTyped;
15
+ exports.CheckoutSessionBaseEntityToJSON = CheckoutSessionBaseEntityToJSON;
16
+ const runtime_1 = require("../runtime");
17
+ const AvailablePaymentMethodEntity_1 = require("./AvailablePaymentMethodEntity");
18
+ const CheckoutSessionItemBaseEntity_1 = require("./CheckoutSessionItemBaseEntity");
19
+ const TagEntity_1 = require("./TagEntity");
20
+ /**
21
+ * @export
22
+ */
23
+ exports.CheckoutSessionBaseEntityUiModeEnum = {
24
+ Hosted: 'HOSTED',
25
+ Embedded: 'EMBEDDED'
26
+ };
27
+ /**
28
+ * @export
29
+ */
30
+ exports.CheckoutSessionBaseEntityStatusEnum = {
31
+ Pending: 'PENDING',
32
+ Processing: 'PROCESSING',
33
+ Expired: 'EXPIRED',
34
+ Completed: 'COMPLETED'
35
+ };
36
+ /**
37
+ * Check if a given object implements the CheckoutSessionBaseEntity interface.
38
+ */
39
+ function instanceOfCheckoutSessionBaseEntity(value) {
40
+ let isInstance = true;
41
+ isInstance = isInstance && "sessionId" in value;
42
+ isInstance = isInstance && "merchantId" in value;
43
+ isInstance = isInstance && "uiMode" in value;
44
+ isInstance = isInstance && "status" in value;
45
+ isInstance = isInstance && "currency" in value;
46
+ isInstance = isInstance && "total" in value;
47
+ isInstance = isInstance && "subtotal" in value;
48
+ isInstance = isInstance && "feesTotal" in value;
49
+ isInstance = isInstance && "taxTotal" in value;
50
+ isInstance = isInstance && "discountTotal" in value;
51
+ isInstance = isInstance && "shippingTotal" in value;
52
+ isInstance = isInstance && "availablePaymentMethods" in value;
53
+ isInstance = isInstance && "successRedirectUrl" in value;
54
+ isInstance = isInstance && "cancelRedirectUrl" in value;
55
+ isInstance = isInstance && "country" in value;
56
+ isInstance = isInstance && "canExtend" in value;
57
+ return isInstance;
58
+ }
59
+ function CheckoutSessionBaseEntityFromJSON(json) {
60
+ return CheckoutSessionBaseEntityFromJSONTyped(json, false);
61
+ }
62
+ function CheckoutSessionBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
63
+ if ((json === undefined) || (json === null)) {
64
+ return json;
65
+ }
66
+ const typed = {
67
+ 'sessionId': json['sessionId'],
68
+ 'merchantId': json['merchantId'],
69
+ 'uiMode': json['uiMode'],
70
+ 'status': json['status'],
71
+ 'currency': json['currency'],
72
+ 'total': json['total'],
73
+ 'subtotal': json['subtotal'],
74
+ 'feesTotal': json['feesTotal'],
75
+ 'taxTotal': json['taxTotal'],
76
+ 'discountTotal': json['discountTotal'],
77
+ 'shippingTotal': json['shippingTotal'],
78
+ 'availablePaymentMethods': (json['availablePaymentMethods'].map(AvailablePaymentMethodEntity_1.AvailablePaymentMethodEntityFromJSON)),
79
+ 'items': !(0, runtime_1.exists)(json, 'items') ? undefined : (json['items'].map(CheckoutSessionItemBaseEntity_1.CheckoutSessionItemBaseEntityFromJSON)),
80
+ 'successRedirectUrl': json['successRedirectUrl'],
81
+ 'cancelRedirectUrl': json['cancelRedirectUrl'],
82
+ 'country': json['country'],
83
+ 'expiresAt': !(0, runtime_1.exists)(json, 'expiresAt') ? undefined : (new Date(json['expiresAt'])),
84
+ 'expiredAt': !(0, runtime_1.exists)(json, 'expiredAt') ? undefined : (new Date(json['expiredAt'])),
85
+ 'canExtend': json['canExtend'],
86
+ 'expiredReason': !(0, runtime_1.exists)(json, 'expiredReason') ? undefined : json['expiredReason'],
87
+ 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(TagEntity_1.TagEntityFromJSON)),
88
+ 'canStore': !(0, runtime_1.exists)(json, 'canStore') ? undefined : json['canStore'],
89
+ 'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
90
+ 'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
91
+ };
92
+ return (0, runtime_1.removeNullUndefined)(typed);
93
+ }
94
+ function CheckoutSessionBaseEntityToJSON(value) {
95
+ if (value === undefined) {
96
+ return undefined;
97
+ }
98
+ if (value === null) {
99
+ return null;
100
+ }
101
+ return {
102
+ 'sessionId': value.sessionId,
103
+ 'merchantId': value.merchantId,
104
+ 'uiMode': value.uiMode,
105
+ 'status': value.status,
106
+ 'currency': value.currency,
107
+ 'total': value.total,
108
+ 'subtotal': value.subtotal,
109
+ 'feesTotal': value.feesTotal,
110
+ 'taxTotal': value.taxTotal,
111
+ 'discountTotal': value.discountTotal,
112
+ 'shippingTotal': value.shippingTotal,
113
+ 'availablePaymentMethods': (value.availablePaymentMethods.map(AvailablePaymentMethodEntity_1.AvailablePaymentMethodEntityToJSON)),
114
+ 'items': value.items === undefined ? undefined : (value.items.map(CheckoutSessionItemBaseEntity_1.CheckoutSessionItemBaseEntityToJSON)),
115
+ 'successRedirectUrl': value.successRedirectUrl,
116
+ 'cancelRedirectUrl': value.cancelRedirectUrl,
117
+ 'country': value.country,
118
+ 'expiresAt': value.expiresAt === undefined ? undefined : (value.expiresAt.toISOString()),
119
+ 'expiredAt': value.expiredAt === undefined ? undefined : (value.expiredAt.toISOString()),
120
+ 'canExtend': value.canExtend,
121
+ 'expiredReason': value.expiredReason,
122
+ 'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntity_1.TagEntityToJSON)),
123
+ 'canStore': value.canStore,
124
+ 'buyerId': value.buyerId,
125
+ 'externalBuyerId': value.externalBuyerId,
126
+ };
127
+ }
@@ -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}
@@ -86,9 +86,10 @@ function CheckoutSessionEntityFromJSONTyped(json, ignoreDiscriminator) {
86
86
  'canExtend': json['canExtend'],
87
87
  'expiredReason': !(0, runtime_1.exists)(json, 'expiredReason') ? undefined : json['expiredReason'],
88
88
  'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(TagEntity_1.TagEntityFromJSON)),
89
- 'redirectUrl': !(0, runtime_1.exists)(json, 'redirectUrl') ? undefined : json['redirectUrl'],
89
+ 'canStore': !(0, runtime_1.exists)(json, 'canStore') ? undefined : json['canStore'],
90
90
  'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
91
91
  'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
92
+ 'redirectUrl': !(0, runtime_1.exists)(json, 'redirectUrl') ? undefined : json['redirectUrl'],
92
93
  'externalTransactionId': !(0, runtime_1.exists)(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
93
94
  'secCode': !(0, runtime_1.exists)(json, 'secCode') ? undefined : json['secCode'],
94
95
  };
@@ -123,9 +124,10 @@ function CheckoutSessionEntityToJSON(value) {
123
124
  'canExtend': value.canExtend,
124
125
  'expiredReason': value.expiredReason,
125
126
  'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntity_1.TagEntityToJSON)),
126
- 'redirectUrl': value.redirectUrl,
127
+ 'canStore': value.canStore,
127
128
  'buyerId': value.buyerId,
128
129
  'externalBuyerId': value.externalBuyerId,
130
+ 'redirectUrl': value.redirectUrl,
129
131
  'externalTransactionId': value.externalTransactionId,
130
132
  'secCode': value.secCode,
131
133
  };
@@ -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,69 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Channel Payments API
6
+ *
7
+ * NOTE: This class is auto generated. Do not edit the class manually.
8
+ *
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.instanceOfCheckoutSessionItemBaseEntity = instanceOfCheckoutSessionItemBaseEntity;
12
+ exports.CheckoutSessionItemBaseEntityFromJSON = CheckoutSessionItemBaseEntityFromJSON;
13
+ exports.CheckoutSessionItemBaseEntityFromJSONTyped = CheckoutSessionItemBaseEntityFromJSONTyped;
14
+ exports.CheckoutSessionItemBaseEntityToJSON = CheckoutSessionItemBaseEntityToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ /**
17
+ * Check if a given object implements the CheckoutSessionItemBaseEntity interface.
18
+ */
19
+ function instanceOfCheckoutSessionItemBaseEntity(value) {
20
+ let isInstance = true;
21
+ isInstance = isInstance && "itemId" in value;
22
+ isInstance = isInstance && "sessionId" in value;
23
+ isInstance = isInstance && "description" in value;
24
+ isInstance = isInstance && "quantity" in value;
25
+ isInstance = isInstance && "unitPrice" in value;
26
+ isInstance = isInstance && "total" in value;
27
+ return isInstance;
28
+ }
29
+ function CheckoutSessionItemBaseEntityFromJSON(json) {
30
+ return CheckoutSessionItemBaseEntityFromJSONTyped(json, false);
31
+ }
32
+ function CheckoutSessionItemBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
33
+ if ((json === undefined) || (json === null)) {
34
+ return json;
35
+ }
36
+ const typed = {
37
+ 'itemId': json['itemId'],
38
+ 'sessionId': json['sessionId'],
39
+ 'description': json['description'],
40
+ 'quantity': json['quantity'],
41
+ 'unitPrice': json['unitPrice'],
42
+ 'total': json['total'],
43
+ 'subtotal': !(0, runtime_1.exists)(json, 'subtotal') ? undefined : json['subtotal'],
44
+ 'discountTotal': !(0, runtime_1.exists)(json, 'discountTotal') ? undefined : json['discountTotal'],
45
+ 'taxTotal': !(0, runtime_1.exists)(json, 'taxTotal') ? undefined : json['taxTotal'],
46
+ 'feesTotal': !(0, runtime_1.exists)(json, 'feesTotal') ? undefined : json['feesTotal'],
47
+ };
48
+ return (0, runtime_1.removeNullUndefined)(typed);
49
+ }
50
+ function CheckoutSessionItemBaseEntityToJSON(value) {
51
+ if (value === undefined) {
52
+ return undefined;
53
+ }
54
+ if (value === null) {
55
+ return null;
56
+ }
57
+ return {
58
+ 'itemId': value.itemId,
59
+ 'sessionId': value.sessionId,
60
+ 'description': value.description,
61
+ 'quantity': value.quantity,
62
+ 'unitPrice': value.unitPrice,
63
+ 'total': value.total,
64
+ 'subtotal': value.subtotal,
65
+ 'discountTotal': value.discountTotal,
66
+ 'taxTotal': value.taxTotal,
67
+ 'feesTotal': value.feesTotal,
68
+ };
69
+ }
@@ -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}