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

stripe / stripe-java / #16727

09 Jan 2025 09:36PM UTC coverage: 12.34% (-0.04%) from 12.384%
#16727

push

github

web-flow
Update generated code for beta (#1932)

* Update generated code for v1407

* Update generated code for v1408

* Update generated code for v1409

* Update generated code for v1410

* Update generated code for v1411

* Update generated code for v1413

* Update generated code for v1414

* Update generated code for v1415

* Update generated code for v1416

* Update generated code (#1931)

* Update generated code for v1399

* Update generated code for v1402

* Update generated code for v1409

* Update generated code for v1412

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>

* Bump version to 28.2.0

* Added pull request template (#1933)

* Update generated code for v1423

* Update generated code for v1429

* Update generated code for v1430

* Update generated code for v1431

* Update generated code for v1432

* Update generated code for v1433

* Update generated code for v1435

* Update generated code for v1436

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Jesse Rosalia <jar@stripe.com>

30 of 1359 new or added lines in 26 files covered. (2.21%)

45 existing lines in 12 files now uncovered.

18906 of 153209 relevant lines covered (12.34%)

0.12 hits per line

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

0.0
/src/main/java/com/stripe/param/treasury/FinancialAccountCloseParams.java
1
// File generated from our OpenAPI spec
2
package com.stripe.param.treasury;
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 FinancialAccountCloseParams 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
  /**
28
   * A different bank account where funds can be deposited/debited in order to get the closing FA's
29
   * balance to $0.
30
   */
31
  @SerializedName("forwarding_settings")
32
  ForwardingSettings forwardingSettings;
33

34
  private FinancialAccountCloseParams(
NEW
35
      List<String> expand, Map<String, Object> extraParams, ForwardingSettings forwardingSettings) {
×
NEW
36
    this.expand = expand;
×
NEW
37
    this.extraParams = extraParams;
×
NEW
38
    this.forwardingSettings = forwardingSettings;
×
NEW
39
  }
×
40

41
  public static Builder builder() {
NEW
42
    return new Builder();
×
43
  }
44

NEW
45
  public static class Builder {
×
46
    private List<String> expand;
47

48
    private Map<String, Object> extraParams;
49

50
    private ForwardingSettings forwardingSettings;
51

52
    /** Finalize and obtain parameter instance from this builder. */
53
    public FinancialAccountCloseParams build() {
NEW
54
      return new FinancialAccountCloseParams(
×
55
          this.expand, this.extraParams, this.forwardingSettings);
56
    }
57

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

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

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

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

110
    /**
111
     * A different bank account where funds can be deposited/debited in order to get the closing
112
     * FA's balance to $0.
113
     */
114
    public Builder setForwardingSettings(
115
        FinancialAccountCloseParams.ForwardingSettings forwardingSettings) {
NEW
116
      this.forwardingSettings = forwardingSettings;
×
NEW
117
      return this;
×
118
    }
119
  }
120

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

132
    /** The financial_account id. */
133
    @SerializedName("financial_account")
134
    String financialAccount;
135

136
    /** The payment_method or bank account id. This needs to be a verified bank account. */
137
    @SerializedName("payment_method")
138
    String paymentMethod;
139

140
    /**
141
     * <strong>Required.</strong> The type of the bank account provided. This can be either
142
     * &quot;financial_account&quot; or &quot;payment_method&quot;
143
     */
144
    @SerializedName("type")
145
    Type type;
146

147
    private ForwardingSettings(
NEW
148
        Map<String, Object> extraParams, String financialAccount, String paymentMethod, Type type) {
×
NEW
149
      this.extraParams = extraParams;
×
NEW
150
      this.financialAccount = financialAccount;
×
NEW
151
      this.paymentMethod = paymentMethod;
×
NEW
152
      this.type = type;
×
NEW
153
    }
×
154

155
    public static Builder builder() {
NEW
156
      return new Builder();
×
157
    }
158

NEW
159
    public static class Builder {
×
160
      private Map<String, Object> extraParams;
161

162
      private String financialAccount;
163

164
      private String paymentMethod;
165

166
      private Type type;
167

168
      /** Finalize and obtain parameter instance from this builder. */
169
      public FinancialAccountCloseParams.ForwardingSettings build() {
NEW
170
        return new FinancialAccountCloseParams.ForwardingSettings(
×
171
            this.extraParams, this.financialAccount, this.paymentMethod, this.type);
172
      }
173

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

187
      /**
188
       * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
189
       * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
190
       * See {@link FinancialAccountCloseParams.ForwardingSettings#extraParams} for the field
191
       * documentation.
192
       */
193
      public Builder putAllExtraParam(Map<String, Object> map) {
NEW
194
        if (this.extraParams == null) {
×
NEW
195
          this.extraParams = new HashMap<>();
×
196
        }
NEW
197
        this.extraParams.putAll(map);
×
NEW
198
        return this;
×
199
      }
200

201
      /** The financial_account id. */
202
      public Builder setFinancialAccount(String financialAccount) {
NEW
203
        this.financialAccount = financialAccount;
×
NEW
204
        return this;
×
205
      }
206

207
      /** The payment_method or bank account id. This needs to be a verified bank account. */
208
      public Builder setPaymentMethod(String paymentMethod) {
NEW
209
        this.paymentMethod = paymentMethod;
×
NEW
210
        return this;
×
211
      }
212

213
      /**
214
       * <strong>Required.</strong> The type of the bank account provided. This can be either
215
       * &quot;financial_account&quot; or &quot;payment_method&quot;
216
       */
217
      public Builder setType(FinancialAccountCloseParams.ForwardingSettings.Type type) {
NEW
218
        this.type = type;
×
NEW
219
        return this;
×
220
      }
221
    }
222

NEW
223
    public enum Type implements ApiRequestParams.EnumParam {
×
NEW
224
      @SerializedName("financial_account")
×
225
      FINANCIAL_ACCOUNT("financial_account"),
226

NEW
227
      @SerializedName("payment_method")
×
228
      PAYMENT_METHOD("payment_method");
229

230
      @Getter(onMethod_ = {@Override})
231
      private final String value;
232

NEW
233
      Type(String value) {
×
NEW
234
        this.value = value;
×
NEW
235
      }
×
236
    }
237
  }
238
}
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

© 2025 Coveralls, Inc