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

4
import com.stripe.exception.StripeException;
5
import com.stripe.model.PaymentRecord;
6
import com.stripe.net.ApiRequest;
7
import com.stripe.net.ApiRequestParams;
8
import com.stripe.net.ApiResource;
9
import com.stripe.net.ApiService;
10
import com.stripe.net.BaseAddress;
11
import com.stripe.net.RequestOptions;
12
import com.stripe.net.StripeResponseGetter;
13
import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams;
14
import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams;
15
import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams;
16
import com.stripe.param.PaymentRecordReportPaymentAttemptParams;
17
import com.stripe.param.PaymentRecordReportPaymentParams;
18
import com.stripe.param.PaymentRecordRetrieveParams;
19

20
public final class PaymentRecordService extends ApiService {
21
  public PaymentRecordService(StripeResponseGetter responseGetter) {
NEW
22
    super(responseGetter);
×
NEW
23
  }
×
24

25
  /** Retrieves a Payment Record with the given ID. */
26
  public PaymentRecord retrieve(String id, PaymentRecordRetrieveParams params)
27
      throws StripeException {
NEW
28
    return retrieve(id, params, (RequestOptions) null);
×
29
  }
30
  /** Retrieves a Payment Record with the given ID. */
31
  public PaymentRecord retrieve(String id, RequestOptions options) throws StripeException {
NEW
32
    return retrieve(id, (PaymentRecordRetrieveParams) null, options);
×
33
  }
34
  /** Retrieves a Payment Record with the given ID. */
35
  public PaymentRecord retrieve(String id) throws StripeException {
NEW
36
    return retrieve(id, (PaymentRecordRetrieveParams) null, (RequestOptions) null);
×
37
  }
38
  /** Retrieves a Payment Record with the given ID. */
39
  public PaymentRecord retrieve(
40
      String id, PaymentRecordRetrieveParams params, RequestOptions options)
41
      throws StripeException {
NEW
42
    String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id));
×
NEW
43
    ApiRequest request =
×
44
        new ApiRequest(
45
            BaseAddress.API,
46
            ApiResource.RequestMethod.GET,
47
            path,
NEW
48
            ApiRequestParams.paramsToMap(params),
×
49
            options);
NEW
50
    return this.request(request, PaymentRecord.class);
×
51
  }
52
  /**
53
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
54
   * specified if all other payment attempts are canceled or failed.
55
   */
56
  public PaymentRecord reportPaymentAttempt(
57
      String id, PaymentRecordReportPaymentAttemptParams params) throws StripeException {
NEW
58
    return reportPaymentAttempt(id, params, (RequestOptions) null);
×
59
  }
60
  /**
61
   * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be
62
   * specified if all other payment attempts are canceled or failed.
63
   */
64
  public PaymentRecord reportPaymentAttempt(
65
      String id, PaymentRecordReportPaymentAttemptParams params, RequestOptions options)
66
      throws StripeException {
NEW
67
    String path =
×
NEW
68
        String.format("/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(id));
×
NEW
69
    ApiRequest request =
×
70
        new ApiRequest(
71
            BaseAddress.API,
72
            ApiResource.RequestMethod.POST,
73
            path,
NEW
74
            ApiRequestParams.paramsToMap(params),
×
75
            options);
NEW
76
    return this.request(request, PaymentRecord.class);
×
77
  }
78
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
79
  public PaymentRecord reportPaymentAttemptCanceled(
80
      String id, PaymentRecordReportPaymentAttemptCanceledParams params) throws StripeException {
NEW
81
    return reportPaymentAttemptCanceled(id, params, (RequestOptions) null);
×
82
  }
83
  /** Report that the most recent payment attempt on the specified Payment Record was canceled. */
84
  public PaymentRecord reportPaymentAttemptCanceled(
85
      String id, PaymentRecordReportPaymentAttemptCanceledParams params, RequestOptions options)
86
      throws StripeException {
NEW
87
    String path =
×
NEW
88
        String.format(
×
NEW
89
            "/v1/payment_records/%s/report_payment_attempt_canceled", ApiResource.urlEncodeId(id));
×
NEW
90
    ApiRequest request =
×
91
        new ApiRequest(
92
            BaseAddress.API,
93
            ApiResource.RequestMethod.POST,
94
            path,
NEW
95
            ApiRequestParams.paramsToMap(params),
×
96
            options);
NEW
97
    return this.request(request, PaymentRecord.class);
×
98
  }
99
  /**
100
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
101
   */
102
  public PaymentRecord reportPaymentAttemptFailed(
103
      String id, PaymentRecordReportPaymentAttemptFailedParams params) throws StripeException {
NEW
104
    return reportPaymentAttemptFailed(id, params, (RequestOptions) null);
×
105
  }
106
  /**
107
   * Report that the most recent payment attempt on the specified Payment Record failed or errored.
108
   */
109
  public PaymentRecord reportPaymentAttemptFailed(
110
      String id, PaymentRecordReportPaymentAttemptFailedParams params, RequestOptions options)
111
      throws StripeException {
NEW
112
    String path =
×
NEW
113
        String.format(
×
NEW
114
            "/v1/payment_records/%s/report_payment_attempt_failed", ApiResource.urlEncodeId(id));
×
NEW
115
    ApiRequest request =
×
116
        new ApiRequest(
117
            BaseAddress.API,
118
            ApiResource.RequestMethod.POST,
119
            path,
NEW
120
            ApiRequestParams.paramsToMap(params),
×
121
            options);
NEW
122
    return this.request(request, PaymentRecord.class);
×
123
  }
124
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
125
  public PaymentRecord reportPaymentAttemptGuaranteed(
126
      String id, PaymentRecordReportPaymentAttemptGuaranteedParams params) throws StripeException {
NEW
127
    return reportPaymentAttemptGuaranteed(id, params, (RequestOptions) null);
×
128
  }
129
  /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */
130
  public PaymentRecord reportPaymentAttemptGuaranteed(
131
      String id, PaymentRecordReportPaymentAttemptGuaranteedParams params, RequestOptions options)
132
      throws StripeException {
NEW
133
    String path =
×
NEW
134
        String.format(
×
135
            "/v1/payment_records/%s/report_payment_attempt_guaranteed",
NEW
136
            ApiResource.urlEncodeId(id));
×
NEW
137
    ApiRequest request =
×
138
        new ApiRequest(
139
            BaseAddress.API,
140
            ApiResource.RequestMethod.POST,
141
            path,
NEW
142
            ApiRequestParams.paramsToMap(params),
×
143
            options);
NEW
144
    return this.request(request, PaymentRecord.class);
×
145
  }
146
  /**
147
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
148
   * report updates through the other report_* methods, or report Payment Records in a terminal
149
   * state directly, through this method.
150
   */
151
  public PaymentRecord reportPayment(PaymentRecordReportPaymentParams params)
152
      throws StripeException {
NEW
153
    return reportPayment(params, (RequestOptions) null);
×
154
  }
155
  /**
156
   * Report a new Payment Record. You may report a Payment Record as it is initialized and later
157
   * report updates through the other report_* methods, or report Payment Records in a terminal
158
   * state directly, through this method.
159
   */
160
  public PaymentRecord reportPayment(
161
      PaymentRecordReportPaymentParams params, RequestOptions options) throws StripeException {
NEW
162
    String path = "/v1/payment_records/report_payment";
×
NEW
163
    ApiRequest request =
×
164
        new ApiRequest(
165
            BaseAddress.API,
166
            ApiResource.RequestMethod.POST,
167
            path,
NEW
168
            ApiRequestParams.paramsToMap(params),
×
169
            options);
NEW
170
    return this.request(request, PaymentRecord.class);
×
171
  }
172
}
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