-
-
Notifications
You must be signed in to change notification settings - Fork 140
/
Copy pathresources.rs
297 lines (272 loc) · 6.93 KB
/
resources.rs
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
//! resources module
//!
//! This module exposes various elements of the
//! stripe api depending on the features exposed.
//!
//! Some of these modules are hand-written, and
//! some are generated.
mod currency;
mod generated;
mod placeholders;
mod types;
#[path = "resources"]
mod core {
pub mod balance_transaction_ext;
pub mod charge_ext;
pub mod customer_ext;
pub mod payment_intent_ext;
pub mod payment_source;
pub mod payout_ext;
pub mod placeholders;
pub mod setup_intent_ext;
pub mod token_ext;
}
#[path = "resources"]
mod payment {
pub mod bank_account_ext;
pub mod card;
pub mod payment_method_ext;
pub mod source_ext;
}
#[cfg(feature = "events")]
mod webhook_events;
#[path = "resources"]
#[cfg(feature = "billing")]
mod billing {
pub mod invoice_ext;
pub mod line_item_ext;
pub mod subscription_ext;
}
#[path = "resources"]
#[cfg(feature = "connect")]
mod connect {
pub mod login_links_ext;
}
#[path = "resources"]
#[cfg(feature = "fraud")]
mod fraud {
pub mod review_ext;
}
#[path = "resources"]
#[cfg(feature = "issuing")]
mod issuing {
pub mod issuing_authorization_ext;
pub mod issuing_card_ext;
pub mod issuing_dispute_ext;
pub mod issuing_merchant_data;
pub mod issuing_transaction_ext;
}
#[path = "resources"]
#[cfg(feature = "orders")]
mod orders {
pub mod order_ext;
}
#[path = "resources"]
#[cfg(feature = "webhook-endpoints")]
mod webhook_endpoints {
pub mod webhook_endpoint_ext;
}
#[rustfmt::skip]
pub use {
currency::*,
types::*,
self::core::{
balance_transaction_ext::*,
charge_ext::*,
customer_ext::*,
payment_intent_ext::*,
payment_source::*,
placeholders::*,
payout_ext::*,
token_ext::*,
setup_intent_ext::*,
},
generated::core::{
address::*,
balance::*,
balance_transaction::*,
billing_details::*,
charge::*,
customer::*,
dispute::*,
ephemeral_key::*,
file::*,
file_link::*,
mandate::*,
package_dimensions::*,
payment_intent::*,
payout::*,
platform_tax_fee::*,
product::*,
refund::*,
reserve_transaction::*,
setup_attempt::*,
setup_intent::*,
shipping::*,
shipping_rate::*,
tax_code::*,
tax_deducted_at_source::*,
token::*,
api_errors::*,
},
payment::{
bank_account_ext::*,
card::*,
payment_method_ext::*,
source_ext::*
},
generated::payment::{
alipay_account::*,
card::*,
bank_account::*,
payment_method::*,
source::*,
payment_method_options_boleto::*,
payment_method_options_oxxo::*,
},
};
#[rustfmt::skip]
#[cfg(feature = "events")]
pub use {
webhook_events::*,
generated::event::*,
};
#[rustfmt::skip]
#[cfg(feature = "checkout")]
pub use {
generated::checkout::{
checkout_session::*,
payment_link::*,
item::*
},
};
#[rustfmt::skip]
#[cfg(feature = "billing")]
pub use {
billing::{
invoice_ext::*,
line_item_ext::*,
subscription_ext::*
},
generated::billing::{
coupon::*,
discount::*,
invoice::*,
invoice_payment_method_options_acss_debit::*,
invoice_payment_method_options_bancontact::*,
invoice_payment_method_options_card::*,
invoiceitem::*,
line_item::*,
plan::*,
plan::PlanInterval,
price::*,
promotion_code::*,
quote::*,
quotes_resource_total_details::*,
subscription_item::*,
subscription_item::PlanInterval as SubscriptionItemInterval,
subscription_item::SubscriptionItemPriceDataRecurring as SubscriptionItemPriceDataRecurring,
subscription_item::SubscriptionItemPriceData as SubscriptionItemPriceData,
// need to import this afterwards so that the SubscriptionItemPriceDataRecurring
// isn't silently ignored
subscription::*,
subscription::PlanInterval as SubscriptionInterval,
subscription::SubscriptionItemPriceDataRecurring as SubscriptionPriceDataRecurring,
subscription::SubscriptionItemPriceData as SubscriptionPriceData,
subscription_schedule::*,
subscription_billing_thresholds::*,
subscription_item_billing_thresholds::*,
tax_id::*,
tax_rate::*,
usage_record_summary::*,
},
};
#[rustfmt::skip]
#[cfg(feature = "connect")]
pub use {
connect::{
login_links_ext::*,
},
generated::connect::{
account_link::*,
account::*,
application::*,
application_fee::*,
connect_collection_transfer::*,
fee_refund::*,
login_link::*,
person::*,
recipient::*,
topup::*,
transfer::*,
transfer_reversal::*,
}
};
#[rustfmt::skip]
#[cfg(feature = "fraud")]
pub use {
fraud::review_ext::*,
generated::fraud::review::*
};
#[rustfmt::skip]
#[cfg(feature = "issuing")]
pub use {
issuing::{
issuing_authorization_ext::*,
issuing_card_ext::*,
issuing_dispute_ext::*,
issuing_merchant_data::*,
issuing_transaction_ext::*,
},
generated::issuing::{
issuing_authorization::*,
issuing_card::*,
issuing_cardholder::*,
issuing_dispute::*,
issuing_transaction::*,
},
};
#[rustfmt::skip]
#[cfg(feature = "orders")]
pub use {
orders::order_ext::*,
generated::orders::{
order::*,
order_item::*,
order_return::*,
sku::*
},
};
#[rustfmt::skip]
#[cfg(feature = "sigma")]
pub use {
generated::scheduled_query_run::*,
};
#[rustfmt::skip]
#[cfg(feature = "webhook-endpoints")]
pub use {
webhook_endpoints::webhook_endpoint_ext::*,
generated::webhook_endpoints::webhook_endpoint::*,
};
#[cfg(not(feature = "full"))]
pub use generated::placeholders::*;
/// this struct is just a stub for code not using the "connect" feature
/// see https://github.com/arlyon/async-stripe/issues/49 for more context
/// if there are more features that requires a fully fledged CompanyParams
/// we probably need to update the code generation and move to a shared place
#[cfg(not(feature = "connect"))]
#[derive(Clone, Debug, serde_derive::Deserialize, serde_derive::Serialize)]
pub struct CompanyParams {
#[serde(default)]
pub metadata: crate::params::Metadata,
}
/// this struct is just a stub for code not using the "connect" feature
/// see https://github.com/arlyon/async-stripe/issues/49 for more context
/// if there are more features that requires a fully fledged PersonParams
/// we probably need to update the code generation and move to a shared place
#[cfg(not(feature = "connect"))]
#[derive(Clone, Debug, serde_derive::Deserialize, serde_derive::Serialize)]
pub struct PersonParams {
#[serde(default)]
pub metadata: crate::params::Metadata,
}