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

stripe / stripe-java / #16380

30 Aug 2024 07:54PM UTC coverage: 12.882% (-0.004%) from 12.886%
#16380

push

github

web-flow
Merge from master after the changes to not pass api_mode from individual methods (#1857)

* Generate SDK for OpenAPI spec version 1230 (#1856)

* Bump version to 26.9.0

* No need for APIMode to be passed around from individual API methods (#1855)

* Generated code

* Update the code around raw request

* Update the v2 tests to use v2 path

16 of 23 new or added lines in 7 files covered. (69.57%)

706 existing lines in 213 files now uncovered.

18468 of 143365 relevant lines covered (12.88%)

0.13 hits per line

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

16.13
/src/main/java/com/stripe/model/ExternalAccountCollection.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model;
3

4
import com.stripe.exception.StripeException;
5
import com.stripe.net.ApiRequest;
6
import com.stripe.net.ApiRequestParams;
7
import com.stripe.net.ApiResource;
8
import com.stripe.net.BaseAddress;
9
import com.stripe.net.RequestOptions;
10
import com.stripe.param.ExternalAccountCollectionCreateParams;
11
import com.stripe.param.ExternalAccountCollectionListParams;
12
import com.stripe.param.ExternalAccountCollectionRetrieveParams;
13
import java.util.Map;
14

15
public class ExternalAccountCollection extends StripeCollection<ExternalAccount> {
1✔
16
  /** Create an external account for a given account. */
17
  public ExternalAccount create(Map<String, Object> params) throws StripeException {
18
    return create(params, (RequestOptions) null);
1✔
19
  }
20

21
  /** Create an external account for a given account. */
22
  public ExternalAccount create(Map<String, Object> params, RequestOptions options)
23
      throws StripeException {
24
    String path = this.getUrl();
1✔
25
    ApiRequest request =
1✔
26
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
27
    return getResponseGetter().request(request, ExternalAccount.class);
1✔
28
  }
29

30
  /** Create an external account for a given account. */
31
  public ExternalAccount create(ExternalAccountCollectionCreateParams params)
32
      throws StripeException {
33
    return create(params, (RequestOptions) null);
×
34
  }
35

36
  /** Create an external account for a given account. */
37
  public ExternalAccount create(
38
      ExternalAccountCollectionCreateParams params, RequestOptions options) throws StripeException {
39
    String path = this.getUrl();
×
40
    ApiResource.checkNullTypedParams(path, params);
×
41
    ApiRequest request =
×
42
        new ApiRequest(
43
            BaseAddress.API,
44
            ApiResource.RequestMethod.POST,
45
            path,
46
            ApiRequestParams.paramsToMap(params),
×
47
            options);
UNCOV
48
    return getResponseGetter().request(request, ExternalAccount.class);
×
49
  }
50

51
  /** List external accounts for an account. */
52
  public ExternalAccountCollection list(Map<String, Object> params) throws StripeException {
53
    return list(params, (RequestOptions) null);
×
54
  }
55

56
  /** List external accounts for an account. */
57
  public ExternalAccountCollection list(Map<String, Object> params, RequestOptions options)
58
      throws StripeException {
59
    String path = this.getUrl();
×
60
    ApiRequest request =
×
61
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
UNCOV
62
    return getResponseGetter().request(request, ExternalAccountCollection.class);
×
63
  }
64

65
  /** List external accounts for an account. */
66
  public ExternalAccountCollection list(ExternalAccountCollectionListParams params)
67
      throws StripeException {
68
    return list(params, (RequestOptions) null);
×
69
  }
70

71
  /** List external accounts for an account. */
72
  public ExternalAccountCollection list(
73
      ExternalAccountCollectionListParams params, RequestOptions options) throws StripeException {
74
    String path = this.getUrl();
×
75
    ApiResource.checkNullTypedParams(path, params);
×
76
    ApiRequest request =
×
77
        new ApiRequest(
78
            BaseAddress.API,
79
            ApiResource.RequestMethod.GET,
80
            path,
81
            ApiRequestParams.paramsToMap(params),
×
82
            options);
UNCOV
83
    return getResponseGetter().request(request, ExternalAccountCollection.class);
×
84
  }
85

86
  /** Retrieve a specified external account for a given account. */
87
  public ExternalAccount retrieve(String id) throws StripeException {
88
    return retrieve(id, (Map<String, Object>) null, (RequestOptions) null);
×
89
  }
90

91
  /** Retrieve a specified external account for a given account. */
92
  public ExternalAccount retrieve(String id, RequestOptions options) throws StripeException {
93
    return retrieve(id, (Map<String, Object>) null, options);
×
94
  }
95

96
  /** Retrieve a specified external account for a given account. */
97
  public ExternalAccount retrieve(String id, Map<String, Object> params, RequestOptions options)
98
      throws StripeException {
99
    String path = String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id));
×
100
    ApiRequest request =
×
101
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
UNCOV
102
    return getResponseGetter().request(request, ExternalAccount.class);
×
103
  }
104

105
  /** Retrieve a specified external account for a given account. */
106
  public ExternalAccount retrieve(
107
      String id, ExternalAccountCollectionRetrieveParams params, RequestOptions options)
108
      throws StripeException {
109
    String path = String.format("%s/%s", this.getUrl(), ApiResource.urlEncodeId(id));
×
110
    ApiResource.checkNullTypedParams(path, params);
×
111
    ApiRequest request =
×
112
        new ApiRequest(
113
            BaseAddress.API,
114
            ApiResource.RequestMethod.GET,
115
            path,
116
            ApiRequestParams.paramsToMap(params),
×
117
            options);
UNCOV
118
    return getResponseGetter().request(request, ExternalAccount.class);
×
119
  }
120
}
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