Skip to content

Commit 2b5c6ed

Browse files
authored
Merge pull request #775 from arlyon/openapi-1761904625
2 parents 7f863fd + 60fc54f commit 2b5c6ed

File tree

1,211 files changed

+14541
-2736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,211 files changed

+14541
-2736
lines changed

async-stripe-webhook/src/generated/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,9 @@ pub enum EventObject {
697697
/// This event is not fired for negative transactions.
698698
#[cfg(feature = "async-stripe-core")]
699699
BalanceAvailable(stripe_core::Balance),
700+
/// Occurs whenever a balance settings status or property has changed.
701+
#[cfg(feature = "async-stripe-core")]
702+
BalanceSettingsUpdated(stripe_core::BalanceSettings),
700703
/// Occurs whenever your custom alert threshold is met.
701704
#[cfg(feature = "async-stripe-billing")]
702705
BillingAlertTriggered(stripe_billing::BillingAlertTriggered),
@@ -915,6 +918,8 @@ pub enum EventObject {
915918
InvoicePaid(stripe_shared::Invoice),
916919
/// Occurs whenever an invoice payment attempt requires further user action to complete.
917920
InvoicePaymentActionRequired(stripe_shared::Invoice),
921+
/// Occurs when an invoice requires a payment using a payment method that cannot be processed by Stripe.
922+
InvoicePaymentAttemptRequired(stripe_shared::Invoice),
918923
/// Occurs whenever an invoice payment attempt fails, due to either a declined payment, including soft decline, or to the lack of a stored payment method.
919924
InvoicePaymentFailed(stripe_shared::Invoice),
920925
/// Occurs whenever an invoice payment attempt succeeds.
@@ -1309,6 +1314,10 @@ impl EventObject {
13091314
if typ == "balance.available" {
13101315
return FromValueOpt::from_value(data).map(Self::BalanceAvailable);
13111316
}
1317+
#[cfg(feature = "async-stripe-core")]
1318+
if typ == "balance_settings.updated" {
1319+
return FromValueOpt::from_value(data).map(Self::BalanceSettingsUpdated);
1320+
}
13121321
#[cfg(feature = "async-stripe-billing")]
13131322
if typ == "billing.alert.triggered" {
13141323
return FromValueOpt::from_value(data).map(Self::BillingAlertTriggered);
@@ -1616,6 +1625,9 @@ impl EventObject {
16161625
if typ == "invoice.payment_action_required" {
16171626
return FromValueOpt::from_value(data).map(Self::InvoicePaymentActionRequired);
16181627
}
1628+
if typ == "invoice.payment_attempt_required" {
1629+
return FromValueOpt::from_value(data).map(Self::InvoicePaymentAttemptRequired);
1630+
}
16191631
if typ == "invoice.payment_failed" {
16201632
return FromValueOpt::from_value(data).map(Self::InvoicePaymentFailed);
16211633
}

crate_info.md

Lines changed: 129 additions & 126 deletions
Large diffs are not rendered by default.

generated/async-stripe-billing/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ invoice_item = []
4646
invoice_line_item = []
4747
invoice_payment = []
4848
invoice_rendering_template = []
49+
payment_record = []
4950
plan = []
5051
quote = []
5152
subscription = []
@@ -71,6 +72,7 @@ full = ["billing_alert",
7172
"invoice_line_item",
7273
"invoice_payment",
7374
"invoice_rendering_template",
75+
"payment_record",
7476
"plan",
7577
"quote",
7678
"subscription",

generated/async-stripe-billing/src/billing_alert/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ const _: () = {
7272
"status" => Deserialize::begin(&mut self.status),
7373
"title" => Deserialize::begin(&mut self.title),
7474
"usage_threshold" => Deserialize::begin(&mut self.usage_threshold),
75-
7675
_ => <dyn Visitor>::ignore(),
7776
})
7877
}
@@ -140,7 +139,6 @@ const _: () = {
140139
"status" => b.status = FromValueOpt::from_value(v),
141140
"title" => b.title = FromValueOpt::from_value(v),
142141
"usage_threshold" => b.usage_threshold = FromValueOpt::from_value(v),
143-
144142
_ => {}
145143
}
146144
}

generated/async-stripe-billing/src/billing_alert_triggered.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ const _: () = {
6565
"customer" => Deserialize::begin(&mut self.customer),
6666
"livemode" => Deserialize::begin(&mut self.livemode),
6767
"value" => Deserialize::begin(&mut self.value),
68-
6968
_ => <dyn Visitor>::ignore(),
7069
})
7170
}
@@ -118,7 +117,6 @@ const _: () = {
118117
"customer" => b.customer = FromValueOpt::from_value(v),
119118
"livemode" => b.livemode = FromValueOpt::from_value(v),
120119
"value" => b.value = FromValueOpt::from_value(v),
121-
122120
_ => {}
123121
}
124122
}

generated/async-stripe-billing/src/billing_bill_resource_invoice_item_parents_invoice_item_parent.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const _: () = {
6060
Ok(match k {
6161
"subscription_details" => Deserialize::begin(&mut self.subscription_details),
6262
"type" => Deserialize::begin(&mut self.type_),
63-
6463
_ => <dyn Visitor>::ignore(),
6564
})
6665
}
@@ -105,7 +104,6 @@ const _: () = {
105104
match k.as_str() {
106105
"subscription_details" => b.subscription_details = FromValueOpt::from_value(v),
107106
"type" => b.type_ = FromValueOpt::from_value(v),
108-
109107
_ => {}
110108
}
111109
}

generated/async-stripe-billing/src/billing_bill_resource_invoice_item_parents_invoice_item_subscription_parent.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ const _: () = {
5555
Ok(match k {
5656
"subscription" => Deserialize::begin(&mut self.subscription),
5757
"subscription_item" => Deserialize::begin(&mut self.subscription_item),
58-
5958
_ => <dyn Visitor>::ignore(),
6059
})
6160
}
@@ -99,7 +98,6 @@ const _: () = {
9998
match k.as_str() {
10099
"subscription" => b.subscription = FromValueOpt::from_value(v),
101100
"subscription_item" => b.subscription_item = FromValueOpt::from_value(v),
102-
103101
_ => {}
104102
}
105103
}

generated/async-stripe-billing/src/billing_credit_balance_summary/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ const _: () = {
6161
"balances" => Deserialize::begin(&mut self.balances),
6262
"customer" => Deserialize::begin(&mut self.customer),
6363
"livemode" => Deserialize::begin(&mut self.livemode),
64-
6564
_ => <dyn Visitor>::ignore(),
6665
})
6766
}
@@ -110,7 +109,6 @@ const _: () = {
110109
"balances" => b.balances = FromValueOpt::from_value(v),
111110
"customer" => b.customer = FromValueOpt::from_value(v),
112111
"livemode" => b.livemode = FromValueOpt::from_value(v),
113-
114112
_ => {}
115113
}
116114
}

generated/async-stripe-billing/src/billing_credit_grant/requests.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ impl StripeRequest for RetrieveBillingCreditGrant {
162162
struct CreateBillingCreditGrantBuilder {
163163
amount: CreateBillingCreditGrantAmount,
164164
applicability_config: CreateBillingCreditGrantApplicabilityConfig,
165-
category: stripe_shared::BillingCreditGrantCategory,
165+
#[serde(skip_serializing_if = "Option::is_none")]
166+
category: Option<stripe_shared::BillingCreditGrantCategory>,
166167
customer: String,
167168
#[serde(skip_serializing_if = "Option::is_none")]
168169
effective_at: Option<stripe_types::Timestamp>,
@@ -181,13 +182,12 @@ impl CreateBillingCreditGrantBuilder {
181182
fn new(
182183
amount: impl Into<CreateBillingCreditGrantAmount>,
183184
applicability_config: impl Into<CreateBillingCreditGrantApplicabilityConfig>,
184-
category: impl Into<stripe_shared::BillingCreditGrantCategory>,
185185
customer: impl Into<String>,
186186
) -> Self {
187187
Self {
188188
amount: amount.into(),
189189
applicability_config: applicability_config.into(),
190-
category: category.into(),
190+
category: None,
191191
customer: customer.into(),
192192
effective_at: None,
193193
expand: None,
@@ -395,18 +395,24 @@ impl CreateBillingCreditGrant {
395395
pub fn new(
396396
amount: impl Into<CreateBillingCreditGrantAmount>,
397397
applicability_config: impl Into<CreateBillingCreditGrantApplicabilityConfig>,
398-
category: impl Into<stripe_shared::BillingCreditGrantCategory>,
399398
customer: impl Into<String>,
400399
) -> Self {
401400
Self {
402401
inner: CreateBillingCreditGrantBuilder::new(
403402
amount.into(),
404403
applicability_config.into(),
405-
category.into(),
406404
customer.into(),
407405
),
408406
}
409407
}
408+
/// The category of this credit grant. It defaults to `paid` if not specified.
409+
pub fn category(
410+
mut self,
411+
category: impl Into<stripe_shared::BillingCreditGrantCategory>,
412+
) -> Self {
413+
self.inner.category = Some(category.into());
414+
self
415+
}
410416
/// The time when the billing credits become effective-when they're eligible for use.
411417
/// It defaults to the current timestamp if not specified.
412418
pub fn effective_at(mut self, effective_at: impl Into<stripe_types::Timestamp>) -> Self {

generated/async-stripe-billing/src/billing_meter/types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ const _: () = {
9696
"status_transitions" => Deserialize::begin(&mut self.status_transitions),
9797
"updated" => Deserialize::begin(&mut self.updated),
9898
"value_settings" => Deserialize::begin(&mut self.value_settings),
99-
10099
_ => <dyn Visitor>::ignore(),
101100
})
102101
}
@@ -201,7 +200,6 @@ const _: () = {
201200
"status_transitions" => b.status_transitions = FromValueOpt::from_value(v),
202201
"updated" => b.updated = FromValueOpt::from_value(v),
203202
"value_settings" => b.value_settings = FromValueOpt::from_value(v),
204-
205203
_ => {}
206204
}
207205
}

0 commit comments

Comments
 (0)