Skip to content

Commit

Permalink
Pin library to API version 2019-05-16
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed May 24, 2019
1 parent a3c73f5 commit ed5e93f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ before_install:

env:
global:
- STRIPE_MOCK_VERSION=0.52.0
- STRIPE_MOCK_VERSION=0.57.0

matrix:
include:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stripe/Stripe.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public abstract class Stripe {
private static final int DEFAULT_CONNECT_TIMEOUT = 30 * 1000;
private static final int DEFAULT_READ_TIMEOUT = 80 * 1000;

public static final String API_VERSION = "2019-03-14";
public static final String API_VERSION = "2019-05-16";
public static final String CONNECT_API_BASE = "https://connect.stripe.com";
public static final String LIVE_API_BASE = "https://api.stripe.com";
public static final String UPLOAD_API_BASE = "https://files.stripe.com";
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/stripe/BaseStripeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

public class BaseStripeTest {
// If changing this number, please also change it in `.travis.yml`.
private static final String MOCK_MINIMUM_VERSION = "0.49.0";
private static final String MOCK_MINIMUM_VERSION = "0.57.0";

private static String port;

Expand Down
7 changes: 1 addition & 6 deletions src/test/java/com/stripe/functional/PaymentIntentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.stripe.model.Customer;
import com.stripe.model.PaymentIntent;
import com.stripe.model.PaymentIntentCollection;
import com.stripe.model.PaymentSource;
import com.stripe.model.Review;
import com.stripe.net.ApiResource;

Expand Down Expand Up @@ -74,7 +73,7 @@ public void testRetrieveExpandWithTypedParam() throws StripeException {
.addExpand("application")
.addExpand("customer")
.addExpand("on_behalf_of")
.addAllExpand(Arrays.asList("review", "source", "transfer_data.destination"))
.addAllExpand(Arrays.asList("review", "transfer_data.destination"))
.build();

final PaymentIntent resource = PaymentIntent.retrieve(PAYMENT_INTENT_ID, typedParams,
Expand All @@ -99,10 +98,6 @@ public void testRetrieveExpandWithTypedParam() throws StripeException {
assertNotNull(review);
assertNotNull(review.getId());
assertEquals(resource.getReview(), review.getId());
final PaymentSource source = resource.getSourceObject();
assertNotNull(source);
assertNotNull(source.getId());
assertEquals(resource.getSource(), source.getId());

final Account transferDestination = resource.getTransferData().getDestinationObject();
assertNotNull(transferDestination);
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/com/stripe/model/PaymentIntentTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public void testDeserializeWithExpansions() throws Exception {
final String[] expansions = {
"application",
"customer",
"invoice",
"on_behalf_of",
"payment_method",
"review",
"source",
"transfer_data.destination",
};

Expand All @@ -72,6 +72,10 @@ public void testDeserializeWithExpansions() throws Exception {
assertNotNull(customer);
assertNotNull(customer.getId());
assertEquals(resource.getCustomer(), customer.getId());
final Invoice invoice = resource.getInvoiceObject();
assertNotNull(invoice);
assertNotNull(invoice.getId());
assertEquals(resource.getInvoice(), invoice.getId());
final Account account = resource.getOnBehalfOfObject();
assertNotNull(account);
assertNotNull(account.getId());
Expand All @@ -84,10 +88,6 @@ public void testDeserializeWithExpansions() throws Exception {
assertNotNull(review);
assertNotNull(review.getId());
assertEquals(resource.getReview(), review.getId());
final PaymentSource source = resource.getSourceObject();
assertNotNull(source);
assertNotNull(source.getId());
assertEquals(resource.getSource(), source.getId());

final Account transferDestination = resource.getTransferData().getDestinationObject();
assertNotNull(transferDestination);
Expand Down

0 comments on commit ed5e93f

Please sign in to comment.