Skip to content

Instantly share code, notes, and snippets.

@abyx
Created March 1, 2012 08:39
Show Gist options
  • Save abyx/70af19742df56a857fc6 to your computer and use it in GitHub Desktop.
Save abyx/70af19742df56a857fc6 to your computer and use it in GitHub Desktop.
@Test
public void deleted() throws Exception {
Customer customer = Customer.create(Maps.<String, Object>newHashMap());
String id = customer.getId();
customer.delete();
Customer deleted = Customer.retrieve(id);
// deleted.getDeleted() / deleted.isDeleted() // These dont exist
System.out.println(deleted);
// Prints:
//<com.stripe.model.Customer@691789110 id=cus_bbifAk49v9rKH3> JSON: {
// "created": 1330591033,
// "id": "cus_bbifAk49v9rKH3",
// "livemode": false,
// "description": null,
// "active_card": null,
// "email": null,
// "plan": null,
// "trial_end": null,
// "discount": null,
// "next_recurring_charge": null,
// "subscription": null
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment