Interface Balances.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Balances.Builder,Balances>, SdkBuilder<Balances.Builder,Balances>, SdkPojo
Enclosing class:
Balances

@Mutable @NotThreadSafe public static interface Balances.Builder extends SdkPojo, CopyableBuilder<Balances.Builder,Balances>
  • Method Details

    • outstanding

      Balances.Builder outstanding(CurrencyAmount outstanding)

      The part of the amount that isn't settled and has no settlement in progress. For an invoice, this is what remains to pay. For a credit memo, this is the credit that isn't yet applied. This balance doesn't include processing.

      Parameters:
      outstanding - The part of the amount that isn't settled and has no settlement in progress. For an invoice, this is what remains to pay. For a credit memo, this is the credit that isn't yet applied. This balance doesn't include processing.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • outstanding

      default Balances.Builder outstanding(Consumer<CurrencyAmount.Builder> outstanding)

      The part of the amount that isn't settled and has no settlement in progress. For an invoice, this is what remains to pay. For a credit memo, this is the credit that isn't yet applied. This balance doesn't include processing.

      This is a convenience method that creates an instance of the CurrencyAmount.Builder avoiding the need to create one manually via CurrencyAmount.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to outstanding(CurrencyAmount).

      Parameters:
      outstanding - a consumer that will call methods on CurrencyAmount.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • processing

      Balances.Builder processing(CurrencyAmount processing)

      The part of the amount with a settlement in progress, for example a payment that's submitted but not yet confirmed. It moves to settled when the settlement completes, and back to outstanding when the settlement fails. This balance is more than 0 only when the status is PROCESSING.

      Parameters:
      processing - The part of the amount with a settlement in progress, for example a payment that's submitted but not yet confirmed. It moves to settled when the settlement completes, and back to outstanding when the settlement fails. This balance is more than 0 only when the status is PROCESSING.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • processing

      default Balances.Builder processing(Consumer<CurrencyAmount.Builder> processing)

      The part of the amount with a settlement in progress, for example a payment that's submitted but not yet confirmed. It moves to settled when the settlement completes, and back to outstanding when the settlement fails. This balance is more than 0 only when the status is PROCESSING.

      This is a convenience method that creates an instance of the CurrencyAmount.Builder avoiding the need to create one manually via CurrencyAmount.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to processing(CurrencyAmount).

      Parameters:
      processing - a consumer that will call methods on CurrencyAmount.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • settled

      Balances.Builder settled(CurrencyAmount settled)

      The part of the amount that is settled. For an invoice, this is the amount paid or covered by credit memos. For a credit memo, this is the amount applied to invoices. This balance is 0 when nothing is settled yet.

      Parameters:
      settled - The part of the amount that is settled. For an invoice, this is the amount paid or covered by credit memos. For a credit memo, this is the amount applied to invoices. This balance is 0 when nothing is settled yet.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • settled

      default Balances.Builder settled(Consumer<CurrencyAmount.Builder> settled)

      The part of the amount that is settled. For an invoice, this is the amount paid or covered by credit memos. For a credit memo, this is the amount applied to invoices. This balance is 0 when nothing is settled yet.

      This is a convenience method that creates an instance of the CurrencyAmount.Builder avoiding the need to create one manually via CurrencyAmount.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to settled(CurrencyAmount).

      Parameters:
      settled - a consumer that will call methods on CurrencyAmount.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • canceled

      Balances.Builder canceled(CurrencyAmount canceled)

      The part of the amount that was canceled and isn't settled, for example when an invoice is voided. When a partly settled record is canceled, it keeps its settled balance, and the rest of the amount moves to canceled. This balance is more than 0 only when the status is CANCELED.

      Parameters:
      canceled - The part of the amount that was canceled and isn't settled, for example when an invoice is voided. When a partly settled record is canceled, it keeps its settled balance, and the rest of the amount moves to canceled. This balance is more than 0 only when the status is CANCELED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • canceled

      default Balances.Builder canceled(Consumer<CurrencyAmount.Builder> canceled)

      The part of the amount that was canceled and isn't settled, for example when an invoice is voided. When a partly settled record is canceled, it keeps its settled balance, and the rest of the amount moves to canceled. This balance is more than 0 only when the status is CANCELED.

      This is a convenience method that creates an instance of the CurrencyAmount.Builder avoiding the need to create one manually via CurrencyAmount.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to canceled(CurrencyAmount).

      Parameters:
      canceled - a consumer that will call methods on CurrencyAmount.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: