@isnap/sdk 2.2.0-next.226 → 2.2.0-next.227
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/generated/openapi.d.ts +488 -53
- package/package.json +1 -1
|
@@ -1056,9 +1056,9 @@ export interface paths {
|
|
|
1056
1056
|
* Reserve a line
|
|
1057
1057
|
* @description Reserves one `available` line for your account for 15 minutes, and returns it with `status: reserved`, `expires_at` set and its full phone number. Accepts an API key; any account can reserve. A reserved line is not billed and cannot send.
|
|
1058
1058
|
*
|
|
1059
|
-
* Within the 15 minutes, a wholesale partner activates it with `POST /v1/lines/{id}/activate`. For any other account, no operation that an API key can call activates it.
|
|
1059
|
+
* Within the 15 minutes, a wholesale partner activates it with `POST /v1/lines/{id}/activate`. For any other account, no operation that an API key can call activates the line or pays for it. Once a payment of the line has started, `expires_at` is 24 hours after the start of that payment, and the line becomes `active` when the payment succeeds. The line returns to `available` with no owner after `expires_at`, or earlier when a started payment has not succeeded after 23 hours.
|
|
1060
1060
|
*
|
|
1061
|
-
*
|
|
1061
|
+
* Reserving a line that you have already reserved returns `409 conflict` and does not extend the reservation. The API sets no limit on the number of lines that an account has reserved at the same time. The `metadata` of the line is left as it is. This operation sends no event, and neither does the end of a reservation.
|
|
1062
1062
|
*/
|
|
1063
1063
|
post: {
|
|
1064
1064
|
parameters: {
|
|
@@ -2380,7 +2380,7 @@ export interface paths {
|
|
|
2380
2380
|
put?: never;
|
|
2381
2381
|
/**
|
|
2382
2382
|
* Release a reserved line
|
|
2383
|
-
* @description Gives back a line that you have reserved: it returns to `available` immediately and no longer belongs to your account. Accepts an API key. Any other line returns `404 not_found`, an `active` line included: to end a line you use, call `POST /v1/lines/{id}/terminate` or `POST /v1/lines/{id}/cancel`. A release changes no billing and leaves the `metadata` of the line as it is. This operation sends no event.
|
|
2383
|
+
* @description Gives back a line that you have reserved: it returns to `available` immediately and no longer belongs to your account. Accepts an API key. Any other line returns `404 not_found`, an `active` line included: to end a line you use, call `POST /v1/lines/{id}/terminate` or `POST /v1/lines/{id}/cancel`. A release cancels the unpaid subscription of a payment that was started for the line, unless that payment has been submitted. A payment that succeeds after the release activates no line: iSnap cancels its subscription and records the charge as a refund owed to the account. A release changes no other billing and leaves the `metadata` of the line as it is. This operation sends no event.
|
|
2384
2384
|
*/
|
|
2385
2385
|
post: {
|
|
2386
2386
|
parameters: {
|
|
@@ -3555,7 +3555,11 @@ export interface paths {
|
|
|
3555
3555
|
put?: never;
|
|
3556
3556
|
/**
|
|
3557
3557
|
* Start the payment of a reserved line
|
|
3558
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates
|
|
3558
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates the per-line subscription of a rented line that the account reserved with `POST /v1/lines/{id}/reserve`, and returns `client_secret`, the client secret of its first payment, for the payment form of Stripe. Only a rented line in status `reserved` can be paid for here. A wholesale partner gets `403 wholesale_partner_no_checkout`.
|
|
3559
|
+
*
|
|
3560
|
+
* The line becomes `active` when the first payment succeeds, and stays `reserved` until then. The call moves the `expires_at` of the line to 24 hours after the creation of the subscription. A subscription whose first payment has not succeeded 23 hours after its creation ends, and the line returns to `available`. A payment that succeeds for a line that the account no longer has reserved activates no line: iSnap cancels the subscription and records the charge as a refund owed to the account. No operation of this API makes that refund.
|
|
3561
|
+
*
|
|
3562
|
+
* A reserved line has at most one unpaid subscription. A repeated call with the same `inbound_only` returns the same `subscription_id` and `client_secret`. A call with the other value of `inbound_only` cancels the unpaid subscription and creates another one. Once the first payment of a subscription of the reservation has been submitted, and until the line is `active`, every call returns `409 purchase_payment_in_progress`, whatever `inbound_only` it sends, and cancels or creates nothing: read the line with `GET /v1/lines/{id}` until it is `active`. A canceled unpaid subscription can no longer be paid. `POST /v1/lines/{id}/release` cancels the unpaid subscription.
|
|
3559
3563
|
*/
|
|
3560
3564
|
post: {
|
|
3561
3565
|
parameters: {
|
|
@@ -3581,13 +3585,13 @@ export interface paths {
|
|
|
3581
3585
|
};
|
|
3582
3586
|
};
|
|
3583
3587
|
responses: {
|
|
3584
|
-
/** @description The
|
|
3588
|
+
/** @description The subscription and the client secret of its first payment. */
|
|
3585
3589
|
200: {
|
|
3586
3590
|
headers: {
|
|
3587
3591
|
[name: string]: unknown;
|
|
3588
3592
|
};
|
|
3589
3593
|
content: {
|
|
3590
|
-
"application/json": components["schemas"]["
|
|
3594
|
+
"application/json": components["schemas"]["CheckoutEnvelope"];
|
|
3591
3595
|
};
|
|
3592
3596
|
};
|
|
3593
3597
|
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. It is `bad_request` when the line is not in status `reserved`, `tier_not_checkoutable` when the line is not a rented line, and `android_rental_not_purchasable` for an Android line. */
|
|
@@ -3608,6 +3612,15 @@ export interface paths {
|
|
|
3608
3612
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3609
3613
|
};
|
|
3610
3614
|
};
|
|
3615
|
+
/** @description Refused. `error.code` is `wholesale_partner_no_checkout` when the account is a wholesale partner. It is `forbidden` when the request carries no header `X-Requested-With: XMLHttpRequest`. */
|
|
3616
|
+
403: {
|
|
3617
|
+
headers: {
|
|
3618
|
+
[name: string]: unknown;
|
|
3619
|
+
};
|
|
3620
|
+
content: {
|
|
3621
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3622
|
+
};
|
|
3623
|
+
};
|
|
3611
3624
|
/** @description Not found. `error.code` is `not_found`: the account reserved no line with this id. */
|
|
3612
3625
|
404: {
|
|
3613
3626
|
headers: {
|
|
@@ -3617,6 +3630,15 @@ export interface paths {
|
|
|
3617
3630
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3618
3631
|
};
|
|
3619
3632
|
};
|
|
3633
|
+
/** @description Conflict. `error.code` is `line_not_reserved` when the reservation of the line has ended. It is `purchase_payment_in_progress` when the first payment of a subscription of the reservation has been submitted and the line is not `active` yet: nothing is canceled or created. It is `purchase_in_progress` when the request has waited 10 seconds for another request that starts a payment for the same account: resend the request. */
|
|
3634
|
+
409: {
|
|
3635
|
+
headers: {
|
|
3636
|
+
[name: string]: unknown;
|
|
3637
|
+
};
|
|
3638
|
+
content: {
|
|
3639
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3640
|
+
};
|
|
3641
|
+
};
|
|
3620
3642
|
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
3621
3643
|
429: {
|
|
3622
3644
|
headers: {
|
|
@@ -3626,7 +3648,7 @@ export interface paths {
|
|
|
3626
3648
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3627
3649
|
};
|
|
3628
3650
|
};
|
|
3629
|
-
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3651
|
+
/** @description Unexpected failure. `error.code` is `stripe_payment_not_started` when Stripe returned no payment to confirm: nothing was charged, and the call can be made again. In any other case `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3630
3652
|
500: {
|
|
3631
3653
|
headers: {
|
|
3632
3654
|
[name: string]: unknown;
|
|
@@ -3654,7 +3676,11 @@ export interface paths {
|
|
|
3654
3676
|
put?: never;
|
|
3655
3677
|
/**
|
|
3656
3678
|
* Start the payment of BYOD slots
|
|
3657
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates a
|
|
3679
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates a subscription to `device_count` BYOD slots, with the billing period chosen in `billing_cycle`, and returns `client_secret`, the client secret of its first payment, for the payment form of Stripe, with the recurring total for that number of slots. Each slot allows one BYOD line: `POST /v1/byod/pair` needs a free slot. A wholesale partner gets `403 wholesale_partner_no_checkout`.
|
|
3680
|
+
*
|
|
3681
|
+
* The slots are available when the first payment succeeds. A subscription whose first payment has not succeeded 23 hours after its creation ends without providing a slot.
|
|
3682
|
+
*
|
|
3683
|
+
* An account has at most one unpaid subscription to BYOD slots. A repeated call with the same `device_count` and `billing_cycle` returns the same `subscription_id` and `client_secret`. A call with another `device_count` or `billing_cycle` cancels the unpaid subscription and creates another one. Once the first payment of a subscription to BYOD slots has been submitted, every call returns `409 purchase_payment_in_progress` and cancels or creates nothing, until `byod_slots.paid` in `GET /v1/billing/coverage` counts its slots and for one hour at most after that payment succeeded. After that, a call creates another subscription. A canceled unpaid subscription can no longer be paid. `DELETE /v1/billing/subscriptions/{id}` cancels an unpaid subscription immediately.
|
|
3658
3684
|
*/
|
|
3659
3685
|
post: {
|
|
3660
3686
|
parameters: {
|
|
@@ -3669,7 +3695,7 @@ export interface paths {
|
|
|
3669
3695
|
};
|
|
3670
3696
|
};
|
|
3671
3697
|
responses: {
|
|
3672
|
-
/** @description The
|
|
3698
|
+
/** @description The subscription, the client secret of its first payment and the recurring total. */
|
|
3673
3699
|
200: {
|
|
3674
3700
|
headers: {
|
|
3675
3701
|
[name: string]: unknown;
|
|
@@ -3696,6 +3722,24 @@ export interface paths {
|
|
|
3696
3722
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3697
3723
|
};
|
|
3698
3724
|
};
|
|
3725
|
+
/** @description Refused. `error.code` is `wholesale_partner_no_checkout` when the account is a wholesale partner. It is `forbidden` when the request carries no header `X-Requested-With: XMLHttpRequest`. */
|
|
3726
|
+
403: {
|
|
3727
|
+
headers: {
|
|
3728
|
+
[name: string]: unknown;
|
|
3729
|
+
};
|
|
3730
|
+
content: {
|
|
3731
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3732
|
+
};
|
|
3733
|
+
};
|
|
3734
|
+
/** @description Conflict. `error.code` is `purchase_payment_in_progress` when the first payment of a subscription to the same product has been submitted and what it buys is not counted yet in `GET /v1/billing/coverage`, for one hour at most after that payment succeeded: nothing is canceled or created. It is `purchase_in_progress` when the request has waited 10 seconds for another request that starts a payment for the same account: resend the request. */
|
|
3735
|
+
409: {
|
|
3736
|
+
headers: {
|
|
3737
|
+
[name: string]: unknown;
|
|
3738
|
+
};
|
|
3739
|
+
content: {
|
|
3740
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3741
|
+
};
|
|
3742
|
+
};
|
|
3699
3743
|
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
3700
3744
|
429: {
|
|
3701
3745
|
headers: {
|
|
@@ -3705,7 +3749,7 @@ export interface paths {
|
|
|
3705
3749
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3706
3750
|
};
|
|
3707
3751
|
};
|
|
3708
|
-
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3752
|
+
/** @description Unexpected failure. `error.code` is `stripe_payment_not_started` when Stripe returned no payment to confirm: nothing was charged, and the call can be made again. In any other case `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3709
3753
|
500: {
|
|
3710
3754
|
headers: {
|
|
3711
3755
|
[name: string]: unknown;
|
|
@@ -3733,7 +3777,13 @@ export interface paths {
|
|
|
3733
3777
|
put?: never;
|
|
3734
3778
|
/**
|
|
3735
3779
|
* Start the payment of hosted macOS sessions
|
|
3736
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates a
|
|
3780
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Creates a subscription to `quantity` hosted macOS sessions, with the billing period chosen in `billing_cycle`, and returns `client_secret`, the client secret of its first payment, for the payment form of Stripe, with an estimate of the recurring total. `GET /v1/billing/mac-quote` returns the same estimate and creates nothing. A wholesale partner gets `403 wholesale_partner_no_checkout`.
|
|
3781
|
+
*
|
|
3782
|
+
* `quantity` must be a whole number of packs, and at least one pack: otherwise the call returns `422 mac_quantity_not_a_pack`, with the size of a pack in `error.issues[0].min`. The account cannot hold more hosted macOS sessions than BYOD lines: otherwise the call returns `422 mac_sessions_exceed_byop_lines`. The sessions of an unpaid subscription count in that comparison for 24 hours at most.
|
|
3783
|
+
*
|
|
3784
|
+
* The sessions are available when the first payment succeeds. A subscription whose first payment has not succeeded 23 hours after its creation ends without providing a session.
|
|
3785
|
+
*
|
|
3786
|
+
* An account has at most one unpaid subscription to hosted macOS sessions. A repeated call with the same `quantity` and `billing_cycle` returns the same `subscription_id` and `client_secret`. A call with another `quantity` or `billing_cycle` cancels the unpaid subscription and creates another one. Once the first payment of a subscription to hosted macOS sessions has been submitted, every call returns `409 purchase_payment_in_progress` and cancels or creates nothing, until `mac_sessions.paid` in `GET /v1/billing/coverage` counts its sessions and for one hour at most after that payment succeeded. After that, a call creates another subscription. A canceled unpaid subscription can no longer be paid. `DELETE /v1/billing/subscriptions/{id}` cancels an unpaid subscription immediately. To change the quantity of a subscription whose first payment succeeded, call `PATCH /v1/billing/subscriptions/{id}`.
|
|
3737
3787
|
*/
|
|
3738
3788
|
post: {
|
|
3739
3789
|
parameters: {
|
|
@@ -3748,7 +3798,7 @@ export interface paths {
|
|
|
3748
3798
|
};
|
|
3749
3799
|
};
|
|
3750
3800
|
responses: {
|
|
3751
|
-
/** @description The
|
|
3801
|
+
/** @description The subscription, the client secret of its first payment and the estimated total. */
|
|
3752
3802
|
200: {
|
|
3753
3803
|
headers: {
|
|
3754
3804
|
[name: string]: unknown;
|
|
@@ -3775,6 +3825,15 @@ export interface paths {
|
|
|
3775
3825
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3776
3826
|
};
|
|
3777
3827
|
};
|
|
3828
|
+
/** @description Refused. `error.code` is `wholesale_partner_no_checkout` when the account is a wholesale partner. It is `forbidden` when the request carries no header `X-Requested-With: XMLHttpRequest`. */
|
|
3829
|
+
403: {
|
|
3830
|
+
headers: {
|
|
3831
|
+
[name: string]: unknown;
|
|
3832
|
+
};
|
|
3833
|
+
content: {
|
|
3834
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3835
|
+
};
|
|
3836
|
+
};
|
|
3778
3837
|
/** @description Not found. `error.code` is `not_found`: the account of the session no longer exists. */
|
|
3779
3838
|
404: {
|
|
3780
3839
|
headers: {
|
|
@@ -3784,6 +3843,15 @@ export interface paths {
|
|
|
3784
3843
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3785
3844
|
};
|
|
3786
3845
|
};
|
|
3846
|
+
/** @description Conflict. `error.code` is `purchase_payment_in_progress` when the first payment of a subscription to the same product has been submitted and what it buys is not counted yet in `GET /v1/billing/coverage`, for one hour at most after that payment succeeded: nothing is canceled or created. It is `purchase_in_progress` when the request has waited 10 seconds for another request that starts a payment for the same account: resend the request. */
|
|
3847
|
+
409: {
|
|
3848
|
+
headers: {
|
|
3849
|
+
[name: string]: unknown;
|
|
3850
|
+
};
|
|
3851
|
+
content: {
|
|
3852
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3853
|
+
};
|
|
3854
|
+
};
|
|
3787
3855
|
/** @description The request breaks a rule of this operation. `error.code` is `mac_quantity_not_a_pack` when `quantity` is not a whole number of packs or is below one pack. It is `mac_sessions_exceed_byop_lines` when the account would hold more hosted macOS sessions than BYOD lines. */
|
|
3788
3856
|
422: {
|
|
3789
3857
|
headers: {
|
|
@@ -3802,6 +3870,168 @@ export interface paths {
|
|
|
3802
3870
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3803
3871
|
};
|
|
3804
3872
|
};
|
|
3873
|
+
/** @description Unexpected failure. `error.code` is `stripe_payment_not_started` when Stripe returned no payment to confirm: nothing was charged, and the call can be made again. `error.code` is `mac_pack_size_unconfigured` or `mac_price_not_graduated` when the price of hosted macOS sessions is misconfigured. In any other case `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3874
|
+
500: {
|
|
3875
|
+
headers: {
|
|
3876
|
+
[name: string]: unknown;
|
|
3877
|
+
};
|
|
3878
|
+
content: {
|
|
3879
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3880
|
+
};
|
|
3881
|
+
};
|
|
3882
|
+
};
|
|
3883
|
+
};
|
|
3884
|
+
delete?: never;
|
|
3885
|
+
options?: never;
|
|
3886
|
+
head?: never;
|
|
3887
|
+
patch?: never;
|
|
3888
|
+
trace?: never;
|
|
3889
|
+
};
|
|
3890
|
+
"/v1/billing/mac-quote": {
|
|
3891
|
+
parameters: {
|
|
3892
|
+
query?: never;
|
|
3893
|
+
header?: never;
|
|
3894
|
+
path?: never;
|
|
3895
|
+
cookie?: never;
|
|
3896
|
+
};
|
|
3897
|
+
/**
|
|
3898
|
+
* Get a quote for hosted macOS sessions
|
|
3899
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns the price tiers of hosted macOS sessions for the billing period chosen in `billing_cycle`, and `estimated_total_cents`, the recurring total for `quantity` sessions. Each tier prices only the sessions that fall inside it. `quantity` must be a whole number of packs, and at least one pack: otherwise the call returns `422 mac_quantity_not_a_pack`, with the size of a pack in `error.issues[0].min`. The call creates nothing and does not compare `quantity` with the number of BYOD lines of the account.
|
|
3900
|
+
*/
|
|
3901
|
+
get: {
|
|
3902
|
+
parameters: {
|
|
3903
|
+
query: {
|
|
3904
|
+
/** @description Number of hosted macOS sessions to price: a whole number of packs, and at least one pack. The size of a pack is returned as `pack_size`, and as `error.issues[0].min` of the `422 mac_quantity_not_a_pack` refusal. */
|
|
3905
|
+
quantity?: number | null;
|
|
3906
|
+
/** @description Billing period to price: `monthly`, `quarterly` or `annual`. */
|
|
3907
|
+
billing_cycle: "monthly" | "quarterly" | "annual";
|
|
3908
|
+
};
|
|
3909
|
+
header?: never;
|
|
3910
|
+
path?: never;
|
|
3911
|
+
cookie?: never;
|
|
3912
|
+
};
|
|
3913
|
+
requestBody?: never;
|
|
3914
|
+
responses: {
|
|
3915
|
+
/** @description The price tiers and the estimated total. */
|
|
3916
|
+
200: {
|
|
3917
|
+
headers: {
|
|
3918
|
+
[name: string]: unknown;
|
|
3919
|
+
};
|
|
3920
|
+
content: {
|
|
3921
|
+
"application/json": components["schemas"]["MacQuoteEnvelope"];
|
|
3922
|
+
};
|
|
3923
|
+
};
|
|
3924
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
3925
|
+
400: {
|
|
3926
|
+
headers: {
|
|
3927
|
+
[name: string]: unknown;
|
|
3928
|
+
};
|
|
3929
|
+
content: {
|
|
3930
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3931
|
+
};
|
|
3932
|
+
};
|
|
3933
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
3934
|
+
401: {
|
|
3935
|
+
headers: {
|
|
3936
|
+
[name: string]: unknown;
|
|
3937
|
+
};
|
|
3938
|
+
content: {
|
|
3939
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3940
|
+
};
|
|
3941
|
+
};
|
|
3942
|
+
/** @description The request breaks a rule of this operation. `error.code` is `mac_quantity_not_a_pack`: `quantity` is not a whole number of packs or is below one pack. */
|
|
3943
|
+
422: {
|
|
3944
|
+
headers: {
|
|
3945
|
+
[name: string]: unknown;
|
|
3946
|
+
};
|
|
3947
|
+
content: {
|
|
3948
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3949
|
+
};
|
|
3950
|
+
};
|
|
3951
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
3952
|
+
429: {
|
|
3953
|
+
headers: {
|
|
3954
|
+
[name: string]: unknown;
|
|
3955
|
+
};
|
|
3956
|
+
content: {
|
|
3957
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3958
|
+
};
|
|
3959
|
+
};
|
|
3960
|
+
/** @description Unexpected failure. `error.code` is `mac_pack_size_unconfigured` or `mac_price_not_graduated` when the price of hosted macOS sessions is misconfigured. In any other case `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3961
|
+
500: {
|
|
3962
|
+
headers: {
|
|
3963
|
+
[name: string]: unknown;
|
|
3964
|
+
};
|
|
3965
|
+
content: {
|
|
3966
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3967
|
+
};
|
|
3968
|
+
};
|
|
3969
|
+
};
|
|
3970
|
+
};
|
|
3971
|
+
put?: never;
|
|
3972
|
+
post?: never;
|
|
3973
|
+
delete?: never;
|
|
3974
|
+
options?: never;
|
|
3975
|
+
head?: never;
|
|
3976
|
+
patch?: never;
|
|
3977
|
+
trace?: never;
|
|
3978
|
+
};
|
|
3979
|
+
"/v1/billing/config": {
|
|
3980
|
+
parameters: {
|
|
3981
|
+
query?: never;
|
|
3982
|
+
header?: never;
|
|
3983
|
+
path?: never;
|
|
3984
|
+
cookie?: never;
|
|
3985
|
+
};
|
|
3986
|
+
/**
|
|
3987
|
+
* Get the payment configuration
|
|
3988
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns `publishable_key`, the Stripe publishable key that the payment form of Stripe is loaded with, and `wholesale`, which is `true` for a wholesale partner. A wholesale partner cannot start a payment with this API: for such an account, `publishable_key` is `null` when iSnap has no publishable key to return. Any other account then gets `503 stripe_not_configured`.
|
|
3989
|
+
*/
|
|
3990
|
+
get: {
|
|
3991
|
+
parameters: {
|
|
3992
|
+
query?: never;
|
|
3993
|
+
header?: never;
|
|
3994
|
+
path?: never;
|
|
3995
|
+
cookie?: never;
|
|
3996
|
+
};
|
|
3997
|
+
requestBody?: never;
|
|
3998
|
+
responses: {
|
|
3999
|
+
/** @description The Stripe publishable key and the type of the account. */
|
|
4000
|
+
200: {
|
|
4001
|
+
headers: {
|
|
4002
|
+
[name: string]: unknown;
|
|
4003
|
+
};
|
|
4004
|
+
content: {
|
|
4005
|
+
"application/json": components["schemas"]["BillingConfigEnvelope"];
|
|
4006
|
+
};
|
|
4007
|
+
};
|
|
4008
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
4009
|
+
400: {
|
|
4010
|
+
headers: {
|
|
4011
|
+
[name: string]: unknown;
|
|
4012
|
+
};
|
|
4013
|
+
content: {
|
|
4014
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4015
|
+
};
|
|
4016
|
+
};
|
|
4017
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
4018
|
+
401: {
|
|
4019
|
+
headers: {
|
|
4020
|
+
[name: string]: unknown;
|
|
4021
|
+
};
|
|
4022
|
+
content: {
|
|
4023
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4024
|
+
};
|
|
4025
|
+
};
|
|
4026
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
4027
|
+
429: {
|
|
4028
|
+
headers: {
|
|
4029
|
+
[name: string]: unknown;
|
|
4030
|
+
};
|
|
4031
|
+
content: {
|
|
4032
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4033
|
+
};
|
|
4034
|
+
};
|
|
3805
4035
|
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
3806
4036
|
500: {
|
|
3807
4037
|
headers: {
|
|
@@ -3811,8 +4041,94 @@ export interface paths {
|
|
|
3811
4041
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3812
4042
|
};
|
|
3813
4043
|
};
|
|
4044
|
+
/** @description Unavailable. `error.code` is `stripe_not_configured`: iSnap has no publishable key to return, and the account is not a wholesale partner. */
|
|
4045
|
+
503: {
|
|
4046
|
+
headers: {
|
|
4047
|
+
[name: string]: unknown;
|
|
4048
|
+
};
|
|
4049
|
+
content: {
|
|
4050
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4051
|
+
};
|
|
4052
|
+
};
|
|
3814
4053
|
};
|
|
3815
4054
|
};
|
|
4055
|
+
put?: never;
|
|
4056
|
+
post?: never;
|
|
4057
|
+
delete?: never;
|
|
4058
|
+
options?: never;
|
|
4059
|
+
head?: never;
|
|
4060
|
+
patch?: never;
|
|
4061
|
+
trace?: never;
|
|
4062
|
+
};
|
|
4063
|
+
"/v1/billing/coverage": {
|
|
4064
|
+
parameters: {
|
|
4065
|
+
query?: never;
|
|
4066
|
+
header?: never;
|
|
4067
|
+
path?: never;
|
|
4068
|
+
cookie?: never;
|
|
4069
|
+
};
|
|
4070
|
+
/**
|
|
4071
|
+
* Get the coverage of the account
|
|
4072
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns the numbers that the purchase and pairing operations compare: the BYOD slots that the account has paid for and the BYOD lines that use them, the hosted macOS sessions that it has paid for and the ones assigned to it, and the sessions of unpaid subscriptions. A subscription counts in `paid` once iSnap has recorded its first payment. The API does not bound the delay between a payment and that record: read this operation until the count changes.
|
|
4073
|
+
*/
|
|
4074
|
+
get: {
|
|
4075
|
+
parameters: {
|
|
4076
|
+
query?: never;
|
|
4077
|
+
header?: never;
|
|
4078
|
+
path?: never;
|
|
4079
|
+
cookie?: never;
|
|
4080
|
+
};
|
|
4081
|
+
requestBody?: never;
|
|
4082
|
+
responses: {
|
|
4083
|
+
/** @description The coverage of the account. */
|
|
4084
|
+
200: {
|
|
4085
|
+
headers: {
|
|
4086
|
+
[name: string]: unknown;
|
|
4087
|
+
};
|
|
4088
|
+
content: {
|
|
4089
|
+
"application/json": components["schemas"]["BillingCoverageEnvelope"];
|
|
4090
|
+
};
|
|
4091
|
+
};
|
|
4092
|
+
/** @description Invalid request. `error.code` is `validation_failed` when a parameter, a header or the body does not match its schema: `error.issues` then lists each problem. */
|
|
4093
|
+
400: {
|
|
4094
|
+
headers: {
|
|
4095
|
+
[name: string]: unknown;
|
|
4096
|
+
};
|
|
4097
|
+
content: {
|
|
4098
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4099
|
+
};
|
|
4100
|
+
};
|
|
4101
|
+
/** @description No valid credential. `error.code` is `unauthorized`. */
|
|
4102
|
+
401: {
|
|
4103
|
+
headers: {
|
|
4104
|
+
[name: string]: unknown;
|
|
4105
|
+
};
|
|
4106
|
+
content: {
|
|
4107
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4108
|
+
};
|
|
4109
|
+
};
|
|
4110
|
+
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
4111
|
+
429: {
|
|
4112
|
+
headers: {
|
|
4113
|
+
[name: string]: unknown;
|
|
4114
|
+
};
|
|
4115
|
+
content: {
|
|
4116
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4117
|
+
};
|
|
4118
|
+
};
|
|
4119
|
+
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
4120
|
+
500: {
|
|
4121
|
+
headers: {
|
|
4122
|
+
[name: string]: unknown;
|
|
4123
|
+
};
|
|
4124
|
+
content: {
|
|
4125
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4126
|
+
};
|
|
4127
|
+
};
|
|
4128
|
+
};
|
|
4129
|
+
};
|
|
4130
|
+
put?: never;
|
|
4131
|
+
post?: never;
|
|
3816
4132
|
delete?: never;
|
|
3817
4133
|
options?: never;
|
|
3818
4134
|
head?: never;
|
|
@@ -3831,7 +4147,9 @@ export interface paths {
|
|
|
3831
4147
|
post?: never;
|
|
3832
4148
|
/**
|
|
3833
4149
|
* Cancel a subscription
|
|
3834
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Schedules
|
|
4150
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Schedules a subscription of the account to end at the end of the billing period already paid: the subscription of a line, a subscription to BYOD slots or a subscription to hosted macOS sessions. The line, the slots or the sessions work until then, and `cancel_at_period_end` reads `true` in `GET /v1/billing/subscriptions`. A subscription to BYOD slots or to hosted macOS sessions whose first payment has not succeeded is canceled immediately instead, and can no longer be paid; when that payment has been submitted, the call returns `409 purchase_payment_in_progress` and cancels nothing.
|
|
4151
|
+
*
|
|
4152
|
+
* Canceling a subscription to BYOD slots returns `422 byop_reduction_strands_mac_sessions` when the account would hold fewer BYOD slots than hosted macOS sessions at the end of the billing period: cancel the subscription to hosted macOS sessions first. When the subscription to BYOD slots ends, the `active` BYOD lines of the account that its remaining BYOD slots no longer cover take the status `cancelled`, oldest first. A subscription to BYOD slots or to hosted macOS sessions that has already ended returns `409 subscription_already_ended`. Any other subscription, a subscription of another account included, returns `403 forbidden`. The response is not wrapped in the standard envelope.
|
|
3835
4153
|
*/
|
|
3836
4154
|
delete: {
|
|
3837
4155
|
parameters: {
|
|
@@ -3872,6 +4190,15 @@ export interface paths {
|
|
|
3872
4190
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3873
4191
|
};
|
|
3874
4192
|
};
|
|
4193
|
+
/** @description Refused. `error.code` is `forbidden`: this operation cannot cancel the subscription, or the subscription belongs to another account, or the request carries no header `X-Requested-With: XMLHttpRequest`. */
|
|
4194
|
+
403: {
|
|
4195
|
+
headers: {
|
|
4196
|
+
[name: string]: unknown;
|
|
4197
|
+
};
|
|
4198
|
+
content: {
|
|
4199
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4200
|
+
};
|
|
4201
|
+
};
|
|
3875
4202
|
/** @description Not found. `error.code` is `not_found`: the account has no billing account yet. iSnap creates one when the account starts a payment. */
|
|
3876
4203
|
404: {
|
|
3877
4204
|
headers: {
|
|
@@ -3881,7 +4208,7 @@ export interface paths {
|
|
|
3881
4208
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3882
4209
|
};
|
|
3883
4210
|
};
|
|
3884
|
-
/** @description Conflict. The resource is not in a state that allows this operation; `error.code` names the reason. */
|
|
4211
|
+
/** @description Conflict. The resource is not in a state that allows this operation; `error.code` names the reason. It is `subscription_already_ended` when a subscription to BYOD slots or to hosted macOS sessions has already ended. It is `purchase_payment_in_progress` when the first payment of an unpaid subscription has been submitted. */
|
|
3885
4212
|
409: {
|
|
3886
4213
|
headers: {
|
|
3887
4214
|
[name: string]: unknown;
|
|
@@ -3890,6 +4217,15 @@ export interface paths {
|
|
|
3890
4217
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3891
4218
|
};
|
|
3892
4219
|
};
|
|
4220
|
+
/** @description The request breaks a rule of this operation. `error.code` is `byop_reduction_strands_mac_sessions`: the account would hold fewer BYOD slots than hosted macOS sessions. */
|
|
4221
|
+
422: {
|
|
4222
|
+
headers: {
|
|
4223
|
+
[name: string]: unknown;
|
|
4224
|
+
};
|
|
4225
|
+
content: {
|
|
4226
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4227
|
+
};
|
|
4228
|
+
};
|
|
3893
4229
|
/** @description Too many requests. `error.code` is `rate_limit_exceeded` when more than 100 requests came from the same network address in 60 seconds, whatever their API key or account: wait `error.retry_after` seconds. */
|
|
3894
4230
|
429: {
|
|
3895
4231
|
headers: {
|
|
@@ -3914,7 +4250,7 @@ export interface paths {
|
|
|
3914
4250
|
head?: never;
|
|
3915
4251
|
/**
|
|
3916
4252
|
* Change the quantity of a subscription
|
|
3917
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Sets the quantity of a subscription to hosted macOS sessions, or of a subscription to BYOD slots. A number of hosted macOS sessions must be a whole number of packs (`422 mac_quantity_not_a_pack`) and cannot exceed the number of BYOD lines of the account (`422 mac_sessions_exceed_byop_lines`). A number of BYOD slots cannot fall below the number of hosted macOS sessions that the account holds (`422 byop_reduction_strands_mac_sessions`). Any other subscription, the subscription of a rented line included, returns `409 subscription_not_quantity_adjustable`. A subscription of another account returns `403 forbidden`.
|
|
4253
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Sets the quantity of a subscription to hosted macOS sessions, or of a subscription to BYOD slots. A number of hosted macOS sessions must be a whole number of packs (`422 mac_quantity_not_a_pack`) and cannot exceed the number of BYOD lines of the account (`422 mac_sessions_exceed_byop_lines`). A number of BYOD slots cannot fall below the number of hosted macOS sessions that the account holds (`422 byop_reduction_strands_mac_sessions`), and cannot be reduced below the number of BYOD lines of the account that are not `cancelled` (`422 byop_reduction_strands_byod_lines`, with that number in `error.issues[0].min`): end BYOD lines first. A subscription that has already ended returns `409 subscription_already_ended`. A subscription whose first payment has not succeeded returns `409 subscription_awaiting_payment`: start the payment again with another quantity instead. Any other subscription, the subscription of a rented line included, returns `409 subscription_not_quantity_adjustable`. A subscription of another account returns `403 forbidden`.
|
|
3918
4254
|
*/
|
|
3919
4255
|
patch: {
|
|
3920
4256
|
parameters: {
|
|
@@ -3977,7 +4313,7 @@ export interface paths {
|
|
|
3977
4313
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3978
4314
|
};
|
|
3979
4315
|
};
|
|
3980
|
-
/** @description Conflict. `error.code` is `subscription_not_quantity_adjustable
|
|
4316
|
+
/** @description Conflict. `error.code` is `subscription_already_ended` when the subscription has already ended. It is `subscription_awaiting_payment` when the first payment of the subscription has not succeeded. It is `subscription_not_quantity_adjustable` when the subscription is neither a subscription to hosted macOS sessions nor a subscription to BYOD slots. */
|
|
3981
4317
|
409: {
|
|
3982
4318
|
headers: {
|
|
3983
4319
|
[name: string]: unknown;
|
|
@@ -3986,7 +4322,7 @@ export interface paths {
|
|
|
3986
4322
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
3987
4323
|
};
|
|
3988
4324
|
};
|
|
3989
|
-
/** @description The request breaks a rule of this operation. `error.code` is `mac_quantity_not_a_pack` when the number of hosted macOS sessions is not a whole number of packs or is below one pack. It is `mac_sessions_exceed_byop_lines` when the account would hold more hosted macOS sessions than BYOD lines. It is `byop_reduction_strands_mac_sessions` when the account would hold fewer BYOD slots than hosted macOS sessions. */
|
|
4325
|
+
/** @description The request breaks a rule of this operation. `error.code` is `mac_quantity_not_a_pack` when the number of hosted macOS sessions is not a whole number of packs or is below one pack. It is `mac_sessions_exceed_byop_lines` when the account would hold more hosted macOS sessions than BYOD lines. It is `byop_reduction_strands_mac_sessions` when the account would hold fewer BYOD slots than hosted macOS sessions. It is `byop_reduction_strands_byod_lines` when a reduction would leave the account with fewer BYOD slots than BYOD lines that are not `cancelled`. */
|
|
3990
4326
|
422: {
|
|
3991
4327
|
headers: {
|
|
3992
4328
|
[name: string]: unknown;
|
|
@@ -4004,7 +4340,7 @@ export interface paths {
|
|
|
4004
4340
|
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
4005
4341
|
};
|
|
4006
4342
|
};
|
|
4007
|
-
/** @description Unexpected failure. `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
4343
|
+
/** @description Unexpected failure. `error.code` is `mac_pack_size_unconfigured` or `mac_price_not_graduated` when the price of hosted macOS sessions is misconfigured. In any other case `error.code` is `internal_error`. An operation that takes a JSON body also returns it when the body, sent as `application/json`, is not valid JSON. Quote `trace_id` when you report it to iSnap. */
|
|
4008
4344
|
500: {
|
|
4009
4345
|
headers: {
|
|
4010
4346
|
[name: string]: unknown;
|
|
@@ -4026,7 +4362,7 @@ export interface paths {
|
|
|
4026
4362
|
};
|
|
4027
4363
|
/**
|
|
4028
4364
|
* List subscriptions
|
|
4029
|
-
* @description Dashboard session only: an API key is refused with `401`. Returns the subscriptions of the account,
|
|
4365
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns the subscriptions of the account, ended ones included: the 100 most recent at most, without pagination. A subscription whose first payment has not succeeded is returned with `status: incomplete` while it can still be paid. A subscription that expired unpaid, or that an operation of this API canceled while it was unpaid, is not returned.
|
|
4030
4366
|
*/
|
|
4031
4367
|
get: {
|
|
4032
4368
|
parameters: {
|
|
@@ -4101,7 +4437,7 @@ export interface paths {
|
|
|
4101
4437
|
};
|
|
4102
4438
|
/**
|
|
4103
4439
|
* List invoices
|
|
4104
|
-
* @description Dashboard session only: an API key is refused with `401`. Returns the invoices of the account, newest first: the 100 most recent at most, without pagination.
|
|
4440
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns the invoices of the account, newest first: the 100 most recent at most, without pagination. The void first invoice of a subscription whose first payment was not made is not returned.
|
|
4105
4441
|
*/
|
|
4106
4442
|
get: {
|
|
4107
4443
|
parameters: {
|
|
@@ -4176,7 +4512,7 @@ export interface paths {
|
|
|
4176
4512
|
};
|
|
4177
4513
|
/**
|
|
4178
4514
|
* List payment methods
|
|
4179
|
-
* @description Dashboard session only: an API key is refused with `401`. Returns the cards saved on the account: the brand, the last four digits, the expiry, and which card is the default payment method. The full card number is never returned.
|
|
4515
|
+
* @description Dashboard session only: an API key is refused with `401`. Returns the cards saved on the account: the brand, the last four digits, the expiry, and which card is the default payment method. The full card number is never returned. An account that has no billing account gets an empty list.
|
|
4180
4516
|
*/
|
|
4181
4517
|
get: {
|
|
4182
4518
|
parameters: {
|
|
@@ -4237,7 +4573,7 @@ export interface paths {
|
|
|
4237
4573
|
put?: never;
|
|
4238
4574
|
/**
|
|
4239
4575
|
* Start adding a payment method
|
|
4240
|
-
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Returns `client_secret`, a client secret for the payment form of Stripe: the form saves a new card on the account.
|
|
4576
|
+
* @description Dashboard session only: an API key is refused with `401`. The request must carry the header `X-Requested-With: XMLHttpRequest`, or it is refused with `403 forbidden`. Returns `client_secret`, a client secret for the payment form of Stripe: the form saves a new card on the account. Only a card can be saved. The call creates the billing account of an account that has none. The response is not wrapped in the standard envelope.
|
|
4241
4577
|
*/
|
|
4242
4578
|
post: {
|
|
4243
4579
|
parameters: {
|
|
@@ -8174,7 +8510,7 @@ export interface components {
|
|
|
8174
8510
|
message: string;
|
|
8175
8511
|
/** @description Kind of problem. On `validation_failed`, for example `invalid_type`, `invalid_value`, `invalid_format`, `invalid_union`, `invalid_key`, `invalid_element`, `too_small`, `too_big`, `not_multiple_of`, `unrecognized_keys` or `custom`. The list is open: read `path` and `message`. */
|
|
8176
8512
|
code: string;
|
|
8177
|
-
/** @description Smallest accepted value. Present only on `limit_out_of_bounds`, `mac_quantity_not_a_pack` and `
|
|
8513
|
+
/** @description Smallest accepted value. Present only on `limit_out_of_bounds`, `mac_quantity_not_a_pack`, `byop_reduction_strands_mac_sessions` and `byop_reduction_strands_byod_lines`. */
|
|
8178
8514
|
min?: number;
|
|
8179
8515
|
/** @description Largest accepted value. Present only on `limit_out_of_bounds` and `mac_sessions_exceed_byop_lines`, and on the `too_big` issue of an `Idempotency-Key` header longer than 255 characters. */
|
|
8180
8516
|
max?: number;
|
|
@@ -8876,13 +9212,24 @@ export interface components {
|
|
|
8876
9212
|
[key: string]: unknown;
|
|
8877
9213
|
};
|
|
8878
9214
|
};
|
|
8879
|
-
|
|
8880
|
-
Checkout: {
|
|
9215
|
+
CheckoutEnvelope: {
|
|
8881
9216
|
/**
|
|
8882
|
-
*
|
|
8883
|
-
* @
|
|
9217
|
+
* @description Always `true` on a success response.
|
|
9218
|
+
* @enum {boolean}
|
|
8884
9219
|
*/
|
|
8885
|
-
|
|
9220
|
+
success: true;
|
|
9221
|
+
data: components["schemas"]["Checkout"];
|
|
9222
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9223
|
+
trace_id: string;
|
|
9224
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9225
|
+
request_id: string;
|
|
9226
|
+
};
|
|
9227
|
+
/** @description The first payment of a reserved line. */
|
|
9228
|
+
Checkout: {
|
|
9229
|
+
/** @description Id of the subscription. The subscription provides nothing until its first payment succeeds, and ends when that payment has not succeeded 23 hours after its creation. */
|
|
9230
|
+
subscription_id: string;
|
|
9231
|
+
/** @description Client secret of the first payment of the subscription, for the payment form of Stripe: the form takes the payment. `null` when the credit balance of the account has paid the first invoice: there is no payment to make. */
|
|
9232
|
+
client_secret: string | null;
|
|
8886
9233
|
};
|
|
8887
9234
|
ByodCheckoutEnvelope: {
|
|
8888
9235
|
/**
|
|
@@ -8896,18 +9243,16 @@ export interface components {
|
|
|
8896
9243
|
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
8897
9244
|
request_id: string;
|
|
8898
9245
|
};
|
|
8899
|
-
/** @description The payment
|
|
9246
|
+
/** @description The first payment of a purchase of BYOD slots. */
|
|
8900
9247
|
ByodCheckoutResponse: {
|
|
8901
|
-
/**
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
*/
|
|
8910
|
-
expires_at: string;
|
|
9248
|
+
/** @description Id of the subscription. The subscription provides nothing until its first payment succeeds, and ends when that payment has not succeeded 23 hours after its creation. */
|
|
9249
|
+
subscription_id: string;
|
|
9250
|
+
/** @description Client secret of the first payment of the subscription, for the payment form of Stripe: the form takes the payment. `null` when the credit balance of the account has paid the first invoice: there is no payment to make. */
|
|
9251
|
+
client_secret: string | null;
|
|
9252
|
+
/** @description Number of BYOD slots ordered. */
|
|
9253
|
+
quantity: number;
|
|
9254
|
+
/** @description Recurring total per billing period, in cents. `null` when it cannot be computed. It excludes tax, proration and discounts. */
|
|
9255
|
+
estimated_total_cents: number | null;
|
|
8911
9256
|
};
|
|
8912
9257
|
/** @description A purchase of BYOD slots. */
|
|
8913
9258
|
ByodCheckoutBody: {
|
|
@@ -8935,18 +9280,12 @@ export interface components {
|
|
|
8935
9280
|
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
8936
9281
|
request_id: string;
|
|
8937
9282
|
};
|
|
8938
|
-
/** @description The payment
|
|
9283
|
+
/** @description The first payment of a purchase of hosted macOS sessions. */
|
|
8939
9284
|
MacCheckoutResponse: {
|
|
8940
|
-
/**
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
checkout_url: string;
|
|
8945
|
-
/**
|
|
8946
|
-
* Format: date-time
|
|
8947
|
-
* @description Timestamp at which the payment page expires.
|
|
8948
|
-
*/
|
|
8949
|
-
expires_at: string;
|
|
9285
|
+
/** @description Id of the subscription. The subscription provides nothing until its first payment succeeds, and ends when that payment has not succeeded 23 hours after its creation. */
|
|
9286
|
+
subscription_id: string;
|
|
9287
|
+
/** @description Client secret of the first payment of the subscription, for the payment form of Stripe: the form takes the payment. `null` when the credit balance of the account has paid the first invoice: there is no payment to make. */
|
|
9288
|
+
client_secret: string | null;
|
|
8950
9289
|
/** @description Number of hosted macOS sessions ordered. */
|
|
8951
9290
|
quantity: number;
|
|
8952
9291
|
/** @description Size of a pack: a quantity is a multiple of it, and at least equal to it. */
|
|
@@ -8968,6 +9307,90 @@ export interface components {
|
|
|
8968
9307
|
*/
|
|
8969
9308
|
billing_cycle: "monthly" | "quarterly" | "annual";
|
|
8970
9309
|
};
|
|
9310
|
+
MacQuoteEnvelope: {
|
|
9311
|
+
/**
|
|
9312
|
+
* @description Always `true` on a success response.
|
|
9313
|
+
* @enum {boolean}
|
|
9314
|
+
*/
|
|
9315
|
+
success: true;
|
|
9316
|
+
data: components["schemas"]["MacQuote"];
|
|
9317
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9318
|
+
trace_id: string;
|
|
9319
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9320
|
+
request_id: string;
|
|
9321
|
+
};
|
|
9322
|
+
/** @description The price of a number of hosted macOS sessions. */
|
|
9323
|
+
MacQuote: {
|
|
9324
|
+
/** @description Number of hosted macOS sessions priced. */
|
|
9325
|
+
quantity: number;
|
|
9326
|
+
/** @description Size of a pack: a quantity is a multiple of it, and at least equal to it. */
|
|
9327
|
+
pack_size: number;
|
|
9328
|
+
/** @description Three-letter currency code of every amount, in lowercase. */
|
|
9329
|
+
currency: string;
|
|
9330
|
+
/** @description The tiers of the price, from the first session up. Each tier prices only the sessions that fall inside it. */
|
|
9331
|
+
tiers: components["schemas"]["MacQuoteTier"][];
|
|
9332
|
+
/** @description Recurring total per billing period, in cents. It excludes tax, proration and discounts. */
|
|
9333
|
+
estimated_total_cents: number;
|
|
9334
|
+
};
|
|
9335
|
+
/** @description A tier of the price of hosted macOS sessions. */
|
|
9336
|
+
MacQuoteTier: {
|
|
9337
|
+
/** @description Highest number of sessions that the tier covers, counted from the first session. `null` for the last tier, which has no upper bound. */
|
|
9338
|
+
up_to: number | null;
|
|
9339
|
+
/** @description Price of one session inside the tier, per billing period, in cents. */
|
|
9340
|
+
unit_amount_cents: number;
|
|
9341
|
+
/** @description Amount added once per billing period when the quantity reaches the tier, in cents. */
|
|
9342
|
+
flat_amount_cents: number;
|
|
9343
|
+
};
|
|
9344
|
+
BillingConfigEnvelope: {
|
|
9345
|
+
/**
|
|
9346
|
+
* @description Always `true` on a success response.
|
|
9347
|
+
* @enum {boolean}
|
|
9348
|
+
*/
|
|
9349
|
+
success: true;
|
|
9350
|
+
data: components["schemas"]["BillingConfig"];
|
|
9351
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9352
|
+
trace_id: string;
|
|
9353
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9354
|
+
request_id: string;
|
|
9355
|
+
};
|
|
9356
|
+
/** @description What the payment form needs, and the type of the account. */
|
|
9357
|
+
BillingConfig: {
|
|
9358
|
+
/** @description Stripe publishable key that the payment form of Stripe is loaded with. It starts with `pk_test_` in test mode and with `pk_live_` in live mode. `null` only for a wholesale partner, when iSnap has no publishable key to return. */
|
|
9359
|
+
publishable_key: string | null;
|
|
9360
|
+
/** @description `true` for a wholesale partner. A wholesale partner is billed on the monthly wholesale invoice: it has no card payment to make, and the operations that start a payment return `403 wholesale_partner_no_checkout` to it. */
|
|
9361
|
+
wholesale: boolean;
|
|
9362
|
+
};
|
|
9363
|
+
BillingCoverageEnvelope: {
|
|
9364
|
+
/**
|
|
9365
|
+
* @description Always `true` on a success response.
|
|
9366
|
+
* @enum {boolean}
|
|
9367
|
+
*/
|
|
9368
|
+
success: true;
|
|
9369
|
+
data: components["schemas"]["BillingCoverage"];
|
|
9370
|
+
/** @description Trace id of the request that produced this response: 32 lowercase hexadecimal characters. Quote it when you report a problem to iSnap. */
|
|
9371
|
+
trace_id: string;
|
|
9372
|
+
/** @description Id of the request that produced this response: `req_` followed by 25 letters or digits. */
|
|
9373
|
+
request_id: string;
|
|
9374
|
+
};
|
|
9375
|
+
/** @description What the account has paid for, and what it uses. */
|
|
9376
|
+
BillingCoverage: {
|
|
9377
|
+
/** @description BYOD slots. `POST /v1/byod/pair` needs `paid` to be greater than `in_use`. */
|
|
9378
|
+
byod_slots: {
|
|
9379
|
+
/** @description Number of BYOD slots that the subscriptions of the account provide. A subscription counts once iSnap has recorded its first payment. */
|
|
9380
|
+
paid: number;
|
|
9381
|
+
/** @description Number of BYOD lines of the account that are not `cancelled`. A `suspended` line counts. */
|
|
9382
|
+
in_use: number;
|
|
9383
|
+
};
|
|
9384
|
+
/** @description Hosted macOS sessions. */
|
|
9385
|
+
mac_sessions: {
|
|
9386
|
+
/** @description Number of hosted macOS sessions that the subscriptions of the account provide. A subscription counts once iSnap has recorded its first payment. */
|
|
9387
|
+
paid: number;
|
|
9388
|
+
/** @description Number of hosted macOS sessions assigned to the account, delivered or not. */
|
|
9389
|
+
in_use: number;
|
|
9390
|
+
/** @description Number of hosted macOS sessions of subscriptions whose first payment has not succeeded. They count with `paid` in the comparison with the BYOD lines of the account, for 24 hours at most. */
|
|
9391
|
+
held: number;
|
|
9392
|
+
};
|
|
9393
|
+
};
|
|
8971
9394
|
SubscriptionQuantityEnvelope: {
|
|
8972
9395
|
/**
|
|
8973
9396
|
* @description Always `true` on a success response.
|
|
@@ -9014,7 +9437,7 @@ export interface components {
|
|
|
9014
9437
|
Subscription: {
|
|
9015
9438
|
/** @description Id of the subscription. */
|
|
9016
9439
|
id: string;
|
|
9017
|
-
/** @description Status of the subscription, for example `active`. */
|
|
9440
|
+
/** @description Status of the subscription, for example `active`. It is `incomplete` while the first payment has not succeeded. */
|
|
9018
9441
|
status: string;
|
|
9019
9442
|
/** @description Start of the current billing period, in Unix seconds. */
|
|
9020
9443
|
current_period_start: number;
|
|
@@ -9022,14 +9445,26 @@ export interface components {
|
|
|
9022
9445
|
current_period_end: number;
|
|
9023
9446
|
/** @description `true` when the end of this subscription is scheduled for the end of the current billing period. */
|
|
9024
9447
|
cancel_at_period_end: boolean;
|
|
9025
|
-
/** @description Id of the line that the subscription pays for
|
|
9448
|
+
/** @description Id of the line that the subscription pays for, in the `line_` form that the line operations take. `null` on a subscription to BYOD slots or to hosted macOS sessions, and when the line no longer exists or no longer belongs to the account. */
|
|
9026
9449
|
line_id: string | null;
|
|
9027
9450
|
/** @description Id of the price. `null` when the subscription has no item. */
|
|
9028
9451
|
price_id: string | null;
|
|
9029
|
-
/** @description Unit amount of the first item of the subscription, in cents. `null` when the price has no unit amount. */
|
|
9452
|
+
/** @description Unit amount of the first item of the subscription, in cents. `null` when the price has no unit amount: the price of hosted macOS sessions is tiered and has none, and `GET /v1/billing/mac-quote` returns its total for a quantity. */
|
|
9030
9453
|
amount: number | null;
|
|
9031
9454
|
/** @description Three-letter currency code, in lowercase. `null` when the subscription has no item. */
|
|
9032
9455
|
currency: string | null;
|
|
9456
|
+
/**
|
|
9457
|
+
* @description What the subscription sells: `outbound`, `inbound` or `shared` for a line, `byop` for BYOD slots, `mac` for hosted macOS sessions. `null` when the subscription has several items, or an item that is none of these.
|
|
9458
|
+
* @enum {string|null}
|
|
9459
|
+
*/
|
|
9460
|
+
product: "outbound" | "inbound" | "shared" | "byop" | "mac" | null;
|
|
9461
|
+
/** @description Quantity of the item of the subscription: the number of BYOD slots for `byop`, the number of hosted macOS sessions for `mac`, and `1` for a line. `null` when the subscription has several items. */
|
|
9462
|
+
quantity: number | null;
|
|
9463
|
+
/**
|
|
9464
|
+
* @description Billing period of the subscription: `monthly`, `quarterly` or `annual`. `null` when `product` is `null`.
|
|
9465
|
+
* @enum {string|null}
|
|
9466
|
+
*/
|
|
9467
|
+
billing_cycle: "monthly" | "quarterly" | "annual" | null;
|
|
9033
9468
|
/** @description Time of creation, in Unix seconds. */
|
|
9034
9469
|
created_at: number;
|
|
9035
9470
|
};
|