Skip to content

Commit

Permalink
Merge pull request arlyon#401 from arlyon/openapi-1688084835
Browse files Browse the repository at this point in the history
Generate latest changes from OpenApi spec
  • Loading branch information
arlyon authored Jul 5, 2023
2 parents 56303e9 + 9a2e0f6 commit 0a1aa69
Show file tree
Hide file tree
Showing 10 changed files with 185 additions and 13 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": "v394"
"version": "v406"
}
2 changes: 1 addition & 1 deletion src/resources/generated/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@ pub struct TransferScheduleParams {
///
/// May also be set to `minimum`, representing the lowest available value for the account country.
/// Default is `minimum`.
/// The `delay_days` parameter does not apply when the `interval` is `manual`.
/// The `delay_days` parameter remains at the last configured value if `interval` is `manual`.
/// [Learn more about controlling payout delay days](https://stripe.com/docs/connect/manage-payout-schedule).
#[serde(skip_serializing_if = "Option::is_none")]
pub delay_days: Option<DelayDays>,
Expand Down
2 changes: 2 additions & 0 deletions src/resources/generated/api_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ pub enum ApiErrorsCode {
AmountTooLarge,
AmountTooSmall,
ApiKeyExpired,
ApplicationFeesNotAllowed,
AuthenticationRequired,
BalanceInsufficient,
BankAccountBadRoutingNumbers,
Expand Down Expand Up @@ -242,6 +243,7 @@ impl ApiErrorsCode {
ApiErrorsCode::AmountTooLarge => "amount_too_large",
ApiErrorsCode::AmountTooSmall => "amount_too_small",
ApiErrorsCode::ApiKeyExpired => "api_key_expired",
ApiErrorsCode::ApplicationFeesNotAllowed => "application_fees_not_allowed",
ApiErrorsCode::AuthenticationRequired => "authentication_required",
ApiErrorsCode::BalanceInsufficient => "balance_insufficient",
ApiErrorsCode::BankAccountBadRoutingNumbers => "bank_account_bad_routing_numbers",
Expand Down
32 changes: 30 additions & 2 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 `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `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`, `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 @@ -8440,10 +8440,13 @@ impl std::default::Default
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum PaymentPagesCheckoutSessionTaxIdType {
AdNrt,
AeTrn,
ArCuit,
AuAbn,
AuArn,
BgUic,
BoTin,
BrCnpj,
BrCpf,
CaBn,
Expand All @@ -8454,6 +8457,11 @@ pub enum PaymentPagesCheckoutSessionTaxIdType {
CaQst,
ChVat,
ClTin,
CnTin,
CoNit,
CrTin,
DoRcn,
EcRuc,
EgTin,
EsCif,
EuOssVat,
Expand All @@ -8478,29 +8486,38 @@ pub enum PaymentPagesCheckoutSessionTaxIdType {
MySst,
NoVat,
NzGst,
PeRuc,
PhTin,
RsPib,
RuInn,
RuKpp,
SaVat,
SgGst,
SgUen,
SiTin,
SvNit,
ThVat,
TrTin,
TwVat,
UaVat,
Unknown,
UsEin,
UyRuc,
VeRif,
VnTin,
ZaVat,
}

impl PaymentPagesCheckoutSessionTaxIdType {
pub fn as_str(self) -> &'static str {
match self {
PaymentPagesCheckoutSessionTaxIdType::AdNrt => "ad_nrt",
PaymentPagesCheckoutSessionTaxIdType::AeTrn => "ae_trn",
PaymentPagesCheckoutSessionTaxIdType::ArCuit => "ar_cuit",
PaymentPagesCheckoutSessionTaxIdType::AuAbn => "au_abn",
PaymentPagesCheckoutSessionTaxIdType::AuArn => "au_arn",
PaymentPagesCheckoutSessionTaxIdType::BgUic => "bg_uic",
PaymentPagesCheckoutSessionTaxIdType::BoTin => "bo_tin",
PaymentPagesCheckoutSessionTaxIdType::BrCnpj => "br_cnpj",
PaymentPagesCheckoutSessionTaxIdType::BrCpf => "br_cpf",
PaymentPagesCheckoutSessionTaxIdType::CaBn => "ca_bn",
Expand All @@ -8511,6 +8528,11 @@ impl PaymentPagesCheckoutSessionTaxIdType {
PaymentPagesCheckoutSessionTaxIdType::CaQst => "ca_qst",
PaymentPagesCheckoutSessionTaxIdType::ChVat => "ch_vat",
PaymentPagesCheckoutSessionTaxIdType::ClTin => "cl_tin",
PaymentPagesCheckoutSessionTaxIdType::CnTin => "cn_tin",
PaymentPagesCheckoutSessionTaxIdType::CoNit => "co_nit",
PaymentPagesCheckoutSessionTaxIdType::CrTin => "cr_tin",
PaymentPagesCheckoutSessionTaxIdType::DoRcn => "do_rcn",
PaymentPagesCheckoutSessionTaxIdType::EcRuc => "ec_ruc",
PaymentPagesCheckoutSessionTaxIdType::EgTin => "eg_tin",
PaymentPagesCheckoutSessionTaxIdType::EsCif => "es_cif",
PaymentPagesCheckoutSessionTaxIdType::EuOssVat => "eu_oss_vat",
Expand All @@ -8535,19 +8557,25 @@ impl PaymentPagesCheckoutSessionTaxIdType {
PaymentPagesCheckoutSessionTaxIdType::MySst => "my_sst",
PaymentPagesCheckoutSessionTaxIdType::NoVat => "no_vat",
PaymentPagesCheckoutSessionTaxIdType::NzGst => "nz_gst",
PaymentPagesCheckoutSessionTaxIdType::PeRuc => "pe_ruc",
PaymentPagesCheckoutSessionTaxIdType::PhTin => "ph_tin",
PaymentPagesCheckoutSessionTaxIdType::RsPib => "rs_pib",
PaymentPagesCheckoutSessionTaxIdType::RuInn => "ru_inn",
PaymentPagesCheckoutSessionTaxIdType::RuKpp => "ru_kpp",
PaymentPagesCheckoutSessionTaxIdType::SaVat => "sa_vat",
PaymentPagesCheckoutSessionTaxIdType::SgGst => "sg_gst",
PaymentPagesCheckoutSessionTaxIdType::SgUen => "sg_uen",
PaymentPagesCheckoutSessionTaxIdType::SiTin => "si_tin",
PaymentPagesCheckoutSessionTaxIdType::SvNit => "sv_nit",
PaymentPagesCheckoutSessionTaxIdType::ThVat => "th_vat",
PaymentPagesCheckoutSessionTaxIdType::TrTin => "tr_tin",
PaymentPagesCheckoutSessionTaxIdType::TwVat => "tw_vat",
PaymentPagesCheckoutSessionTaxIdType::UaVat => "ua_vat",
PaymentPagesCheckoutSessionTaxIdType::Unknown => "unknown",
PaymentPagesCheckoutSessionTaxIdType::UsEin => "us_ein",
PaymentPagesCheckoutSessionTaxIdType::UyRuc => "uy_ruc",
PaymentPagesCheckoutSessionTaxIdType::VeRif => "ve_rif",
PaymentPagesCheckoutSessionTaxIdType::VnTin => "vn_tin",
PaymentPagesCheckoutSessionTaxIdType::ZaVat => "za_vat",
}
}
Expand All @@ -8566,6 +8594,6 @@ impl std::fmt::Display for PaymentPagesCheckoutSessionTaxIdType {
}
impl std::default::Default for PaymentPagesCheckoutSessionTaxIdType {
fn default() -> Self {
Self::AeTrn
Self::AdNrt
}
}
14 changes: 14 additions & 0 deletions src/resources/generated/credit_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ pub struct CreditNote {
/// The aggregate amounts calculated per discount for all line items.
pub discount_amounts: Vec<DiscountsResourceDiscountAmount>,

/// The date when this credit note is in effect.
///
/// Same as `created` unless overwritten.
/// When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
pub effective_at: Option<Timestamp>,

/// ID of the invoice.
pub invoice: Expandable<Invoice>,

Expand Down Expand Up @@ -195,6 +201,13 @@ pub struct CreateCreditNote<'a> {
#[serde(skip_serializing_if = "Option::is_none")]
pub credit_amount: Option<i64>,

/// The date when this credit note is in effect.
///
/// Same as `created` unless overwritten.
/// When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
#[serde(skip_serializing_if = "Option::is_none")]
pub effective_at: Option<Timestamp>,

/// Specifies which fields in the response should be expanded.
#[serde(skip_serializing_if = "Expand::is_empty")]
pub expand: &'a [&'a str],
Expand Down Expand Up @@ -246,6 +259,7 @@ impl<'a> CreateCreditNote<'a> {
CreateCreditNote {
amount: Default::default(),
credit_amount: Default::default(),
effective_at: Default::default(),
expand: Default::default(),
invoice,
lines: Default::default(),
Expand Down
32 changes: 30 additions & 2 deletions 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 `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `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`, `ph_tin`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tr_tin`, `tw_vat`, `ua_vat`, `us_ein`, 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`, `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 @@ -1020,10 +1020,13 @@ impl std::default::Default for CustomerTaxLocationSource {
#[derive(Copy, Clone, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(rename_all = "snake_case")]
pub enum TaxIdType {
AdNrt,
AeTrn,
ArCuit,
AuAbn,
AuArn,
BgUic,
BoTin,
BrCnpj,
BrCpf,
CaBn,
Expand All @@ -1034,6 +1037,11 @@ pub enum TaxIdType {
CaQst,
ChVat,
ClTin,
CnTin,
CoNit,
CrTin,
DoRcn,
EcRuc,
EgTin,
EsCif,
EuOssVat,
Expand All @@ -1058,28 +1066,37 @@ pub enum TaxIdType {
MySst,
NoVat,
NzGst,
PeRuc,
PhTin,
RsPib,
RuInn,
RuKpp,
SaVat,
SgGst,
SgUen,
SiTin,
SvNit,
ThVat,
TrTin,
TwVat,
UaVat,
UsEin,
UyRuc,
VeRif,
VnTin,
ZaVat,
}

impl TaxIdType {
pub fn as_str(self) -> &'static str {
match self {
TaxIdType::AdNrt => "ad_nrt",
TaxIdType::AeTrn => "ae_trn",
TaxIdType::ArCuit => "ar_cuit",
TaxIdType::AuAbn => "au_abn",
TaxIdType::AuArn => "au_arn",
TaxIdType::BgUic => "bg_uic",
TaxIdType::BoTin => "bo_tin",
TaxIdType::BrCnpj => "br_cnpj",
TaxIdType::BrCpf => "br_cpf",
TaxIdType::CaBn => "ca_bn",
Expand All @@ -1090,6 +1107,11 @@ impl TaxIdType {
TaxIdType::CaQst => "ca_qst",
TaxIdType::ChVat => "ch_vat",
TaxIdType::ClTin => "cl_tin",
TaxIdType::CnTin => "cn_tin",
TaxIdType::CoNit => "co_nit",
TaxIdType::CrTin => "cr_tin",
TaxIdType::DoRcn => "do_rcn",
TaxIdType::EcRuc => "ec_ruc",
TaxIdType::EgTin => "eg_tin",
TaxIdType::EsCif => "es_cif",
TaxIdType::EuOssVat => "eu_oss_vat",
Expand All @@ -1114,18 +1136,24 @@ impl TaxIdType {
TaxIdType::MySst => "my_sst",
TaxIdType::NoVat => "no_vat",
TaxIdType::NzGst => "nz_gst",
TaxIdType::PeRuc => "pe_ruc",
TaxIdType::PhTin => "ph_tin",
TaxIdType::RsPib => "rs_pib",
TaxIdType::RuInn => "ru_inn",
TaxIdType::RuKpp => "ru_kpp",
TaxIdType::SaVat => "sa_vat",
TaxIdType::SgGst => "sg_gst",
TaxIdType::SgUen => "sg_uen",
TaxIdType::SiTin => "si_tin",
TaxIdType::SvNit => "sv_nit",
TaxIdType::ThVat => "th_vat",
TaxIdType::TrTin => "tr_tin",
TaxIdType::TwVat => "tw_vat",
TaxIdType::UaVat => "ua_vat",
TaxIdType::UsEin => "us_ein",
TaxIdType::UyRuc => "uy_ruc",
TaxIdType::VeRif => "ve_rif",
TaxIdType::VnTin => "vn_tin",
TaxIdType::ZaVat => "za_vat",
}
}
Expand All @@ -1144,7 +1172,7 @@ impl std::fmt::Display for TaxIdType {
}
impl std::default::Default for TaxIdType {
fn default() -> Self {
Self::AeTrn
Self::AdNrt
}
}

Expand Down
Loading

0 comments on commit 0a1aa69

Please sign in to comment.