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

stripe / stripe-java / #14673

16 Aug 2023 11:12PM UTC coverage: 14.689% (+3.7%) from 11.034%
#14673

push

github-actions

web-flow
Merge pull request #1633 from stripe/merge-upstream

12954 of 12954 new or added lines in 361 files covered. (100.0%)

15225 of 103649 relevant lines covered (14.69%)

0.15 hits per line

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

0.0
/src/main/java/com/stripe/model/capital/FinancingTransaction.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model.capital;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.HasId;
7
import com.stripe.model.StripeObject;
8
import com.stripe.net.ApiMode;
9
import com.stripe.net.ApiRequestParams;
10
import com.stripe.net.ApiResource;
11
import com.stripe.net.BaseAddress;
12
import com.stripe.net.RequestOptions;
13
import com.stripe.net.StripeResponseGetter;
14
import com.stripe.param.capital.FinancingTransactionListParams;
15
import com.stripe.param.capital.FinancingTransactionRetrieveParams;
16
import java.util.Map;
17
import lombok.EqualsAndHashCode;
18
import lombok.Getter;
19
import lombok.Setter;
20

21
/** This is an object representing the details of a transaction on a Capital financing object. */
22
@Getter
23
@Setter
24
@EqualsAndHashCode(callSuper = false)
25
public class FinancingTransaction extends ApiResource implements HasId {
×
26
  /** The ID of the merchant associated with this financing transaction. */
27
  @SerializedName("account")
28
  String account;
29

30
  /** Time at which the financing transaction was created. Given in seconds since unix epoch. */
31
  @SerializedName("created_at")
32
  Long createdAt;
33

34
  /** This is an object representing a transaction on a Capital financing offer. */
35
  @SerializedName("details")
36
  Details details;
37

38
  /** The Capital financing offer for this financing transaction. */
39
  @SerializedName("financing_offer")
40
  String financingOffer;
41

42
  /** A unique identifier for the financing transaction object. */
43
  @Getter(onMethod_ = {@Override})
44
  @SerializedName("id")
45
  String id;
46

47
  /**
48
   * The Capital transaction object that predates the Financing Transactions API and corresponds
49
   * with the balance transaction that was created as a result of this financing transaction.
50
   */
51
  @SerializedName("legacy_balance_transaction_source")
52
  String legacyBalanceTransactionSource;
53

54
  /**
55
   * Has the value {@code true} if the object exists in live mode or the value {@code false} if the
56
   * object exists in test mode.
57
   */
58
  @SerializedName("livemode")
59
  Boolean livemode;
60

61
  /**
62
   * The object type: financing_transaction
63
   *
64
   * <p>Equal to {@code capital.financing_transaction}.
65
   */
66
  @SerializedName("object")
67
  String object;
68

69
  /**
70
   * The type of the financing transaction.
71
   *
72
   * <p>One of {@code payment}, {@code payout}, or {@code reversal}.
73
   */
74
  @SerializedName("type")
75
  String type;
76

77
  /** A human-friendly description of the financing transaction. */
78
  @SerializedName("user_facing_description")
79
  String userFacingDescription;
80

81
  /**
82
   * Returns a list of financing transactions. The transactions are returned in sorted order, with
83
   * the most recent transactions appearing first.
84
   */
85
  public static FinancingTransactionCollection list(Map<String, Object> params)
86
      throws StripeException {
87
    return list(params, (RequestOptions) null);
×
88
  }
89

90
  /**
91
   * Returns a list of financing transactions. The transactions are returned in sorted order, with
92
   * the most recent transactions appearing first.
93
   */
94
  public static FinancingTransactionCollection list(
95
      Map<String, Object> params, RequestOptions options) throws StripeException {
96
    String path = "/v1/capital/financing_transactions";
×
97
    return getGlobalResponseGetter()
×
98
        .request(
×
99
            BaseAddress.API,
100
            ApiResource.RequestMethod.GET,
101
            path,
102
            params,
103
            FinancingTransactionCollection.class,
104
            options,
105
            ApiMode.V1);
106
  }
107

108
  /**
109
   * Returns a list of financing transactions. The transactions are returned in sorted order, with
110
   * the most recent transactions appearing first.
111
   */
112
  public static FinancingTransactionCollection list(FinancingTransactionListParams params)
113
      throws StripeException {
114
    return list(params, (RequestOptions) null);
×
115
  }
116

117
  /**
118
   * Returns a list of financing transactions. The transactions are returned in sorted order, with
119
   * the most recent transactions appearing first.
120
   */
121
  public static FinancingTransactionCollection list(
122
      FinancingTransactionListParams params, RequestOptions options) throws StripeException {
123
    String path = "/v1/capital/financing_transactions";
×
124
    ApiResource.checkNullTypedParams(path, params);
×
125
    return getGlobalResponseGetter()
×
126
        .request(
×
127
            BaseAddress.API,
128
            ApiResource.RequestMethod.GET,
129
            path,
130
            ApiRequestParams.paramsToMap(params),
×
131
            FinancingTransactionCollection.class,
132
            options,
133
            ApiMode.V1);
134
  }
135

136
  /** Retrieves a financing transaction for a financing offer. */
137
  public static FinancingTransaction retrieve(String financingTransaction) throws StripeException {
138
    return retrieve(financingTransaction, (Map<String, Object>) null, (RequestOptions) null);
×
139
  }
140

141
  /** Retrieves a financing transaction for a financing offer. */
142
  public static FinancingTransaction retrieve(String financingTransaction, RequestOptions options)
143
      throws StripeException {
144
    return retrieve(financingTransaction, (Map<String, Object>) null, options);
×
145
  }
146

147
  /** Retrieves a financing transaction for a financing offer. */
148
  public static FinancingTransaction retrieve(
149
      String financingTransaction, Map<String, Object> params, RequestOptions options)
150
      throws StripeException {
151
    String path =
×
152
        String.format(
×
153
            "/v1/capital/financing_transactions/%s", ApiResource.urlEncodeId(financingTransaction));
×
154
    return getGlobalResponseGetter()
×
155
        .request(
×
156
            BaseAddress.API,
157
            ApiResource.RequestMethod.GET,
158
            path,
159
            params,
160
            FinancingTransaction.class,
161
            options,
162
            ApiMode.V1);
163
  }
164

165
  /** Retrieves a financing transaction for a financing offer. */
166
  public static FinancingTransaction retrieve(
167
      String financingTransaction,
168
      FinancingTransactionRetrieveParams params,
169
      RequestOptions options)
170
      throws StripeException {
171
    String path =
×
172
        String.format(
×
173
            "/v1/capital/financing_transactions/%s", ApiResource.urlEncodeId(financingTransaction));
×
174
    ApiResource.checkNullTypedParams(path, params);
×
175
    return getGlobalResponseGetter()
×
176
        .request(
×
177
            BaseAddress.API,
178
            ApiResource.RequestMethod.GET,
179
            path,
180
            ApiRequestParams.paramsToMap(params),
×
181
            FinancingTransaction.class,
182
            options,
183
            ApiMode.V1);
184
  }
185

186
  /** This is an object representing a transaction on a Capital financing offer. */
187
  @Getter
188
  @Setter
189
  @EqualsAndHashCode(callSuper = false)
190
  public static class Details extends StripeObject {
×
191
    /** The advance amount being repaid, paid out, or reversed in minor units. */
192
    @SerializedName("advance_amount")
193
    Long advanceAmount;
194

195
    /** The currency of the financing transaction. */
196
    @SerializedName("currency")
197
    String currency;
198

199
    /** The fee amount being repaid, paid out, or reversed in minor units. */
200
    @SerializedName("fee_amount")
201
    Long feeAmount;
202

203
    /**
204
     * The linked payment for the transaction. This field only applies to financing transactions of
205
     * type {@code paydown} and reason {@code automatic_withholding}.
206
     */
207
    @SerializedName("linked_payment")
208
    String linkedPayment;
209

210
    /**
211
     * The reason for the financing transaction (if applicable).
212
     *
213
     * <p>One of {@code automatic_withholding}, {@code automatic_withholding_refund}, {@code
214
     * collection}, {@code collection_failure}, {@code financing_cancellation}, {@code refill},
215
     * {@code requested_by_user}, or {@code user_initiated}.
216
     */
217
    @SerializedName("reason")
218
    String reason;
219

220
    /**
221
     * The reversed transaction. This field only applies to financing transactions of type {@code
222
     * reversal}.
223
     */
224
    @SerializedName("reversed_transaction")
225
    String reversedTransaction;
226

227
    /** The advance and fee amount being repaid, paid out, or reversed in minor units. */
228
    @SerializedName("total_amount")
229
    Long totalAmount;
230

231
    /** This is an object representing a linked transaction on a Capital Financing Transaction. */
232
    @SerializedName("transaction")
233
    Transaction transaction;
234

235
    /** This is an object representing a linked transaction on a Capital Financing Transaction. */
236
    @Getter
237
    @Setter
238
    @EqualsAndHashCode(callSuper = false)
239
    public static class Transaction extends StripeObject {
×
240
      /** The linked payment ID. */
241
      @SerializedName("charge")
242
      String charge;
243

244
      /** The linked Treasury Financing Transaction ID. */
245
      @SerializedName("treasury_transaction")
246
      String treasuryTransaction;
247
    }
248
  }
249

250
  @Override
251
  public void setResponseGetter(StripeResponseGetter responseGetter) {
252
    super.setResponseGetter(responseGetter);
×
253
    trySetResponseGetter(details, responseGetter);
×
254
  }
×
255
}
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