@forteplatforms/sdk 1.0.526 → 1.0.527

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.
@@ -42,6 +42,12 @@ export interface CheckoutSubscription {
42
42
  metadata?: {
43
43
  [key: string]: string;
44
44
  };
45
+ /**
46
+ *
47
+ * @type {Date}
48
+ * @memberof CheckoutSubscription
49
+ */
50
+ startTime?: Date | null;
45
51
  /**
46
52
  *
47
53
  * @type {Date}
@@ -49,6 +49,7 @@ function CheckoutSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
49
49
  'lineItems': (json['lineItems'].map(PaymentLineItem_1.PaymentLineItemFromJSON)),
50
50
  'description': json['description'] == null ? undefined : json['description'],
51
51
  'metadata': json['metadata'] == null ? undefined : json['metadata'],
52
+ 'startTime': json['startTime'] == null ? undefined : (new Date(json['startTime'])),
52
53
  'endTime': json['endTime'] == null ? undefined : (new Date(json['endTime'])),
53
54
  };
54
55
  }
@@ -65,6 +66,7 @@ function CheckoutSubscriptionToJSONTyped(value, ignoreDiscriminator) {
65
66
  'lineItems': (value['lineItems'].map(PaymentLineItem_1.PaymentLineItemToJSON)),
66
67
  'description': value['description'],
67
68
  'metadata': value['metadata'],
69
+ 'startTime': value['startTime'] == null ? value['startTime'] : value['startTime'].toISOString(),
68
70
  'endTime': value['endTime'] == null ? value['endTime'] : value['endTime'].toISOString(),
69
71
  };
70
72
  }
@@ -46,6 +46,12 @@ export interface CheckoutSubscriptionPreview {
46
46
  * @memberof CheckoutSubscriptionPreview
47
47
  */
48
48
  lineItems: Array<PaymentLineItem>;
49
+ /**
50
+ *
51
+ * @type {Date}
52
+ * @memberof CheckoutSubscriptionPreview
53
+ */
54
+ startTime?: Date | null;
49
55
  /**
50
56
  *
51
57
  * @type {Date}
@@ -56,6 +56,7 @@ function CheckoutSubscriptionPreviewFromJSONTyped(json, ignoreDiscriminator) {
56
56
  'taxCents': json['taxCents'] == null ? undefined : json['taxCents'],
57
57
  'amountCents': json['amountCents'],
58
58
  'lineItems': (json['lineItems'].map(PaymentLineItem_1.PaymentLineItemFromJSON)),
59
+ 'startTime': json['startTime'] == null ? undefined : (new Date(json['startTime'])),
59
60
  'nextRenewalAt': (new Date(json['nextRenewalAt'])),
60
61
  };
61
62
  }
@@ -73,6 +74,7 @@ function CheckoutSubscriptionPreviewToJSONTyped(value, ignoreDiscriminator) {
73
74
  'taxCents': value['taxCents'],
74
75
  'amountCents': value['amountCents'],
75
76
  'lineItems': (value['lineItems'].map(PaymentLineItem_1.PaymentLineItemToJSON)),
77
+ 'startTime': value['startTime'] == null ? value['startTime'] : value['startTime'].toISOString(),
76
78
  'nextRenewalAt': value['nextRenewalAt'].toISOString(),
77
79
  };
78
80
  }
@@ -22,7 +22,7 @@ export interface CreateCheckoutResponse {
22
22
  * @type {PaymentObject}
23
23
  * @memberof CreateCheckoutResponse
24
24
  */
25
- payment: PaymentObject;
25
+ payment?: PaymentObject;
26
26
  /**
27
27
  *
28
28
  * @type {Array<SubscriptionObject>}
@@ -34,7 +34,7 @@ export interface CreateCheckoutResponse {
34
34
  * @type {string}
35
35
  * @memberof CreateCheckoutResponse
36
36
  */
37
- stripeClientSecret: string;
37
+ stripeClientSecret?: string | null;
38
38
  /**
39
39
  *
40
40
  * @type {string}
@@ -24,12 +24,8 @@ var PaymentObject_1 = require("./PaymentObject");
24
24
  * Check if a given object implements the CreateCheckoutResponse interface.
25
25
  */
26
26
  function instanceOfCreateCheckoutResponse(value) {
27
- if (!('payment' in value) || value['payment'] === undefined)
28
- return false;
29
27
  if (!('subscriptions' in value) || value['subscriptions'] === undefined)
30
28
  return false;
31
- if (!('stripeClientSecret' in value) || value['stripeClientSecret'] === undefined)
32
- return false;
33
29
  if (!('stripePublishableKey' in value) || value['stripePublishableKey'] === undefined)
34
30
  return false;
35
31
  if (!('stripeConnectedAccountId' in value) || value['stripeConnectedAccountId'] === undefined)
@@ -44,9 +40,9 @@ function CreateCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
44
40
  return json;
45
41
  }
46
42
  return {
47
- 'payment': (0, PaymentObject_1.PaymentObjectFromJSON)(json['payment']),
43
+ 'payment': json['payment'] == null ? undefined : (0, PaymentObject_1.PaymentObjectFromJSON)(json['payment']),
48
44
  'subscriptions': (json['subscriptions'].map(SubscriptionObject_1.SubscriptionObjectFromJSON)),
49
- 'stripeClientSecret': json['stripeClientSecret'],
45
+ 'stripeClientSecret': json['stripeClientSecret'] == null ? undefined : json['stripeClientSecret'],
50
46
  'stripePublishableKey': json['stripePublishableKey'],
51
47
  'stripeConnectedAccountId': json['stripeConnectedAccountId'],
52
48
  };
@@ -265,9 +265,11 @@ export declare const ForteApiExceptionErrorCodeType: {
265
265
  readonly CHECKOUT_TOO_MANY_LINE_ITEMS: "CHECKOUT_TOO_MANY_LINE_ITEMS";
266
266
  readonly CHECKOUT_SHIPPING_REQUIRES_CUSTOMER_ADDRESS: "CHECKOUT_SHIPPING_REQUIRES_CUSTOMER_ADDRESS";
267
267
  readonly CHECKOUT_REQUIRES_CARD: "CHECKOUT_REQUIRES_CARD";
268
+ readonly CHECKOUT_START_TIME_INVALID: "CHECKOUT_START_TIME_INVALID";
268
269
  readonly CHECKOUT_END_TIME_INVALID: "CHECKOUT_END_TIME_INVALID";
269
270
  readonly SUBSCRIPTION_NOT_FOUND: "SUBSCRIPTION_NOT_FOUND";
270
271
  readonly SUBSCRIPTION_NOT_ACTIVE: "SUBSCRIPTION_NOT_ACTIVE";
272
+ readonly SUBSCRIPTION_CHARGE_IN_PROGRESS: "SUBSCRIPTION_CHARGE_IN_PROGRESS";
271
273
  readonly SUBSCRIPTION_INTERVAL_INVALID: "SUBSCRIPTION_INTERVAL_INVALID";
272
274
  readonly SUBSCRIPTION_END_TIME_INVALID: "SUBSCRIPTION_END_TIME_INVALID";
273
275
  readonly SUBSCRIPTION_PAYMENT_METHOD_REQUIRED: "SUBSCRIPTION_PAYMENT_METHOD_REQUIRED";
@@ -250,9 +250,11 @@ exports.ForteApiExceptionErrorCodeType = {
250
250
  CHECKOUT_TOO_MANY_LINE_ITEMS: 'CHECKOUT_TOO_MANY_LINE_ITEMS',
251
251
  CHECKOUT_SHIPPING_REQUIRES_CUSTOMER_ADDRESS: 'CHECKOUT_SHIPPING_REQUIRES_CUSTOMER_ADDRESS',
252
252
  CHECKOUT_REQUIRES_CARD: 'CHECKOUT_REQUIRES_CARD',
253
+ CHECKOUT_START_TIME_INVALID: 'CHECKOUT_START_TIME_INVALID',
253
254
  CHECKOUT_END_TIME_INVALID: 'CHECKOUT_END_TIME_INVALID',
254
255
  SUBSCRIPTION_NOT_FOUND: 'SUBSCRIPTION_NOT_FOUND',
255
256
  SUBSCRIPTION_NOT_ACTIVE: 'SUBSCRIPTION_NOT_ACTIVE',
257
+ SUBSCRIPTION_CHARGE_IN_PROGRESS: 'SUBSCRIPTION_CHARGE_IN_PROGRESS',
256
258
  SUBSCRIPTION_INTERVAL_INVALID: 'SUBSCRIPTION_INTERVAL_INVALID',
257
259
  SUBSCRIPTION_END_TIME_INVALID: 'SUBSCRIPTION_END_TIME_INVALID',
258
260
  SUBSCRIPTION_PAYMENT_METHOD_REQUIRED: 'SUBSCRIPTION_PAYMENT_METHOD_REQUIRED',
@@ -166,6 +166,12 @@ export interface PaymentObject {
166
166
  * @memberof PaymentObject
167
167
  */
168
168
  subscriptionIds: Array<string>;
169
+ /**
170
+ *
171
+ * @type {Array<string>}
172
+ * @memberof PaymentObject
173
+ */
174
+ scheduledSubscriptionIds?: Array<string> | null;
169
175
  /**
170
176
  *
171
177
  * @type {Date}
@@ -102,6 +102,7 @@ function PaymentObjectFromJSONTyped(json, ignoreDiscriminator) {
102
102
  'subscriptionStripeTaxTransactionId': json['subscriptionStripeTaxTransactionId'] == null ? undefined : json['subscriptionStripeTaxTransactionId'],
103
103
  'subscriptionId': json['subscriptionId'] == null ? undefined : json['subscriptionId'],
104
104
  'subscriptionIds': json['subscriptionIds'],
105
+ 'scheduledSubscriptionIds': json['scheduledSubscriptionIds'] == null ? undefined : json['scheduledSubscriptionIds'],
105
106
  'subscriptionRenewalTime': json['subscriptionRenewalTime'] == null ? undefined : (new Date(json['subscriptionRenewalTime'])),
106
107
  'stateHistory': (json['stateHistory'].map(StateHistory_1.StateHistoryFromJSON)),
107
108
  'refundHistory': (json['refundHistory'].map(RefundRecord_1.RefundRecordFromJSON)),
@@ -143,6 +144,7 @@ function PaymentObjectToJSONTyped(value, ignoreDiscriminator) {
143
144
  'subscriptionStripeTaxTransactionId': value['subscriptionStripeTaxTransactionId'],
144
145
  'subscriptionId': value['subscriptionId'],
145
146
  'subscriptionIds': value['subscriptionIds'],
147
+ 'scheduledSubscriptionIds': value['scheduledSubscriptionIds'],
146
148
  'subscriptionRenewalTime': value['subscriptionRenewalTime'] == null ? value['subscriptionRenewalTime'] : value['subscriptionRenewalTime'].toISOString(),
147
149
  'stateHistory': (value['stateHistory'].map(StateHistory_1.StateHistoryToJSON)),
148
150
  'refundHistory': (value['refundHistory'].map(RefundRecord_1.RefundRecordToJSON)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forteplatforms/sdk",
3
- "version": "1.0.526",
3
+ "version": "1.0.527",
4
4
  "description": "Official TypeScript SDK for Forte Platforms",
5
5
  "author": "Forte Platforms <support@forteplatforms.com>",
6
6
  "repository": {