Skip to content

Commit d34e594

Browse files
Update generated code for v2148 and
1 parent 7c91caf commit d34e594

27 files changed

+1608
-42
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
62f4f6bb7256abf1d83d35d2fb79a309954b19c9
1+
0822236fb875490aa7ccc7b66dbb52f8965ee062

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2146
1+
v2148

src/main/java/com/stripe/model/EventDataClassLookup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ public final class EventDataClassLookup {
234234
classLookup.put("tax.calculation", com.stripe.model.tax.Calculation.class);
235235
classLookup.put("tax.calculation_line_item", com.stripe.model.tax.CalculationLineItem.class);
236236
classLookup.put("tax.form", com.stripe.model.tax.Form.class);
237+
classLookup.put("tax.location", com.stripe.model.tax.Location.class);
237238
classLookup.put("tax.registration", com.stripe.model.tax.Registration.class);
238239
classLookup.put("tax.settings", com.stripe.model.tax.Settings.class);
239240
classLookup.put("tax.transaction", com.stripe.model.tax.Transaction.class);

src/main/java/com/stripe/model/TaxCode.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.stripe.net.ApiResource;
99
import com.stripe.net.BaseAddress;
1010
import com.stripe.net.RequestOptions;
11+
import com.stripe.net.StripeResponseGetter;
1112
import com.stripe.param.TaxCodeListParams;
1213
import com.stripe.param.TaxCodeRetrieveParams;
1314
import java.util.Map;
@@ -44,6 +45,14 @@ public class TaxCode extends ApiResource implements HasId {
4445
@SerializedName("object")
4546
String object;
4647

48+
/**
49+
* An object that describes more information about the tax location required for this tax code.
50+
* Some <a href="https://stripe.com/tax/tax-for-tickets/integration-guide#types-of-products">tax
51+
* codes</a> require a tax location of type {@code performance} to calculate tax correctly.
52+
*/
53+
@SerializedName("requirements")
54+
Requirements requirements;
55+
4756
/**
4857
* A list of <a href="https://stripe.com/docs/tax/tax-categories">all tax codes available</a> to
4958
* add to Products in order to allow specific tax calculations.
@@ -135,4 +144,28 @@ public static TaxCode retrieve(String id, TaxCodeRetrieveParams params, RequestO
135144
options);
136145
return getGlobalResponseGetter().request(request, TaxCode.class);
137146
}
147+
148+
/**
149+
* For more details about Requirements, please refer to the <a
150+
* href="https://docs.stripe.com/api">API Reference.</a>
151+
*/
152+
@Getter
153+
@Setter
154+
@EqualsAndHashCode(callSuper = false)
155+
public static class Requirements extends StripeObject {
156+
/**
157+
* Describes whether a performance location is required for a successful tax calculation with a
158+
* tax code.
159+
*
160+
* <p>One of {@code optional}, or {@code required}.
161+
*/
162+
@SerializedName("performance_location")
163+
String performanceLocation;
164+
}
165+
166+
@Override
167+
public void setResponseGetter(StripeResponseGetter responseGetter) {
168+
super.setResponseGetter(responseGetter);
169+
trySetResponseGetter(requirements, responseGetter);
170+
}
138171
}

src/main/java/com/stripe/model/tax/Calculation.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public static class TaxBreakdown extends StripeObject {
472472
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
473473
* destination (customer's address).
474474
*
475-
* <p>One of {@code destination}, or {@code origin}.
475+
* <p>One of {@code destination}, {@code origin}, or {@code performance}.
476476
*/
477477
@SerializedName("sourcing")
478478
String sourcing;
@@ -565,10 +565,12 @@ public static class TaxRateDetails extends StripeObject {
565565
/**
566566
* The tax type, such as {@code vat} or {@code sales_tax}.
567567
*
568-
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
569-
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
570-
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code
571-
* vat}.
568+
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
569+
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
570+
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax},
571+
* {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code
572+
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code
573+
* tourism_tax}, or {@code vat}.
572574
*/
573575
@SerializedName("tax_type")
574576
String taxType;
@@ -666,9 +668,11 @@ public static class TaxRateDetails extends StripeObject {
666668
/**
667669
* The tax type, such as {@code vat} or {@code sales_tax}.
668670
*
669-
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
670-
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
671-
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
671+
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
672+
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
673+
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
674+
* luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
675+
* {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
672676
*/
673677
@SerializedName("tax_type")
674678
String taxType;

src/main/java/com/stripe/model/tax/CalculationLineItem.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ public class CalculationLineItem extends StripeObject implements HasId {
5757
@SerializedName("object")
5858
String object;
5959

60+
/**
61+
* A tax location for a line item that acts as a performance location. This indicates that the
62+
* line item might be taxed at the place where it is being performed at. This is helpful for
63+
* events or other services being performed at non-customer addresses like venues or offices. This
64+
* can be left empty for tax codes that do not require a tax location. For tax codes where the
65+
* location requirement is &quot;optional&quot;, this would override the customer address in most
66+
* use cases.
67+
*/
68+
@SerializedName("performance_location")
69+
String performanceLocation;
70+
6071
/** The ID of an existing <a href="https://docs.stripe.com/api/products/object">Product</a>. */
6172
@SerializedName("product")
6273
String product;
@@ -113,7 +124,7 @@ public static class TaxBreakdown extends StripeObject {
113124
* Indicates whether the jurisdiction was determined by the origin (merchant's address) or
114125
* destination (customer's address).
115126
*
116-
* <p>One of {@code destination}, or {@code origin}.
127+
* <p>One of {@code destination}, {@code origin}, or {@code performance}.
117128
*/
118129
@SerializedName("sourcing")
119130
String sourcing;
@@ -206,9 +217,11 @@ public static class TaxRateDetails extends StripeObject {
206217
/**
207218
* The tax type, such as {@code vat} or {@code sales_tax}.
208219
*
209-
* <p>One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst},
210-
* {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code
211-
* retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}.
220+
* <p>One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code
221+
* communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst},
222+
* {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code
223+
* luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee},
224+
* {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}.
212225
*/
213226
@SerializedName("tax_type")
214227
String taxType;
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.model.tax;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.Address;
7+
import com.stripe.model.HasId;
8+
import com.stripe.net.ApiRequest;
9+
import com.stripe.net.ApiRequestParams;
10+
import com.stripe.net.ApiResource;
11+
import com.stripe.net.BaseAddress;
12+
import com.stripe.net.RequestOptions;
13+
import com.stripe.net.StripeResponseGetter;
14+
import com.stripe.param.tax.LocationCreateParams;
15+
import com.stripe.param.tax.LocationListParams;
16+
import com.stripe.param.tax.LocationRetrieveParams;
17+
import java.util.Map;
18+
import lombok.EqualsAndHashCode;
19+
import lombok.Getter;
20+
import lombok.Setter;
21+
22+
/** Tax locations represent venues for services, tickets, or other product types. */
23+
@Getter
24+
@Setter
25+
@EqualsAndHashCode(callSuper = false)
26+
public class Location extends ApiResource implements HasId {
27+
@SerializedName("address")
28+
Address address;
29+
30+
/**
31+
* A descriptive text providing additional context about the tax location. This can include
32+
* information about the venue, types of events held, services available, or any relevant details
33+
* for better identification (e.g., &quot;A spacious auditorium suitable for large concerts and
34+
* events.&quot;).
35+
*/
36+
@SerializedName("description")
37+
String description;
38+
39+
/** Unique identifier for the object. */
40+
@Getter(onMethod_ = {@Override})
41+
@SerializedName("id")
42+
String id;
43+
44+
/**
45+
* String representing the object's type. Objects of the same type share the same value.
46+
*
47+
* <p>Equal to {@code tax.location}.
48+
*/
49+
@SerializedName("object")
50+
String object;
51+
52+
/**
53+
* The type of tax location to be defined. Currently the only option is {@code performance}.
54+
*
55+
* <p>Equal to {@code performance}.
56+
*/
57+
@SerializedName("type")
58+
String type;
59+
60+
/**
61+
* Create a tax location to use in calculating taxes for a service, ticket, or other type of
62+
* product. The resulting object contains the id, address, name, description, and current
63+
* operational status of the tax location.
64+
*/
65+
public static Location create(Map<String, Object> params) throws StripeException {
66+
return create(params, (RequestOptions) null);
67+
}
68+
69+
/**
70+
* Create a tax location to use in calculating taxes for a service, ticket, or other type of
71+
* product. The resulting object contains the id, address, name, description, and current
72+
* operational status of the tax location.
73+
*/
74+
public static Location create(Map<String, Object> params, RequestOptions options)
75+
throws StripeException {
76+
String path = "/v1/tax/locations";
77+
ApiRequest request =
78+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
79+
return getGlobalResponseGetter().request(request, Location.class);
80+
}
81+
82+
/**
83+
* Create a tax location to use in calculating taxes for a service, ticket, or other type of
84+
* product. The resulting object contains the id, address, name, description, and current
85+
* operational status of the tax location.
86+
*/
87+
public static Location create(LocationCreateParams params) throws StripeException {
88+
return create(params, (RequestOptions) null);
89+
}
90+
91+
/**
92+
* Create a tax location to use in calculating taxes for a service, ticket, or other type of
93+
* product. The resulting object contains the id, address, name, description, and current
94+
* operational status of the tax location.
95+
*/
96+
public static Location create(LocationCreateParams params, RequestOptions options)
97+
throws StripeException {
98+
String path = "/v1/tax/locations";
99+
ApiResource.checkNullTypedParams(path, params);
100+
ApiRequest request =
101+
new ApiRequest(
102+
BaseAddress.API,
103+
ApiResource.RequestMethod.POST,
104+
path,
105+
ApiRequestParams.paramsToMap(params),
106+
options);
107+
return getGlobalResponseGetter().request(request, Location.class);
108+
}
109+
110+
/**
111+
* Retrieve a list of all tax locations. Tax locations can represent the venues for services,
112+
* tickets, or other product types.
113+
*
114+
* <p>The response includes detailed information for each tax location, such as its address, name,
115+
* description, and current operational status.
116+
*
117+
* <p>You can paginate through the list by using the {@code limit} parameter to control the number
118+
* of results returned in each request.
119+
*/
120+
public static LocationCollection list(Map<String, Object> params) throws StripeException {
121+
return list(params, (RequestOptions) null);
122+
}
123+
124+
/**
125+
* Retrieve a list of all tax locations. Tax locations can represent the venues for services,
126+
* tickets, or other product types.
127+
*
128+
* <p>The response includes detailed information for each tax location, such as its address, name,
129+
* description, and current operational status.
130+
*
131+
* <p>You can paginate through the list by using the {@code limit} parameter to control the number
132+
* of results returned in each request.
133+
*/
134+
public static LocationCollection list(Map<String, Object> params, RequestOptions options)
135+
throws StripeException {
136+
String path = "/v1/tax/locations";
137+
ApiRequest request =
138+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
139+
return getGlobalResponseGetter().request(request, LocationCollection.class);
140+
}
141+
142+
/**
143+
* Retrieve a list of all tax locations. Tax locations can represent the venues for services,
144+
* tickets, or other product types.
145+
*
146+
* <p>The response includes detailed information for each tax location, such as its address, name,
147+
* description, and current operational status.
148+
*
149+
* <p>You can paginate through the list by using the {@code limit} parameter to control the number
150+
* of results returned in each request.
151+
*/
152+
public static LocationCollection list(LocationListParams params) throws StripeException {
153+
return list(params, (RequestOptions) null);
154+
}
155+
156+
/**
157+
* Retrieve a list of all tax locations. Tax locations can represent the venues for services,
158+
* tickets, or other product types.
159+
*
160+
* <p>The response includes detailed information for each tax location, such as its address, name,
161+
* description, and current operational status.
162+
*
163+
* <p>You can paginate through the list by using the {@code limit} parameter to control the number
164+
* of results returned in each request.
165+
*/
166+
public static LocationCollection list(LocationListParams params, RequestOptions options)
167+
throws StripeException {
168+
String path = "/v1/tax/locations";
169+
ApiResource.checkNullTypedParams(path, params);
170+
ApiRequest request =
171+
new ApiRequest(
172+
BaseAddress.API,
173+
ApiResource.RequestMethod.GET,
174+
path,
175+
ApiRequestParams.paramsToMap(params),
176+
options);
177+
return getGlobalResponseGetter().request(request, LocationCollection.class);
178+
}
179+
180+
/**
181+
* Fetch the details of a specific tax location using its unique identifier. Use a tax location to
182+
* calculate taxes based on the location of the end product, such as a performance, instead of the
183+
* customer address. For more details, check the <a
184+
* href="https://docs.stripe.com/tax/tax-for-tickets/integration-guide">integration guide</a>.
185+
*/
186+
public static Location retrieve(String location) throws StripeException {
187+
return retrieve(location, (Map<String, Object>) null, (RequestOptions) null);
188+
}
189+
190+
/**
191+
* Fetch the details of a specific tax location using its unique identifier. Use a tax location to
192+
* calculate taxes based on the location of the end product, such as a performance, instead of the
193+
* customer address. For more details, check the <a
194+
* href="https://docs.stripe.com/tax/tax-for-tickets/integration-guide">integration guide</a>.
195+
*/
196+
public static Location retrieve(String location, RequestOptions options) throws StripeException {
197+
return retrieve(location, (Map<String, Object>) null, options);
198+
}
199+
200+
/**
201+
* Fetch the details of a specific tax location using its unique identifier. Use a tax location to
202+
* calculate taxes based on the location of the end product, such as a performance, instead of the
203+
* customer address. For more details, check the <a
204+
* href="https://docs.stripe.com/tax/tax-for-tickets/integration-guide">integration guide</a>.
205+
*/
206+
public static Location retrieve(
207+
String location, Map<String, Object> params, RequestOptions options) throws StripeException {
208+
String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location));
209+
ApiRequest request =
210+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
211+
return getGlobalResponseGetter().request(request, Location.class);
212+
}
213+
214+
/**
215+
* Fetch the details of a specific tax location using its unique identifier. Use a tax location to
216+
* calculate taxes based on the location of the end product, such as a performance, instead of the
217+
* customer address. For more details, check the <a
218+
* href="https://docs.stripe.com/tax/tax-for-tickets/integration-guide">integration guide</a>.
219+
*/
220+
public static Location retrieve(
221+
String location, LocationRetrieveParams params, RequestOptions options)
222+
throws StripeException {
223+
String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location));
224+
ApiResource.checkNullTypedParams(path, params);
225+
ApiRequest request =
226+
new ApiRequest(
227+
BaseAddress.API,
228+
ApiResource.RequestMethod.GET,
229+
path,
230+
ApiRequestParams.paramsToMap(params),
231+
options);
232+
return getGlobalResponseGetter().request(request, Location.class);
233+
}
234+
235+
@Override
236+
public void setResponseGetter(StripeResponseGetter responseGetter) {
237+
super.setResponseGetter(responseGetter);
238+
trySetResponseGetter(address, responseGetter);
239+
}
240+
}

0 commit comments

Comments
 (0)