• 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

69.57
/src/main/java/com/stripe/model/reporting/ReportType.java
1
// File generated from our OpenAPI spec
2
package com.stripe.model.reporting;
3

4
import com.google.gson.annotations.SerializedName;
5
import com.stripe.exception.StripeException;
6
import com.stripe.model.HasId;
7
import com.stripe.net.ApiRequest;
8
import com.stripe.net.ApiRequestParams;
9
import com.stripe.net.ApiResource;
10
import com.stripe.net.BaseAddress;
11
import com.stripe.net.RequestOptions;
12
import com.stripe.param.reporting.ReportTypeListParams;
13
import com.stripe.param.reporting.ReportTypeRetrieveParams;
14
import java.util.List;
15
import java.util.Map;
16
import lombok.EqualsAndHashCode;
17
import lombok.Getter;
18
import lombok.Setter;
19

20
/**
21
 * The Report Type resource corresponds to a particular type of report, such as the "Activity
22
 * summary" or "Itemized payouts" reports. These objects are identified by an ID
23
 * belonging to a set of enumerated values. See <a
24
 * href="https://stripe.com/docs/reporting/statements/api">API Access to Reports documentation</a>
25
 * for those Report Type IDs, along with required and optional parameters.
26
 *
27
 * <p>Note that certain report types can only be run based on your live-mode data (not test-mode
28
 * data), and will error when queried without a <a
29
 * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.
30
 */
31
@Getter
32
@Setter
33
@EqualsAndHashCode(callSuper = false)
34
public class ReportType extends ApiResource implements HasId {
1✔
35
  /**
36
   * Most recent time for which this Report Type is available. Measured in seconds since the Unix
37
   * epoch.
38
   */
39
  @SerializedName("data_available_end")
40
  Long dataAvailableEnd;
41

42
  /**
43
   * Earliest time for which this Report Type is available. Measured in seconds since the Unix
44
   * epoch.
45
   */
46
  @SerializedName("data_available_start")
47
  Long dataAvailableStart;
48

49
  /**
50
   * List of column names that are included by default when this Report Type gets run. (If the
51
   * Report Type doesn't support the {@code columns} parameter, this will be null.)
52
   */
53
  @SerializedName("default_columns")
54
  List<String> defaultColumns;
55

56
  /**
57
   * The <a href="https://stripe.com/docs/reporting/statements/api#available-report-types">ID of the
58
   * Report Type</a>, such as {@code balance.summary.1}.
59
   */
60
  @Getter(onMethod_ = {@Override})
61
  @SerializedName("id")
62
  String id;
63

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

71
  /** Human-readable name of the Report Type. */
72
  @SerializedName("name")
73
  String name;
74

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

83
  /** When this Report Type was latest updated. Measured in seconds since the Unix epoch. */
84
  @SerializedName("updated")
85
  Long updated;
86

87
  /**
88
   * Version of the Report Type. Different versions report with the same ID will have the same
89
   * purpose, but may take different run parameters or have different result schemas.
90
   */
91
  @SerializedName("version")
92
  Long version;
93

94
  /** Returns a full list of Report Types. */
95
  public static ReportTypeCollection list(Map<String, Object> params) throws StripeException {
96
    return list(params, (RequestOptions) null);
1✔
97
  }
98

99
  /** Returns a full list of Report Types. */
100
  public static ReportTypeCollection list(Map<String, Object> params, RequestOptions options)
101
      throws StripeException {
102
    String path = "/v1/reporting/report_types";
1✔
103
    ApiRequest request =
1✔
104
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
105
    return getGlobalResponseGetter().request(request, ReportTypeCollection.class);
1✔
106
  }
107

108
  /** Returns a full list of Report Types. */
109
  public static ReportTypeCollection list(ReportTypeListParams params) throws StripeException {
110
    return list(params, (RequestOptions) null);
1✔
111
  }
112

113
  /** Returns a full list of Report Types. */
114
  public static ReportTypeCollection list(ReportTypeListParams params, RequestOptions options)
115
      throws StripeException {
116
    String path = "/v1/reporting/report_types";
1✔
117
    ApiResource.checkNullTypedParams(path, params);
1✔
118
    ApiRequest request =
1✔
119
        new ApiRequest(
120
            BaseAddress.API,
121
            ApiResource.RequestMethod.GET,
122
            path,
123
            ApiRequestParams.paramsToMap(params),
1✔
124
            options);
125
    return getGlobalResponseGetter().request(request, ReportTypeCollection.class);
1✔
126
  }
127

128
  /**
129
   * Retrieves the details of a Report Type. (Certain report types require a <a
130
   * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
131
   */
132
  public static ReportType retrieve(String reportType) throws StripeException {
133
    return retrieve(reportType, (Map<String, Object>) null, (RequestOptions) null);
1✔
134
  }
135

136
  /**
137
   * Retrieves the details of a Report Type. (Certain report types require a <a
138
   * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
139
   */
140
  public static ReportType retrieve(String reportType, RequestOptions options)
141
      throws StripeException {
142
    return retrieve(reportType, (Map<String, Object>) null, options);
×
143
  }
144

145
  /**
146
   * Retrieves the details of a Report Type. (Certain report types require a <a
147
   * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
148
   */
149
  public static ReportType retrieve(
150
      String reportType, Map<String, Object> params, RequestOptions options)
151
      throws StripeException {
152
    String path =
1✔
153
        String.format("/v1/reporting/report_types/%s", ApiResource.urlEncodeId(reportType));
1✔
154
    ApiRequest request =
1✔
155
        new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options);
156
    return getGlobalResponseGetter().request(request, ReportType.class);
1✔
157
  }
158

159
  /**
160
   * Retrieves the details of a Report Type. (Certain report types require a <a
161
   * href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
162
   */
163
  public static ReportType retrieve(
164
      String reportType, ReportTypeRetrieveParams params, RequestOptions options)
165
      throws StripeException {
166
    String path =
×
167
        String.format("/v1/reporting/report_types/%s", ApiResource.urlEncodeId(reportType));
×
168
    ApiResource.checkNullTypedParams(path, params);
×
169
    ApiRequest request =
×
170
        new ApiRequest(
171
            BaseAddress.API,
172
            ApiResource.RequestMethod.GET,
173
            path,
174
            ApiRequestParams.paramsToMap(params),
×
175
            options);
UNCOV
176
    return getGlobalResponseGetter().request(request, ReportType.class);
×
177
  }
178
}
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