@channelpayments/node-sdk 1.185.0 → 1.187.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 (41) hide show
  1. package/dist/cjs/apis/ChannelPaymentsApi.d.ts +1 -1
  2. package/dist/cjs/apis/ChannelPaymentsApi.js +0 -3
  3. package/dist/cjs/models/BillingAddressEntity.d.ts +68 -0
  4. package/dist/cjs/models/BillingAddressEntity.js +66 -0
  5. package/dist/cjs/models/BillingDetailsDto.d.ts +45 -0
  6. package/dist/cjs/models/BillingDetailsDto.js +56 -0
  7. package/dist/cjs/models/BillingDetailsEntity.d.ts +45 -0
  8. package/dist/cjs/models/BillingDetailsEntity.js +56 -0
  9. package/dist/cjs/models/CreateServicePaymentMethodDto.d.ts +109 -0
  10. package/dist/cjs/models/CreateServicePaymentMethodDto.js +84 -0
  11. package/dist/cjs/models/CreateStoredCardPaymentMethodDto.d.ts +69 -0
  12. package/dist/cjs/models/{CreateStoredCardPaymentMethod.js → CreateStoredCardPaymentMethodDto.js} +15 -10
  13. package/dist/cjs/models/PaymentMethodEntity.d.ts +13 -0
  14. package/dist/cjs/models/PaymentMethodEntity.js +5 -0
  15. package/dist/cjs/models/PaymentMethodServiceEntity.d.ts +13 -0
  16. package/dist/cjs/models/PaymentMethodServiceEntity.js +5 -0
  17. package/dist/cjs/models/index.d.ts +5 -1
  18. package/dist/cjs/models/index.js +5 -1
  19. package/dist/cjs/runtime.js +1 -1
  20. package/dist/mjs/apis/ChannelPaymentsApi.d.ts +1 -1
  21. package/dist/mjs/apis/ChannelPaymentsApi.js +0 -3
  22. package/dist/mjs/models/BillingAddressEntity.d.ts +68 -0
  23. package/dist/mjs/models/BillingAddressEntity.js +60 -0
  24. package/dist/mjs/models/BillingDetailsDto.d.ts +45 -0
  25. package/dist/mjs/models/BillingDetailsDto.js +50 -0
  26. package/dist/mjs/models/BillingDetailsEntity.d.ts +45 -0
  27. package/dist/mjs/models/BillingDetailsEntity.js +50 -0
  28. package/dist/mjs/models/CreateServicePaymentMethodDto.d.ts +109 -0
  29. package/dist/mjs/models/CreateServicePaymentMethodDto.js +77 -0
  30. package/dist/mjs/models/CreateStoredCardPaymentMethodDto.d.ts +69 -0
  31. package/dist/mjs/models/{CreateStoredCardPaymentMethod.js → CreateStoredCardPaymentMethodDto.js} +11 -6
  32. package/dist/mjs/models/PaymentMethodEntity.d.ts +13 -0
  33. package/dist/mjs/models/PaymentMethodEntity.js +5 -0
  34. package/dist/mjs/models/PaymentMethodServiceEntity.d.ts +13 -0
  35. package/dist/mjs/models/PaymentMethodServiceEntity.js +5 -0
  36. package/dist/mjs/models/index.d.ts +5 -1
  37. package/dist/mjs/models/index.js +5 -1
  38. package/dist/mjs/runtime.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/cjs/models/CreateStoredCardPaymentMethod.d.ts +0 -56
  41. package/dist/mjs/models/CreateStoredCardPaymentMethod.d.ts +0 -56
@@ -31,7 +31,7 @@ export interface SearchChangeNotificationsRequest {
31
31
  cursor?: string;
32
32
  }
33
33
  export interface SearchPaymentMethodsRequest {
34
- merchantId: string;
34
+ merchantId?: string;
35
35
  paymentMethodId?: string;
36
36
  externalPaymentMethodId?: string;
37
37
  accountHolderName?: string;
@@ -1724,9 +1724,6 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
1724
1724
  */
1725
1725
  searchPaymentMethods(requestParameters) {
1726
1726
  return __awaiter(this, void 0, void 0, function* () {
1727
- if (requestParameters.merchantId === null || requestParameters.merchantId === undefined) {
1728
- throw new runtime.RequiredError('merchantId', 'Required parameter \'merchantId\' was null or undefined when calling searchPaymentMethods.');
1729
- }
1730
1727
  const queryParameters = {};
1731
1728
  if (requestParameters.merchantId !== undefined) {
1732
1729
  queryParameters['merchantId'] = requestParameters.merchantId;
@@ -0,0 +1,68 @@
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 BillingAddressEntity
11
+ */
12
+ export interface BillingAddressEntity {
13
+ /**
14
+ * The country of the account holder address.
15
+ * @type {string}
16
+ * @memberof BillingAddressEntity
17
+ */
18
+ country: string;
19
+ /**
20
+ * The country code of the account holder address.
21
+ * @type {string}
22
+ * @memberof BillingAddressEntity
23
+ */
24
+ countryCode: string;
25
+ /**
26
+ * The subdivision of the account holder address.
27
+ * @type {string}
28
+ * @memberof BillingAddressEntity
29
+ */
30
+ subdivision: string;
31
+ /**
32
+ * The subdivision code of the account holder address.
33
+ * @type {string}
34
+ * @memberof BillingAddressEntity
35
+ */
36
+ subdivisionCode: string;
37
+ /**
38
+ * The city of the account holder address.
39
+ * @type {string}
40
+ * @memberof BillingAddressEntity
41
+ */
42
+ city: string;
43
+ /**
44
+ * The street address of the account holder.
45
+ * @type {string}
46
+ * @memberof BillingAddressEntity
47
+ */
48
+ streetAddress: string;
49
+ /**
50
+ * The postal code of the account holder address.
51
+ * @type {string}
52
+ * @memberof BillingAddressEntity
53
+ */
54
+ postalCode: string;
55
+ /**
56
+ * The second line of the street address of the account holder.
57
+ * @type {string}
58
+ * @memberof BillingAddressEntity
59
+ */
60
+ streetAddress2?: string;
61
+ }
62
+ /**
63
+ * Check if a given object implements the BillingAddressEntity interface.
64
+ */
65
+ export declare function instanceOfBillingAddressEntity(value: object): boolean;
66
+ export declare function BillingAddressEntityFromJSON(json: any): BillingAddressEntity;
67
+ export declare function BillingAddressEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingAddressEntity;
68
+ export declare function BillingAddressEntityToJSON(value?: BillingAddressEntity | null): any;
@@ -0,0 +1,66 @@
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.instanceOfBillingAddressEntity = instanceOfBillingAddressEntity;
12
+ exports.BillingAddressEntityFromJSON = BillingAddressEntityFromJSON;
13
+ exports.BillingAddressEntityFromJSONTyped = BillingAddressEntityFromJSONTyped;
14
+ exports.BillingAddressEntityToJSON = BillingAddressEntityToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ /**
17
+ * Check if a given object implements the BillingAddressEntity interface.
18
+ */
19
+ function instanceOfBillingAddressEntity(value) {
20
+ let isInstance = true;
21
+ isInstance = isInstance && "country" in value;
22
+ isInstance = isInstance && "countryCode" in value;
23
+ isInstance = isInstance && "subdivision" in value;
24
+ isInstance = isInstance && "subdivisionCode" in value;
25
+ isInstance = isInstance && "city" in value;
26
+ isInstance = isInstance && "streetAddress" in value;
27
+ isInstance = isInstance && "postalCode" in value;
28
+ return isInstance;
29
+ }
30
+ function BillingAddressEntityFromJSON(json) {
31
+ return BillingAddressEntityFromJSONTyped(json, false);
32
+ }
33
+ function BillingAddressEntityFromJSONTyped(json, ignoreDiscriminator) {
34
+ if ((json === undefined) || (json === null)) {
35
+ return json;
36
+ }
37
+ const typed = {
38
+ 'country': json['country'],
39
+ 'countryCode': json['countryCode'],
40
+ 'subdivision': json['subdivision'],
41
+ 'subdivisionCode': json['subdivisionCode'],
42
+ 'city': json['city'],
43
+ 'streetAddress': json['streetAddress'],
44
+ 'postalCode': json['postalCode'],
45
+ 'streetAddress2': !(0, runtime_1.exists)(json, 'streetAddress2') ? undefined : json['streetAddress2'],
46
+ };
47
+ return (0, runtime_1.removeNullUndefined)(typed);
48
+ }
49
+ function BillingAddressEntityToJSON(value) {
50
+ if (value === undefined) {
51
+ return undefined;
52
+ }
53
+ if (value === null) {
54
+ return null;
55
+ }
56
+ return {
57
+ 'country': value.country,
58
+ 'countryCode': value.countryCode,
59
+ 'subdivision': value.subdivision,
60
+ 'subdivisionCode': value.subdivisionCode,
61
+ 'city': value.city,
62
+ 'streetAddress': value.streetAddress,
63
+ 'postalCode': value.postalCode,
64
+ 'streetAddress2': value.streetAddress2,
65
+ };
66
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ import type { BillingAddressDto } from './BillingAddressDto';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface BillingDetailsDto
12
+ */
13
+ export interface BillingDetailsDto {
14
+ /**
15
+ * The first name of the account holder.
16
+ * @type {string}
17
+ * @memberof BillingDetailsDto
18
+ */
19
+ givenName: string;
20
+ /**
21
+ * The last name of the account holder.
22
+ * @type {string}
23
+ * @memberof BillingDetailsDto
24
+ */
25
+ familyName: string;
26
+ /**
27
+ * The email address of the account holder.
28
+ * @type {string}
29
+ * @memberof BillingDetailsDto
30
+ */
31
+ email: string;
32
+ /**
33
+ * The address of the account holder.
34
+ * @type {BillingAddressDto}
35
+ * @memberof BillingDetailsDto
36
+ */
37
+ billingAddress: BillingAddressDto;
38
+ }
39
+ /**
40
+ * Check if a given object implements the BillingDetailsDto interface.
41
+ */
42
+ export declare function instanceOfBillingDetailsDto(value: object): boolean;
43
+ export declare function BillingDetailsDtoFromJSON(json: any): BillingDetailsDto;
44
+ export declare function BillingDetailsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingDetailsDto;
45
+ export declare function BillingDetailsDtoToJSON(value?: BillingDetailsDto | null): any;
@@ -0,0 +1,56 @@
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.instanceOfBillingDetailsDto = instanceOfBillingDetailsDto;
12
+ exports.BillingDetailsDtoFromJSON = BillingDetailsDtoFromJSON;
13
+ exports.BillingDetailsDtoFromJSONTyped = BillingDetailsDtoFromJSONTyped;
14
+ exports.BillingDetailsDtoToJSON = BillingDetailsDtoToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ const BillingAddressDto_1 = require("./BillingAddressDto");
17
+ /**
18
+ * Check if a given object implements the BillingDetailsDto interface.
19
+ */
20
+ function instanceOfBillingDetailsDto(value) {
21
+ let isInstance = true;
22
+ isInstance = isInstance && "givenName" in value;
23
+ isInstance = isInstance && "familyName" in value;
24
+ isInstance = isInstance && "email" in value;
25
+ isInstance = isInstance && "billingAddress" in value;
26
+ return isInstance;
27
+ }
28
+ function BillingDetailsDtoFromJSON(json) {
29
+ return BillingDetailsDtoFromJSONTyped(json, false);
30
+ }
31
+ function BillingDetailsDtoFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ const typed = {
36
+ 'givenName': json['givenName'],
37
+ 'familyName': json['familyName'],
38
+ 'email': json['email'],
39
+ 'billingAddress': (0, BillingAddressDto_1.BillingAddressDtoFromJSON)(json['billingAddress']),
40
+ };
41
+ return (0, runtime_1.removeNullUndefined)(typed);
42
+ }
43
+ function BillingDetailsDtoToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'givenName': value.givenName,
52
+ 'familyName': value.familyName,
53
+ 'email': value.email,
54
+ 'billingAddress': (0, BillingAddressDto_1.BillingAddressDtoToJSON)(value.billingAddress),
55
+ };
56
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ import type { BillingAddressEntity } from './BillingAddressEntity';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface BillingDetailsEntity
12
+ */
13
+ export interface BillingDetailsEntity {
14
+ /**
15
+ * The first name of the account holder.
16
+ * @type {string}
17
+ * @memberof BillingDetailsEntity
18
+ */
19
+ givenName: string;
20
+ /**
21
+ * The last name of the account holder.
22
+ * @type {string}
23
+ * @memberof BillingDetailsEntity
24
+ */
25
+ familyName: string;
26
+ /**
27
+ * The email address of the account holder.
28
+ * @type {string}
29
+ * @memberof BillingDetailsEntity
30
+ */
31
+ email: string;
32
+ /**
33
+ * The address of the account holder.
34
+ * @type {BillingAddressEntity}
35
+ * @memberof BillingDetailsEntity
36
+ */
37
+ billingAddress: BillingAddressEntity;
38
+ }
39
+ /**
40
+ * Check if a given object implements the BillingDetailsEntity interface.
41
+ */
42
+ export declare function instanceOfBillingDetailsEntity(value: object): boolean;
43
+ export declare function BillingDetailsEntityFromJSON(json: any): BillingDetailsEntity;
44
+ export declare function BillingDetailsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingDetailsEntity;
45
+ export declare function BillingDetailsEntityToJSON(value?: BillingDetailsEntity | null): any;
@@ -0,0 +1,56 @@
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.instanceOfBillingDetailsEntity = instanceOfBillingDetailsEntity;
12
+ exports.BillingDetailsEntityFromJSON = BillingDetailsEntityFromJSON;
13
+ exports.BillingDetailsEntityFromJSONTyped = BillingDetailsEntityFromJSONTyped;
14
+ exports.BillingDetailsEntityToJSON = BillingDetailsEntityToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ const BillingAddressEntity_1 = require("./BillingAddressEntity");
17
+ /**
18
+ * Check if a given object implements the BillingDetailsEntity interface.
19
+ */
20
+ function instanceOfBillingDetailsEntity(value) {
21
+ let isInstance = true;
22
+ isInstance = isInstance && "givenName" in value;
23
+ isInstance = isInstance && "familyName" in value;
24
+ isInstance = isInstance && "email" in value;
25
+ isInstance = isInstance && "billingAddress" in value;
26
+ return isInstance;
27
+ }
28
+ function BillingDetailsEntityFromJSON(json) {
29
+ return BillingDetailsEntityFromJSONTyped(json, false);
30
+ }
31
+ function BillingDetailsEntityFromJSONTyped(json, ignoreDiscriminator) {
32
+ if ((json === undefined) || (json === null)) {
33
+ return json;
34
+ }
35
+ const typed = {
36
+ 'givenName': json['givenName'],
37
+ 'familyName': json['familyName'],
38
+ 'email': json['email'],
39
+ 'billingAddress': (0, BillingAddressEntity_1.BillingAddressEntityFromJSON)(json['billingAddress']),
40
+ };
41
+ return (0, runtime_1.removeNullUndefined)(typed);
42
+ }
43
+ function BillingDetailsEntityToJSON(value) {
44
+ if (value === undefined) {
45
+ return undefined;
46
+ }
47
+ if (value === null) {
48
+ return null;
49
+ }
50
+ return {
51
+ 'givenName': value.givenName,
52
+ 'familyName': value.familyName,
53
+ 'email': value.email,
54
+ 'billingAddress': (0, BillingAddressEntity_1.BillingAddressEntityToJSON)(value.billingAddress),
55
+ };
56
+ }
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ import type { BillingDetailsDto } from './BillingDetailsDto';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface CreateServicePaymentMethodDto
12
+ */
13
+ export interface CreateServicePaymentMethodDto {
14
+ /**
15
+ * The payment method
16
+ * @type {string}
17
+ * @memberof CreateServicePaymentMethodDto
18
+ */
19
+ method: CreateServicePaymentMethodDtoMethodEnum;
20
+ /**
21
+ * The 13 - 19 digit card number. Must be unset if method is not CARD.
22
+ * @type {string}
23
+ * @memberof CreateServicePaymentMethodDto
24
+ */
25
+ number?: string;
26
+ /**
27
+ * The expiration date of the card, formatted MM/YY, Must be unset if method is not CARD.
28
+ * @type {string}
29
+ * @memberof CreateServicePaymentMethodDto
30
+ */
31
+ expirationDate?: string;
32
+ /**
33
+ * The routing number of the bank account. Must be unset if method is not BANK_ACCOUNT.
34
+ * @type {string}
35
+ * @memberof CreateServicePaymentMethodDto
36
+ */
37
+ abaNumber?: string;
38
+ /**
39
+ * The account number of the bank account. Must be unset if method is not BANK_ACCOUNT.
40
+ * @type {string}
41
+ * @memberof CreateServicePaymentMethodDto
42
+ */
43
+ accountNumber?: string;
44
+ /**
45
+ * The account type of the bank account. Must be unset if method is not BANK_ACCOUNT.
46
+ * @type {string}
47
+ * @memberof CreateServicePaymentMethodDto
48
+ */
49
+ accountType?: CreateServicePaymentMethodDtoAccountTypeEnum;
50
+ /**
51
+ * The name of the account holder of the bank account. Must be unset if method is not BANK_ACCOUNT.
52
+ * @type {string}
53
+ * @memberof CreateServicePaymentMethodDto
54
+ */
55
+ accountHolderName?: string;
56
+ /**
57
+ * The external ID of the buyer to associate the payment to
58
+ * @type {string}
59
+ * @memberof CreateServicePaymentMethodDto
60
+ */
61
+ externalBuyerId?: string;
62
+ /**
63
+ * The Channel Payments ID of the buyer to associate the payment to
64
+ * @type {string}
65
+ * @memberof CreateServicePaymentMethodDto
66
+ */
67
+ buyerId?: string;
68
+ /**
69
+ * An external ID to match the card against your own records
70
+ * @type {string}
71
+ * @memberof CreateServicePaymentMethodDto
72
+ */
73
+ externalPaymentMethodId?: string;
74
+ /**
75
+ * The billing details of the account holder.
76
+ * @type {BillingDetailsDto}
77
+ * @memberof CreateServicePaymentMethodDto
78
+ */
79
+ billingDetails?: BillingDetailsDto;
80
+ /**
81
+ * If the customer initiated the payment method creation or not.
82
+ * @type {boolean}
83
+ * @memberof CreateServicePaymentMethodDto
84
+ */
85
+ isCustomerStored?: boolean;
86
+ }
87
+ /**
88
+ * @export
89
+ */
90
+ export declare const CreateServicePaymentMethodDtoMethodEnum: {
91
+ readonly Card: "CARD";
92
+ readonly Bank: "BANK";
93
+ };
94
+ export type CreateServicePaymentMethodDtoMethodEnum = typeof CreateServicePaymentMethodDtoMethodEnum[keyof typeof CreateServicePaymentMethodDtoMethodEnum];
95
+ /**
96
+ * @export
97
+ */
98
+ export declare const CreateServicePaymentMethodDtoAccountTypeEnum: {
99
+ readonly Checking: "CHECKING";
100
+ readonly Savings: "SAVINGS";
101
+ };
102
+ export type CreateServicePaymentMethodDtoAccountTypeEnum = typeof CreateServicePaymentMethodDtoAccountTypeEnum[keyof typeof CreateServicePaymentMethodDtoAccountTypeEnum];
103
+ /**
104
+ * Check if a given object implements the CreateServicePaymentMethodDto interface.
105
+ */
106
+ export declare function instanceOfCreateServicePaymentMethodDto(value: object): boolean;
107
+ export declare function CreateServicePaymentMethodDtoFromJSON(json: any): CreateServicePaymentMethodDto;
108
+ export declare function CreateServicePaymentMethodDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateServicePaymentMethodDto;
109
+ export declare function CreateServicePaymentMethodDtoToJSON(value?: CreateServicePaymentMethodDto | null): any;
@@ -0,0 +1,84 @@
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.CreateServicePaymentMethodDtoAccountTypeEnum = exports.CreateServicePaymentMethodDtoMethodEnum = void 0;
12
+ exports.instanceOfCreateServicePaymentMethodDto = instanceOfCreateServicePaymentMethodDto;
13
+ exports.CreateServicePaymentMethodDtoFromJSON = CreateServicePaymentMethodDtoFromJSON;
14
+ exports.CreateServicePaymentMethodDtoFromJSONTyped = CreateServicePaymentMethodDtoFromJSONTyped;
15
+ exports.CreateServicePaymentMethodDtoToJSON = CreateServicePaymentMethodDtoToJSON;
16
+ const runtime_1 = require("../runtime");
17
+ const BillingDetailsDto_1 = require("./BillingDetailsDto");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.CreateServicePaymentMethodDtoMethodEnum = {
22
+ Card: 'CARD',
23
+ Bank: 'BANK'
24
+ };
25
+ /**
26
+ * @export
27
+ */
28
+ exports.CreateServicePaymentMethodDtoAccountTypeEnum = {
29
+ Checking: 'CHECKING',
30
+ Savings: 'SAVINGS'
31
+ };
32
+ /**
33
+ * Check if a given object implements the CreateServicePaymentMethodDto interface.
34
+ */
35
+ function instanceOfCreateServicePaymentMethodDto(value) {
36
+ let isInstance = true;
37
+ isInstance = isInstance && "method" in value;
38
+ return isInstance;
39
+ }
40
+ function CreateServicePaymentMethodDtoFromJSON(json) {
41
+ return CreateServicePaymentMethodDtoFromJSONTyped(json, false);
42
+ }
43
+ function CreateServicePaymentMethodDtoFromJSONTyped(json, ignoreDiscriminator) {
44
+ if ((json === undefined) || (json === null)) {
45
+ return json;
46
+ }
47
+ const typed = {
48
+ 'method': json['method'],
49
+ 'number': !(0, runtime_1.exists)(json, 'number') ? undefined : json['number'],
50
+ 'expirationDate': !(0, runtime_1.exists)(json, 'expirationDate') ? undefined : json['expirationDate'],
51
+ 'abaNumber': !(0, runtime_1.exists)(json, 'abaNumber') ? undefined : json['abaNumber'],
52
+ 'accountNumber': !(0, runtime_1.exists)(json, 'accountNumber') ? undefined : json['accountNumber'],
53
+ 'accountType': !(0, runtime_1.exists)(json, 'accountType') ? undefined : json['accountType'],
54
+ 'accountHolderName': !(0, runtime_1.exists)(json, 'accountHolderName') ? undefined : json['accountHolderName'],
55
+ 'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
56
+ 'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
57
+ 'externalPaymentMethodId': !(0, runtime_1.exists)(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
58
+ 'billingDetails': !(0, runtime_1.exists)(json, 'billingDetails') ? undefined : (0, BillingDetailsDto_1.BillingDetailsDtoFromJSON)(json['billingDetails']),
59
+ 'isCustomerStored': !(0, runtime_1.exists)(json, 'isCustomerStored') ? undefined : json['isCustomerStored'],
60
+ };
61
+ return (0, runtime_1.removeNullUndefined)(typed);
62
+ }
63
+ function CreateServicePaymentMethodDtoToJSON(value) {
64
+ if (value === undefined) {
65
+ return undefined;
66
+ }
67
+ if (value === null) {
68
+ return null;
69
+ }
70
+ return {
71
+ 'method': value.method,
72
+ 'number': value.number,
73
+ 'expirationDate': value.expirationDate,
74
+ 'abaNumber': value.abaNumber,
75
+ 'accountNumber': value.accountNumber,
76
+ 'accountType': value.accountType,
77
+ 'accountHolderName': value.accountHolderName,
78
+ 'externalBuyerId': value.externalBuyerId,
79
+ 'buyerId': value.buyerId,
80
+ 'externalPaymentMethodId': value.externalPaymentMethodId,
81
+ 'billingDetails': (0, BillingDetailsDto_1.BillingDetailsDtoToJSON)(value.billingDetails),
82
+ 'isCustomerStored': value.isCustomerStored,
83
+ };
84
+ }
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ import type { BillingDetailsDto } from './BillingDetailsDto';
8
+ /**
9
+ *
10
+ * @export
11
+ * @interface CreateStoredCardPaymentMethodDto
12
+ */
13
+ export interface CreateStoredCardPaymentMethodDto {
14
+ /**
15
+ * The payment method id.
16
+ * @type {string}
17
+ * @memberof CreateStoredCardPaymentMethodDto
18
+ */
19
+ paymentMethodIntegrationId: string;
20
+ /**
21
+ * The integration id.
22
+ * @type {string}
23
+ * @memberof CreateStoredCardPaymentMethodDto
24
+ */
25
+ integrationId: string;
26
+ /**
27
+ * The merchant id.
28
+ * @type {string}
29
+ * @memberof CreateStoredCardPaymentMethodDto
30
+ */
31
+ merchantId: string;
32
+ /**
33
+ * The buyer id.
34
+ * @type {string}
35
+ * @memberof CreateStoredCardPaymentMethodDto
36
+ */
37
+ buyerId?: string;
38
+ /**
39
+ * The external buyer id.
40
+ * @type {string}
41
+ * @memberof CreateStoredCardPaymentMethodDto
42
+ */
43
+ externalBuyerId?: string;
44
+ /**
45
+ * The name of the account holder.
46
+ * @type {string}
47
+ * @memberof CreateStoredCardPaymentMethodDto
48
+ */
49
+ accountHolderName?: string;
50
+ /**
51
+ * The billing details of the account holder.
52
+ * @type {BillingDetailsDto}
53
+ * @memberof CreateStoredCardPaymentMethodDto
54
+ */
55
+ billingDetails?: BillingDetailsDto;
56
+ /**
57
+ * If the customer initiated the payment method creation or not.
58
+ * @type {boolean}
59
+ * @memberof CreateStoredCardPaymentMethodDto
60
+ */
61
+ isCustomerStored?: boolean;
62
+ }
63
+ /**
64
+ * Check if a given object implements the CreateStoredCardPaymentMethodDto interface.
65
+ */
66
+ export declare function instanceOfCreateStoredCardPaymentMethodDto(value: object): boolean;
67
+ export declare function CreateStoredCardPaymentMethodDtoFromJSON(json: any): CreateStoredCardPaymentMethodDto;
68
+ export declare function CreateStoredCardPaymentMethodDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateStoredCardPaymentMethodDto;
69
+ export declare function CreateStoredCardPaymentMethodDtoToJSON(value?: CreateStoredCardPaymentMethodDto | null): any;
@@ -8,25 +8,26 @@
8
8
  *
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.instanceOfCreateStoredCardPaymentMethod = instanceOfCreateStoredCardPaymentMethod;
12
- exports.CreateStoredCardPaymentMethodFromJSON = CreateStoredCardPaymentMethodFromJSON;
13
- exports.CreateStoredCardPaymentMethodFromJSONTyped = CreateStoredCardPaymentMethodFromJSONTyped;
14
- exports.CreateStoredCardPaymentMethodToJSON = CreateStoredCardPaymentMethodToJSON;
11
+ exports.instanceOfCreateStoredCardPaymentMethodDto = instanceOfCreateStoredCardPaymentMethodDto;
12
+ exports.CreateStoredCardPaymentMethodDtoFromJSON = CreateStoredCardPaymentMethodDtoFromJSON;
13
+ exports.CreateStoredCardPaymentMethodDtoFromJSONTyped = CreateStoredCardPaymentMethodDtoFromJSONTyped;
14
+ exports.CreateStoredCardPaymentMethodDtoToJSON = CreateStoredCardPaymentMethodDtoToJSON;
15
15
  const runtime_1 = require("../runtime");
16
+ const BillingDetailsDto_1 = require("./BillingDetailsDto");
16
17
  /**
17
- * Check if a given object implements the CreateStoredCardPaymentMethod interface.
18
+ * Check if a given object implements the CreateStoredCardPaymentMethodDto interface.
18
19
  */
19
- function instanceOfCreateStoredCardPaymentMethod(value) {
20
+ function instanceOfCreateStoredCardPaymentMethodDto(value) {
20
21
  let isInstance = true;
21
22
  isInstance = isInstance && "paymentMethodIntegrationId" in value;
22
23
  isInstance = isInstance && "integrationId" in value;
23
24
  isInstance = isInstance && "merchantId" in value;
24
25
  return isInstance;
25
26
  }
26
- function CreateStoredCardPaymentMethodFromJSON(json) {
27
- return CreateStoredCardPaymentMethodFromJSONTyped(json, false);
27
+ function CreateStoredCardPaymentMethodDtoFromJSON(json) {
28
+ return CreateStoredCardPaymentMethodDtoFromJSONTyped(json, false);
28
29
  }
29
- function CreateStoredCardPaymentMethodFromJSONTyped(json, ignoreDiscriminator) {
30
+ function CreateStoredCardPaymentMethodDtoFromJSONTyped(json, ignoreDiscriminator) {
30
31
  if ((json === undefined) || (json === null)) {
31
32
  return json;
32
33
  }
@@ -37,10 +38,12 @@ function CreateStoredCardPaymentMethodFromJSONTyped(json, ignoreDiscriminator) {
37
38
  'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
38
39
  'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
39
40
  'accountHolderName': !(0, runtime_1.exists)(json, 'accountHolderName') ? undefined : json['accountHolderName'],
41
+ 'billingDetails': !(0, runtime_1.exists)(json, 'billingDetails') ? undefined : (0, BillingDetailsDto_1.BillingDetailsDtoFromJSON)(json['billingDetails']),
42
+ 'isCustomerStored': !(0, runtime_1.exists)(json, 'isCustomerStored') ? undefined : json['isCustomerStored'],
40
43
  };
41
44
  return (0, runtime_1.removeNullUndefined)(typed);
42
45
  }
43
- function CreateStoredCardPaymentMethodToJSON(value) {
46
+ function CreateStoredCardPaymentMethodDtoToJSON(value) {
44
47
  if (value === undefined) {
45
48
  return undefined;
46
49
  }
@@ -54,5 +57,7 @@ function CreateStoredCardPaymentMethodToJSON(value) {
54
57
  'buyerId': value.buyerId,
55
58
  'externalBuyerId': value.externalBuyerId,
56
59
  'accountHolderName': value.accountHolderName,
60
+ 'billingDetails': (0, BillingDetailsDto_1.BillingDetailsDtoToJSON)(value.billingDetails),
61
+ 'isCustomerStored': value.isCustomerStored,
57
62
  };
58
63
  }