Skip to content

Commit 13c7a50

Browse files
Update generated code for v2135 and
1 parent 4271589 commit 13c7a50

File tree

4 files changed

+212
-2
lines changed

4 files changed

+212
-2
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9f285ec0ba7c5c40b8631324c0040f43e77612a9
1+
6bb77d9eff2b7823591e32903b9e33b0ffe58c36

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2134
1+
v2135

src/main/java/com/stripe/param/ProductCreateParams.java

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ public class ProductCreateParams extends ApiRequestParams {
102102
@SerializedName("tax_code")
103103
String taxCode;
104104

105+
/**
106+
* Tax details for this product, including the <a href="https://stripe.com/tax/tax-codes">tax
107+
* code</a> and an optional performance location.
108+
*/
109+
@SerializedName("tax_details")
110+
TaxDetails taxDetails;
111+
105112
/**
106113
* The type of the product. Defaults to {@code service} if not explicitly specified, enabling use
107114
* of this product with Subscriptions and Plans. Set this parameter to {@code good} to use this
@@ -137,6 +144,7 @@ private ProductCreateParams(
137144
Boolean shippable,
138145
String statementDescriptor,
139146
String taxCode,
147+
TaxDetails taxDetails,
140148
Type type,
141149
String unitLabel,
142150
String url) {
@@ -154,6 +162,7 @@ private ProductCreateParams(
154162
this.shippable = shippable;
155163
this.statementDescriptor = statementDescriptor;
156164
this.taxCode = taxCode;
165+
this.taxDetails = taxDetails;
157166
this.type = type;
158167
this.unitLabel = unitLabel;
159168
this.url = url;
@@ -192,6 +201,8 @@ public static class Builder {
192201

193202
private String taxCode;
194203

204+
private TaxDetails taxDetails;
205+
195206
private Type type;
196207

197208
private String unitLabel;
@@ -215,6 +226,7 @@ public ProductCreateParams build() {
215226
this.shippable,
216227
this.statementDescriptor,
217228
this.taxCode,
229+
this.taxDetails,
218230
this.type,
219231
this.unitLabel,
220232
this.url);
@@ -423,6 +435,15 @@ public Builder setTaxCode(String taxCode) {
423435
return this;
424436
}
425437

438+
/**
439+
* Tax details for this product, including the <a href="https://stripe.com/tax/tax-codes">tax
440+
* code</a> and an optional performance location.
441+
*/
442+
public Builder setTaxDetails(ProductCreateParams.TaxDetails taxDetails) {
443+
this.taxDetails = taxDetails;
444+
return this;
445+
}
446+
426447
/**
427448
* The type of the product. Defaults to {@code service} if not explicitly specified, enabling
428449
* use of this product with Subscriptions and Plans. Set this parameter to {@code good} to use
@@ -1711,6 +1732,81 @@ public Builder setWidth(BigDecimal width) {
17111732
}
17121733
}
17131734

1735+
@Getter
1736+
@EqualsAndHashCode(callSuper = false)
1737+
public static class TaxDetails {
1738+
/**
1739+
* Map of extra parameters for custom features not available in this client library. The content
1740+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1741+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
1742+
* param object. Effectively, this map is flattened to its parent instance.
1743+
*/
1744+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1745+
Map<String, Object> extraParams;
1746+
1747+
/**
1748+
* <strong>Required.</strong> A <a href="https://docs.stripe.com/tax/tax-categories">tax
1749+
* code</a> ID.
1750+
*/
1751+
@SerializedName("tax_code")
1752+
String taxCode;
1753+
1754+
private TaxDetails(Map<String, Object> extraParams, String taxCode) {
1755+
this.extraParams = extraParams;
1756+
this.taxCode = taxCode;
1757+
}
1758+
1759+
public static Builder builder() {
1760+
return new Builder();
1761+
}
1762+
1763+
public static class Builder {
1764+
private Map<String, Object> extraParams;
1765+
1766+
private String taxCode;
1767+
1768+
/** Finalize and obtain parameter instance from this builder. */
1769+
public ProductCreateParams.TaxDetails build() {
1770+
return new ProductCreateParams.TaxDetails(this.extraParams, this.taxCode);
1771+
}
1772+
1773+
/**
1774+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1775+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
1776+
* ProductCreateParams.TaxDetails#extraParams} for the field documentation.
1777+
*/
1778+
public Builder putExtraParam(String key, Object value) {
1779+
if (this.extraParams == null) {
1780+
this.extraParams = new HashMap<>();
1781+
}
1782+
this.extraParams.put(key, value);
1783+
return this;
1784+
}
1785+
1786+
/**
1787+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1788+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1789+
* See {@link ProductCreateParams.TaxDetails#extraParams} for the field documentation.
1790+
*/
1791+
public Builder putAllExtraParam(Map<String, Object> map) {
1792+
if (this.extraParams == null) {
1793+
this.extraParams = new HashMap<>();
1794+
}
1795+
this.extraParams.putAll(map);
1796+
return this;
1797+
}
1798+
1799+
/**
1800+
* <strong>Required.</strong> A <a href="https://docs.stripe.com/tax/tax-categories">tax
1801+
* code</a> ID.
1802+
*/
1803+
public Builder setTaxCode(String taxCode) {
1804+
this.taxCode = taxCode;
1805+
return this;
1806+
}
1807+
}
1808+
}
1809+
17141810
public enum Type implements ApiRequestParams.EnumParam {
17151811
@SerializedName("good")
17161812
GOOD("good"),

src/main/java/com/stripe/param/ProductUpdateParams.java

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ public class ProductUpdateParams extends ApiRequestParams {
9696
@SerializedName("tax_code")
9797
Object taxCode;
9898

99+
/**
100+
* Tax details for this product, including the <a href="https://stripe.com/tax/tax-codes">tax
101+
* code</a> and an optional performance location.
102+
*/
103+
@SerializedName("tax_details")
104+
Object taxDetails;
105+
99106
/**
100107
* A label that represents units of this product. When set, this will be included in customers'
101108
* receipts, invoices, Checkout, and the customer portal. May only be set if {@code type=service}.
@@ -121,6 +128,7 @@ private ProductUpdateParams(
121128
Boolean shippable,
122129
Object statementDescriptor,
123130
Object taxCode,
131+
Object taxDetails,
124132
Object unitLabel,
125133
Object url) {
126134
this.active = active;
@@ -136,6 +144,7 @@ private ProductUpdateParams(
136144
this.shippable = shippable;
137145
this.statementDescriptor = statementDescriptor;
138146
this.taxCode = taxCode;
147+
this.taxDetails = taxDetails;
139148
this.unitLabel = unitLabel;
140149
this.url = url;
141150
}
@@ -171,6 +180,8 @@ public static class Builder {
171180

172181
private Object taxCode;
173182

183+
private Object taxDetails;
184+
174185
private Object unitLabel;
175186

176187
private Object url;
@@ -191,6 +202,7 @@ public ProductUpdateParams build() {
191202
this.shippable,
192203
this.statementDescriptor,
193204
this.taxCode,
205+
this.taxDetails,
194206
this.unitLabel,
195207
this.url);
196208
}
@@ -506,6 +518,24 @@ public Builder setTaxCode(EmptyParam taxCode) {
506518
return this;
507519
}
508520

521+
/**
522+
* Tax details for this product, including the <a href="https://stripe.com/tax/tax-codes">tax
523+
* code</a> and an optional performance location.
524+
*/
525+
public Builder setTaxDetails(ProductUpdateParams.TaxDetails taxDetails) {
526+
this.taxDetails = taxDetails;
527+
return this;
528+
}
529+
530+
/**
531+
* Tax details for this product, including the <a href="https://stripe.com/tax/tax-codes">tax
532+
* code</a> and an optional performance location.
533+
*/
534+
public Builder setTaxDetails(EmptyParam taxDetails) {
535+
this.taxDetails = taxDetails;
536+
return this;
537+
}
538+
509539
/**
510540
* A label that represents units of this product. When set, this will be included in customers'
511541
* receipts, invoices, Checkout, and the customer portal. May only be set if {@code
@@ -727,4 +757,88 @@ public Builder setWidth(BigDecimal width) {
727757
}
728758
}
729759
}
760+
761+
@Getter
762+
@EqualsAndHashCode(callSuper = false)
763+
public static class TaxDetails {
764+
/**
765+
* Map of extra parameters for custom features not available in this client library. The content
766+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
767+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
768+
* param object. Effectively, this map is flattened to its parent instance.
769+
*/
770+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
771+
Map<String, Object> extraParams;
772+
773+
/**
774+
* <strong>Required.</strong> A <a href="https://docs.stripe.com/tax/tax-categories">tax
775+
* code</a> ID.
776+
*/
777+
@SerializedName("tax_code")
778+
Object taxCode;
779+
780+
private TaxDetails(Map<String, Object> extraParams, Object taxCode) {
781+
this.extraParams = extraParams;
782+
this.taxCode = taxCode;
783+
}
784+
785+
public static Builder builder() {
786+
return new Builder();
787+
}
788+
789+
public static class Builder {
790+
private Map<String, Object> extraParams;
791+
792+
private Object taxCode;
793+
794+
/** Finalize and obtain parameter instance from this builder. */
795+
public ProductUpdateParams.TaxDetails build() {
796+
return new ProductUpdateParams.TaxDetails(this.extraParams, this.taxCode);
797+
}
798+
799+
/**
800+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
801+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
802+
* ProductUpdateParams.TaxDetails#extraParams} for the field documentation.
803+
*/
804+
public Builder putExtraParam(String key, Object value) {
805+
if (this.extraParams == null) {
806+
this.extraParams = new HashMap<>();
807+
}
808+
this.extraParams.put(key, value);
809+
return this;
810+
}
811+
812+
/**
813+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
814+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
815+
* See {@link ProductUpdateParams.TaxDetails#extraParams} for the field documentation.
816+
*/
817+
public Builder putAllExtraParam(Map<String, Object> map) {
818+
if (this.extraParams == null) {
819+
this.extraParams = new HashMap<>();
820+
}
821+
this.extraParams.putAll(map);
822+
return this;
823+
}
824+
825+
/**
826+
* <strong>Required.</strong> A <a href="https://docs.stripe.com/tax/tax-categories">tax
827+
* code</a> ID.
828+
*/
829+
public Builder setTaxCode(String taxCode) {
830+
this.taxCode = taxCode;
831+
return this;
832+
}
833+
834+
/**
835+
* <strong>Required.</strong> A <a href="https://docs.stripe.com/tax/tax-categories">tax
836+
* code</a> ID.
837+
*/
838+
public Builder setTaxCode(EmptyParam taxCode) {
839+
this.taxCode = taxCode;
840+
return this;
841+
}
842+
}
843+
}
730844
}

0 commit comments

Comments
 (0)