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

stripe / stripe-java / #16418

13 Sep 2024 05:53PM UTC coverage: 12.856% (-0.02%) from 12.874%
#16418

push

github

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

Update generated code for beta

9 of 344 new or added lines in 28 files covered. (2.62%)

10 existing lines in 8 files now uncovered.

18470 of 143664 relevant lines covered (12.86%)

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/InvoiceRenderingTemplateRetrieveParams.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 InvoiceRenderingTemplateRetrieveParams 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
  @SerializedName("version")
28
  Long version;
29

30
  private InvoiceRenderingTemplateRetrieveParams(
NEW
31
      List<String> expand, Map<String, Object> extraParams, Long version) {
×
NEW
32
    this.expand = expand;
×
NEW
33
    this.extraParams = extraParams;
×
NEW
34
    this.version = version;
×
NEW
35
  }
×
36

37
  public static Builder builder() {
NEW
38
    return new Builder();
×
39
  }
40

NEW
41
  public static class Builder {
×
42
    private List<String> expand;
43

44
    private Map<String, Object> extraParams;
45

46
    private Long version;
47

48
    /** Finalize and obtain parameter instance from this builder. */
49
    public InvoiceRenderingTemplateRetrieveParams build() {
NEW
50
      return new InvoiceRenderingTemplateRetrieveParams(
×
51
          this.expand, this.extraParams, this.version);
52
    }
53

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

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

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

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

106
    public Builder setVersion(Long version) {
NEW
107
      this.version = version;
×
NEW
108
      return this;
×
109
    }
110
  }
111
}
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