Package com.stripe.model

Examples of com.stripe.model.InvoiceLineItemCollection


    listParams.put("count", 1);
    Invoice createdInvoice = Invoice.all(listParams).getData().get(0);
    Invoice retrievedInvoice = Invoice.retrieve(createdInvoice.getId());
    assertEquals(createdInvoice.getId(), retrievedInvoice.getId());

    InvoiceLineItemCollection lines = retrievedInvoice.getLines().all(
        listParams);
    assertFalse(lines == null);
  }
View Full Code Here


    Map<String, Object> upcomingParams = new HashMap<String, Object>();
    upcomingParams.put("customer", customer.getId());
    Invoice upcomingInvoice = Invoice.upcoming(upcomingParams);
    assertFalse(upcomingInvoice.getAttempted());

    InvoiceLineItemCollection lines = upcomingInvoice.getLines().all(null);
    assertFalse(lines.getData().isEmpty());
    assertEquals(item.getId(), lines.getData().get(0).getId());

    Map<String, Object> fetchParams = new HashMap<String, Object>();
    fetchParams.put("starting_after", item.getId());
    InvoiceLineItemCollection linesAfterFirst = upcomingInvoice.getLines().all(fetchParams);
    assertTrue(linesAfterFirst.getData().isEmpty());
  }
View Full Code Here

TOP

Related Classes of com.stripe.model.InvoiceLineItemCollection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.