Account Line Items

An AccountLineItem is a single line item in the accounting ledger for a billing account. These include payments and invoices.

List Invoices

SDK Function

Invoice.list()

Return Object

ListIterator<AccountLineItem>

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.AccountLineItem;
import com.files.models.Invoice;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<AccountLineItem> accountLineItems = Invoice.list(parameters);
  for (AccountLineItem accountLineItem : accountLineItems.listAutoPaging()) {
    // Operate on accountLineItem
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

List Payments

SDK Function

Payment.list()

Return Object

ListIterator<AccountLineItem>

Authorization Requirement

Available to all authenticated keys or sessions.

Additional Arguments

Example Request

import com.files.ListIterator;
import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.AccountLineItem;
import com.files.models.Payment;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  ListIterator<AccountLineItem> accountLineItems = Payment.list(parameters);
  for (AccountLineItem accountLineItem : accountLineItems.listAutoPaging()) {
    // Operate on accountLineItem
  }
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Invoice

SDK Function

Invoice.find()

Return Object

AccountLineItem

Authorization Requirement

Available to all authenticated keys or sessions.

Function Arguments

ArgumentDescription
id
int64
Required
Invoice ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.AccountLineItem;
import com.files.models.Invoice;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  AccountLineItem accountLineItem = Invoice.find(id, parameters);
  // Operate on accountLineItem
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

Show Payment

SDK Function

Payment.find()

Return Object

AccountLineItem

Authorization Requirement

Available to all authenticated keys or sessions.

Function Arguments

ArgumentDescription
id
int64
Required
Payment ID.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.AccountLineItem;
import com.files.models.Payment;

try {
  HashMap<String, Object> parameters = new HashMap<>();
  AccountLineItem accountLineItem = Payment.find(id, parameters);
  // Operate on accountLineItem
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The AccountLineItem Object

Some of the functions above return a AccountLineItem object. The attributes of this object are listed below.

AttributeDescription
id
int64
Line item Id
amount
decimal
Line item amount
balance
decimal
Line item balance
created_at
date-time
Line item created at
currency
string
Line item currency
download_uri
string
Line item download uri
invoice_line_items
array(object)
Associated invoice line items
method
string
Line item payment method
payment_line_items
array(object)
Associated payment line items
payment_reversed_at
date-time
Date/time payment was reversed if applicable
payment_type
string
Type of payment if applicable
site_name
string
Site name this line item is for
type
string
Type of line item, either payment or invoice