This repository was archived by the owner on Jul 24, 2024. It is now read-only.
File tree 2 files changed +66
-0
lines changed 2 files changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,41 @@ class GatewaysEndpoint extends BaseExtend {
37
37
}
38
38
)
39
39
}
40
+
41
+ StripeCustomers ( slug , stripe_account ) {
42
+ return this . request . send (
43
+ `${ this . endpoint } /${ slug } /stripe_customers` ,
44
+ 'POST' ,
45
+ {
46
+ data : {
47
+ options : {
48
+ stripe_account
49
+ }
50
+ }
51
+ } ,
52
+ undefined ,
53
+ this ,
54
+ false ,
55
+ )
56
+ }
57
+
58
+ StripeInvoices ( slug , stripe_account , customer_id ) {
59
+ return this . request . send (
60
+ `${ this . endpoint } /${ slug } /stripe_invoices` ,
61
+ 'POST' ,
62
+ {
63
+ data : {
64
+ customer_id,
65
+ options : {
66
+ stripe_account,
67
+ }
68
+ }
69
+ } ,
70
+ undefined ,
71
+ this ,
72
+ false ,
73
+ )
74
+ }
40
75
}
41
76
42
77
export default GatewaysEndpoint
Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ export interface OnboardingLinkResponse {
37
37
onboarding_link : string
38
38
}
39
39
40
+ export interface InvoicingResult {
41
+ id : string
42
+ created : string
43
+ name : string
44
+ email : string
45
+ object : string
46
+ }
47
+
40
48
/**
41
49
* Gateway Endpoints
42
50
*/
@@ -69,4 +77,27 @@ export interface GatewaysEndpoint
69
77
returnUrl : string ,
70
78
test ?: boolean
71
79
) : Promise < T >
80
+
81
+ /**
82
+ * StripeCustomers
83
+ * Description: This endpoint allows you to retrieve all customers of a connected Stripe Account
84
+ * @param slug [string] The slug of supported gateway (currently only elastic_path_payments_stripe).
85
+ * @param stripe_account [string] The id of the connected Stripe Account
86
+ */
87
+ StripeCustomers < T = Resource < InvoicingResult > > (
88
+ slug : 'elastic_path_payments_stripe' ,
89
+ stripe_account : string
90
+ ) : Promise < T >
91
+
92
+ /**
93
+ * StripeInvoices
94
+ * Description: This endpoint allows you to send a Stripe Invoice to a connected Customer
95
+ * @param slug [string] The slug of supported gateway (currently only elastic_path_payments_stripe).
96
+ * @param stripe_account [string] The id of the connected Stripe Account
97
+ */
98
+ StripeInvoices < T = Resource < InvoicingResult > > (
99
+ slug : 'elastic_path_payments_stripe' ,
100
+ stripe_account : string ,
101
+ customer_id : string
102
+ ) : Promise < T >
72
103
}
You can’t perform that action at this time.
0 commit comments