Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1926

Merged
merged 11 commits into from
Dec 5, 2024
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1370
v1384
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,14 @@ public static class Capabilities extends StripeObject {
@SerializedName("au_becs_debit_payments")
String auBecsDebitPayments;

/**
* The status of the automatic_indirect_tax capability of the account.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("automatic_indirect_tax")
String automaticIndirectTax;

/**
* The status of the Bacs Direct Debits payments capability of the account, or whether the
* account can directly process Bacs Direct Debits charges.
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/stripe/model/BalanceTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ public class BalanceTransaction extends ApiResource implements HasId {
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
* refund}, {@code refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code
* stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal},
* {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code
* transfer_refund}. Learn more about <a
* href="https://stripe.com/docs/reports/balance-transaction-types">balance transaction types and
* what they represent</a>. To classify transactions for accounting purposes, consider {@code
* reporting_category} instead.
* payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code
* refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee},
* {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, {@code
* transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code transfer_refund}. Learn
* more about <a href="https://stripe.com/docs/reports/balance-transaction-types">balance
* transaction types and what they represent</a>. To classify transactions for accounting
* purposes, consider {@code reporting_category} instead.
*
* <p>One of {@code adjustment}, {@code advance}, {@code advance_funding}, {@code
* anticipation_repayment}, {@code application_fee}, {@code application_fee_refund}, {@code
Expand All @@ -145,10 +145,10 @@ public class BalanceTransaction extends ApiResource implements HasId {
* payment_failure_refund}, {@code payment_network_reserve_hold}, {@code
* payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code
* payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code
* refund}, {@code refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code
* stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal},
* {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code
* transfer_refund}.
* payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code
* refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee},
* {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, {@code
* transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code transfer_refund}.
*/
@SerializedName("type")
String type;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,15 @@ public static class AmountsDue extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>One of {@code finalization_requires_location_inputs}, or {@code
* finalization_system_error}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/**
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice
* items (invoice items with manually specified <a
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/stripe/model/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,15 @@ public static class SepaDebit extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {}
public static class MandateOptions extends StripeObject {
/**
* Prefix used to generate the Mandate reference. Must be at most 12 characters long.
* Must consist of only uppercase letters, numbers, spaces, or the following special
* characters: '/', '_', '-', '&amp;', '.'. Cannot begin with 'STRIPE'.
*/
@SerializedName("reference_prefix")
String referencePrefix;
}
}

/**
Expand Down
20 changes: 18 additions & 2 deletions src/main/java/com/stripe/model/PaymentIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -3535,7 +3535,15 @@ public static class BacsDebit extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {}
public static class MandateOptions extends StripeObject {
/**
* Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
* consist of only uppercase letters, numbers, spaces, or the following special characters:
* '/', '_', '-', '&amp;', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
*/
@SerializedName("reference_prefix")
String referencePrefix;
}
}

/**
Expand Down Expand Up @@ -5388,7 +5396,15 @@ public static class SepaDebit extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {}
public static class MandateOptions extends StripeObject {
/**
* Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
* consist of only uppercase letters, numbers, spaces, or the following special characters:
* '/', '_', '-', '&amp;', '.'. Cannot begin with 'STRIPE'.
*/
@SerializedName("reference_prefix")
String referencePrefix;
}
}

/**
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/stripe/model/QuotePreviewInvoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,15 @@ public static class AppliesTo extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>One of {@code finalization_requires_location_inputs}, or {@code
* finalization_system_error}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/**
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice
* items (invoice items with manually specified <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,14 @@ public void setOnBehalfOfObject(Account expandableObject) {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>Equal to {@code requires_location_inputs}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/** Whether Stripe automatically computes tax on invoices created during this phase. */
@SerializedName("enabled")
Boolean enabled;
Expand Down Expand Up @@ -1130,6 +1138,14 @@ public static class DiscountEnd extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>Equal to {@code requires_location_inputs}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/** Whether Stripe automatically computes tax on invoices created during this phase. */
@SerializedName("enabled")
Boolean enabled;
Expand Down
20 changes: 18 additions & 2 deletions src/main/java/com/stripe/model/SetupIntent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,15 @@ public static class BacsDebit extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {}
public static class MandateOptions extends StripeObject {
/**
* Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
* consist of only uppercase letters, numbers, spaces, or the following special characters:
* '/', '_', '-', '&amp;', '.'. Cannot begin with 'DDIC' or 'STRIPE'.
*/
@SerializedName("reference_prefix")
String referencePrefix;
}
}

/**
Expand Down Expand Up @@ -1391,7 +1399,15 @@ public static class SepaDebit extends StripeObject {
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class MandateOptions extends StripeObject {}
public static class MandateOptions extends StripeObject {
/**
* Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must
* consist of only uppercase letters, numbers, spaces, or the following special characters:
* '/', '_', '-', '&amp;', '.'. Cannot begin with 'STRIPE'.
*/
@SerializedName("reference_prefix")
String referencePrefix;
}
}

/**
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Subscription.java
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,14 @@ public Subscription update(SubscriptionUpdateParams params, RequestOptions optio
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>Equal to {@code requires_location_inputs}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/** Whether Stripe automatically computes tax on this subscription. */
@SerializedName("enabled")
Boolean enabled;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/com/stripe/model/SubscriptionSchedule.java
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,14 @@ public void setOnBehalfOfObject(Account expandableObject) {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>Equal to {@code requires_location_inputs}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/** Whether Stripe automatically computes tax on invoices created during this phase. */
@SerializedName("enabled")
Boolean enabled;
Expand Down Expand Up @@ -1444,6 +1452,14 @@ public static class DiscountEnd extends StripeObject {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AutomaticTax extends StripeObject {
/**
* If Stripe disabled automatic tax, this enum describes why.
*
* <p>Equal to {@code requires_location_inputs}.
*/
@SerializedName("disabled_reason")
String disabledReason;

/** Whether Stripe automatically computes tax on invoices created during this phase. */
@SerializedName("enabled")
Boolean enabled;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/billing/CreditGrant.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStore<Cre
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Customer> customer;

/** The time when the billing credits become effectivewhen they're eligible for use. */
/** The time when the billing credits become effective-when they're eligible for use. */
@SerializedName("effective_at")
Long effectiveAt;

Expand Down Expand Up @@ -451,7 +451,7 @@ public static class ApplicabilityConfig extends StripeObject {
@EqualsAndHashCode(callSuper = false)
public static class Scope extends StripeObject {
/**
* The price type for which credit grants can apply. We currently only support the {@code
* The price type that credit grants can apply to. We currently only support the {@code
* metered} price type. This refers to prices that have a <a
* href="https://docs.stripe.com/api/billing/meter">Billing Meter</a> attached to them.
*
Expand Down
67 changes: 51 additions & 16 deletions src/main/java/com/stripe/model/billing/Meter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@
import lombok.Setter;

/**
* A billing meter is a resource that allows you to track usage of a particular event. For example,
* you might create a billing meter to track the number of API calls made by a particular user. You
* can then attach the billing meter to a price and attach the price to a subscription to charge the
* user for the number of API calls they make.
* Meters specify how to aggregate meter events over a billing period. Meter events represent the
* actions that customers take in your system. Meters attach to prices and form the basis of the
* bill.
*
* <p>Related guide: <a href="https://docs.stripe.com/billing/subscriptions/usage-based">Usage based
* billing</a>
Expand Down Expand Up @@ -137,22 +136,34 @@ public static Meter create(MeterCreateParams params, RequestOptions options)
return getGlobalResponseGetter().request(request, Meter.class);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate() throws StripeException {
return deactivate((Map<String, Object>) null, (RequestOptions) null);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate(RequestOptions options) throws StripeException {
return deactivate((Map<String, Object>) null, options);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate(Map<String, Object> params) throws StripeException {
return deactivate(params, (RequestOptions) null);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path =
Expand All @@ -162,12 +173,18 @@ public Meter deactivate(Map<String, Object> params, RequestOptions options)
return getResponseGetter().request(request, Meter.class);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate(MeterDeactivateParams params) throws StripeException {
return deactivate(params, (RequestOptions) null);
}

/** Deactivates a billing meter. */
/**
* When a meter is deactivated, no more meter events will be accepted for this meter. You can’t
* attach a deactivated meter to a price.
*/
public Meter deactivate(MeterDeactivateParams params, RequestOptions options)
throws StripeException {
String path =
Expand Down Expand Up @@ -257,22 +274,34 @@ public static MeterCollection list(MeterListParams params, RequestOptions option
return getGlobalResponseGetter().request(request, MeterCollection.class);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate() throws StripeException {
return reactivate((Map<String, Object>) null, (RequestOptions) null);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate(RequestOptions options) throws StripeException {
return reactivate((Map<String, Object>) null, options);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate(Map<String, Object> params) throws StripeException {
return reactivate(params, (RequestOptions) null);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path =
Expand All @@ -282,12 +311,18 @@ public Meter reactivate(Map<String, Object> params, RequestOptions options)
return getResponseGetter().request(request, Meter.class);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate(MeterReactivateParams params) throws StripeException {
return reactivate(params, (RequestOptions) null);
}

/** Reactivates a billing meter. */
/**
* When a meter is reactivated, events for this meter can be accepted and you can attach the meter
* to a price.
*/
public Meter reactivate(MeterReactivateParams params, RequestOptions options)
throws StripeException {
String path =
Expand Down
Loading
Loading