This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree 2 files changed +18
-2
lines changed
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 {
13
13
} )
14
14
}
15
15
16
+ Update ( id , body , token = null ) {
17
+ return this . request . send (
18
+ `${ this . endpoint } /${ id } ` ,
19
+ 'PUT' ,
20
+ body ,
21
+ token
22
+ )
23
+ }
24
+
16
25
GetInvoices ( id ) {
17
26
return this . request . send ( `${ this . endpoint } /${ id } /invoices` , 'GET' )
18
27
}
Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ export interface SubscriptionCreate {
53
53
}
54
54
}
55
55
56
+ export interface SubscriptionUpdate extends Identifiable {
57
+ type : 'subscription'
58
+ attributes : {
59
+ plan_id : string
60
+ }
61
+ }
62
+
56
63
export interface SubscriptionInvoice extends Identifiable {
57
64
type : "subscription-invoice" ,
58
65
attributes : {
@@ -129,11 +136,11 @@ export interface SubscriptionsEndpoint
129
136
extends Omit < CrudQueryableResource <
130
137
Subscription ,
131
138
SubscriptionCreate ,
132
- never ,
139
+ SubscriptionUpdate ,
133
140
SubscriptionFilter ,
134
141
never ,
135
142
SubscriptionsInclude
136
- > , "All" | "Limit" | "Offset" | "Sort" | " Attributes" | "Update " | "Link" > {
143
+ > , "All" | "Attributes" | "Link" > {
137
144
endpoint : 'subscriptions'
138
145
139
146
All ( token ?: string ) : Promise < ResourcePage < Subscription , SubscriptionsIncluded > >
You can’t perform that action at this time.
0 commit comments