• 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/model/issuing/FraudLiabilityDebit.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model.issuing;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.BalanceTransaction;
7
import com.stripe.model.ExpandableField;
8
import com.stripe.model.HasId;
9
import com.stripe.net.ApiRequest;
10
import com.stripe.net.ApiRequestParams;
11
import com.stripe.net.ApiResource;
12
import com.stripe.net.BaseAddress;
13
import com.stripe.net.RequestOptions;
14
import com.stripe.net.StripeResponseGetter;
15
import com.stripe.param.issuing.FraudLiabilityDebitListParams;
16
import com.stripe.param.issuing.FraudLiabilityDebitRetrieveParams;
17
import java.util.Map;
18
import lombok.EqualsAndHashCode;
19
import lombok.Getter;
20
import lombok.Setter;
21

22
/**
23
 * A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on
24
 * Issuing transactions.
25
 */
26
@Getter
27
@Setter
28
@EqualsAndHashCode(callSuper = false)
NEW
29
public class FraudLiabilityDebit extends ApiResource implements HasId {
×
30
  /**
31
   * Debited amount. This is equal to the disputed amount and is given in the card’s currency and in
32
   * the smallest currency unit.
33
   */
34
  @SerializedName("amount")
35
  Long amount;
36

37
  /**
38
   * ID of the <a href="https://stripe.com/docs/api/balance_transactions">balance transaction</a>
39
   * associated with this debit.
40
   */
41
  @SerializedName("balance_transaction")
42
  @Getter(lombok.AccessLevel.NONE)
43
  @Setter(lombok.AccessLevel.NONE)
44
  ExpandableField<BalanceTransaction> balanceTransaction;
45

46
  /** Time at which the object was created. Measured in seconds since the Unix epoch. */
47
  @SerializedName("created")
48
  Long created;
49

50
  /**
51
   * The currency of the debit. Three-letter <a
52
   * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>, in lowercase.
53
   * Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
54
   */
55
  @SerializedName("currency")
56
  String currency;
57

58
  /** The ID of the linked dispute. */
59
  @SerializedName("dispute")
60
  String dispute;
61

62
  /** Unique identifier for the object. */
63
  @Getter(onMethod_ = {@Override})
64
  @SerializedName("id")
65
  String id;
66

67
  /**
68
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
69
   * object exists in test mode.
70
   */
71
  @SerializedName("livemode")
72
  Boolean livemode;
73

74
  /**
75
   * String representing the object's type. Objects of the same type share the same value.
76
   *
77
   * <p>Equal to {@code issuing.fraud_liability_debit}.
78
   */
79
  @SerializedName("object")
80
  String object;
81

82
  /** Get ID of expandable {@code balanceTransaction} object. */
83
  public String getBalanceTransaction() {
NEW
84
    return (this.balanceTransaction != null) ? this.balanceTransaction.getId() : null;
×
85
  }
86

87
  public void setBalanceTransaction(String id) {
NEW
88
    this.balanceTransaction = ApiResource.setExpandableFieldId(id, this.balanceTransaction);
×
NEW
89
  }
×
90

91
  /** Get expanded {@code balanceTransaction}. */
92
  public BalanceTransaction getBalanceTransactionObject() {
NEW
93
    return (this.balanceTransaction != null) ? this.balanceTransaction.getExpanded() : null;
×
94
  }
95

96
  public void setBalanceTransactionObject(BalanceTransaction expandableObject) {
NEW
97
    this.balanceTransaction =
×
NEW
98
        new ExpandableField<BalanceTransaction>(expandableObject.getId(), expandableObject);
×
NEW
99
  }
×
100

101
  /**
102
   * Returns a list of Issuing {@code FraudLiabilityDebit} objects. The objects are sorted in
103
   * descending order by creation date, with the most recently created object appearing first.
104
   */
105
  public static FraudLiabilityDebitCollection list(Map<String, Object> params)
106
      throws StripeException {
NEW
107
    return list(params, (RequestOptions) null);
×
108
  }
109

110
  /**
111
   * Returns a list of Issuing {@code FraudLiabilityDebit} objects. The objects are sorted in
112
   * descending order by creation date, with the most recently created object appearing first.
113
   */
114
  public static FraudLiabilityDebitCollection list(
115
      Map<String, Object> params, RequestOptions options) throws StripeException {
NEW
116
    String path = "/v1/issuing/fraud_liability_debits";
×
NEW
117
    ApiRequest request =
×
118
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
NEW
119
    return getGlobalResponseGetter().request(request, FraudLiabilityDebitCollection.class);
×
120
  }
121

122
  /**
123
   * Returns a list of Issuing {@code FraudLiabilityDebit} objects. The objects are sorted in
124
   * descending order by creation date, with the most recently created object appearing first.
125
   */
126
  public static FraudLiabilityDebitCollection list(FraudLiabilityDebitListParams params)
127
      throws StripeException {
NEW
128
    return list(params, (RequestOptions) null);
×
129
  }
130

131
  /**
132
   * Returns a list of Issuing {@code FraudLiabilityDebit} objects. The objects are sorted in
133
   * descending order by creation date, with the most recently created object appearing first.
134
   */
135
  public static FraudLiabilityDebitCollection list(
136
      FraudLiabilityDebitListParams params, RequestOptions options) throws StripeException {
NEW
137
    String path = "/v1/issuing/fraud_liability_debits";
×
NEW
138
    ApiResource.checkNullTypedParams(path, params);
×
NEW
139
    ApiRequest request =
×
140
        new ApiRequest(
141
            BaseAddress.API,
142
            ApiResource.RequestMethod.GET,
143
            path,
NEW
144
            ApiRequestParams.paramsToMap(params),
×
145
            options);
NEW
146
    return getGlobalResponseGetter().request(request, FraudLiabilityDebitCollection.class);
×
147
  }
148

149
  /** Retrieves an Issuing {@code FraudLiabilityDebit} object. */
150
  public static FraudLiabilityDebit retrieve(String fraudLiabilityDebit) throws StripeException {
NEW
151
    return retrieve(fraudLiabilityDebit, (Map<String, Object>) null, (RequestOptions) null);
×
152
  }
153

154
  /** Retrieves an Issuing {@code FraudLiabilityDebit} object. */
155
  public static FraudLiabilityDebit retrieve(String fraudLiabilityDebit, RequestOptions options)
156
      throws StripeException {
NEW
157
    return retrieve(fraudLiabilityDebit, (Map<String, Object>) null, options);
×
158
  }
159

160
  /** Retrieves an Issuing {@code FraudLiabilityDebit} object. */
161
  public static FraudLiabilityDebit retrieve(
162
      String fraudLiabilityDebit, Map<String, Object> params, RequestOptions options)
163
      throws StripeException {
NEW
164
    String path =
×
NEW
165
        String.format(
×
NEW
166
            "/v1/issuing/fraud_liability_debits/%s", ApiResource.urlEncodeId(fraudLiabilityDebit));
×
NEW
167
    ApiRequest request =
×
168
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
NEW
169
    return getGlobalResponseGetter().request(request, FraudLiabilityDebit.class);
×
170
  }
171

172
  /** Retrieves an Issuing {@code FraudLiabilityDebit} object. */
173
  public static FraudLiabilityDebit retrieve(
174
      String fraudLiabilityDebit, FraudLiabilityDebitRetrieveParams params, RequestOptions options)
175
      throws StripeException {
NEW
176
    String path =
×
NEW
177
        String.format(
×
NEW
178
            "/v1/issuing/fraud_liability_debits/%s", ApiResource.urlEncodeId(fraudLiabilityDebit));
×
NEW
179
    ApiResource.checkNullTypedParams(path, params);
×
NEW
180
    ApiRequest request =
×
181
        new ApiRequest(
182
            BaseAddress.API,
183
            ApiResource.RequestMethod.GET,
184
            path,
NEW
185
            ApiRequestParams.paramsToMap(params),
×
186
            options);
NEW
187
    return getGlobalResponseGetter().request(request, FraudLiabilityDebit.class);
×
188
  }
189

190
  @Override
191
  public void setResponseGetter(StripeResponseGetter responseGetter) {
NEW
192
    super.setResponseGetter(responseGetter);
×
NEW
193
    trySetResponseGetter(balanceTransaction, responseGetter);
×
NEW
194
  }
×
195
}
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