示例#1
0
 @Test
 public void testEventListPerCallAPIKey() throws StripeException {
   Map<String, Object> listParams = new HashMap<String, Object>();
   listParams.put("count", 1);
   List<Event> events = Event.all(listParams, Stripe.apiKey).getData();
   assertEquals(events.size(), 1);
 }
示例#2
0
 @Test
 public void testEventRetrievePerCallAPIKey() throws StripeException {
   Map<String, Object> listParams = new HashMap<String, Object>();
   listParams.put("count", 1);
   Event event = Event.all(listParams, Stripe.apiKey).getData().get(0);
   Event retrievedEvent = Event.retrieve(event.getId());
   assertEquals(event.getId(), retrievedEvent.getId());
 }