Skip to content

Commit

Permalink
feat: generate latest changes from OpenApi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon authored Feb 9, 2024
1 parent f3f06a3 commit a3b0e4d
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openapi/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v808"
"version": "v814"
}
4 changes: 3 additions & 1 deletion src/resources/generated/charge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ pub struct PaymentMethodDetailsOxxo {
pub struct PaymentMethodDetailsP24 {
/// The customer's bank.
///
/// Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
/// Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`.
pub bank: Option<PaymentMethodDetailsP24Bank>,

/// Unique reference for this Przelewy24 payment.
Expand Down Expand Up @@ -2774,6 +2774,7 @@ pub enum PaymentMethodDetailsP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -2804,6 +2805,7 @@ impl PaymentMethodDetailsP24Bank {
PaymentMethodDetailsP24Bank::SantanderPrzelew24 => "santander_przelew24",
PaymentMethodDetailsP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe",
PaymentMethodDetailsP24Bank::ToyotaBank => "toyota_bank",
PaymentMethodDetailsP24Bank::Velobank => "velobank",
PaymentMethodDetailsP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/resources/generated/identity_verification_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ pub struct GelatoIdNumberReport {
pub first_name: Option<String>,

/// ID number.
///
/// When `id_number_type` is `us_ssn`, only the last 4 digits are present.
pub id_number: Option<String>,

/// Type of ID number.
Expand Down
144 changes: 143 additions & 1 deletion src/resources/generated/payment_intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,15 @@ pub struct PaymentIntentPaymentMethodOptionsAuBecsDebit {
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsBlik {}
pub struct PaymentIntentPaymentMethodOptionsBlik {
/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentIntentPaymentMethodOptionsCard {
Expand Down Expand Up @@ -948,6 +956,12 @@ pub struct PaymentIntentPaymentMethodOptionsCard {
/// Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
pub request_three_d_secure: Option<PaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,

/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,

/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
Expand Down Expand Up @@ -3059,6 +3073,14 @@ pub struct CreatePaymentIntentPaymentMethodOptionsBlik {
/// Can only be set on confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,

/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
Expand Down Expand Up @@ -3147,6 +3169,12 @@ pub struct CreatePaymentIntentPaymentMethodOptionsCard {
pub request_three_d_secure:
Option<CreatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,

/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,

/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
Expand Down Expand Up @@ -3964,6 +3992,14 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsBlik {
/// Can only be set on confirmation.
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,

/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
///
/// If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
#[serde(skip_serializing_if = "Option::is_none")]
pub setup_future_usage: Option<UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
Expand Down Expand Up @@ -4052,6 +4088,12 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCard {
pub request_three_d_secure:
Option<UpdatePaymentIntentPaymentMethodOptionsCardRequestThreeDSecure>,

/// When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e.
///
/// using the cvc_token parameter).
#[serde(skip_serializing_if = "Option::is_none")]
pub require_cvc_recollection: Option<bool>,

/// Indicates that you intend to make future payments with this PaymentIntent's payment method.
///
/// Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.
Expand Down Expand Up @@ -5516,6 +5558,7 @@ pub enum CreatePaymentIntentPaymentMethodDataP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -5552,6 +5595,7 @@ impl CreatePaymentIntentPaymentMethodDataP24Bank {
"tmobile_usbugi_bankowe"
}
CreatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
CreatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank",
CreatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down Expand Up @@ -6272,6 +6316,38 @@ impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBancontact
}
}

/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}

impl CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}

impl AsRef<str> for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}

impl std::fmt::Display for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for CreatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}

/// An enum representing the possible values of an `CreatePaymentIntentPaymentMethodOptionsBoleto`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
Expand Down Expand Up @@ -9085,6 +9161,38 @@ impl std::default::Default for PaymentIntentPaymentMethodOptionsAuBecsDebitSetup
}
}

/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}

impl PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}

impl AsRef<str> for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}

impl std::fmt::Display for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for PaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}

/// An enum representing the possible values of an `PaymentIntentPaymentMethodOptionsCard`'s `capture_method` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
Expand Down Expand Up @@ -11483,6 +11591,7 @@ pub enum UpdatePaymentIntentPaymentMethodDataP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -11519,6 +11628,7 @@ impl UpdatePaymentIntentPaymentMethodDataP24Bank {
"tmobile_usbugi_bankowe"
}
UpdatePaymentIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
UpdatePaymentIntentPaymentMethodDataP24Bank::Velobank => "velobank",
UpdatePaymentIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down Expand Up @@ -12239,6 +12349,38 @@ impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBancontact
}
}

/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBlik`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
None,
}

impl UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
pub fn as_str(self) -> &'static str {
match self {
UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage::None => "none",
}
}
}

impl AsRef<str> for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn as_ref(&self) -> &str {
self.as_str()
}
}

impl std::fmt::Display for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
self.as_str().fmt(f)
}
}
impl std::default::Default for UpdatePaymentIntentPaymentMethodOptionsBlikSetupFutureUsage {
fn default() -> Self {
Self::None
}
}

/// An enum representing the possible values of an `UpdatePaymentIntentPaymentMethodOptionsBoleto`'s `setup_future_usage` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
Expand Down
6 changes: 5 additions & 1 deletion src/resources/generated/payment_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ pub struct Networks {
/// All available networks for the card.
pub available: Vec<String>,

/// The preferred network for the card.
/// The preferred network for co-branded cards.
///
/// Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
pub preferred: Option<String>,
Expand Down Expand Up @@ -1705,6 +1705,7 @@ pub enum CreatePaymentMethodP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -1735,6 +1736,7 @@ impl CreatePaymentMethodP24Bank {
CreatePaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24",
CreatePaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe",
CreatePaymentMethodP24Bank::ToyotaBank => "toyota_bank",
CreatePaymentMethodP24Bank::Velobank => "velobank",
CreatePaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down Expand Up @@ -2294,6 +2296,7 @@ pub enum PaymentMethodP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -2324,6 +2327,7 @@ impl PaymentMethodP24Bank {
PaymentMethodP24Bank::SantanderPrzelew24 => "santander_przelew24",
PaymentMethodP24Bank::TmobileUsbugiBankowe => "tmobile_usbugi_bankowe",
PaymentMethodP24Bank::ToyotaBank => "toyota_bank",
PaymentMethodP24Bank::Velobank => "velobank",
PaymentMethodP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/resources/generated/setup_intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2625,6 +2625,7 @@ pub enum CreateSetupIntentPaymentMethodDataP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -2659,6 +2660,7 @@ impl CreateSetupIntentPaymentMethodDataP24Bank {
"tmobile_usbugi_bankowe"
}
CreateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
CreateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank",
CreateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down Expand Up @@ -4559,6 +4561,7 @@ pub enum UpdateSetupIntentPaymentMethodDataP24Bank {
SantanderPrzelew24,
TmobileUsbugiBankowe,
ToyotaBank,
Velobank,
VolkswagenBank,
}

Expand Down Expand Up @@ -4593,6 +4596,7 @@ impl UpdateSetupIntentPaymentMethodDataP24Bank {
"tmobile_usbugi_bankowe"
}
UpdateSetupIntentPaymentMethodDataP24Bank::ToyotaBank => "toyota_bank",
UpdateSetupIntentPaymentMethodDataP24Bank::Velobank => "velobank",
UpdateSetupIntentPaymentMethodDataP24Bank::VolkswagenBank => "volkswagen_bank",
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/resources/subscription_ext.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use serde::Serialize;

use crate::CancellationDetails;
use crate::client::{Client, Response};
use crate::ids::SubscriptionId;
use crate::params::SearchList;
use crate::resources::{CreateSubscriptionItems, Subscription};
use crate::CancellationDetails;

#[derive(Clone, Debug, Default, Serialize)]
pub struct CancelSubscription {
Expand Down

0 comments on commit a3b0e4d

Please sign in to comment.