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 7, 2023
1 parent a088ccd commit d93d649
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openapi/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "v406"
"version": "v409"
}
24 changes: 24 additions & 0 deletions src/resources/generated/payment_link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,17 @@ pub struct PaymentLinksResourceCustomFields {

pub label: PaymentLinksResourceCustomFieldsLabel,

/// Configuration for `type=numeric` fields.
pub numeric: Option<PaymentLinksResourceCustomFieldsNumeric>,

/// Whether the customer is required to complete the field before completing the Checkout Session.
///
/// Defaults to `false`.
pub optional: bool,

/// Configuration for `type=text` fields.
pub text: Option<PaymentLinksResourceCustomFieldsText>,

/// The type of the field.
#[serde(rename = "type")]
pub type_: PaymentLinksResourceCustomFieldsType,
Expand Down Expand Up @@ -247,6 +253,24 @@ pub struct PaymentLinksResourceCustomFieldsLabel {
pub type_: PaymentLinksResourceCustomFieldsLabelType,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentLinksResourceCustomFieldsNumeric {
/// The maximum character length constraint for the customer's input.
pub maximum_length: Option<i64>,

/// The minimum character length requirement for the customer's input.
pub minimum_length: Option<i64>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentLinksResourceCustomFieldsText {
/// The maximum character length constraint for the customer's input.
pub maximum_length: Option<i64>,

/// The minimum character length requirement for the customer's input.
pub minimum_length: Option<i64>,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct PaymentLinksResourceCustomText {
/// Custom text that should be displayed alongside shipping address collection.
Expand Down
11 changes: 11 additions & 0 deletions src/resources/generated/subscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ impl<'a> CreateSubscription<'a> {
/// The parameters for `Subscription::list`.
#[derive(Clone, Debug, Serialize, Default)]
pub struct ListSubscriptions<'a> {
/// Filter subscriptions by their automatic tax settings.
#[serde(skip_serializing_if = "Option::is_none")]
pub automatic_tax: Option<ListSubscriptionsAutomaticTax>,

/// The collection method of the subscriptions to retrieve.
///
/// Either `charge_automatically` or `send_invoice`.
Expand Down Expand Up @@ -733,6 +737,7 @@ pub struct ListSubscriptions<'a> {
impl<'a> ListSubscriptions<'a> {
pub fn new() -> Self {
ListSubscriptions {
automatic_tax: Default::default(),
collection_method: Default::default(),
created: Default::default(),
current_period_end: Default::default(),
Expand Down Expand Up @@ -1117,6 +1122,12 @@ pub struct CreateSubscriptionTrialSettings {
pub end_behavior: CreateSubscriptionTrialSettingsEndBehavior,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct ListSubscriptionsAutomaticTax {
/// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
pub enabled: bool,
}

#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct UpdateSubscriptionAutomaticTax {
/// Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
Expand Down

0 comments on commit d93d649

Please sign in to comment.