• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stripe / stripe-java / #16599

29 Oct 2024 11:04PM UTC coverage: 12.519% (-0.1%) from 12.62%
#16599

push

github

web-flow
Merge pull request #1914 from stripe/latest-codegen-beta

Update generated code for beta

40 of 1580 new or added lines in 51 files covered. (2.53%)

19 existing lines in 15 files now uncovered.

18843 of 150513 relevant lines covered (12.52%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/stripe/param/PaymentIntentTriggerActionParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.net.ApiRequestParams;
6
import java.util.ArrayList;
7
import java.util.HashMap;
8
import java.util.List;
9
import java.util.Map;
10
import lombok.Getter;
11

12
@Getter
13
public class PaymentIntentTriggerActionParams extends ApiRequestParams {
14
  /** Specifies which fields in the response should be expanded. */
15
  @SerializedName("expand")
16
  List<String> expand;
17

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

27
  /** True to simulate success, false to simulate failure. */
28
  @SerializedName("scan_qr_code")
29
  ScanQrCode scanQrCode;
30

31
  /** <strong>Required.</strong> The type of action to be simulated. */
32
  @SerializedName("type")
33
  Type type;
34

35
  private PaymentIntentTriggerActionParams(
NEW
36
      List<String> expand, Map<String, Object> extraParams, ScanQrCode scanQrCode, Type type) {
×
NEW
37
    this.expand = expand;
×
NEW
38
    this.extraParams = extraParams;
×
NEW
39
    this.scanQrCode = scanQrCode;
×
NEW
40
    this.type = type;
×
NEW
41
  }
×
42

43
  public static Builder builder() {
NEW
44
    return new Builder();
×
45
  }
46

NEW
47
  public static class Builder {
×
48
    private List<String> expand;
49

50
    private Map<String, Object> extraParams;
51

52
    private ScanQrCode scanQrCode;
53

54
    private Type type;
55

56
    /** Finalize and obtain parameter instance from this builder. */
57
    public PaymentIntentTriggerActionParams build() {
NEW
58
      return new PaymentIntentTriggerActionParams(
×
59
          this.expand, this.extraParams, this.scanQrCode, this.type);
60
    }
61

62
    /**
63
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
64
     * subsequent calls adds additional elements to the original list. See {@link
65
     * PaymentIntentTriggerActionParams#expand} for the field documentation.
66
     */
67
    public Builder addExpand(String element) {
NEW
68
      if (this.expand == null) {
×
NEW
69
        this.expand = new ArrayList<>();
×
70
      }
NEW
71
      this.expand.add(element);
×
NEW
72
      return this;
×
73
    }
74

75
    /**
76
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
77
     * subsequent calls adds additional elements to the original list. See {@link
78
     * PaymentIntentTriggerActionParams#expand} for the field documentation.
79
     */
80
    public Builder addAllExpand(List<String> elements) {
NEW
81
      if (this.expand == null) {
×
NEW
82
        this.expand = new ArrayList<>();
×
83
      }
NEW
84
      this.expand.addAll(elements);
×
NEW
85
      return this;
×
86
    }
87

88
    /**
89
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
90
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
91
     * PaymentIntentTriggerActionParams#extraParams} for the field documentation.
92
     */
93
    public Builder putExtraParam(String key, Object value) {
NEW
94
      if (this.extraParams == null) {
×
NEW
95
        this.extraParams = new HashMap<>();
×
96
      }
NEW
97
      this.extraParams.put(key, value);
×
NEW
98
      return this;
×
99
    }
100

101
    /**
102
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
103
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
104
     * See {@link PaymentIntentTriggerActionParams#extraParams} for the field documentation.
105
     */
106
    public Builder putAllExtraParam(Map<String, Object> map) {
NEW
107
      if (this.extraParams == null) {
×
NEW
108
        this.extraParams = new HashMap<>();
×
109
      }
NEW
110
      this.extraParams.putAll(map);
×
NEW
111
      return this;
×
112
    }
113

114
    /** True to simulate success, false to simulate failure. */
115
    public Builder setScanQrCode(PaymentIntentTriggerActionParams.ScanQrCode scanQrCode) {
NEW
116
      this.scanQrCode = scanQrCode;
×
NEW
117
      return this;
×
118
    }
119

120
    /** <strong>Required.</strong> The type of action to be simulated. */
121
    public Builder setType(PaymentIntentTriggerActionParams.Type type) {
NEW
122
      this.type = type;
×
NEW
123
      return this;
×
124
    }
125
  }
126

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

138
    /** Whether the QR Code scan's payment should succeed or fail. */
139
    @SerializedName("result")
140
    Result result;
141

NEW
142
    private ScanQrCode(Map<String, Object> extraParams, Result result) {
×
NEW
143
      this.extraParams = extraParams;
×
NEW
144
      this.result = result;
×
NEW
145
    }
×
146

147
    public static Builder builder() {
NEW
148
      return new Builder();
×
149
    }
150

NEW
151
    public static class Builder {
×
152
      private Map<String, Object> extraParams;
153

154
      private Result result;
155

156
      /** Finalize and obtain parameter instance from this builder. */
157
      public PaymentIntentTriggerActionParams.ScanQrCode build() {
NEW
158
        return new PaymentIntentTriggerActionParams.ScanQrCode(this.extraParams, this.result);
×
159
      }
160

161
      /**
162
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
163
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
164
       * PaymentIntentTriggerActionParams.ScanQrCode#extraParams} for the field documentation.
165
       */
166
      public Builder putExtraParam(String key, Object value) {
NEW
167
        if (this.extraParams == null) {
×
NEW
168
          this.extraParams = new HashMap<>();
×
169
        }
NEW
170
        this.extraParams.put(key, value);
×
NEW
171
        return this;
×
172
      }
173

174
      /**
175
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
176
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
177
       * See {@link PaymentIntentTriggerActionParams.ScanQrCode#extraParams} for the field
178
       * documentation.
179
       */
180
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
181
        if (this.extraParams == null) {
×
NEW
182
          this.extraParams = new HashMap<>();
×
183
        }
NEW
184
        this.extraParams.putAll(map);
×
NEW
185
        return this;
×
186
      }
187

188
      /** Whether the QR Code scan's payment should succeed or fail. */
189
      public Builder setResult(PaymentIntentTriggerActionParams.ScanQrCode.Result result) {
NEW
190
        this.result = result;
×
NEW
191
        return this;
×
192
      }
193
    }
194

NEW
195
    public enum Result implements ApiRequestParams.EnumParam {
×
NEW
196
      @SerializedName("failure")
×
197
      FAILURE("failure"),
198

NEW
199
      @SerializedName("success")
×
200
      SUCCESS("success");
201

202
      @Getter(onMethod_ = {@Override})
203
      private final String value;
204

NEW
205
      Result(String value) {
×
NEW
206
        this.value = value;
×
NEW
207
      }
×
208
    }
209
  }
210

NEW
211
  public enum Type implements ApiRequestParams.EnumParam {
×
NEW
212
    @SerializedName("expire")
×
213
    EXPIRE("expire"),
214

NEW
215
    @SerializedName("fund")
×
216
    FUND("fund");
217

218
    @Getter(onMethod_ = {@Override})
219
    private final String value;
220

NEW
221
    Type(String value) {
×
NEW
222
      this.value = value;
×
NEW
223
    }
×
224
  }
225
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc