@amos.com/node 0.1.7 → 0.1.9
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.
- package/dist/index.d.mts +78 -15
- package/dist/index.d.ts +78 -15
- package/openapi/schema.ts +78 -15
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -104,13 +104,13 @@ interface paths {
|
|
|
104
104
|
};
|
|
105
105
|
/** Retrieve a customer by ID */
|
|
106
106
|
get: operations["GetCustomer"];
|
|
107
|
-
|
|
107
|
+
/** Update a customer by ID */
|
|
108
|
+
put: operations["UpdateCustomer"];
|
|
108
109
|
post?: never;
|
|
109
110
|
delete?: never;
|
|
110
111
|
options?: never;
|
|
111
112
|
head?: never;
|
|
112
|
-
|
|
113
|
-
patch: operations["UpdateCustomer"];
|
|
113
|
+
patch?: never;
|
|
114
114
|
trace?: never;
|
|
115
115
|
};
|
|
116
116
|
"/external_accounts": {
|
|
@@ -723,13 +723,13 @@ interface paths {
|
|
|
723
723
|
cookie?: never;
|
|
724
724
|
};
|
|
725
725
|
get?: never;
|
|
726
|
-
|
|
726
|
+
/** Update a product by ID */
|
|
727
|
+
put: operations["UpdateProduct"];
|
|
727
728
|
post?: never;
|
|
728
729
|
delete?: never;
|
|
729
730
|
options?: never;
|
|
730
731
|
head?: never;
|
|
731
|
-
|
|
732
|
-
patch: operations["UpdateProduct"];
|
|
732
|
+
patch?: never;
|
|
733
733
|
trace?: never;
|
|
734
734
|
};
|
|
735
735
|
"/refunds": {
|
|
@@ -959,6 +959,23 @@ interface paths {
|
|
|
959
959
|
patch?: never;
|
|
960
960
|
trace?: never;
|
|
961
961
|
};
|
|
962
|
+
"/subscriptions/{id}/skip": {
|
|
963
|
+
parameters: {
|
|
964
|
+
query?: never;
|
|
965
|
+
header?: never;
|
|
966
|
+
path?: never;
|
|
967
|
+
cookie?: never;
|
|
968
|
+
};
|
|
969
|
+
get?: never;
|
|
970
|
+
/** Skip subscription billing periods by ID */
|
|
971
|
+
put: operations["SkipSubscription"];
|
|
972
|
+
post?: never;
|
|
973
|
+
delete?: never;
|
|
974
|
+
options?: never;
|
|
975
|
+
head?: never;
|
|
976
|
+
patch?: never;
|
|
977
|
+
trace?: never;
|
|
978
|
+
};
|
|
962
979
|
"/subscriptions/{id}/cancel": {
|
|
963
980
|
parameters: {
|
|
964
981
|
query?: never;
|
|
@@ -1277,6 +1294,8 @@ interface components {
|
|
|
1277
1294
|
/** Format: uuid */
|
|
1278
1295
|
customer_id?: string;
|
|
1279
1296
|
description?: string | null;
|
|
1297
|
+
failure_code?: string | null;
|
|
1298
|
+
failure_reason?: string | null;
|
|
1280
1299
|
/** @enum {string|null} */
|
|
1281
1300
|
allowed_reverse_action?: "void" | "refund" | null;
|
|
1282
1301
|
metadata?: components["schemas"]["Metadata"];
|
|
@@ -1313,14 +1332,12 @@ interface components {
|
|
|
1313
1332
|
customer: components["schemas"]["CreateCustomerInput"];
|
|
1314
1333
|
};
|
|
1315
1334
|
UpdateCustomerInput: {
|
|
1316
|
-
/** Format: uuid */
|
|
1317
|
-
account_id?: string;
|
|
1318
|
-
name?: string;
|
|
1319
1335
|
email?: string;
|
|
1320
|
-
|
|
1321
|
-
phone?: string;
|
|
1336
|
+
name?: string;
|
|
1322
1337
|
/** Format: uuid */
|
|
1323
1338
|
payment_method_id?: string;
|
|
1339
|
+
phone?: string;
|
|
1340
|
+
metadata?: components["schemas"]["Metadata"];
|
|
1324
1341
|
};
|
|
1325
1342
|
UpdateCustomerRequest: {
|
|
1326
1343
|
customer: components["schemas"]["UpdateCustomerInput"];
|
|
@@ -1914,6 +1931,8 @@ interface components {
|
|
|
1914
1931
|
/** Format: uuid */
|
|
1915
1932
|
customer_id?: string;
|
|
1916
1933
|
description?: string | null;
|
|
1934
|
+
failure_code?: string | null;
|
|
1935
|
+
failure_reason?: string | null;
|
|
1917
1936
|
metadata?: components["schemas"]["Metadata"];
|
|
1918
1937
|
/** Format: uuid */
|
|
1919
1938
|
original_transaction_id?: string;
|
|
@@ -2016,6 +2035,12 @@ interface components {
|
|
|
2016
2035
|
UpdateSubscriptionRequest: {
|
|
2017
2036
|
subscription: components["schemas"]["UpdateSubscriptionInput"];
|
|
2018
2037
|
};
|
|
2038
|
+
SkipSubscriptionInput: {
|
|
2039
|
+
period_count?: number;
|
|
2040
|
+
};
|
|
2041
|
+
SkipSubscriptionRequest: {
|
|
2042
|
+
subscription: components["schemas"]["SkipSubscriptionInput"];
|
|
2043
|
+
};
|
|
2019
2044
|
Subscription: {
|
|
2020
2045
|
/** Format: uuid */
|
|
2021
2046
|
id?: string;
|
|
@@ -2036,6 +2061,8 @@ interface components {
|
|
|
2036
2061
|
/** @enum {string} */
|
|
2037
2062
|
state?: "active" | "paused" | "past_due" | "cancelled";
|
|
2038
2063
|
cycles_completed?: number;
|
|
2064
|
+
skip_billing_periods_remaining?: number;
|
|
2065
|
+
skipped_billing_periods_count?: number;
|
|
2039
2066
|
/** Format: date-time */
|
|
2040
2067
|
current_billing_period_start?: string;
|
|
2041
2068
|
/** Format: date-time */
|
|
@@ -2127,6 +2154,8 @@ interface components {
|
|
|
2127
2154
|
/** Format: uuid */
|
|
2128
2155
|
customer_id?: string;
|
|
2129
2156
|
description?: string | null;
|
|
2157
|
+
failure_code?: string | null;
|
|
2158
|
+
failure_reason?: string | null;
|
|
2130
2159
|
metadata?: components["schemas"]["Metadata"];
|
|
2131
2160
|
/** Format: uuid */
|
|
2132
2161
|
original_transaction_id?: string;
|
|
@@ -2165,8 +2194,7 @@ interface components {
|
|
|
2165
2194
|
updated_at?: string;
|
|
2166
2195
|
};
|
|
2167
2196
|
CreateWebhookEndpointInput: {
|
|
2168
|
-
|
|
2169
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2197
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2170
2198
|
metadata?: components["schemas"]["Metadata"];
|
|
2171
2199
|
active?: boolean;
|
|
2172
2200
|
url?: string;
|
|
@@ -2177,8 +2205,7 @@ interface components {
|
|
|
2177
2205
|
WebhookEndpoint: {
|
|
2178
2206
|
/** Format: uuid */
|
|
2179
2207
|
id?: string;
|
|
2180
|
-
|
|
2181
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2208
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2182
2209
|
metadata?: components["schemas"]["Metadata"];
|
|
2183
2210
|
secret?: string;
|
|
2184
2211
|
url?: string;
|
|
@@ -4331,6 +4358,42 @@ interface operations {
|
|
|
4331
4358
|
};
|
|
4332
4359
|
};
|
|
4333
4360
|
};
|
|
4361
|
+
SkipSubscription: {
|
|
4362
|
+
parameters: {
|
|
4363
|
+
query?: never;
|
|
4364
|
+
header?: never;
|
|
4365
|
+
path: {
|
|
4366
|
+
/** @description The ID of the subscription to skip billing periods for */
|
|
4367
|
+
id: string;
|
|
4368
|
+
};
|
|
4369
|
+
cookie?: never;
|
|
4370
|
+
};
|
|
4371
|
+
requestBody: {
|
|
4372
|
+
content: {
|
|
4373
|
+
"application/json": components["schemas"]["SkipSubscriptionRequest"];
|
|
4374
|
+
};
|
|
4375
|
+
};
|
|
4376
|
+
responses: {
|
|
4377
|
+
/** @description Subscription billing periods skipped successfully */
|
|
4378
|
+
200: {
|
|
4379
|
+
headers: {
|
|
4380
|
+
[name: string]: unknown;
|
|
4381
|
+
};
|
|
4382
|
+
content: {
|
|
4383
|
+
"application/json": components["schemas"]["Subscription"];
|
|
4384
|
+
};
|
|
4385
|
+
};
|
|
4386
|
+
/** @description Unprocessable entity */
|
|
4387
|
+
422: {
|
|
4388
|
+
headers: {
|
|
4389
|
+
[name: string]: unknown;
|
|
4390
|
+
};
|
|
4391
|
+
content: {
|
|
4392
|
+
"application/json": components["schemas"]["Error"];
|
|
4393
|
+
};
|
|
4394
|
+
};
|
|
4395
|
+
};
|
|
4396
|
+
};
|
|
4334
4397
|
CancelSubscription: {
|
|
4335
4398
|
parameters: {
|
|
4336
4399
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -104,13 +104,13 @@ interface paths {
|
|
|
104
104
|
};
|
|
105
105
|
/** Retrieve a customer by ID */
|
|
106
106
|
get: operations["GetCustomer"];
|
|
107
|
-
|
|
107
|
+
/** Update a customer by ID */
|
|
108
|
+
put: operations["UpdateCustomer"];
|
|
108
109
|
post?: never;
|
|
109
110
|
delete?: never;
|
|
110
111
|
options?: never;
|
|
111
112
|
head?: never;
|
|
112
|
-
|
|
113
|
-
patch: operations["UpdateCustomer"];
|
|
113
|
+
patch?: never;
|
|
114
114
|
trace?: never;
|
|
115
115
|
};
|
|
116
116
|
"/external_accounts": {
|
|
@@ -723,13 +723,13 @@ interface paths {
|
|
|
723
723
|
cookie?: never;
|
|
724
724
|
};
|
|
725
725
|
get?: never;
|
|
726
|
-
|
|
726
|
+
/** Update a product by ID */
|
|
727
|
+
put: operations["UpdateProduct"];
|
|
727
728
|
post?: never;
|
|
728
729
|
delete?: never;
|
|
729
730
|
options?: never;
|
|
730
731
|
head?: never;
|
|
731
|
-
|
|
732
|
-
patch: operations["UpdateProduct"];
|
|
732
|
+
patch?: never;
|
|
733
733
|
trace?: never;
|
|
734
734
|
};
|
|
735
735
|
"/refunds": {
|
|
@@ -959,6 +959,23 @@ interface paths {
|
|
|
959
959
|
patch?: never;
|
|
960
960
|
trace?: never;
|
|
961
961
|
};
|
|
962
|
+
"/subscriptions/{id}/skip": {
|
|
963
|
+
parameters: {
|
|
964
|
+
query?: never;
|
|
965
|
+
header?: never;
|
|
966
|
+
path?: never;
|
|
967
|
+
cookie?: never;
|
|
968
|
+
};
|
|
969
|
+
get?: never;
|
|
970
|
+
/** Skip subscription billing periods by ID */
|
|
971
|
+
put: operations["SkipSubscription"];
|
|
972
|
+
post?: never;
|
|
973
|
+
delete?: never;
|
|
974
|
+
options?: never;
|
|
975
|
+
head?: never;
|
|
976
|
+
patch?: never;
|
|
977
|
+
trace?: never;
|
|
978
|
+
};
|
|
962
979
|
"/subscriptions/{id}/cancel": {
|
|
963
980
|
parameters: {
|
|
964
981
|
query?: never;
|
|
@@ -1277,6 +1294,8 @@ interface components {
|
|
|
1277
1294
|
/** Format: uuid */
|
|
1278
1295
|
customer_id?: string;
|
|
1279
1296
|
description?: string | null;
|
|
1297
|
+
failure_code?: string | null;
|
|
1298
|
+
failure_reason?: string | null;
|
|
1280
1299
|
/** @enum {string|null} */
|
|
1281
1300
|
allowed_reverse_action?: "void" | "refund" | null;
|
|
1282
1301
|
metadata?: components["schemas"]["Metadata"];
|
|
@@ -1313,14 +1332,12 @@ interface components {
|
|
|
1313
1332
|
customer: components["schemas"]["CreateCustomerInput"];
|
|
1314
1333
|
};
|
|
1315
1334
|
UpdateCustomerInput: {
|
|
1316
|
-
/** Format: uuid */
|
|
1317
|
-
account_id?: string;
|
|
1318
|
-
name?: string;
|
|
1319
1335
|
email?: string;
|
|
1320
|
-
|
|
1321
|
-
phone?: string;
|
|
1336
|
+
name?: string;
|
|
1322
1337
|
/** Format: uuid */
|
|
1323
1338
|
payment_method_id?: string;
|
|
1339
|
+
phone?: string;
|
|
1340
|
+
metadata?: components["schemas"]["Metadata"];
|
|
1324
1341
|
};
|
|
1325
1342
|
UpdateCustomerRequest: {
|
|
1326
1343
|
customer: components["schemas"]["UpdateCustomerInput"];
|
|
@@ -1914,6 +1931,8 @@ interface components {
|
|
|
1914
1931
|
/** Format: uuid */
|
|
1915
1932
|
customer_id?: string;
|
|
1916
1933
|
description?: string | null;
|
|
1934
|
+
failure_code?: string | null;
|
|
1935
|
+
failure_reason?: string | null;
|
|
1917
1936
|
metadata?: components["schemas"]["Metadata"];
|
|
1918
1937
|
/** Format: uuid */
|
|
1919
1938
|
original_transaction_id?: string;
|
|
@@ -2016,6 +2035,12 @@ interface components {
|
|
|
2016
2035
|
UpdateSubscriptionRequest: {
|
|
2017
2036
|
subscription: components["schemas"]["UpdateSubscriptionInput"];
|
|
2018
2037
|
};
|
|
2038
|
+
SkipSubscriptionInput: {
|
|
2039
|
+
period_count?: number;
|
|
2040
|
+
};
|
|
2041
|
+
SkipSubscriptionRequest: {
|
|
2042
|
+
subscription: components["schemas"]["SkipSubscriptionInput"];
|
|
2043
|
+
};
|
|
2019
2044
|
Subscription: {
|
|
2020
2045
|
/** Format: uuid */
|
|
2021
2046
|
id?: string;
|
|
@@ -2036,6 +2061,8 @@ interface components {
|
|
|
2036
2061
|
/** @enum {string} */
|
|
2037
2062
|
state?: "active" | "paused" | "past_due" | "cancelled";
|
|
2038
2063
|
cycles_completed?: number;
|
|
2064
|
+
skip_billing_periods_remaining?: number;
|
|
2065
|
+
skipped_billing_periods_count?: number;
|
|
2039
2066
|
/** Format: date-time */
|
|
2040
2067
|
current_billing_period_start?: string;
|
|
2041
2068
|
/** Format: date-time */
|
|
@@ -2127,6 +2154,8 @@ interface components {
|
|
|
2127
2154
|
/** Format: uuid */
|
|
2128
2155
|
customer_id?: string;
|
|
2129
2156
|
description?: string | null;
|
|
2157
|
+
failure_code?: string | null;
|
|
2158
|
+
failure_reason?: string | null;
|
|
2130
2159
|
metadata?: components["schemas"]["Metadata"];
|
|
2131
2160
|
/** Format: uuid */
|
|
2132
2161
|
original_transaction_id?: string;
|
|
@@ -2165,8 +2194,7 @@ interface components {
|
|
|
2165
2194
|
updated_at?: string;
|
|
2166
2195
|
};
|
|
2167
2196
|
CreateWebhookEndpointInput: {
|
|
2168
|
-
|
|
2169
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2197
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2170
2198
|
metadata?: components["schemas"]["Metadata"];
|
|
2171
2199
|
active?: boolean;
|
|
2172
2200
|
url?: string;
|
|
@@ -2177,8 +2205,7 @@ interface components {
|
|
|
2177
2205
|
WebhookEndpoint: {
|
|
2178
2206
|
/** Format: uuid */
|
|
2179
2207
|
id?: string;
|
|
2180
|
-
|
|
2181
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2208
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2182
2209
|
metadata?: components["schemas"]["Metadata"];
|
|
2183
2210
|
secret?: string;
|
|
2184
2211
|
url?: string;
|
|
@@ -4331,6 +4358,42 @@ interface operations {
|
|
|
4331
4358
|
};
|
|
4332
4359
|
};
|
|
4333
4360
|
};
|
|
4361
|
+
SkipSubscription: {
|
|
4362
|
+
parameters: {
|
|
4363
|
+
query?: never;
|
|
4364
|
+
header?: never;
|
|
4365
|
+
path: {
|
|
4366
|
+
/** @description The ID of the subscription to skip billing periods for */
|
|
4367
|
+
id: string;
|
|
4368
|
+
};
|
|
4369
|
+
cookie?: never;
|
|
4370
|
+
};
|
|
4371
|
+
requestBody: {
|
|
4372
|
+
content: {
|
|
4373
|
+
"application/json": components["schemas"]["SkipSubscriptionRequest"];
|
|
4374
|
+
};
|
|
4375
|
+
};
|
|
4376
|
+
responses: {
|
|
4377
|
+
/** @description Subscription billing periods skipped successfully */
|
|
4378
|
+
200: {
|
|
4379
|
+
headers: {
|
|
4380
|
+
[name: string]: unknown;
|
|
4381
|
+
};
|
|
4382
|
+
content: {
|
|
4383
|
+
"application/json": components["schemas"]["Subscription"];
|
|
4384
|
+
};
|
|
4385
|
+
};
|
|
4386
|
+
/** @description Unprocessable entity */
|
|
4387
|
+
422: {
|
|
4388
|
+
headers: {
|
|
4389
|
+
[name: string]: unknown;
|
|
4390
|
+
};
|
|
4391
|
+
content: {
|
|
4392
|
+
"application/json": components["schemas"]["Error"];
|
|
4393
|
+
};
|
|
4394
|
+
};
|
|
4395
|
+
};
|
|
4396
|
+
};
|
|
4334
4397
|
CancelSubscription: {
|
|
4335
4398
|
parameters: {
|
|
4336
4399
|
query?: never;
|
package/openapi/schema.ts
CHANGED
|
@@ -101,13 +101,13 @@ export interface paths {
|
|
|
101
101
|
};
|
|
102
102
|
/** Retrieve a customer by ID */
|
|
103
103
|
get: operations["GetCustomer"];
|
|
104
|
-
|
|
104
|
+
/** Update a customer by ID */
|
|
105
|
+
put: operations["UpdateCustomer"];
|
|
105
106
|
post?: never;
|
|
106
107
|
delete?: never;
|
|
107
108
|
options?: never;
|
|
108
109
|
head?: never;
|
|
109
|
-
|
|
110
|
-
patch: operations["UpdateCustomer"];
|
|
110
|
+
patch?: never;
|
|
111
111
|
trace?: never;
|
|
112
112
|
};
|
|
113
113
|
"/external_accounts": {
|
|
@@ -720,13 +720,13 @@ export interface paths {
|
|
|
720
720
|
cookie?: never;
|
|
721
721
|
};
|
|
722
722
|
get?: never;
|
|
723
|
-
|
|
723
|
+
/** Update a product by ID */
|
|
724
|
+
put: operations["UpdateProduct"];
|
|
724
725
|
post?: never;
|
|
725
726
|
delete?: never;
|
|
726
727
|
options?: never;
|
|
727
728
|
head?: never;
|
|
728
|
-
|
|
729
|
-
patch: operations["UpdateProduct"];
|
|
729
|
+
patch?: never;
|
|
730
730
|
trace?: never;
|
|
731
731
|
};
|
|
732
732
|
"/refunds": {
|
|
@@ -956,6 +956,23 @@ export interface paths {
|
|
|
956
956
|
patch?: never;
|
|
957
957
|
trace?: never;
|
|
958
958
|
};
|
|
959
|
+
"/subscriptions/{id}/skip": {
|
|
960
|
+
parameters: {
|
|
961
|
+
query?: never;
|
|
962
|
+
header?: never;
|
|
963
|
+
path?: never;
|
|
964
|
+
cookie?: never;
|
|
965
|
+
};
|
|
966
|
+
get?: never;
|
|
967
|
+
/** Skip subscription billing periods by ID */
|
|
968
|
+
put: operations["SkipSubscription"];
|
|
969
|
+
post?: never;
|
|
970
|
+
delete?: never;
|
|
971
|
+
options?: never;
|
|
972
|
+
head?: never;
|
|
973
|
+
patch?: never;
|
|
974
|
+
trace?: never;
|
|
975
|
+
};
|
|
959
976
|
"/subscriptions/{id}/cancel": {
|
|
960
977
|
parameters: {
|
|
961
978
|
query?: never;
|
|
@@ -1274,6 +1291,8 @@ export interface components {
|
|
|
1274
1291
|
/** Format: uuid */
|
|
1275
1292
|
customer_id?: string;
|
|
1276
1293
|
description?: string | null;
|
|
1294
|
+
failure_code?: string | null;
|
|
1295
|
+
failure_reason?: string | null;
|
|
1277
1296
|
/** @enum {string|null} */
|
|
1278
1297
|
allowed_reverse_action?: "void" | "refund" | null;
|
|
1279
1298
|
metadata?: components["schemas"]["Metadata"];
|
|
@@ -1310,14 +1329,12 @@ export interface components {
|
|
|
1310
1329
|
customer: components["schemas"]["CreateCustomerInput"];
|
|
1311
1330
|
};
|
|
1312
1331
|
UpdateCustomerInput: {
|
|
1313
|
-
/** Format: uuid */
|
|
1314
|
-
account_id?: string;
|
|
1315
|
-
name?: string;
|
|
1316
1332
|
email?: string;
|
|
1317
|
-
|
|
1318
|
-
phone?: string;
|
|
1333
|
+
name?: string;
|
|
1319
1334
|
/** Format: uuid */
|
|
1320
1335
|
payment_method_id?: string;
|
|
1336
|
+
phone?: string;
|
|
1337
|
+
metadata?: components["schemas"]["Metadata"];
|
|
1321
1338
|
};
|
|
1322
1339
|
UpdateCustomerRequest: {
|
|
1323
1340
|
customer: components["schemas"]["UpdateCustomerInput"];
|
|
@@ -1911,6 +1928,8 @@ export interface components {
|
|
|
1911
1928
|
/** Format: uuid */
|
|
1912
1929
|
customer_id?: string;
|
|
1913
1930
|
description?: string | null;
|
|
1931
|
+
failure_code?: string | null;
|
|
1932
|
+
failure_reason?: string | null;
|
|
1914
1933
|
metadata?: components["schemas"]["Metadata"];
|
|
1915
1934
|
/** Format: uuid */
|
|
1916
1935
|
original_transaction_id?: string;
|
|
@@ -2013,6 +2032,12 @@ export interface components {
|
|
|
2013
2032
|
UpdateSubscriptionRequest: {
|
|
2014
2033
|
subscription: components["schemas"]["UpdateSubscriptionInput"];
|
|
2015
2034
|
};
|
|
2035
|
+
SkipSubscriptionInput: {
|
|
2036
|
+
period_count?: number;
|
|
2037
|
+
};
|
|
2038
|
+
SkipSubscriptionRequest: {
|
|
2039
|
+
subscription: components["schemas"]["SkipSubscriptionInput"];
|
|
2040
|
+
};
|
|
2016
2041
|
Subscription: {
|
|
2017
2042
|
/** Format: uuid */
|
|
2018
2043
|
id?: string;
|
|
@@ -2033,6 +2058,8 @@ export interface components {
|
|
|
2033
2058
|
/** @enum {string} */
|
|
2034
2059
|
state?: "active" | "paused" | "past_due" | "cancelled";
|
|
2035
2060
|
cycles_completed?: number;
|
|
2061
|
+
skip_billing_periods_remaining?: number;
|
|
2062
|
+
skipped_billing_periods_count?: number;
|
|
2036
2063
|
/** Format: date-time */
|
|
2037
2064
|
current_billing_period_start?: string;
|
|
2038
2065
|
/** Format: date-time */
|
|
@@ -2124,6 +2151,8 @@ export interface components {
|
|
|
2124
2151
|
/** Format: uuid */
|
|
2125
2152
|
customer_id?: string;
|
|
2126
2153
|
description?: string | null;
|
|
2154
|
+
failure_code?: string | null;
|
|
2155
|
+
failure_reason?: string | null;
|
|
2127
2156
|
metadata?: components["schemas"]["Metadata"];
|
|
2128
2157
|
/** Format: uuid */
|
|
2129
2158
|
original_transaction_id?: string;
|
|
@@ -2162,8 +2191,7 @@ export interface components {
|
|
|
2162
2191
|
updated_at?: string;
|
|
2163
2192
|
};
|
|
2164
2193
|
CreateWebhookEndpointInput: {
|
|
2165
|
-
|
|
2166
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2194
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2167
2195
|
metadata?: components["schemas"]["Metadata"];
|
|
2168
2196
|
active?: boolean;
|
|
2169
2197
|
url?: string;
|
|
@@ -2174,8 +2202,7 @@ export interface components {
|
|
|
2174
2202
|
WebhookEndpoint: {
|
|
2175
2203
|
/** Format: uuid */
|
|
2176
2204
|
id?: string;
|
|
2177
|
-
|
|
2178
|
-
event?: "charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded";
|
|
2205
|
+
events?: ("charge.cancelled" | "charge.created" | "charge.errored" | "charge.failed" | "charge.processing" | "charge.requires_capture" | "charge.requires_confirmation" | "charge.requires_review" | "charge.succeeded" | "customer.created" | "customer.updated" | "legal_entity.created" | "legal_entity.updated" | "legal_entity_principal.created" | "legal_entity_principal.updated" | "merchant.created" | "merchant.updated" | "payment_intent.cancelled" | "payment_intent.created" | "payment_intent.errored_authorization" | "payment_intent.errored_capture" | "payment_intent.errored_sale" | "payment_intent.processing_authorization" | "payment_intent.processing_capture" | "payment_intent.processing_sale" | "payment_intent.requires_capture" | "payment_intent.requires_confirmation" | "payment_intent.requires_payment_method" | "payment_intent.requires_review" | "payment_intent.succeeded" | "processor_transaction.completed" | "reconciliation.created" | "refund.cancelled" | "refund.created" | "refund.failed" | "refund.pending" | "refund.processing" | "refund.requires_review" | "refund.succeeded" | "void.created" | "void.failed" | "void.pending" | "void.processing" | "void.requires_review" | "void.succeeded")[];
|
|
2179
2206
|
metadata?: components["schemas"]["Metadata"];
|
|
2180
2207
|
secret?: string;
|
|
2181
2208
|
url?: string;
|
|
@@ -4328,6 +4355,42 @@ export interface operations {
|
|
|
4328
4355
|
};
|
|
4329
4356
|
};
|
|
4330
4357
|
};
|
|
4358
|
+
SkipSubscription: {
|
|
4359
|
+
parameters: {
|
|
4360
|
+
query?: never;
|
|
4361
|
+
header?: never;
|
|
4362
|
+
path: {
|
|
4363
|
+
/** @description The ID of the subscription to skip billing periods for */
|
|
4364
|
+
id: string;
|
|
4365
|
+
};
|
|
4366
|
+
cookie?: never;
|
|
4367
|
+
};
|
|
4368
|
+
requestBody: {
|
|
4369
|
+
content: {
|
|
4370
|
+
"application/json": components["schemas"]["SkipSubscriptionRequest"];
|
|
4371
|
+
};
|
|
4372
|
+
};
|
|
4373
|
+
responses: {
|
|
4374
|
+
/** @description Subscription billing periods skipped successfully */
|
|
4375
|
+
200: {
|
|
4376
|
+
headers: {
|
|
4377
|
+
[name: string]: unknown;
|
|
4378
|
+
};
|
|
4379
|
+
content: {
|
|
4380
|
+
"application/json": components["schemas"]["Subscription"];
|
|
4381
|
+
};
|
|
4382
|
+
};
|
|
4383
|
+
/** @description Unprocessable entity */
|
|
4384
|
+
422: {
|
|
4385
|
+
headers: {
|
|
4386
|
+
[name: string]: unknown;
|
|
4387
|
+
};
|
|
4388
|
+
content: {
|
|
4389
|
+
"application/json": components["schemas"]["Error"];
|
|
4390
|
+
};
|
|
4391
|
+
};
|
|
4392
|
+
};
|
|
4393
|
+
};
|
|
4331
4394
|
CancelSubscription: {
|
|
4332
4395
|
parameters: {
|
|
4333
4396
|
query?: never;
|