Assert.assertEquals((int) invoice.getSubtotalInCents(), 1200); Assert.assertEquals((int) invoice.getTaxInCents(), 0); Assert.assertEquals((int) invoice.getTotalInCents(), 1200); Assert.assertEquals(invoice.getCurrency(), "USD"); Assert.assertEquals(invoice.getCreatedAt(), new DateTime("2011-08-25T12:00:00Z"));
Assert.assertEquals((int) invoice.getSubtotalInCents(), 1200); Assert.assertEquals((int) invoice.getTaxInCents(), 0); Assert.assertEquals((int) invoice.getTotalInCents(), 1200); Assert.assertEquals(invoice.getCurrency(), "USD"); Assert.assertEquals(invoice.getCreatedAt(), new DateTime("2011-08-25T12:00:00Z"));
Assert.assertEquals((int) invoice.getSubtotalInCents(), 9900); Assert.assertEquals((int) invoice.getTaxInCents(), 0); Assert.assertEquals((int) invoice.getTotalInCents(), 9900); Assert.assertEquals(invoice.getCurrency(), "USD"); Assert.assertEquals(invoice.getTaxType(), "usst");
Assert.assertEquals((int) invoice.getSubtotalInCents(), 9900); Assert.assertEquals((int) invoice.getTaxInCents(), 0); Assert.assertEquals((int) invoice.getTotalInCents(), 9900); Assert.assertEquals(invoice.getCurrency(), "USD"); Assert.assertEquals(invoice.getTaxType(), "usst");
Assert.assertEquals(invoice.getTotalInCents(), new Integer(200)); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions); Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund");
Assert.assertEquals(invoice.getTotalInCents(), new Integer(200)); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions); Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund");
Assert.assertEquals(found.getInvoice().getAccount().getAccountCode(), accountData.getAccountCode()); Assert.assertEquals(found.getInvoice().getAccount().getFirstName(), accountData.getFirstName()); Assert.assertEquals(found.getInvoice().getTotalInCents(), (Integer) 15); Assert.assertEquals(found.getInvoice().getCurrency(), CURRENCY); Assert.assertEquals(invoices.get(0).getTotalInCents(), t.getAmountInCents(), "Amount in cents is not the same"); final Integer total = subscriptionData.getUnitAmountInCents() + planData.getSetupFeeInCents().getUnitAmountUSD(); Assert.assertEquals(invoices.get(1).getTotalInCents(), total, "Amount in cents is not the same"); } finally {
Assert.assertEquals(found.getInvoice().getAccount().getAccountCode(), accountData.getAccountCode()); Assert.assertEquals(found.getInvoice().getAccount().getFirstName(), accountData.getFirstName()); Assert.assertEquals(found.getInvoice().getTotalInCents(), (Integer) 15); Assert.assertEquals(found.getInvoice().getCurrency(), CURRENCY); Assert.assertEquals(invoices.get(0).getTotalInCents(), t.getAmountInCents(), "Amount in cents is not the same"); Assert.assertEquals(invoices.get(1).getTotalInCents(), subscriptionData.getUnitAmountInCents(), "Amount in cents is not the same"); } finally {
Assert.assertEquals(invoice.getTotalInCents(), new Integer(200)); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions); Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund");
Assert.assertEquals(invoice.getTotalInCents(), new Integer(200)); final Invoice refundInvoice = recurlyClient.refundInvoice(invoice.getId(), refundOptions); Assert.assertEquals(refundInvoice.getTotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getSubtotalInCents(), new Integer(-100)); Assert.assertEquals(refundInvoice.getTransactions().get(0).getAction(), "refund");