Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3602014a6583f6c0fbfdde3c575839ac7d0b4e9c
499f00588b1b41670a44a1e00598db81222ce169
99 changes: 68 additions & 31 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2141
v2149
1 change: 1 addition & 0 deletions src/main/java/com/stripe/model/EventDataClassLookup.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public final class EventDataClassLookup {
classLookup.put("tax.calculation", com.stripe.model.tax.Calculation.class);
classLookup.put("tax.calculation_line_item", com.stripe.model.tax.CalculationLineItem.class);
classLookup.put("tax.form", com.stripe.model.tax.Form.class);
classLookup.put("tax.location", com.stripe.model.tax.Location.class);
classLookup.put("tax.registration", com.stripe.model.tax.Registration.class);
classLookup.put("tax.settings", com.stripe.model.tax.Settings.class);
classLookup.put("tax.transaction", com.stripe.model.tax.Transaction.class);
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/com/stripe/model/Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -2382,6 +2382,31 @@ public static class ScheduleDetails extends StripeObject {
/** The schedule that generated this invoice. */
@SerializedName("schedule")
String schedule;

/** The subscription associated with this schedule. */
@SerializedName("subscription")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Subscription> subscription;

/** Get ID of expandable {@code subscription} object. */
public String getSubscription() {
return (this.subscription != null) ? this.subscription.getId() : null;
}

public void setSubscription(String id) {
this.subscription = ApiResource.setExpandableFieldId(id, this.subscription);
}

/** Get expanded {@code subscription}. */
public Subscription getSubscriptionObject() {
return (this.subscription != null) ? this.subscription.getExpanded() : null;
}

public void setSubscriptionObject(Subscription expandableObject) {
this.subscription =
new ExpandableField<Subscription>(expandableObject.getId(), expandableObject);
}
}

/**
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/Plan.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ public class Plan extends ApiResource implements HasId, MetadataStore<Plan> {
@SerializedName("deleted")
Boolean deleted;

/**
* A custom identifier for this price, such as a SKU number or product code, that can be used to
* reference records from external systems.
*/
@SerializedName("external_reference")
String externalReference;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/Price.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ public class Price extends ApiResource implements HasId, MetadataStore<Price> {
@SerializedName("deleted")
Boolean deleted;

/**
* A custom identifier for this price, such as a SKU number or product code, that can be used to
* reference records from external systems.
*/
@SerializedName("external_reference")
String externalReference;

/** Unique identifier for the object. */
@Getter(onMethod_ = {@Override})
@SerializedName("id")
Expand Down
20 changes: 6 additions & 14 deletions src/main/java/com/stripe/model/Quote.java
Original file line number Diff line number Diff line change
Expand Up @@ -2027,14 +2027,10 @@ public static class SubscriptionData extends StripeObject {
Map<String, String> metadata;

/**
* Configures how the quote handles billing for line transitions. Possible values are {@code
* line_start} (default) or {@code billing_period_start}. {@code line_start} bills based on the
* current state of the line, ignoring changes scheduled for future lines. {@code
* billing_period_start} bills predictively for upcoming line transitions within the current
* billing cycle, including pricing changes and service period adjustments that will occur
* before the next invoice.
* Configures how the subscription schedule handles billing for phase transitions when the quote
* is accepted.
*
* <p>One of {@code billing_period_start}, or {@code line_start}.
* <p>One of {@code billing_period_start}, or {@code phase_start}.
*/
@SerializedName("phase_effective_at")
String phaseEffectiveAt;
Expand Down Expand Up @@ -2494,14 +2490,10 @@ public static class SubscriptionDataOverride extends StripeObject {
String endBehavior;

/**
* Configures how the quote handles billing for line transitions. Possible values are {@code
* line_start} (default) or {@code billing_period_start}. {@code line_start} bills based on the
* current state of the line, ignoring changes scheduled for future lines. {@code
* billing_period_start} bills predictively for upcoming line transitions within the current
* billing cycle, including pricing changes and service period adjustments that will occur
* before the next invoice.
* Configures how the subscription schedule handles billing for phase transitions when the quote
* is accepted.
*
* <p>One of {@code billing_period_start}, or {@code line_start}.
* <p>One of {@code billing_period_start}, or {@code phase_start}.
*/
@SerializedName("phase_effective_at")
String phaseEffectiveAt;
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/com/stripe/model/QuoteLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ public class QuoteLine extends StripeObject implements HasId {
CancelSubscriptionSchedule cancelSubscriptionSchedule;

/**
* Configures how the subscription schedule handles billing for phase transitions. Possible values
* are {@code phase_start} (default) or {@code billing_period_start}. {@code phase_start} bills
* based on the current state of the subscription, ignoring changes scheduled in future phases.
* {@code billing_period_start} bills predictively for upcoming phase transitions within the
* current billing cycle, including pricing changes and service period adjustments that will occur
* before the next invoice.
* Configures how the subscription schedule handles billing for phase transitions.
*
* <p>One of {@code billing_period_start}, or {@code line_start}.
*/
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/com/stripe/model/QuotePreviewInvoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,31 @@ public static class ScheduleDetails extends StripeObject {
/** The schedule that generated this invoice. */
@SerializedName("schedule")
String schedule;

/** The subscription associated with this schedule. */
@SerializedName("subscription")
@Getter(lombok.AccessLevel.NONE)
@Setter(lombok.AccessLevel.NONE)
ExpandableField<Subscription> subscription;

/** Get ID of expandable {@code subscription} object. */
public String getSubscription() {
return (this.subscription != null) ? this.subscription.getId() : null;
}

public void setSubscription(String id) {
this.subscription = ApiResource.setExpandableFieldId(id, this.subscription);
}

/** Get expanded {@code subscription}. */
public Subscription getSubscriptionObject() {
return (this.subscription != null) ? this.subscription.getExpanded() : null;
}

public void setSubscriptionObject(Subscription expandableObject) {
this.subscription =
new ExpandableField<Subscription>(expandableObject.getId(), expandableObject);
}
}

/**
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/com/stripe/model/TaxCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.stripe.net.ApiResource;
import com.stripe.net.BaseAddress;
import com.stripe.net.RequestOptions;
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.TaxCodeListParams;
import com.stripe.param.TaxCodeRetrieveParams;
import java.util.Map;
Expand Down Expand Up @@ -44,6 +45,14 @@ public class TaxCode extends ApiResource implements HasId {
@SerializedName("object")
String object;

/**
* An object that describes more information about the tax location required for this tax code.
* Some <a href="https://stripe.com/tax/tax-for-tickets/integration-guide#types-of-products">tax
* codes</a> require a tax location of type {@code performance} to calculate tax correctly.
*/
@SerializedName("requirements")
Requirements requirements;

/**
* A list of <a href="https://stripe.com/docs/tax/tax-categories">all tax codes available</a> to
* add to Products in order to allow specific tax calculations.
Expand Down Expand Up @@ -135,4 +144,28 @@ public static TaxCode retrieve(String id, TaxCodeRetrieveParams params, RequestO
options);
return getGlobalResponseGetter().request(request, TaxCode.class);
}

/**
* For more details about Requirements, please refer to the <a
* href="https://docs.stripe.com/api">API Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Requirements extends StripeObject {
/**
* Describes whether a performance location is required for a successful tax calculation with a
* tax code.
*
* <p>One of {@code optional}, or {@code required}.
*/
@SerializedName("performance_location")
String performanceLocation;
}

@Override
public void setResponseGetter(StripeResponseGetter responseGetter) {
super.setResponseGetter(responseGetter);
trySetResponseGetter(requirements, responseGetter);
}
}
30 changes: 23 additions & 7 deletions src/main/java/com/stripe/model/sharedpayment/GrantedToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.stripe.net.StripeResponseGetter;
import com.stripe.param.sharedpayment.GrantedTokenCreateParams;
import com.stripe.param.sharedpayment.GrantedTokenRetrieveParams;
import com.stripe.param.sharedpayment.GrantedTokenUpdateParams;
import com.stripe.param.sharedpayment.GrantedTokenRevokeParams;
import java.util.Map;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand Down Expand Up @@ -237,15 +237,31 @@ public static GrantedToken create(GrantedTokenCreateParams params, RequestOption
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken update(Map<String, Object> params) throws StripeException {
return update(params, (RequestOptions) null);
public GrantedToken revoke() throws StripeException {
return revoke((Map<String, Object>) null, (RequestOptions) null);
}

/**
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken update(Map<String, Object> params, RequestOptions options)
public GrantedToken revoke(RequestOptions options) throws StripeException {
return revoke((Map<String, Object>) null, options);
}

/**
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken revoke(Map<String, Object> params) throws StripeException {
return revoke(params, (RequestOptions) null);
}

/**
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken revoke(Map<String, Object> params, RequestOptions options)
throws StripeException {
String path =
String.format(
Expand All @@ -260,15 +276,15 @@ public GrantedToken update(Map<String, Object> params, RequestOptions options)
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken update(GrantedTokenUpdateParams params) throws StripeException {
return update(params, (RequestOptions) null);
public GrantedToken revoke(GrantedTokenRevokeParams params) throws StripeException {
return revoke(params, (RequestOptions) null);
}

/**
* Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode
* and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
*/
public GrantedToken update(GrantedTokenUpdateParams params, RequestOptions options)
public GrantedToken revoke(GrantedTokenRevokeParams params, RequestOptions options)
throws StripeException {
String path =
String.format(
Expand Down
20 changes: 12 additions & 8 deletions src/main/java/com/stripe/model/tax/Calculation.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ public static class TaxBreakdown extends StripeObject {
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
* destination (customer's address).
*
* <p>One of {@code destination}, or {@code origin}.
* <p>One of {@code destination}, {@code origin}, or {@code performance}.
*/
@SerializedName("sourcing")
String sourcing;
Expand Down Expand Up @@ -565,10 +565,12 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code
* vat}.
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax},
* {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code
* tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
Expand Down Expand Up @@ -666,9 +668,11 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
* luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
* {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
Expand Down
21 changes: 17 additions & 4 deletions src/main/java/com/stripe/model/tax/CalculationLineItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ public class CalculationLineItem extends StripeObject implements HasId {
@SerializedName("object")
String object;

/**
* A tax location for a line item that acts as a performance location. This indicates that the
* line item might be taxed at the place where it is being performed at. This is helpful for
* events or other services being performed at non-customer addresses like venues or offices. This
* can be left empty for tax codes that do not require a tax location. For tax codes where the
* location requirement is &quot;optional&quot;, this would override the customer address in most
* use cases.
*/
@SerializedName("performance_location")
String performanceLocation;

/** The ID of an existing <a href="https://docs.stripe.com/api/products/object">Product</a>. */
@SerializedName("product")
String product;
Expand Down Expand Up @@ -113,7 +124,7 @@ public static class TaxBreakdown extends StripeObject {
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
* destination (customer's address).
*
* <p>One of {@code destination}, or {@code origin}.
* <p>One of {@code destination}, {@code origin}, or {@code performance}.
*/
@SerializedName("sourcing")
String sourcing;
Expand Down Expand Up @@ -206,9 +217,11 @@ public static class TaxRateDetails extends StripeObject {
/**
* The tax type, such as {@code vat} or {@code sales_tax}.
*
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
* luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
* {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
*/
@SerializedName("tax_type")
String taxType;
Expand Down
Loading
Loading