Skip to content

API Updates #1193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 16 additions & 37 deletions src/main/java/com/stripe/model/reporting/ReportRun.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ public class ReportRun extends ApiResource implements HasId {
@SerializedName("id")
String id;

/** Always {@code true}: reports can only be run on live-mode data. */
/**
* {@code true} if the report is run on live mode data and {@code false} if it is run on test mode
* data.
*/
@SerializedName("livemode")
Boolean livemode;

Expand Down Expand Up @@ -83,27 +86,18 @@ public class ReportRun extends ApiResource implements HasId {
@SerializedName("succeeded_at")
Long succeededAt;

/**
* Retrieves the details of an existing Report Run. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Retrieves the details of an existing Report Run. */
public static ReportRun retrieve(String reportRun) throws StripeException {
return retrieve(reportRun, (Map<String, Object>) null, (RequestOptions) null);
}

/**
* Retrieves the details of an existing Report Run. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Retrieves the details of an existing Report Run. */
public static ReportRun retrieve(String reportRun, RequestOptions options)
throws StripeException {
return retrieve(reportRun, (Map<String, Object>) null, options);
}

/**
* Retrieves the details of an existing Report Run. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Retrieves the details of an existing Report Run. */
public static ReportRun retrieve(
String reportRun, Map<String, Object> params, RequestOptions options) throws StripeException {
String url =
Expand All @@ -115,10 +109,7 @@ public static ReportRun retrieve(
ApiResource.RequestMethod.GET, url, params, ReportRun.class, options);
}

/**
* Retrieves the details of an existing Report Run. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Retrieves the details of an existing Report Run. */
public static ReportRun retrieve(
String reportRun, ReportRunRetrieveParams params, RequestOptions options)
throws StripeException {
Expand All @@ -132,15 +123,15 @@ public static ReportRun retrieve(
}

/**
* Creates a new object and begin running the report. (Requires a <a
* Creates a new object and begin running the report. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportRun create(Map<String, Object> params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates a new object and begin running the report. (Requires a <a
* Creates a new object and begin running the report. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportRun create(Map<String, Object> params, RequestOptions options)
Expand All @@ -151,15 +142,15 @@ public static ReportRun create(Map<String, Object> params, RequestOptions option
}

/**
* Creates a new object and begin running the report. (Requires a <a
* Creates a new object and begin running the report. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportRun create(ReportRunCreateParams params) throws StripeException {
return create(params, (RequestOptions) null);
}

/**
* Creates a new object and begin running the report. (Requires a <a
* Creates a new object and begin running the report. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportRun create(ReportRunCreateParams params, RequestOptions options)
Expand All @@ -169,36 +160,24 @@ public static ReportRun create(ReportRunCreateParams params, RequestOptions opti
ApiResource.RequestMethod.POST, url, params, ReportRun.class, options);
}

/**
* Returns a list of Report Runs, with the most recent appearing first. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a list of Report Runs, with the most recent appearing first. */
public static ReportRunCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a list of Report Runs, with the most recent appearing first. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a list of Report Runs, with the most recent appearing first. */
public static ReportRunCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs");
return ApiResource.requestCollection(url, params, ReportRunCollection.class, options);
}

/**
* Returns a list of Report Runs, with the most recent appearing first. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a list of Report Runs, with the most recent appearing first. */
public static ReportRunCollection list(ReportRunListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a list of Report Runs, with the most recent appearing first. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a list of Report Runs, with the most recent appearing first. */
public static ReportRunCollection list(ReportRunListParams params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_runs");
Expand Down
28 changes: 8 additions & 20 deletions src/main/java/com/stripe/model/reporting/ReportType.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ public class ReportType extends ApiResource implements HasId {
Long version;

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

/**
* Retrieves the details of a Report Type. (Requires a <a
* Retrieves the details of a Report Type. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportType retrieve(String reportType, RequestOptions options)
Expand All @@ -89,7 +89,7 @@ public static ReportType retrieve(String reportType, RequestOptions options)
}

/**
* Retrieves the details of a Report Type. (Requires a <a
* Retrieves the details of a Report Type. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportType retrieve(
Expand All @@ -105,7 +105,7 @@ public static ReportType retrieve(
}

/**
* Retrieves the details of a Report Type. (Requires a <a
* Retrieves the details of a Report Type. (Certain report types require a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
public static ReportType retrieve(
Expand All @@ -120,36 +120,24 @@ public static ReportType retrieve(
ApiResource.RequestMethod.GET, url, params, ReportType.class, options);
}

/**
* Returns a full list of Report Types. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a full list of Report Types. */
public static ReportTypeCollection list(Map<String, Object> params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a full list of Report Types. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a full list of Report Types. */
public static ReportTypeCollection list(Map<String, Object> params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_types");
return ApiResource.requestCollection(url, params, ReportTypeCollection.class, options);
}

/**
* Returns a full list of Report Types. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a full list of Report Types. */
public static ReportTypeCollection list(ReportTypeListParams params) throws StripeException {
return list(params, (RequestOptions) null);
}

/**
* Returns a full list of Report Types. (Requires a <a
* href="https://stripe.com/docs/keys#test-live-modes">live-mode API key</a>.)
*/
/** Returns a full list of Report Types. */
public static ReportTypeCollection list(ReportTypeListParams params, RequestOptions options)
throws StripeException {
String url = String.format("%s%s", Stripe.getApiBase(), "/v1/reporting/report_types");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class SubscriptionCreateParams extends ApiRequestParams {
/**
* A list of prices and quantities that will generate invoice items appended to the first invoice
* for this subscription. You may pass up to 10 items.
* for this subscription. You may pass up to 20 items.
*/
@SerializedName("add_invoice_items")
List<AddInvoiceItem> addInvoiceItems;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ public enum CollectionMethod implements ApiRequestParams.EnumParam {
public static class Phase {
/**
* A list of prices and quantities that will generate invoice items appended to the next
* invoice. You may pass up to 10 items.
* invoice. You may pass up to 20 items.
*/
@SerializedName("add_invoice_items")
List<AddInvoiceItem> addInvoiceItems;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ public enum CollectionMethod implements ApiRequestParams.EnumParam {
public static class Phase {
/**
* A list of prices and quantities that will generate invoice items appended to the next
* invoice. You may pass up to 10 items.
* invoice. You may pass up to 20 items.
*/
@SerializedName("add_invoice_items")
List<AddInvoiceItem> addInvoiceItems;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class SubscriptionUpdateParams extends ApiRequestParams {
/**
* A list of prices and quantities that will generate invoice items appended to the first invoice
* for this subscription. You may pass up to 10 items.
* for this subscription. You may pass up to 20 items.
*/
@SerializedName("add_invoice_items")
List<AddInvoiceItem> addInvoiceItems;
Expand Down
Loading