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

stripe / stripe-java / #16493

03 Oct 2024 07:15PM UTC coverage: 12.942% (+0.08%) from 12.864%
#16493

push

github

web-flow
Merge Stripe-java v27.0.0 to beta branch (#1888)

409 of 1651 new or added lines in 88 files covered. (24.77%)

31 existing lines in 7 files now uncovered.

18773 of 145050 relevant lines covered (12.94%)

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/terminal/ReaderProcessSetupIntentParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.terminal;
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 ReaderProcessSetupIntentParams extends ApiRequestParams {
14
  /**
15
   * <strong>Required.</strong> This field indicates whether this payment method can be shown again
16
   * to its customer in a checkout flow. Stripe products such as Checkout and Elements use this
17
   * field to determine whether a payment method can be shown as a saved payment method in a
18
   * checkout flow.
19
   */
20
  @SerializedName("allow_redisplay")
21
  AllowRedisplay allowRedisplay;
22

23
  /** Specifies which fields in the response should be expanded. */
24
  @SerializedName("expand")
25
  List<String> expand;
26

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

36
  /** Configuration overrides. */
37
  @SerializedName("process_config")
38
  ProcessConfig processConfig;
39

40
  /** <strong>Required.</strong> SetupIntent ID */
41
  @SerializedName("setup_intent")
42
  String setupIntent;
43

44
  private ReaderProcessSetupIntentParams(
45
      AllowRedisplay allowRedisplay,
46
      List<String> expand,
47
      Map<String, Object> extraParams,
48
      ProcessConfig processConfig,
UNCOV
49
      String setupIntent) {
×
NEW
50
    this.allowRedisplay = allowRedisplay;
×
UNCOV
51
    this.expand = expand;
×
UNCOV
52
    this.extraParams = extraParams;
×
UNCOV
53
    this.processConfig = processConfig;
×
UNCOV
54
    this.setupIntent = setupIntent;
×
UNCOV
55
  }
×
56

57
  public static Builder builder() {
UNCOV
58
    return new Builder();
×
59
  }
60

UNCOV
61
  public static class Builder {
×
62
    private AllowRedisplay allowRedisplay;
63

64
    private List<String> expand;
65

66
    private Map<String, Object> extraParams;
67

68
    private ProcessConfig processConfig;
69

70
    private String setupIntent;
71

72
    /** Finalize and obtain parameter instance from this builder. */
73
    public ReaderProcessSetupIntentParams build() {
UNCOV
74
      return new ReaderProcessSetupIntentParams(
×
75
          this.allowRedisplay, this.expand, this.extraParams, this.processConfig, this.setupIntent);
76
    }
77

78
    /**
79
     * <strong>Required.</strong> This field indicates whether this payment method can be shown
80
     * again to its customer in a checkout flow. Stripe products such as Checkout and Elements use
81
     * this field to determine whether a payment method can be shown as a saved payment method in a
82
     * checkout flow.
83
     */
84
    public Builder setAllowRedisplay(ReaderProcessSetupIntentParams.AllowRedisplay allowRedisplay) {
NEW
85
      this.allowRedisplay = allowRedisplay;
×
UNCOV
86
      return this;
×
87
    }
88

89
    /**
90
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
91
     * subsequent calls adds additional elements to the original list. See {@link
92
     * ReaderProcessSetupIntentParams#expand} for the field documentation.
93
     */
94
    public Builder addExpand(String element) {
95
      if (this.expand == null) {
×
96
        this.expand = new ArrayList<>();
×
97
      }
98
      this.expand.add(element);
×
99
      return this;
×
100
    }
101

102
    /**
103
     * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and
104
     * subsequent calls adds additional elements to the original list. See {@link
105
     * ReaderProcessSetupIntentParams#expand} for the field documentation.
106
     */
107
    public Builder addAllExpand(List<String> elements) {
108
      if (this.expand == null) {
×
109
        this.expand = new ArrayList<>();
×
110
      }
111
      this.expand.addAll(elements);
×
112
      return this;
×
113
    }
114

115
    /**
116
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
117
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
118
     * ReaderProcessSetupIntentParams#extraParams} for the field documentation.
119
     */
120
    public Builder putExtraParam(String key, Object value) {
121
      if (this.extraParams == null) {
×
122
        this.extraParams = new HashMap<>();
×
123
      }
124
      this.extraParams.put(key, value);
×
125
      return this;
×
126
    }
127

128
    /**
129
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
130
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
131
     * See {@link ReaderProcessSetupIntentParams#extraParams} for the field documentation.
132
     */
133
    public Builder putAllExtraParam(Map<String, Object> map) {
134
      if (this.extraParams == null) {
×
135
        this.extraParams = new HashMap<>();
×
136
      }
137
      this.extraParams.putAll(map);
×
138
      return this;
×
139
    }
140

141
    /** Configuration overrides. */
142
    public Builder setProcessConfig(ReaderProcessSetupIntentParams.ProcessConfig processConfig) {
143
      this.processConfig = processConfig;
×
144
      return this;
×
145
    }
146

147
    /** <strong>Required.</strong> SetupIntent ID */
148
    public Builder setSetupIntent(String setupIntent) {
UNCOV
149
      this.setupIntent = setupIntent;
×
UNCOV
150
      return this;
×
151
    }
152
  }
153

154
  @Getter
155
  public static class ProcessConfig {
156
    /** Enables cancel button on transaction screens. */
157
    @SerializedName("enable_customer_cancellation")
158
    Boolean enableCustomerCancellation;
159

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

169
    private ProcessConfig(Boolean enableCustomerCancellation, Map<String, Object> extraParams) {
×
170
      this.enableCustomerCancellation = enableCustomerCancellation;
×
171
      this.extraParams = extraParams;
×
172
    }
×
173

174
    public static Builder builder() {
175
      return new Builder();
×
176
    }
177

178
    public static class Builder {
×
179
      private Boolean enableCustomerCancellation;
180

181
      private Map<String, Object> extraParams;
182

183
      /** Finalize and obtain parameter instance from this builder. */
184
      public ReaderProcessSetupIntentParams.ProcessConfig build() {
185
        return new ReaderProcessSetupIntentParams.ProcessConfig(
×
186
            this.enableCustomerCancellation, this.extraParams);
187
      }
188

189
      /** Enables cancel button on transaction screens. */
190
      public Builder setEnableCustomerCancellation(Boolean enableCustomerCancellation) {
191
        this.enableCustomerCancellation = enableCustomerCancellation;
×
192
        return this;
×
193
      }
194

195
      /**
196
       * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
197
       * call, and subsequent calls add additional key/value pairs to the original map. See {@link
198
       * ReaderProcessSetupIntentParams.ProcessConfig#extraParams} for the field documentation.
199
       */
200
      public Builder putExtraParam(String key, Object value) {
201
        if (this.extraParams == null) {
×
202
          this.extraParams = new HashMap<>();
×
203
        }
204
        this.extraParams.put(key, value);
×
205
        return this;
×
206
      }
207

208
      /**
209
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
210
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
211
       * See {@link ReaderProcessSetupIntentParams.ProcessConfig#extraParams} for the field
212
       * documentation.
213
       */
214
      public Builder putAllExtraParam(Map<String, Object> map) {
215
        if (this.extraParams == null) {
×
216
          this.extraParams = new HashMap<>();
×
217
        }
218
        this.extraParams.putAll(map);
×
219
        return this;
×
220
      }
221
    }
222
  }
223

NEW
224
  public enum AllowRedisplay implements ApiRequestParams.EnumParam {
×
NEW
225
    @SerializedName("always")
×
226
    ALWAYS("always"),
227

NEW
228
    @SerializedName("limited")
×
229
    LIMITED("limited"),
230

NEW
231
    @SerializedName("unspecified")
×
232
    UNSPECIFIED("unspecified");
233

234
    @Getter(onMethod_ = {@Override})
235
    private final String value;
236

NEW
237
    AllowRedisplay(String value) {
×
NEW
238
      this.value = value;
×
NEW
239
    }
×
240
  }
241
}
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