Class Balances

java.lang.Object
software.amazon.awssdk.services.payments.model.Balances
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Balances.Builder,Balances>

@Generated("software.amazon.awssdk:codegen") public final class Balances extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Balances.Builder,Balances>

How much of the record's amount is outstanding, processing, settled, and canceled. The four balances add up to amount. Each balance is in the currency of amount, and a balance with nothing in it is 0.

See Also:
  • Method Details

    • outstanding

      public final 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.

      Returns:
      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.
    • processing

      public final 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.

      Returns:
      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.
    • settled

      public final 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.

      Returns:
      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.
    • canceled

      public final 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.

      Returns:
      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.
    • toBuilder

      public Balances.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Balances.Builder,Balances>
      Returns:
      a builder for type T
    • builder

      public static Balances.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Balances.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.