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

stripe / stripe-java / #16612

04 Nov 2024 11:45PM UTC coverage: 12.42% (-0.1%) from 12.519%
#16612

Pull #1917

github

web-flow
Merge 5c2bcd0c4 into 23267db11
Pull Request #1917: Update generated code for beta

9 of 1290 new or added lines in 41 files covered. (0.7%)

16 existing lines in 13 files now uncovered.

18852 of 151790 relevant lines covered (12.42%)

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/PaymentRecordReportPaymentAttemptGuaranteedParams.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 PaymentRecordReportPaymentAttemptGuaranteedParams 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
   * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds since
29
   * the Unix epoch.
30
   */
31
  @SerializedName("guaranteed_at")
32
  Long guaranteedAt;
33

34
  @SerializedName("metadata")
35
  Map<String, String> metadata;
36

37
  private PaymentRecordReportPaymentAttemptGuaranteedParams(
38
      List<String> expand,
39
      Map<String, Object> extraParams,
40
      Long guaranteedAt,
NEW
41
      Map<String, String> metadata) {
×
NEW
42
    this.expand = expand;
×
NEW
43
    this.extraParams = extraParams;
×
NEW
44
    this.guaranteedAt = guaranteedAt;
×
NEW
45
    this.metadata = metadata;
×
NEW
46
  }
×
47

48
  public static Builder builder() {
NEW
49
    return new Builder();
×
50
  }
51

NEW
52
  public static class Builder {
×
53
    private List<String> expand;
54

55
    private Map<String, Object> extraParams;
56

57
    private Long guaranteedAt;
58

59
    private Map<String, String> metadata;
60

61
    /** Finalize and obtain parameter instance from this builder. */
62
    public PaymentRecordReportPaymentAttemptGuaranteedParams build() {
NEW
63
      return new PaymentRecordReportPaymentAttemptGuaranteedParams(
×
64
          this.expand, this.extraParams, this.guaranteedAt, this.metadata);
65
    }
66

67
    /**
68
     * Add an element 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
     * PaymentRecordReportPaymentAttemptGuaranteedParams#expand} for the field documentation.
71
     */
72
    public Builder addExpand(String element) {
NEW
73
      if (this.expand == null) {
×
NEW
74
        this.expand = new ArrayList<>();
×
75
      }
NEW
76
      this.expand.add(element);
×
NEW
77
      return this;
×
78
    }
79

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

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

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

120
    /**
121
     * <strong>Required.</strong> When the reported payment was guaranteed. Measured in seconds
122
     * since the Unix epoch.
123
     */
124
    public Builder setGuaranteedAt(Long guaranteedAt) {
NEW
125
      this.guaranteedAt = guaranteedAt;
×
NEW
126
      return this;
×
127
    }
128

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

142
    /**
143
     * Add all map key/value pairs to `metadata` map. A map is initialized for the first
144
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
145
     * See {@link PaymentRecordReportPaymentAttemptGuaranteedParams#metadata} for the field
146
     * documentation.
147
     */
148
    public Builder putAllMetadata(Map<String, String> map) {
NEW
149
      if (this.metadata == null) {
×
NEW
150
        this.metadata = new HashMap<>();
×
151
      }
NEW
152
      this.metadata.putAll(map);
×
NEW
153
      return this;
×
154
    }
155
  }
156
}
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