예제 #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());
 }