This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ class SubscriptionsEndpoint extends CRUDExtend {
1313 } )
1414 }
1515
16+ Update ( id , body , token = null ) {
17+ return this . request . send (
18+ `${ this . endpoint } /${ id } ` ,
19+ 'PUT' ,
20+ body ,
21+ token
22+ )
23+ }
24+
1625 GetInvoices ( id ) {
1726 return this . request . send ( `${ this . endpoint } /${ id } /invoices` , 'GET' )
1827 }
Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ export interface SubscriptionCreate {
5353 }
5454}
5555
56+ export interface SubscriptionUpdate extends Identifiable {
57+ type : 'subscription'
58+ attributes : {
59+ plan_id : string
60+ }
61+ }
62+
5663export interface SubscriptionInvoice extends Identifiable {
5764 type : "subscription-invoice" ,
5865 attributes : {
@@ -129,11 +136,11 @@ export interface SubscriptionsEndpoint
129136 extends Omit < CrudQueryableResource <
130137 Subscription ,
131138 SubscriptionCreate ,
132- never ,
139+ SubscriptionUpdate ,
133140 SubscriptionFilter ,
134141 never ,
135142 SubscriptionsInclude
136- > , "All" | "Limit" | "Offset" | "Sort" | " Attributes" | "Update " | "Link" > {
143+ > , "All" | "Attributes" | "Link" > {
137144 endpoint : 'subscriptions'
138145
139146 All ( token ?: string ) : Promise < ResourcePage < Subscription , SubscriptionsIncluded > >
You can’t perform that action at this time.
0 commit comments