Skip to content

Add changes related to API version 2018-08-23 #577

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
Aug 28, 2018
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
29 changes: 28 additions & 1 deletion src/main/java/com/stripe/model/Customer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class Customer extends ApiResource implements MetadataStore<Customer>, Ha
@Getter(onMethod = @__({@Override})) String id;
String object;
Long accountBalance;
String businessVatId;
Long created;
String currency;
@Getter(AccessLevel.NONE) @Setter(AccessLevel.NONE)
Expand All @@ -33,6 +32,18 @@ public class Customer extends ApiResource implements MetadataStore<Customer>, Ha
ShippingDetails shipping;
ExternalAccountCollection sources;
CustomerSubscriptionCollection subscriptions;
TaxInfo taxInfo;
TaxInfoVerification taxInfoVerification;

/**
* The {@code businessVatId} attribute.
*
* @return the {@code businessVatId} attribute
* @deprecated Prefer using the {@link #taxInfo} attribute instead.
* @see <a href="https://stripe.com/docs/upgrades#2018-08-23">API version 2018-08-23</a>
*/
@Deprecated
String businessVatId;

/**
* The {@code cards} attribute.
Expand Down Expand Up @@ -222,4 +233,20 @@ public static class NextRecurringCharge extends StripeObject {
Long amount;
String date;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TaxInfo extends StripeObject {
String taxId;
String type;
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class TaxInfoVerification extends StripeObject {
String status;
String verifiedName;
}
}
12 changes: 11 additions & 1 deletion src/main/java/com/stripe/model/Plan.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,18 @@ public Plan update(Map<String, Object> params, RequestOptions options) throws St
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Tier extends StripeObject {
Long amount;
Long unitAmount;
Long upTo;

/**
* The {@code amount} attribute.
*
* @return the {@code amount} attribute
* @deprecated Prefer using the {@code unitAmount} attribute instead.
* @see <a href="https://stripe.com/docs/upgrades#2018-08-23">API version 2018-08-23</a>
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this attribute really deprecated? It's still present in the API reference: https://stripe.com/docs/api#plan_object-amount

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is actively deprecated since we shipped unit_amount. We're renaming amount because we are going to ship another type of amount property and we wanted to to avoid the confusion.

TL;DR: yep, the docs are incorrect I suppose

Long amount;
}

@Getter
Expand Down