Skip to content

Commit

Permalink
Generate latest changes from OpenApi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon authored Jul 21, 2023
1 parent aa1c50e commit 90270a4
Show file tree
Hide file tree
Showing 22 changed files with 378 additions and 47 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": "v409"
"version": "v425"
}
2 changes: 2 additions & 0 deletions src/resources/generated/api_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ pub enum ApiErrorsCode {
InvalidExpiryYear,
InvalidNumber,
InvalidSourceUsage,
InvalidTaxLocation,
InvoiceNoCustomerLineItems,
InvoiceNoPaymentMethodTypes,
InvoiceNoSubscriptionLineItems,
Expand Down Expand Up @@ -298,6 +299,7 @@ impl ApiErrorsCode {
ApiErrorsCode::InvalidExpiryYear => "invalid_expiry_year",
ApiErrorsCode::InvalidNumber => "invalid_number",
ApiErrorsCode::InvalidSourceUsage => "invalid_source_usage",
ApiErrorsCode::InvalidTaxLocation => "invalid_tax_location",
ApiErrorsCode::InvoiceNoCustomerLineItems => "invoice_no_customer_line_items",
ApiErrorsCode::InvoiceNoPaymentMethodTypes => "invoice_no_payment_method_types",
ApiErrorsCode::InvoiceNoSubscriptionLineItems => "invoice_no_subscription_line_items",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/generated/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Balance {
/// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
pub livemode: bool,

/// Funds that are not yet available in the balance, due to the 7-day rolling pay cycle.
/// Funds that are not yet available in the balance.
///
/// The pending balance for each currency, and for each payment type, can be found in the `source_types` property.
pub pending: Vec<BalanceAmount>,
Expand Down
3 changes: 3 additions & 0 deletions src/resources/generated/charge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,9 @@ pub struct PaymentMethodDetailsAffirm {}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentMethodDetailsAfterpayClearpay {
/// The Afterpay order ID associated with this payment intent.
pub order_id: Option<String>,

/// Order identifier shown to the merchant in Afterpay’s online portal.
pub reference: Option<String>,
}
Expand Down
12 changes: 3 additions & 9 deletions src/resources/generated/checkout_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ pub struct PaymentPagesCheckoutSessionShippingOption {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentPagesCheckoutSessionTaxId {
/// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`.
/// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`.
#[serde(rename = "type")]
pub type_: PaymentPagesCheckoutSessionTaxIdType,

Expand Down Expand Up @@ -7354,8 +7354,6 @@ impl std::default::Default
#[serde(rename_all = "snake_case")]
pub enum LineItemsTaxAmountTaxabilityReason {
CustomerExempt,
ExcludedTerritory,
JurisdictionUnsupported,
NotCollecting,
NotSubjectToTax,
NotSupported,
Expand All @@ -7369,18 +7367,13 @@ pub enum LineItemsTaxAmountTaxabilityReason {
ReverseCharge,
StandardRated,
TaxableBasisReduced,
VatExempt,
ZeroRated,
}

impl LineItemsTaxAmountTaxabilityReason {
pub fn as_str(self) -> &'static str {
match self {
LineItemsTaxAmountTaxabilityReason::CustomerExempt => "customer_exempt",
LineItemsTaxAmountTaxabilityReason::ExcludedTerritory => "excluded_territory",
LineItemsTaxAmountTaxabilityReason::JurisdictionUnsupported => {
"jurisdiction_unsupported"
}
LineItemsTaxAmountTaxabilityReason::NotCollecting => "not_collecting",
LineItemsTaxAmountTaxabilityReason::NotSubjectToTax => "not_subject_to_tax",
LineItemsTaxAmountTaxabilityReason::NotSupported => "not_supported",
Expand All @@ -7394,7 +7387,6 @@ impl LineItemsTaxAmountTaxabilityReason {
LineItemsTaxAmountTaxabilityReason::ReverseCharge => "reverse_charge",
LineItemsTaxAmountTaxabilityReason::StandardRated => "standard_rated",
LineItemsTaxAmountTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced",
LineItemsTaxAmountTaxabilityReason::VatExempt => "vat_exempt",
LineItemsTaxAmountTaxabilityReason::ZeroRated => "zero_rated",
}
}
Expand Down Expand Up @@ -8488,6 +8480,7 @@ pub enum PaymentPagesCheckoutSessionTaxIdType {
NzGst,
PeRuc,
PhTin,
RoTin,
RsPib,
RuInn,
RuKpp,
Expand Down Expand Up @@ -8559,6 +8552,7 @@ impl PaymentPagesCheckoutSessionTaxIdType {
PaymentPagesCheckoutSessionTaxIdType::NzGst => "nz_gst",
PaymentPagesCheckoutSessionTaxIdType::PeRuc => "pe_ruc",
PaymentPagesCheckoutSessionTaxIdType::PhTin => "ph_tin",
PaymentPagesCheckoutSessionTaxIdType::RoTin => "ro_tin",
PaymentPagesCheckoutSessionTaxIdType::RsPib => "rs_pib",
PaymentPagesCheckoutSessionTaxIdType::RuInn => "ru_inn",
PaymentPagesCheckoutSessionTaxIdType::RuKpp => "ru_kpp",
Expand Down
4 changes: 3 additions & 1 deletion src/resources/generated/customer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ pub struct CustomerInvoiceSettings {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct TaxIdData {
/// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`.
/// Type of the tax ID, one of `ad_nrt`, `ae_trn`, `ar_cuit`, `au_abn`, `au_arn`, `bg_uic`, `bo_tin`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sv_nit`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, `uy_ruc`, `ve_rif`, `vn_tin`, or `za_vat`.
#[serde(rename = "type")]
pub type_: TaxIdType,

Expand Down Expand Up @@ -1068,6 +1068,7 @@ pub enum TaxIdType {
NzGst,
PeRuc,
PhTin,
RoTin,
RsPib,
RuInn,
RuKpp,
Expand Down Expand Up @@ -1138,6 +1139,7 @@ impl TaxIdType {
TaxIdType::NzGst => "nz_gst",
TaxIdType::PeRuc => "pe_ruc",
TaxIdType::PhTin => "ph_tin",
TaxIdType::RoTin => "ro_tin",
TaxIdType::RsPib => "rs_pib",
TaxIdType::RuInn => "ru_inn",
TaxIdType::RuKpp => "ru_kpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ pub struct CustomerCashBalanceTransaction {

/// The type of the cash balance transaction.
///
/// One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`.
/// New types may be added in future.
/// See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
#[serde(rename = "type")]
Expand Down
4 changes: 3 additions & 1 deletion src/resources/generated/invoice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ pub struct InvoiceInstallmentsCard {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct InvoicesResourceInvoiceTaxId {
/// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`.
/// The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, or `unknown`.
#[serde(rename = "type")]
pub type_: TaxIdType,

Expand Down Expand Up @@ -2488,6 +2488,7 @@ pub enum TaxIdType {
NzGst,
PeRuc,
PhTin,
RoTin,
RsPib,
RuInn,
RuKpp,
Expand Down Expand Up @@ -2559,6 +2560,7 @@ impl TaxIdType {
TaxIdType::NzGst => "nz_gst",
TaxIdType::PeRuc => "pe_ruc",
TaxIdType::PhTin => "ph_tin",
TaxIdType::RoTin => "ro_tin",
TaxIdType::RsPib => "rs_pib",
TaxIdType::RuInn => "ru_inn",
TaxIdType::RuKpp => "ru_kpp",
Expand Down
8 changes: 0 additions & 8 deletions src/resources/generated/invoices_shipping_cost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ pub struct LineItemsTaxAmount {
#[serde(rename_all = "snake_case")]
pub enum LineItemsTaxAmountTaxabilityReason {
CustomerExempt,
ExcludedTerritory,
JurisdictionUnsupported,
NotCollecting,
NotSubjectToTax,
NotSupported,
Expand All @@ -65,18 +63,13 @@ pub enum LineItemsTaxAmountTaxabilityReason {
ReverseCharge,
StandardRated,
TaxableBasisReduced,
VatExempt,
ZeroRated,
}

impl LineItemsTaxAmountTaxabilityReason {
pub fn as_str(self) -> &'static str {
match self {
LineItemsTaxAmountTaxabilityReason::CustomerExempt => "customer_exempt",
LineItemsTaxAmountTaxabilityReason::ExcludedTerritory => "excluded_territory",
LineItemsTaxAmountTaxabilityReason::JurisdictionUnsupported => {
"jurisdiction_unsupported"
}
LineItemsTaxAmountTaxabilityReason::NotCollecting => "not_collecting",
LineItemsTaxAmountTaxabilityReason::NotSubjectToTax => "not_subject_to_tax",
LineItemsTaxAmountTaxabilityReason::NotSupported => "not_supported",
Expand All @@ -90,7 +83,6 @@ impl LineItemsTaxAmountTaxabilityReason {
LineItemsTaxAmountTaxabilityReason::ReverseCharge => "reverse_charge",
LineItemsTaxAmountTaxabilityReason::StandardRated => "standard_rated",
LineItemsTaxAmountTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced",
LineItemsTaxAmountTaxabilityReason::VatExempt => "vat_exempt",
LineItemsTaxAmountTaxabilityReason::ZeroRated => "zero_rated",
}
}
Expand Down
8 changes: 0 additions & 8 deletions src/resources/generated/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ pub struct LineItemsTaxAmount {
#[serde(rename_all = "snake_case")]
pub enum LineItemsTaxAmountTaxabilityReason {
CustomerExempt,
ExcludedTerritory,
JurisdictionUnsupported,
NotCollecting,
NotSubjectToTax,
NotSupported,
Expand All @@ -110,18 +108,13 @@ pub enum LineItemsTaxAmountTaxabilityReason {
ReverseCharge,
StandardRated,
TaxableBasisReduced,
VatExempt,
ZeroRated,
}

impl LineItemsTaxAmountTaxabilityReason {
pub fn as_str(self) -> &'static str {
match self {
LineItemsTaxAmountTaxabilityReason::CustomerExempt => "customer_exempt",
LineItemsTaxAmountTaxabilityReason::ExcludedTerritory => "excluded_territory",
LineItemsTaxAmountTaxabilityReason::JurisdictionUnsupported => {
"jurisdiction_unsupported"
}
LineItemsTaxAmountTaxabilityReason::NotCollecting => "not_collecting",
LineItemsTaxAmountTaxabilityReason::NotSubjectToTax => "not_subject_to_tax",
LineItemsTaxAmountTaxabilityReason::NotSupported => "not_supported",
Expand All @@ -135,7 +128,6 @@ impl LineItemsTaxAmountTaxabilityReason {
LineItemsTaxAmountTaxabilityReason::ReverseCharge => "reverse_charge",
LineItemsTaxAmountTaxabilityReason::StandardRated => "standard_rated",
LineItemsTaxAmountTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced",
LineItemsTaxAmountTaxabilityReason::VatExempt => "vat_exempt",
LineItemsTaxAmountTaxabilityReason::ZeroRated => "zero_rated",
}
}
Expand Down
84 changes: 84 additions & 0 deletions src/resources/generated/payment_intent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,14 @@ pub struct PaymentFlowsAmountDetailsResourceTip {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentFlowsAutomaticPaymentMethodsPaymentIntent {
/// Controls whether this PaymentIntent will accept redirect-based payment methods.
///
/// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
///
/// To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_redirects: Option<PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects>,

/// Automatically calculates compatible payment methods.
pub enabled: bool,
}
Expand Down Expand Up @@ -1861,6 +1869,14 @@ impl<'a> UpdatePaymentIntent<'a> {

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct CreatePaymentIntentAutomaticPaymentMethods {
/// Controls whether this PaymentIntent will accept redirect-based payment methods.
///
/// Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps.
///
/// To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment.
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_redirects: Option<CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects>,

/// Whether this feature is enabled.
pub enabled: bool,
}
Expand Down Expand Up @@ -4644,6 +4660,40 @@ pub struct UpdatePaymentIntentPaymentMethodOptionsCustomerBalanceBankTransferEuB
pub country: String,
}

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

impl CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects {
pub fn as_str(self) -> &'static str {
match self {
CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects::Always => "always",
CreatePaymentIntentAutomaticPaymentMethodsAllowRedirects::Never => "never",
}
}
}

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

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

/// An enum representing the possible values of an `CreatePaymentIntentMandateDataCustomerAcceptance`'s `type` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
Expand Down Expand Up @@ -7619,6 +7669,40 @@ impl std::default::Default for FundingInstructionsBankTransferFinancialAddressTy
}
}

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

impl PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects {
pub fn as_str(self) -> &'static str {
match self {
PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects::Always => "always",
PaymentFlowsAutomaticPaymentMethodsPaymentIntentAllowRedirects::Never => "never",
}
}
}

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

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

/// An enum representing the possible values of an `PaymentIntent`'s `cancellation_reason` field.
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
Expand Down
8 changes: 0 additions & 8 deletions src/resources/generated/quotes_resource_total_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ pub struct LineItemsTaxAmount {
#[serde(rename_all = "snake_case")]
pub enum LineItemsTaxAmountTaxabilityReason {
CustomerExempt,
ExcludedTerritory,
JurisdictionUnsupported,
NotCollecting,
NotSubjectToTax,
NotSupported,
Expand All @@ -75,18 +73,13 @@ pub enum LineItemsTaxAmountTaxabilityReason {
ReverseCharge,
StandardRated,
TaxableBasisReduced,
VatExempt,
ZeroRated,
}

impl LineItemsTaxAmountTaxabilityReason {
pub fn as_str(self) -> &'static str {
match self {
LineItemsTaxAmountTaxabilityReason::CustomerExempt => "customer_exempt",
LineItemsTaxAmountTaxabilityReason::ExcludedTerritory => "excluded_territory",
LineItemsTaxAmountTaxabilityReason::JurisdictionUnsupported => {
"jurisdiction_unsupported"
}
LineItemsTaxAmountTaxabilityReason::NotCollecting => "not_collecting",
LineItemsTaxAmountTaxabilityReason::NotSubjectToTax => "not_subject_to_tax",
LineItemsTaxAmountTaxabilityReason::NotSupported => "not_supported",
Expand All @@ -100,7 +93,6 @@ impl LineItemsTaxAmountTaxabilityReason {
LineItemsTaxAmountTaxabilityReason::ReverseCharge => "reverse_charge",
LineItemsTaxAmountTaxabilityReason::StandardRated => "standard_rated",
LineItemsTaxAmountTaxabilityReason::TaxableBasisReduced => "taxable_basis_reduced",
LineItemsTaxAmountTaxabilityReason::VatExempt => "vat_exempt",
LineItemsTaxAmountTaxabilityReason::ZeroRated => "zero_rated",
}
}
Expand Down
Loading

0 comments on commit 90270a4

Please sign in to comment.