Skip to content

Commit

Permalink
Merge upstream and update generated code for v1439
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Jan 10, 2025
2 parents fc96887 + 7e9d703 commit 2a4d05a
Show file tree
Hide file tree
Showing 4 changed files with 352 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1436
v1439
27 changes: 27 additions & 0 deletions src/main/java/com/stripe/model/terminal/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ public static class Tipping extends StripeObject {
@SerializedName("hkd")
Hkd hkd;

@SerializedName("jpy")
Jpy jpy;

@SerializedName("myr")
Myr myr;

Expand Down Expand Up @@ -594,6 +597,30 @@ public static class Hkd extends StripeObject {
Long smartTipThreshold;
}

/**
* For more details about Jpy, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
*/
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Jpy extends StripeObject {
/** Fixed amounts displayed when collecting a tip. */
@SerializedName("fixed_amounts")
List<Long> fixedAmounts;

/** Percentages displayed when collecting a tip. */
@SerializedName("percentages")
List<Long> percentages;

/**
* Below this amount, fixed amounts will be displayed; above it, percentages will be
* displayed.
*/
@SerializedName("smart_tip_threshold")
Long smartTipThreshold;
}

/**
* For more details about Myr, please refer to the <a href="https://docs.stripe.com/api">API
* Reference.</a>
Expand Down
162 changes: 162 additions & 0 deletions src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ public static class Tipping {
@SerializedName("hkd")
Hkd hkd;

/** Tipping configuration for JPY. */
@SerializedName("jpy")
Jpy jpy;

/** Tipping configuration for MYR. */
@SerializedName("myr")
Myr myr;
Expand Down Expand Up @@ -616,6 +620,7 @@ private Tipping(
Map<String, Object> extraParams,
Gbp gbp,
Hkd hkd,
Jpy jpy,
Myr myr,
Nok nok,
Nzd nzd,
Expand All @@ -632,6 +637,7 @@ private Tipping(
this.extraParams = extraParams;
this.gbp = gbp;
this.hkd = hkd;
this.jpy = jpy;
this.myr = myr;
this.nok = nok;
this.nzd = nzd;
Expand Down Expand Up @@ -664,6 +670,8 @@ public static class Builder {

private Hkd hkd;

private Jpy jpy;

private Myr myr;

private Nok nok;
Expand All @@ -690,6 +698,7 @@ public ConfigurationCreateParams.Tipping build() {
this.extraParams,
this.gbp,
this.hkd,
this.jpy,
this.myr,
this.nok,
this.nzd,
Expand Down Expand Up @@ -773,6 +782,12 @@ public Builder setHkd(ConfigurationCreateParams.Tipping.Hkd hkd) {
return this;
}

/** Tipping configuration for JPY. */
public Builder setJpy(ConfigurationCreateParams.Tipping.Jpy jpy) {
this.jpy = jpy;
return this;
}

/** Tipping configuration for MYR. */
public Builder setMyr(ConfigurationCreateParams.Tipping.Myr myr) {
this.myr = myr;
Expand Down Expand Up @@ -1992,6 +2007,153 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) {
}
}

@Getter
public static class Jpy {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** Fixed amounts displayed when collecting a tip. */
@SerializedName("fixed_amounts")
List<Long> fixedAmounts;

/** Percentages displayed when collecting a tip. */
@SerializedName("percentages")
List<Long> percentages;

/**
* Below this amount, fixed amounts will be displayed; above it, percentages will be
* displayed.
*/
@SerializedName("smart_tip_threshold")
Long smartTipThreshold;

private Jpy(
Map<String, Object> extraParams,
List<Long> fixedAmounts,
List<Long> percentages,
Long smartTipThreshold) {
this.extraParams = extraParams;
this.fixedAmounts = fixedAmounts;
this.percentages = percentages;
this.smartTipThreshold = smartTipThreshold;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Map<String, Object> extraParams;

private List<Long> fixedAmounts;

private List<Long> percentages;

private Long smartTipThreshold;

/** Finalize and obtain parameter instance from this builder. */
public ConfigurationCreateParams.Tipping.Jpy build() {
return new ConfigurationCreateParams.Tipping.Jpy(
this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold);
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link ConfigurationCreateParams.Tipping.Jpy#extraParams} for the field
* documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link ConfigurationCreateParams.Tipping.Jpy#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}

/**
* Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation.
*/
public Builder addFixedAmount(Long element) {
if (this.fixedAmounts == null) {
this.fixedAmounts = new ArrayList<>();
}
this.fixedAmounts.add(element);
return this;
}

/**
* Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* ConfigurationCreateParams.Tipping.Jpy#fixedAmounts} for the field documentation.
*/
public Builder addAllFixedAmount(List<Long> elements) {
if (this.fixedAmounts == null) {
this.fixedAmounts = new ArrayList<>();
}
this.fixedAmounts.addAll(elements);
return this;
}

/**
* Add an element to `percentages` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation.
*/
public Builder addPercentage(Long element) {
if (this.percentages == null) {
this.percentages = new ArrayList<>();
}
this.percentages.add(element);
return this;
}

/**
* Add all elements to `percentages` list. A list is initialized for the first `add/addAll`
* call, and subsequent calls adds additional elements to the original list. See {@link
* ConfigurationCreateParams.Tipping.Jpy#percentages} for the field documentation.
*/
public Builder addAllPercentage(List<Long> elements) {
if (this.percentages == null) {
this.percentages = new ArrayList<>();
}
this.percentages.addAll(elements);
return this;
}

/**
* Below this amount, fixed amounts will be displayed; above it, percentages will be
* displayed.
*/
public Builder setSmartTipThreshold(Long smartTipThreshold) {
this.smartTipThreshold = smartTipThreshold;
return this;
}
}
}

@Getter
public static class Myr {
/**
Expand Down
Loading

0 comments on commit 2a4d05a

Please sign in to comment.