Skip to content

Commit 52b2c88

Browse files
committed
Update schema
1 parent 90ca609 commit 52b2c88

5 files changed

Lines changed: 220 additions & 0 deletions

File tree

packages/dashboard-client/resources.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,38 @@
776776
"name": "updateInfo",
777777
"rawName": "rawUpdateInfo"
778778
},
779+
{
780+
"returnsItem": false,
781+
"requestBodyRequiresItem": false,
782+
"offersNestedItemsOptionInQueryParams": false,
783+
"rel": "cancel_subscription",
784+
"urlTemplate": "/per-site-pricing-billing-profiles/${perSitePricingBillingProfileId}/cancel-subscription",
785+
"method": "POST",
786+
"comment": "Cancel subscription",
787+
"urlPlaceholders": [
788+
{
789+
"variableName": "perSitePricingBillingProfileId",
790+
"isEntityId": true,
791+
"relType": "PerSitePricingBillingProfileData"
792+
}
793+
],
794+
"entityIdPlaceholder": {
795+
"variableName": "perSitePricingBillingProfileId",
796+
"isEntityId": true,
797+
"relType": "PerSitePricingBillingProfileData"
798+
},
799+
"requestBodyType": "PerSitePricingBillingProfileCancelSubscriptionSchema",
800+
"optionalRequestBody": false,
801+
"requestStructure": {
802+
"type": "per_site_pricing_billing_profile",
803+
"attributes": ["reason"],
804+
"relationships": []
805+
},
806+
"queryParamsRequired": false,
807+
"responseType": "PerSitePricingBillingProfileCancelSubscriptionTargetSchema",
808+
"name": "cancelSubscription",
809+
"rawName": "rawCancelSubscription"
810+
},
779811
{
780812
"returnsItem": false,
781813
"requestBodyRequiresItem": false,
@@ -865,6 +897,27 @@
865897
"responseType": "PerOwnerPricingBillingProfileUpdateInfoTargetSchema",
866898
"name": "updateInfo",
867899
"rawName": "rawUpdateInfo"
900+
},
901+
{
902+
"returnsItem": false,
903+
"requestBodyRequiresItem": false,
904+
"offersNestedItemsOptionInQueryParams": false,
905+
"rel": "cancel_subscription",
906+
"urlTemplate": "/per-owner-pricing-billing-profile/cancel-subscription",
907+
"method": "POST",
908+
"comment": "Cancel subscription",
909+
"urlPlaceholders": [],
910+
"requestBodyType": "PerOwnerPricingBillingProfileCancelSubscriptionSchema",
911+
"optionalRequestBody": false,
912+
"requestStructure": {
913+
"type": "per_owner_pricing_billing_profile",
914+
"attributes": ["reason"],
915+
"relationships": []
916+
},
917+
"queryParamsRequired": false,
918+
"responseType": "PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema",
919+
"name": "cancelSubscription",
920+
"rawName": "rawCancelSubscription"
868921
}
869922
],
870923
"namespace": "perOwnerPricingBillingProfile",

packages/dashboard-client/src/generated/ApiTypes.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,9 @@ export type PerSitePricingBillingProfile = {
28282828
state: string;
28292829
zip: string;
28302830
vat_number: null | string;
2831+
/**
2832+
* Whether the subscription has been cancelled and all associated projects are frozen.
2833+
*/
28312834
defaulting: boolean;
28322835
defaulting_since: null | string;
28332836
credits: number;
@@ -2846,6 +2849,8 @@ export type PerSitePricingBillingProfileUpdateCreditCardTargetSchema =
28462849
PerSitePricingBillingProfile;
28472850
export type PerSitePricingBillingProfileUpdateInfoTargetSchema =
28482851
PerSitePricingBillingProfile;
2852+
export type PerSitePricingBillingProfileCancelSubscriptionTargetSchema =
2853+
PerSitePricingBillingProfile;
28492854
export type PerSitePricingBillingProfileDestroyTargetSchema =
28502855
PerSitePricingBillingProfile;
28512856
/**
@@ -2871,6 +2876,9 @@ export type PerSitePricingBillingProfileAttributes = {
28712876
state: string;
28722877
zip: string;
28732878
vat_number: null | string;
2879+
/**
2880+
* Whether the subscription has been cancelled and all associated projects are frozen.
2881+
*/
28742882
defaulting: boolean;
28752883
defaulting_since: null | string;
28762884
credits: number;
@@ -2920,6 +2928,14 @@ export type PerSitePricingBillingProfileUpdateInfoSchema = {
29202928
cf_cod_fiscale?: null | string;
29212929
};
29222930
};
2931+
/**
2932+
* This interface was referenced by `PerSitePricingBillingProfile`'s JSON-Schema
2933+
* via the `cancel_subscription.schema` link.
2934+
*/
2935+
export type PerSitePricingBillingProfileCancelSubscriptionSchema = {
2936+
type?: 'per_site_pricing_billing_profile';
2937+
reason?: string | null;
2938+
};
29232939
/**
29242940
* A billing profile
29252941
*
@@ -2945,6 +2961,9 @@ export type PerOwnerPricingBillingProfile = {
29452961
state: string;
29462962
zip: string;
29472963
vat_number: null | string;
2964+
/**
2965+
* Whether the subscription has been cancelled and all associated projects are frozen.
2966+
*/
29482967
defaulting: boolean;
29492968
defaulting_since: null | string;
29502969
credits: number;
@@ -2961,6 +2980,8 @@ export type PerOwnerPricingBillingProfileUpdateCreditCardTargetSchema =
29612980
PerOwnerPricingBillingProfile;
29622981
export type PerOwnerPricingBillingProfileUpdateInfoTargetSchema =
29632982
PerOwnerPricingBillingProfile;
2983+
export type PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema =
2984+
PerOwnerPricingBillingProfile;
29642985
/**
29652986
* Billing profile info
29662987
*
@@ -2984,6 +3005,9 @@ export type PerOwnerPricingBillingProfileAttributes = {
29843005
state: string;
29853006
zip: string;
29863007
vat_number: null | string;
3008+
/**
3009+
* Whether the subscription has been cancelled and all associated projects are frozen.
3010+
*/
29873011
defaulting: boolean;
29883012
defaulting_since: null | string;
29893013
credits: number;
@@ -3024,6 +3048,14 @@ export type PerOwnerPricingBillingProfileUpdateInfoSchema = {
30243048
po_number?: null | string;
30253049
};
30263050
};
3051+
/**
3052+
* This interface was referenced by `PerOwnerPricingBillingProfile`'s JSON-Schema
3053+
* via the `cancel_subscription.schema` link.
3054+
*/
3055+
export type PerOwnerPricingBillingProfileCancelSubscriptionSchema = {
3056+
type?: 'per_owner_pricing_billing_profile';
3057+
reason?: string | null;
3058+
};
30273059
/**
30283060
* An invoice
30293061
*

packages/dashboard-client/src/generated/RawApiTypes.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,6 +1812,9 @@ export type PerOwnerPricingBillingProfileAttributes = {
18121812
state: string;
18131813
zip: string;
18141814
vat_number: null | string;
1815+
/**
1816+
* Whether the subscription has been cancelled and all associated projects are frozen.
1817+
*/
18151818
defaulting: boolean;
18161819
defaulting_since: null | string;
18171820
credits: number;
@@ -1881,6 +1884,25 @@ export type PerOwnerPricingBillingProfileUpdateInfoSchema = {
18811884
export type PerOwnerPricingBillingProfileUpdateInfoTargetSchema = {
18821885
data: PerOwnerPricingBillingProfile;
18831886
};
1887+
/**
1888+
* This interface was referenced by `PerOwnerPricingBillingProfile`'s JSON-Schema
1889+
* via the `cancel_subscription.schema` link.
1890+
*/
1891+
export type PerOwnerPricingBillingProfileCancelSubscriptionSchema = {
1892+
data: {
1893+
type: 'per_owner_pricing_billing_profile';
1894+
attributes: {
1895+
reason?: string | null;
1896+
};
1897+
};
1898+
};
1899+
/**
1900+
* This interface was referenced by `PerOwnerPricingBillingProfile`'s JSON-Schema
1901+
* via the `cancel_subscription.targetSchema` link.
1902+
*/
1903+
export type PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema = {
1904+
data: PerOwnerPricingBillingProfile;
1905+
};
18841906
/**
18851907
* This interface was referenced by `Account`'s JSON-Schema
18861908
* via the `reset_password.schema` link.
@@ -2772,6 +2794,9 @@ export type PerSitePricingBillingProfileAttributes = {
27722794
state: string;
27732795
zip: string;
27742796
vat_number: null | string;
2797+
/**
2798+
* Whether the subscription has been cancelled and all associated projects are frozen.
2799+
*/
27752800
defaulting: boolean;
27762801
defaulting_since: null | string;
27772802
credits: number;
@@ -2862,6 +2887,25 @@ export type PerSitePricingBillingProfileUpdateInfoSchema = {
28622887
export type PerSitePricingBillingProfileUpdateInfoTargetSchema = {
28632888
data: PerSitePricingBillingProfile;
28642889
};
2890+
/**
2891+
* This interface was referenced by `PerSitePricingBillingProfile`'s JSON-Schema
2892+
* via the `cancel_subscription.schema` link.
2893+
*/
2894+
export type PerSitePricingBillingProfileCancelSubscriptionSchema = {
2895+
data: {
2896+
type: 'per_site_pricing_billing_profile';
2897+
attributes: {
2898+
reason?: string | null;
2899+
};
2900+
};
2901+
};
2902+
/**
2903+
* This interface was referenced by `PerSitePricingBillingProfile`'s JSON-Schema
2904+
* via the `cancel_subscription.targetSchema` link.
2905+
*/
2906+
export type PerSitePricingBillingProfileCancelSubscriptionTargetSchema = {
2907+
data: PerSitePricingBillingProfile;
2908+
};
28652909
/**
28662910
* This interface was referenced by `PerSitePricingBillingProfile`'s JSON-Schema
28672911
* via the `destroy.targetSchema` link.

packages/dashboard-client/src/generated/resources/PerOwnerPricingBillingProfile.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,47 @@ export default class PerOwnerPricingBillingProfile extends BaseResource {
118118
},
119119
);
120120
}
121+
122+
/**
123+
* Cancel subscription
124+
*
125+
* @throws {ApiError}
126+
* @throws {TimeoutError}
127+
*/
128+
cancelSubscription(
129+
body: ApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionSchema,
130+
) {
131+
return this.rawCancelSubscription(
132+
Utils.serializeRequestBody<RawApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionSchema>(
133+
body,
134+
{
135+
type: 'per_owner_pricing_billing_profile',
136+
attributes: ['reason'],
137+
relationships: [],
138+
},
139+
),
140+
).then((body) =>
141+
Utils.deserializeResponseBody<ApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema>(
142+
body,
143+
),
144+
);
145+
}
146+
147+
/**
148+
* Cancel subscription
149+
*
150+
* @throws {ApiError}
151+
* @throws {TimeoutError}
152+
*/
153+
rawCancelSubscription(
154+
body: RawApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionSchema,
155+
): Promise<RawApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema> {
156+
return this.client.request<RawApiTypes.PerOwnerPricingBillingProfileCancelSubscriptionTargetSchema>(
157+
{
158+
method: 'POST',
159+
url: '/per-owner-pricing-billing-profile/cancel-subscription',
160+
body,
161+
},
162+
);
163+
}
121164
}

packages/dashboard-client/src/generated/resources/PerSitePricingBillingProfile.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,54 @@ export default class PerSitePricingBillingProfile extends BaseResource {
172172
);
173173
}
174174

175+
/**
176+
* Cancel subscription
177+
*
178+
* @throws {ApiError}
179+
* @throws {TimeoutError}
180+
*/
181+
cancelSubscription(
182+
perSitePricingBillingProfileId:
183+
| string
184+
| ApiTypes.PerSitePricingBillingProfileData,
185+
body: ApiTypes.PerSitePricingBillingProfileCancelSubscriptionSchema,
186+
) {
187+
return this.rawCancelSubscription(
188+
Utils.toId(perSitePricingBillingProfileId),
189+
Utils.serializeRequestBody<RawApiTypes.PerSitePricingBillingProfileCancelSubscriptionSchema>(
190+
body,
191+
{
192+
type: 'per_site_pricing_billing_profile',
193+
attributes: ['reason'],
194+
relationships: [],
195+
},
196+
),
197+
).then((body) =>
198+
Utils.deserializeResponseBody<ApiTypes.PerSitePricingBillingProfileCancelSubscriptionTargetSchema>(
199+
body,
200+
),
201+
);
202+
}
203+
204+
/**
205+
* Cancel subscription
206+
*
207+
* @throws {ApiError}
208+
* @throws {TimeoutError}
209+
*/
210+
rawCancelSubscription(
211+
perSitePricingBillingProfileId: string,
212+
body: RawApiTypes.PerSitePricingBillingProfileCancelSubscriptionSchema,
213+
): Promise<RawApiTypes.PerSitePricingBillingProfileCancelSubscriptionTargetSchema> {
214+
return this.client.request<RawApiTypes.PerSitePricingBillingProfileCancelSubscriptionTargetSchema>(
215+
{
216+
method: 'POST',
217+
url: `/per-site-pricing-billing-profiles/${perSitePricingBillingProfileId}/cancel-subscription`,
218+
body,
219+
},
220+
);
221+
}
222+
175223
/**
176224
* Delete a billing profile
177225
*

0 commit comments

Comments
 (0)