Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2013 Ning, Inc.
   *
   * Ning licenses this file to you under the Apache License, version 2.0
   * (the "License"); you may not use this file except in compliance with the
   * License.  You may obtain a copy of the License at:
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
  * License for the specific language governing permissions and limitations
  * under the License.
  */
 
 package org.killbill.billing.invoice.api;
 
 import java.util.List;
 import java.util.UUID;
 
 
 public interface Invoice extends Entity {

    

Parameters:
item the invoice ietm to add
Returns:
true if successful
 
     boolean addInvoiceItem(InvoiceItem item);

    

Parameters:
items the list of ietms to add
Returns:
true is successful
 
     boolean addInvoiceItems(Collection<InvoiceItemitems);

    

Returns:
the list of items on that invoice
 
     List<InvoiceItemgetInvoiceItems();

    

Parameters:
clazz the filter class for the items
<T> a InvoiceItem type
Returns:
the list of invoice ietms on that invoice for that type
 
     public <T extends InvoiceItemList<InvoiceItemgetInvoiceItems(Class<T> clazz);

    

Returns:
the number of items on that invoice
 
     int getNumberOfItems();

    

Parameters:
payment the successful payment for that invoice
Returns:
true if we were able to add the payment
 
     boolean addPayment(InvoicePayment payment);

    

Parameters:
payments the list of payments to add on that invoice
Returns:
true if we were able to add the payments
 
     boolean addPayments(Collection<InvoicePaymentpayments);

    

Returns:
the list of payments associated with that invoice
 
     List<InvoicePaymentgetPayments();

    

Returns:
the number of payments on that invoice
 
     int getNumberOfPayments();

    

Returns:
the accountId
 
     UUID getAccountId();

    

Returns:
the invoice number
 
     Integer getInvoiceNumber();

    

Returns:
the day the invoice was generated, in the account timezone
 
     LocalDate getInvoiceDate();

    
The target day is the latest day to consider for billing events.

Returns:
the target day in the account timezone
    LocalDate getTargetDate();

    

Returns:
the currency associated with that invoice
    Currency getCurrency();

    

Returns:
the sum of all successful payment amounts for that invoice
    BigDecimal getPaidAmount();

    

Returns:
the sum of all EXTERNAL_CHARGE, FIXED and RECURRING item amounts when the invoice was created

Returns:
the sum of all charges (EXTERNAL_CHARGE, FIXED, RECURRING) and adjustments (item or invoice adjustment) amounts
    BigDecimal getChargedAmount();

    

Returns:
the sum of all CBA_ADJ items
    BigDecimal getCreditedAmount();

    

Returns:
the sum of all refunds and chargebacks for payments associated with that invoice
    BigDecimal getRefundedAmount();

    

Returns:
the current balance on that invoice
    BigDecimal getBalance();

    

Returns:
true if this is a migration invoice
    boolean isMigrationInvoice();
New to GrepCode? Check out our FAQ X