Skip to content

Commit 6cb7a36

Browse files
Update generated code for v760
1 parent fb08be6 commit 6cb7a36

File tree

2 files changed

+84
-1
lines changed

2 files changed

+84
-1
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v758
1+
v760

src/main/java/com/stripe/param/issuing/CardCreateParams.java

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public class CardCreateParams extends ApiRequestParams {
4747
@SerializedName("metadata")
4848
Map<String, String> metadata;
4949

50+
/** The desired PIN for this card. */
51+
@SerializedName("pin")
52+
Pin pin;
53+
5054
/** The card this is meant to be a replacement for (if any). */
5155
@SerializedName("replacement_for")
5256
String replacementFor;
@@ -90,6 +94,7 @@ private CardCreateParams(
9094
Map<String, Object> extraParams,
9195
String financialAccount,
9296
Map<String, String> metadata,
97+
Pin pin,
9398
String replacementFor,
9499
ReplacementReason replacementReason,
95100
Shipping shipping,
@@ -102,6 +107,7 @@ private CardCreateParams(
102107
this.extraParams = extraParams;
103108
this.financialAccount = financialAccount;
104109
this.metadata = metadata;
110+
this.pin = pin;
105111
this.replacementFor = replacementFor;
106112
this.replacementReason = replacementReason;
107113
this.shipping = shipping;
@@ -127,6 +133,8 @@ public static class Builder {
127133

128134
private Map<String, String> metadata;
129135

136+
private Pin pin;
137+
130138
private String replacementFor;
131139

132140
private ReplacementReason replacementReason;
@@ -148,6 +156,7 @@ public CardCreateParams build() {
148156
this.extraParams,
149157
this.financialAccount,
150158
this.metadata,
159+
this.pin,
151160
this.replacementFor,
152161
this.replacementReason,
153162
this.shipping,
@@ -254,6 +263,12 @@ public Builder putAllMetadata(Map<String, String> map) {
254263
return this;
255264
}
256265

266+
/** The desired PIN for this card. */
267+
public Builder setPin(CardCreateParams.Pin pin) {
268+
this.pin = pin;
269+
return this;
270+
}
271+
257272
/** The card this is meant to be a replacement for (if any). */
258273
public Builder setReplacementFor(String replacementFor) {
259274
this.replacementFor = replacementFor;
@@ -304,6 +319,74 @@ public Builder setType(CardCreateParams.Type type) {
304319
}
305320
}
306321

322+
@Getter
323+
public static class Pin {
324+
/** The card's desired new PIN, encrypted under Stripe's public key. */
325+
@SerializedName("encrypted_number")
326+
String encryptedNumber;
327+
328+
/**
329+
* Map of extra parameters for custom features not available in this client library. The content
330+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
331+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
332+
* param object. Effectively, this map is flattened to its parent instance.
333+
*/
334+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
335+
Map<String, Object> extraParams;
336+
337+
private Pin(String encryptedNumber, Map<String, Object> extraParams) {
338+
this.encryptedNumber = encryptedNumber;
339+
this.extraParams = extraParams;
340+
}
341+
342+
public static Builder builder() {
343+
return new Builder();
344+
}
345+
346+
public static class Builder {
347+
private String encryptedNumber;
348+
349+
private Map<String, Object> extraParams;
350+
351+
/** Finalize and obtain parameter instance from this builder. */
352+
public CardCreateParams.Pin build() {
353+
return new CardCreateParams.Pin(this.encryptedNumber, this.extraParams);
354+
}
355+
356+
/** The card's desired new PIN, encrypted under Stripe's public key. */
357+
public Builder setEncryptedNumber(String encryptedNumber) {
358+
this.encryptedNumber = encryptedNumber;
359+
return this;
360+
}
361+
362+
/**
363+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
364+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
365+
* CardCreateParams.Pin#extraParams} for the field documentation.
366+
*/
367+
public Builder putExtraParam(String key, Object value) {
368+
if (this.extraParams == null) {
369+
this.extraParams = new HashMap<>();
370+
}
371+
this.extraParams.put(key, value);
372+
return this;
373+
}
374+
375+
/**
376+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
377+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
378+
* See {@link CardCreateParams.Pin#extraParams} for the field documentation.
379+
*/
380+
public Builder putAllExtraParam(Map<String, Object> map) {
381+
if (this.extraParams == null) {
382+
this.extraParams = new HashMap<>();
383+
}
384+
this.extraParams.putAll(map);
385+
return this;
386+
}
387+
}
388+
}
389+
307390
@Getter
308391
public static class Shipping {
309392
/** <strong>Required.</strong> The address that the card is shipped to. */

0 commit comments

Comments
 (0)