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

stripe / stripe-java / #16624

07 Nov 2024 10:04PM UTC coverage: 12.419% (-0.1%) from 12.519%
#16624

push

github

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

Update generated code for beta

17 of 1341 new or added lines in 57 files covered. (1.27%)

33 existing lines in 29 files now uncovered.

18855 of 151828 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/PaymentRecordReportPaymentAttemptCanceledParams.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 PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestParams {
14
  /**
15
   * <strong>Required.</strong> When the reported payment was canceled. Measured in seconds since
16
   * the Unix epoch.
17
   */
18
  @SerializedName("canceled_at")
19
  Long canceledAt;
20

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

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

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

37
  private PaymentRecordReportPaymentAttemptCanceledParams(
38
      Long canceledAt,
39
      List<String> expand,
40
      Map<String, Object> extraParams,
NEW
41
      Map<String, String> metadata) {
×
NEW
42
    this.canceledAt = canceledAt;
×
NEW
43
    this.expand = expand;
×
NEW
44
    this.extraParams = extraParams;
×
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 Long canceledAt;
54

55
    private List<String> expand;
56

57
    private Map<String, Object> extraParams;
58

59
    private Map<String, String> metadata;
60

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

67
    /**
68
     * <strong>Required.</strong> When the reported payment was canceled. Measured in seconds since
69
     * the Unix epoch.
70
     */
71
    public Builder setCanceledAt(Long canceledAt) {
NEW
72
      this.canceledAt = canceledAt;
×
NEW
73
      return this;
×
74
    }
75

76
    /**
77
     * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and
78
     * subsequent calls adds additional elements to the original list. See {@link
79
     * PaymentRecordReportPaymentAttemptCanceledParams#expand} for the field documentation.
80
     */
81
    public Builder addExpand(String element) {
NEW
82
      if (this.expand == null) {
×
NEW
83
        this.expand = new ArrayList<>();
×
84
      }
NEW
85
      this.expand.add(element);
×
NEW
86
      return this;
×
87
    }
88

89
    /**
90
     * Add all elements 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
     * PaymentRecordReportPaymentAttemptCanceledParams#expand} for the field documentation.
93
     */
94
    public Builder addAllExpand(List<String> elements) {
NEW
95
      if (this.expand == null) {
×
NEW
96
        this.expand = new ArrayList<>();
×
97
      }
NEW
98
      this.expand.addAll(elements);
×
NEW
99
      return this;
×
100
    }
101

102
    /**
103
     * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
104
     * call, and subsequent calls add additional key/value pairs to the original map. See {@link
105
     * PaymentRecordReportPaymentAttemptCanceledParams#extraParams} for the field documentation.
106
     */
107
    public Builder putExtraParam(String key, Object value) {
NEW
108
      if (this.extraParams == null) {
×
NEW
109
        this.extraParams = new HashMap<>();
×
110
      }
NEW
111
      this.extraParams.put(key, value);
×
NEW
112
      return this;
×
113
    }
114

115
    /**
116
     * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
117
     * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
118
     * See {@link PaymentRecordReportPaymentAttemptCanceledParams#extraParams} for the field
119
     * documentation.
120
     */
121
    public Builder putAllExtraParam(Map<String, Object> map) {
NEW
122
      if (this.extraParams == null) {
×
NEW
123
        this.extraParams = new HashMap<>();
×
124
      }
NEW
125
      this.extraParams.putAll(map);
×
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
     * PaymentRecordReportPaymentAttemptCanceledParams#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 PaymentRecordReportPaymentAttemptCanceledParams#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

© 2026 Coveralls, Inc