@channelpayments/node-sdk 1.37.0 → 1.39.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.
@@ -17,7 +17,7 @@ export interface CreateTransactionDtoPaymentMethod {
17
17
  */
18
18
  method: CreateTransactionDtoPaymentMethodMethodEnum;
19
19
  /**
20
- * The 13 - 19 digit card number. Must be unset is method is not CARD.
20
+ * The 13 - 19 digit card number. Must be unset if stored paymentMethodId is used.
21
21
  * @type {string}
22
22
  * @memberof CreateTransactionDtoPaymentMethod
23
23
  */
@@ -29,31 +29,31 @@ export interface CreateTransactionDtoPaymentMethod {
29
29
  */
30
30
  securityCode?: string;
31
31
  /**
32
- * The expiration date of the card, formatted MM/YY. Must be unset if method is not CARD.
32
+ * The expiration date of the card, formatted MM/YY. Must be unset if stored paymentMethodId is used.
33
33
  * @type {string}
34
34
  * @memberof CreateTransactionDtoPaymentMethod
35
35
  */
36
36
  expirationDate?: string;
37
37
  /**
38
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
38
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or buyerId is provided.
39
39
  * @type {string}
40
40
  * @memberof CreateTransactionDtoPaymentMethod
41
41
  */
42
42
  externalBuyerId?: string;
43
43
  /**
44
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
44
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or externalBuyerId is provided.
45
45
  * @type {string}
46
46
  * @memberof CreateTransactionDtoPaymentMethod
47
47
  */
48
48
  buyerId?: string;
49
49
  /**
50
- * The id of the stored payment method to use. Must be unset if method is not ID.
50
+ * The ID of the stored payment method to use. Must be unset if number, expirationDate and securityCode are provided.
51
51
  * @type {string}
52
52
  * @memberof CreateTransactionDtoPaymentMethod
53
53
  */
54
54
  paymentMethodId?: string;
55
55
  /**
56
- * Whether or not to also try and store the payment method for future use
56
+ * Whether or not to store the payment method for future use
57
57
  * @type {boolean}
58
58
  * @memberof CreateTransactionDtoPaymentMethod
59
59
  */
@@ -17,7 +17,7 @@ export interface PaymentMethodDto {
17
17
  */
18
18
  method: PaymentMethodDtoMethodEnum;
19
19
  /**
20
- * The 13 - 19 digit card number. Must be unset is method is not CARD.
20
+ * The 13 - 19 digit card number. Must be unset if stored paymentMethodId is used.
21
21
  * @type {string}
22
22
  * @memberof PaymentMethodDto
23
23
  */
@@ -29,31 +29,31 @@ export interface PaymentMethodDto {
29
29
  */
30
30
  securityCode?: string;
31
31
  /**
32
- * The expiration date of the card, formatted MM/YY. Must be unset if method is not CARD.
32
+ * The expiration date of the card, formatted MM/YY. Must be unset if stored paymentMethodId is used.
33
33
  * @type {string}
34
34
  * @memberof PaymentMethodDto
35
35
  */
36
36
  expirationDate?: string;
37
37
  /**
38
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
38
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or buyerId is provided.
39
39
  * @type {string}
40
40
  * @memberof PaymentMethodDto
41
41
  */
42
42
  externalBuyerId?: string;
43
43
  /**
44
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
44
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or externalBuyerId is provided.
45
45
  * @type {string}
46
46
  * @memberof PaymentMethodDto
47
47
  */
48
48
  buyerId?: string;
49
49
  /**
50
- * The id of the stored payment method to use. Must be unset if method is not ID.
50
+ * The ID of the stored payment method to use. Must be unset if number, expirationDate and securityCode are provided.
51
51
  * @type {string}
52
52
  * @memberof PaymentMethodDto
53
53
  */
54
54
  paymentMethodId?: string;
55
55
  /**
56
- * Whether or not to also try and store the payment method for future use
56
+ * Whether or not to store the payment method for future use
57
57
  * @type {boolean}
58
58
  * @memberof PaymentMethodDto
59
59
  */
@@ -102,6 +102,12 @@ export interface TransactionEntity {
102
102
  * @memberof TransactionEntity
103
103
  */
104
104
  buyer?: PaymentsBuyerEntity;
105
+ /**
106
+ *
107
+ * @type {string}
108
+ * @memberof TransactionEntity
109
+ */
110
+ externalBuyerId?: string;
105
111
  /**
106
112
  *
107
113
  * @type {Date}
@@ -88,6 +88,7 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
88
88
  'country': !(0, runtime_1.exists)(json, 'country') ? undefined : json['country'],
89
89
  'paymentMethod': !(0, runtime_1.exists)(json, 'paymentMethod') ? undefined : (0, PaymentMethodEntity1_1.PaymentMethodEntity1FromJSON)(json['paymentMethod']),
90
90
  'buyer': !(0, runtime_1.exists)(json, 'buyer') ? undefined : (0, PaymentsBuyerEntity_1.PaymentsBuyerEntityFromJSON)(json['buyer']),
91
+ 'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
91
92
  'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
92
93
  'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
93
94
  'merchantInitiated': !(0, runtime_1.exists)(json, 'merchantInitiated') ? undefined : json['merchantInitiated'],
@@ -129,6 +130,7 @@ function TransactionEntityToJSON(value) {
129
130
  'country': value.country,
130
131
  'paymentMethod': (0, PaymentMethodEntity1_1.PaymentMethodEntity1ToJSON)(value.paymentMethod),
131
132
  'buyer': (0, PaymentsBuyerEntity_1.PaymentsBuyerEntityToJSON)(value.buyer),
133
+ 'externalBuyerId': value.externalBuyerId,
132
134
  'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
133
135
  'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
134
136
  'merchantInitiated': value.merchantInitiated,
@@ -15,7 +15,7 @@ export interface TransactionRefundEntity {
15
15
  * @type {string}
16
16
  * @memberof TransactionRefundEntity
17
17
  */
18
- refundRecordId: string;
18
+ id: string;
19
19
  /**
20
20
  *
21
21
  * @type {string}
@@ -25,7 +25,7 @@ exports.TransactionRefundEntityStatusEnum = {
25
25
  */
26
26
  function instanceOfTransactionRefundEntity(value) {
27
27
  let isInstance = true;
28
- isInstance = isInstance && "refundRecordId" in value;
28
+ isInstance = isInstance && "id" in value;
29
29
  isInstance = isInstance && "merchantId" in value;
30
30
  isInstance = isInstance && "refundId" in value;
31
31
  isInstance = isInstance && "transactionId" in value;
@@ -45,7 +45,7 @@ function TransactionRefundEntityFromJSONTyped(json, ignoreDiscriminator) {
45
45
  return json;
46
46
  }
47
47
  const typed = {
48
- 'refundRecordId': json['refundRecordId'],
48
+ 'id': json['id'],
49
49
  'merchantId': json['merchantId'],
50
50
  'refundId': json['refundId'],
51
51
  'transactionId': json['transactionId'],
@@ -66,7 +66,7 @@ function TransactionRefundEntityToJSON(value) {
66
66
  return null;
67
67
  }
68
68
  return {
69
- 'refundRecordId': value.refundRecordId,
69
+ 'id': value.id,
70
70
  'merchantId': value.merchantId,
71
71
  'refundId': value.refundId,
72
72
  'transactionId': value.transactionId,
@@ -17,7 +17,7 @@ export interface CreateTransactionDtoPaymentMethod {
17
17
  */
18
18
  method: CreateTransactionDtoPaymentMethodMethodEnum;
19
19
  /**
20
- * The 13 - 19 digit card number. Must be unset is method is not CARD.
20
+ * The 13 - 19 digit card number. Must be unset if stored paymentMethodId is used.
21
21
  * @type {string}
22
22
  * @memberof CreateTransactionDtoPaymentMethod
23
23
  */
@@ -29,31 +29,31 @@ export interface CreateTransactionDtoPaymentMethod {
29
29
  */
30
30
  securityCode?: string;
31
31
  /**
32
- * The expiration date of the card, formatted MM/YY. Must be unset if method is not CARD.
32
+ * The expiration date of the card, formatted MM/YY. Must be unset if stored paymentMethodId is used.
33
33
  * @type {string}
34
34
  * @memberof CreateTransactionDtoPaymentMethod
35
35
  */
36
36
  expirationDate?: string;
37
37
  /**
38
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
38
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or buyerId is provided.
39
39
  * @type {string}
40
40
  * @memberof CreateTransactionDtoPaymentMethod
41
41
  */
42
42
  externalBuyerId?: string;
43
43
  /**
44
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
44
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or externalBuyerId is provided.
45
45
  * @type {string}
46
46
  * @memberof CreateTransactionDtoPaymentMethod
47
47
  */
48
48
  buyerId?: string;
49
49
  /**
50
- * The id of the stored payment method to use. Must be unset if method is not ID.
50
+ * The ID of the stored payment method to use. Must be unset if number, expirationDate and securityCode are provided.
51
51
  * @type {string}
52
52
  * @memberof CreateTransactionDtoPaymentMethod
53
53
  */
54
54
  paymentMethodId?: string;
55
55
  /**
56
- * Whether or not to also try and store the payment method for future use
56
+ * Whether or not to store the payment method for future use
57
57
  * @type {boolean}
58
58
  * @memberof CreateTransactionDtoPaymentMethod
59
59
  */
@@ -17,7 +17,7 @@ export interface PaymentMethodDto {
17
17
  */
18
18
  method: PaymentMethodDtoMethodEnum;
19
19
  /**
20
- * The 13 - 19 digit card number. Must be unset is method is not CARD.
20
+ * The 13 - 19 digit card number. Must be unset if stored paymentMethodId is used.
21
21
  * @type {string}
22
22
  * @memberof PaymentMethodDto
23
23
  */
@@ -29,31 +29,31 @@ export interface PaymentMethodDto {
29
29
  */
30
30
  securityCode?: string;
31
31
  /**
32
- * The expiration date of the card, formatted MM/YY. Must be unset if method is not CARD.
32
+ * The expiration date of the card, formatted MM/YY. Must be unset if stored paymentMethodId is used.
33
33
  * @type {string}
34
34
  * @memberof PaymentMethodDto
35
35
  */
36
36
  expirationDate?: string;
37
37
  /**
38
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
38
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or buyerId is provided.
39
39
  * @type {string}
40
40
  * @memberof PaymentMethodDto
41
41
  */
42
42
  externalBuyerId?: string;
43
43
  /**
44
- * The id of the buyer to associate the payment to. Must be unset if method is ID.
44
+ * The ID of the buyer to associate the payment to. Must be unset if stored paymentMethodId is used or externalBuyerId is provided.
45
45
  * @type {string}
46
46
  * @memberof PaymentMethodDto
47
47
  */
48
48
  buyerId?: string;
49
49
  /**
50
- * The id of the stored payment method to use. Must be unset if method is not ID.
50
+ * The ID of the stored payment method to use. Must be unset if number, expirationDate and securityCode are provided.
51
51
  * @type {string}
52
52
  * @memberof PaymentMethodDto
53
53
  */
54
54
  paymentMethodId?: string;
55
55
  /**
56
- * Whether or not to also try and store the payment method for future use
56
+ * Whether or not to store the payment method for future use
57
57
  * @type {boolean}
58
58
  * @memberof PaymentMethodDto
59
59
  */
@@ -102,6 +102,12 @@ export interface TransactionEntity {
102
102
  * @memberof TransactionEntity
103
103
  */
104
104
  buyer?: PaymentsBuyerEntity;
105
+ /**
106
+ *
107
+ * @type {string}
108
+ * @memberof TransactionEntity
109
+ */
110
+ externalBuyerId?: string;
105
111
  /**
106
112
  *
107
113
  * @type {Date}
@@ -83,6 +83,7 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
83
83
  'country': !exists(json, 'country') ? undefined : json['country'],
84
84
  'paymentMethod': !exists(json, 'paymentMethod') ? undefined : PaymentMethodEntity1FromJSON(json['paymentMethod']),
85
85
  'buyer': !exists(json, 'buyer') ? undefined : PaymentsBuyerEntityFromJSON(json['buyer']),
86
+ 'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
86
87
  'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
87
88
  'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
88
89
  'merchantInitiated': !exists(json, 'merchantInitiated') ? undefined : json['merchantInitiated'],
@@ -123,6 +124,7 @@ export function TransactionEntityToJSON(value) {
123
124
  'country': value.country,
124
125
  'paymentMethod': PaymentMethodEntity1ToJSON(value.paymentMethod),
125
126
  'buyer': PaymentsBuyerEntityToJSON(value.buyer),
127
+ 'externalBuyerId': value.externalBuyerId,
126
128
  'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
127
129
  'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
128
130
  'merchantInitiated': value.merchantInitiated,
@@ -15,7 +15,7 @@ export interface TransactionRefundEntity {
15
15
  * @type {string}
16
16
  * @memberof TransactionRefundEntity
17
17
  */
18
- refundRecordId: string;
18
+ id: string;
19
19
  /**
20
20
  *
21
21
  * @type {string}
@@ -22,7 +22,7 @@ export const TransactionRefundEntityStatusEnum = {
22
22
  */
23
23
  export function instanceOfTransactionRefundEntity(value) {
24
24
  let isInstance = true;
25
- isInstance = isInstance && "refundRecordId" in value;
25
+ isInstance = isInstance && "id" in value;
26
26
  isInstance = isInstance && "merchantId" in value;
27
27
  isInstance = isInstance && "refundId" in value;
28
28
  isInstance = isInstance && "transactionId" in value;
@@ -40,7 +40,7 @@ export function TransactionRefundEntityFromJSONTyped(json, ignoreDiscriminator)
40
40
  return json;
41
41
  }
42
42
  const typed = {
43
- 'refundRecordId': json['refundRecordId'],
43
+ 'id': json['id'],
44
44
  'merchantId': json['merchantId'],
45
45
  'refundId': json['refundId'],
46
46
  'transactionId': json['transactionId'],
@@ -60,7 +60,7 @@ export function TransactionRefundEntityToJSON(value) {
60
60
  return null;
61
61
  }
62
62
  return {
63
- 'refundRecordId': value.refundRecordId,
63
+ 'id': value.id,
64
64
  'merchantId': value.merchantId,
65
65
  'refundId': value.refundId,
66
66
  'transactionId': value.transactionId,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@channelpayments/node-sdk",
3
3
  "description": "Channel Payments nodejs sdk",
4
- "version": "1.37.0",
4
+ "version": "1.39.0",
5
5
  "author": "Channel Payments",
6
6
  "license": "ISC",
7
7
  "main": "dist/cjs/index.js",