Class Transaction

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class Transaction extends ApiResource implements HasId
Transactions represent changes to a FinancialAccount's balance.
  • Constructor Details

    • Transaction

      public Transaction()
  • Method Details

    • list

      public static TransactionCollection list(Map<String,Object> params) throws StripeException
      Retrieves a list of Transaction objects.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves a list of Transaction objects.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(TransactionListParams params) throws StripeException
      Retrieves a list of Transaction objects.
      Throws:
      StripeException
    • list

      public static TransactionCollection list(TransactionListParams params, RequestOptions options) throws StripeException
      Retrieves a list of Transaction objects.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String id) throws StripeException
      Retrieves the details of an existing Transaction.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String id, RequestOptions options) throws StripeException
      Retrieves the details of an existing Transaction.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the details of an existing Transaction.
      Throws:
      StripeException
    • retrieve

      public static Transaction retrieve(String id, TransactionRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the details of an existing Transaction.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      Description copied from interface: StripeActiveObject
      Method is used by the containing object or StripeResponseGetter implementations to set the StripeResponseGetter instance used to make further requests.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmount

      public Long getAmount()
      Amount (in cents) transferred.
    • getBalanceImpact

      public Transaction.BalanceImpact getBalanceImpact()
      Change to a FinancialAccount's balance.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getDescription

      public String getDescription()
      An arbitrary string attached to the object. Often useful for displaying to users.
    • getEntries

      public TransactionEntryCollection getEntries()
      A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
    • getFinancialAccount

      public String getFinancialAccount()
      The FinancialAccount associated with this object.
    • getFlow

      public String getFlow()
      ID of the flow that created the Transaction.
    • getFlowDetails

      public Transaction.FlowDetails getFlowDetails()
      Details of the flow that created the Transaction.
    • getFlowType

      public String getFlowType()
      Type of the flow that created the Transaction.

      One of credit_reversal, debit_reversal, inbound_transfer, issuing_authorization, other, outbound_payment, outbound_transfer, received_credit, or received_debit.

    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to treasury.transaction.

    • getStatus

      public String getStatus()
      Status of the Transaction.

      One of open, posted, or void.

    • getStatusTransitions

      public Transaction.StatusTransitions getStatusTransitions()
    • setAmount

      public void setAmount(Long amount)
      Amount (in cents) transferred.
    • setBalanceImpact

      public void setBalanceImpact(Transaction.BalanceImpact balanceImpact)
      Change to a FinancialAccount's balance.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setDescription

      public void setDescription(String description)
      An arbitrary string attached to the object. Often useful for displaying to users.
    • setEntries

      public void setEntries(TransactionEntryCollection entries)
      A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints.
    • setFinancialAccount

      public void setFinancialAccount(String financialAccount)
      The FinancialAccount associated with this object.
    • setFlow

      public void setFlow(String flow)
      ID of the flow that created the Transaction.
    • setFlowDetails

      public void setFlowDetails(Transaction.FlowDetails flowDetails)
      Details of the flow that created the Transaction.
    • setFlowType

      public void setFlowType(String flowType)
      Type of the flow that created the Transaction.

      One of credit_reversal, debit_reversal, inbound_transfer, issuing_authorization, other, outbound_payment, outbound_transfer, received_credit, or received_debit.

    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to treasury.transaction.

    • setStatus

      public void setStatus(String status)
      Status of the Transaction.

      One of open, posted, or void.

    • setStatusTransitions

      public void setStatusTransitions(Transaction.StatusTransitions statusTransitions)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId