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

stripe / stripe-java / #14623

pending completion
#14623

Pull #1596

github-actions

web-flow
Merge 2db1cc836 into 0adfd1352
Pull Request #1596: Add StripeClient

10149 of 10149 new or added lines in 282 files covered. (100.0%)

14798 of 78436 relevant lines covered (18.87%)

0.19 hits per line

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

30.43
/src/main/java/com/stripe/param/PaymentSourceRetrieveParams.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 PaymentSourceRetrieveParams 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
  private PaymentSourceRetrieveParams(List<String> expand, Map<String, Object> extraParams) {
1✔
28
    this.expand = expand;
1✔
29
    this.extraParams = extraParams;
1✔
30
  }
1✔
31

32
  public static Builder builder() {
33
    return new Builder();
1✔
34
  }
35

36
  public static class Builder {
1✔
37
    private List<String> expand;
38

39
    private Map<String, Object> extraParams;
40

41
    /** Finalize and obtain parameter instance from this builder. */
42
    public PaymentSourceRetrieveParams build() {
43
      return new PaymentSourceRetrieveParams(this.expand, this.extraParams);
1✔
44
    }
45

46
    /**
47
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
48
     * subsequent calls adds additional elements to the original list. See {@link
49
     * PaymentSourceRetrieveParams#expand} for the field documentation.
50
     */
51
    public Builder addExpand(String element) {
52
      if (this.expand == null) {
×
53
        this.expand = new ArrayList<>();
×
54
      }
55
      this.expand.add(element);
×
56
      return this;
×
57
    }
58

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

72
    /**
73
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
74
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
75
     * PaymentSourceRetrieveParams#extraParams} for the field documentation.
76
     */
77
    public Builder putExtraParam(String key, Object value) {
78
      if (this.extraParams == null) {
×
79
        this.extraParams = new HashMap<>();
×
80
      }
81
      this.extraParams.put(key, value);
×
82
      return this;
×
83
    }
84

85
    /**
86
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
87
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
88
     * See {@link PaymentSourceRetrieveParams#extraParams} for the field documentation.
89
     */
90
    public Builder putAllExtraParam(Map<String, Object> map) {
91
      if (this.extraParams == null) {
×
92
        this.extraParams = new HashMap<>();
×
93
      }
94
      this.extraParams.putAll(map);
×
95
      return this;
×
96
    }
97
  }
98
}
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