Interface FinancialRecord.Builder

  • Method Details

    • id

      The ID that Amazon Web Services Payments issued for the record, such as INV-5364-6253-7364-1342. To retrieve the record again, pass this value to GetFinancialRecord or BatchGetFinancialRecord as identifier.

      Parameters:
      id - The ID that Amazon Web Services Payments issued for the record, such as INV-5364-6253-7364-1342. To retrieve the record again, pass this value to GetFinancialRecord or BatchGetFinancialRecord as identifier.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      The type of the financial record. The populated member of details matches this type. The following values are valid:

      • INVOICE – An invoice: a bill from Amazon Web Services. Payments and credit memos applied to the invoice settle it.

      • CREDIT_MEMO – A credit memo: a credit issued to your account, for example for a billing correction or a service credit. Applying it to one or more invoices settles it.

      Parameters:
      type - The type of the financial record. The populated member of details matches this type. The following values are valid:

      • INVOICE – An invoice: a bill from Amazon Web Services. Payments and credit memos applied to the invoice settle it.

      • CREDIT_MEMO – A credit memo: a credit issued to your account, for example for a billing correction or a service credit. Applying it to one or more invoices settles it.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of the financial record. The populated member of details matches this type. The following values are valid:

      • INVOICE – An invoice: a bill from Amazon Web Services. Payments and credit memos applied to the invoice settle it.

      • CREDIT_MEMO – A credit memo: a credit issued to your account, for example for a billing correction or a service credit. Applying it to one or more invoices settles it.

      Parameters:
      type - The type of the financial record. The populated member of details matches this type. The following values are valid:

      • INVOICE – An invoice: a bill from Amazon Web Services. Payments and credit memos applied to the invoice settle it.

      • CREDIT_MEMO – A credit memo: a credit issued to your account, for example for a billing correction or a service credit. Applying it to one or more invoices settles it.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • businessUnit

      FinancialRecord.Builder businessUnit(BusinessUnit businessUnit)

      The Amazon Web Services business unit that issued the record: its merchant of record and its line of business.

      Parameters:
      businessUnit - The Amazon Web Services business unit that issued the record: its merchant of record and its line of business.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • businessUnit

      default FinancialRecord.Builder businessUnit(Consumer<BusinessUnit.Builder> businessUnit)

      The Amazon Web Services business unit that issued the record: its merchant of record and its line of business.

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

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

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

      The total amount of the financial record, in the currency that the record was issued in. The amount doesn't change as the record is settled. balances shows how much of it is in each settlement state.

      Parameters:
      amount - The total amount of the financial record, in the currency that the record was issued in. The amount doesn't change as the record is settled. balances shows how much of it is in each settlement state.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • amount

      The total amount of the financial record, in the currency that the record was issued in. The amount doesn't change as the record is settled. balances shows how much of it is in each settlement state.

      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 amount(CurrencyAmount).

      Parameters:
      amount - 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:
    • balances

      FinancialRecord.Builder balances(Balances balances)

      How much of amount is outstanding, processing, settled, and canceled.

      Parameters:
      balances - How much of amount is outstanding, processing, settled, and canceled.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • balances

      default FinancialRecord.Builder balances(Consumer<Balances.Builder> balances)

      How much of amount is outstanding, processing, settled, and canceled.

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

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

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

      FinancialRecord.Builder settlementStatus(String settlementStatus)

      Whether the record is open or closed. If you receive a status value that you don't recognize, use this member to tell open records from closed ones. The following values are valid:

      • OPEN – Part of the amount is outstanding or processing. The status is OUTSTANDING or PROCESSING.

      • CLOSED – The whole amount is settled or canceled. The status is SETTLED or CANCELED.

      A CLOSED record becomes OPEN again if a payment or credit applied to it is reversed. Its closedAt is then absent until the record closes again.

      Parameters:
      settlementStatus - Whether the record is open or closed. If you receive a status value that you don't recognize, use this member to tell open records from closed ones. The following values are valid:

      • OPEN – Part of the amount is outstanding or processing. The status is OUTSTANDING or PROCESSING.

      • CLOSED – The whole amount is settled or canceled. The status is SETTLED or CANCELED.

      A CLOSED record becomes OPEN again if a payment or credit applied to it is reversed. Its closedAt is then absent until the record closes again.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • settlementStatus

      FinancialRecord.Builder settlementStatus(SettlementStatus settlementStatus)

      Whether the record is open or closed. If you receive a status value that you don't recognize, use this member to tell open records from closed ones. The following values are valid:

      • OPEN – Part of the amount is outstanding or processing. The status is OUTSTANDING or PROCESSING.

      • CLOSED – The whole amount is settled or canceled. The status is SETTLED or CANCELED.

      A CLOSED record becomes OPEN again if a payment or credit applied to it is reversed. Its closedAt is then absent until the record closes again.

      Parameters:
      settlementStatus - Whether the record is open or closed. If you receive a status value that you don't recognize, use this member to tell open records from closed ones. The following values are valid:

      • OPEN – Part of the amount is outstanding or processing. The status is OUTSTANDING or PROCESSING.

      • CLOSED – The whole amount is settled or canceled. The status is SETTLED or CANCELED.

      A CLOSED record becomes OPEN again if a payment or credit applied to it is reversed. Its closedAt is then absent until the record closes again.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The settlement stage of the record. The following values are valid:

      • OUTSTANDING – Part of the amount isn't settled, and no settlement is in progress on the record. For an invoice, dueStatus shows whether it's due or past due. The settlementStatus is OPEN.

      • PROCESSING – A settlement of part or all of the amount is in progress, for example a payment that's submitted but not yet confirmed. PROCESSING takes precedence over OUTSTANDING: while any part of the amount is processing, the status is PROCESSING, even if another part is still outstanding. The settlementStatus is OPEN.

      • SETTLED – The whole amount is settled. The settlementStatus is CLOSED.

      • CANCELED – The record is canceled. The part of the amount that wasn't settled isn't collected or applied. The settlementStatus is CLOSED.

      Parameters:
      status - The settlement stage of the record. The following values are valid:

      • OUTSTANDING – Part of the amount isn't settled, and no settlement is in progress on the record. For an invoice, dueStatus shows whether it's due or past due. The settlementStatus is OPEN.

      • PROCESSING – A settlement of part or all of the amount is in progress, for example a payment that's submitted but not yet confirmed. PROCESSING takes precedence over OUTSTANDING: while any part of the amount is processing, the status is PROCESSING, even if another part is still outstanding. The settlementStatus is OPEN.

      • SETTLED – The whole amount is settled. The settlementStatus is CLOSED.

      • CANCELED – The record is canceled. The part of the amount that wasn't settled isn't collected or applied. The settlementStatus is CLOSED.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The settlement stage of the record. The following values are valid:

      • OUTSTANDING – Part of the amount isn't settled, and no settlement is in progress on the record. For an invoice, dueStatus shows whether it's due or past due. The settlementStatus is OPEN.

      • PROCESSING – A settlement of part or all of the amount is in progress, for example a payment that's submitted but not yet confirmed. PROCESSING takes precedence over OUTSTANDING: while any part of the amount is processing, the status is PROCESSING, even if another part is still outstanding. The settlementStatus is OPEN.

      • SETTLED – The whole amount is settled. The settlementStatus is CLOSED.

      • CANCELED – The record is canceled. The part of the amount that wasn't settled isn't collected or applied. The settlementStatus is CLOSED.

      Parameters:
      status - The settlement stage of the record. The following values are valid:

      • OUTSTANDING – Part of the amount isn't settled, and no settlement is in progress on the record. For an invoice, dueStatus shows whether it's due or past due. The settlementStatus is OPEN.

      • PROCESSING – A settlement of part or all of the amount is in progress, for example a payment that's submitted but not yet confirmed. PROCESSING takes precedence over OUTSTANDING: while any part of the amount is processing, the status is PROCESSING, even if another part is still outstanding. The settlementStatus is OPEN.

      • SETTLED – The whole amount is settled. The settlementStatus is CLOSED.

      • CANCELED – The record is canceled. The part of the amount that wasn't settled isn't collected or applied. The settlementStatus is CLOSED.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • issuedAt

      FinancialRecord.Builder issuedAt(Instant issuedAt)

      The date and time, in UTC, when this record was issued.

      Parameters:
      issuedAt - The date and time, in UTC, when this record was issued.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • closedAt

      FinancialRecord.Builder closedAt(Instant closedAt)

      The date and time, in UTC, when the record was last closed, that is, when its status last became SETTLED or CANCELED. This member is absent while the settlementStatus is OPEN, including after a closed record reopens.

      Parameters:
      closedAt - The date and time, in UTC, when the record was last closed, that is, when its status last became SETTLED or CANCELED. This member is absent while the settlementStatus is OPEN, including after a closed record reopens.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • details

      The attributes that exist only for the record's type. The populated member matches type: invoiceDetails for an INVOICE, creditMemoDetails for a CREDIT_MEMO.

      Parameters:
      details - The attributes that exist only for the record's type. The populated member matches type: invoiceDetails for an INVOICE, creditMemoDetails for a CREDIT_MEMO.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • details

      The attributes that exist only for the record's type. The populated member matches type: invoiceDetails for an INVOICE, creditMemoDetails for a CREDIT_MEMO.

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

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

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