-
Notifications
You must be signed in to change notification settings - Fork 719
/
AuthorizationsResource.d.ts
149 lines (130 loc) · 6.11 KB
/
AuthorizationsResource.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
// File generated from our OpenAPI spec
declare module 'stripe' {
namespace Stripe {
namespace Issuing {
interface AuthorizationRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
interface AuthorizationUpdateParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
}
interface AuthorizationListParams extends PaginationParams {
/**
* Only return authorizations that belong to the given card.
*/
card?: string;
/**
* Only return authorizations that belong to the given cardholder.
*/
cardholder?: string;
/**
* Only return authorizations that were created during the given date interval.
*/
created?: Stripe.RangeQueryParam | number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`.
*/
status?: AuthorizationListParams.Status;
}
namespace AuthorizationListParams {
type Status = 'closed' | 'pending' | 'reversed';
}
interface AuthorizationApproveParams {
/**
* If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request).
*/
amount?: number;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
}
interface AuthorizationDeclineParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
*/
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
}
class AuthorizationsResource {
/**
* Retrieves an Issuing Authorization object.
*/
retrieve(
id: string,
params?: AuthorizationRetrieveParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
retrieve(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
/**
* Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
*/
update(
id: string,
params?: AuthorizationUpdateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
/**
* Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
*/
list(
params?: AuthorizationListParams,
options?: RequestOptions
): ApiListPromise<Stripe.Issuing.Authorization>;
list(
options?: RequestOptions
): ApiListPromise<Stripe.Issuing.Authorization>;
/**
* Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
* You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found [here](https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
*/
approve(
id: string,
params?: AuthorizationApproveParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
approve(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
/**
* Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow.
* You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found [here](https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling).
*/
decline(
id: string,
params?: AuthorizationDeclineParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
decline(
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Issuing.Authorization>>;
}
}
}
}