Skip to content

Deprecate total_count #839

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 2 commits into from
Sep 3, 2019
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
4 changes: 2 additions & 2 deletions src/main/java/com/stripe/model/EphemeralKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class EphemeralKey extends ApiResource implements HasId {
Long expires;

/** Unique identifier for the object. */
@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

Expand Down Expand Up @@ -100,7 +100,7 @@ public EphemeralKey delete(RequestOptions options) throws StripeException {
@Setter
@EqualsAndHashCode(callSuper = false)
public static class AssociatedObject extends StripeObject implements HasId {
@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
String id;

String type;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Event extends ApiResource implements HasId {
EventData data;

/** Unique identifier for the object. */
@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/model/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class File extends ApiResource implements HasId {
String filename;

/** Unique identifier for the object. */
@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
@SerializedName("id")
String id;

Expand Down
23 changes: 15 additions & 8 deletions src/main/java/com/stripe/model/StripeCollection.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ public abstract class StripeCollection<T extends HasId> extends StripeObject
implements StripeCollectionInterface<T> {
String object;

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
List<T> data;

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
Boolean hasMore;

@Getter(onMethod = @__({@Override}))
Long totalCount;

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
String url;

/**
Expand All @@ -59,11 +56,21 @@ public abstract class StripeCollection<T extends HasId> extends StripeObject
*/
@Deprecated Long count;

@Getter(onMethod = @__({@Override}))
/**
* The {@code total_count} attribute.
*
* @deprecated Use pagination parameters instead.
* @see <a href="https://stripe.com/docs/api/java#pagination">Pagination</a>
*/
@Deprecated
@Getter(onMethod_ = {@Override})
Long totalCount;

@Getter(onMethod_ = {@Override})
@Setter(onMethod = @__({@Override}))
private RequestOptions requestOptions;

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
@Setter(onMethod = @__({@Override}))
private Map<String, Object> requestParams;

Expand Down
11 changes: 9 additions & 2 deletions src/main/java/com/stripe/model/StripeCollectionInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,17 @@ public interface StripeCollectionInterface<T> {

Boolean getHasMore();

Long getTotalCount();

String getUrl();

/**
* The {@code total_count} attribute.
*
* @deprecated Use pagination parameters instead.
* @see <a href="https://stripe.com/docs/api/java#pagination">Pagination</a>
*/
@Deprecated
Long getTotalCount();

/**
* Get request options that were used to fetch the collection. This is useful for purposes of
* pagination.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/param/FileCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public enum Purpose implements ApiRequestParams.EnumParam {
@SerializedName("tax_document_user_upload")
TAX_DOCUMENT_USER_UPLOAD("tax_document_user_upload");

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
private final String value;

Purpose(String value) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/param/FileListParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ public enum Purpose implements ApiRequestParams.EnumParam {
@SerializedName("tax_document_user_upload")
TAX_DOCUMENT_USER_UPLOAD("tax_document_user_upload");

@Getter(onMethod = @__({@Override}))
@Getter(onMethod_ = {@Override})
private final String value;

Purpose(String value) {
Expand Down