Class ReceivedCredit

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class ReceivedCredit extends ApiResource implements HasId
Legacy ReceivedCredits are part of the v1 version of Treasury for platforms and do not support many of the features introduced in Treasury for platforms v2. Use Received Credits instead of building a new v1 integration.

ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount.

  • Constructor Details

    • ReceivedCredit

      public ReceivedCredit()
  • Method Details

    • getTransaction

      public String getTransaction()
      Get ID of expandable transaction object.
    • setTransaction

      public void setTransaction(String id)
    • getTransactionObject

      public Transaction getTransactionObject()
      Get expanded transaction.
    • setTransactionObject

      public void setTransactionObject(Transaction expandableObject)
    • list

      public static ReceivedCreditCollection list(Map<String,Object> params) throws StripeException
      Returns a list of ReceivedCredits.
      Throws:
      StripeException
    • list

      public static ReceivedCreditCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of ReceivedCredits.
      Throws:
      StripeException
    • list

      Returns a list of ReceivedCredits.
      Throws:
      StripeException
    • list

      Returns a list of ReceivedCredits.
      Throws:
      StripeException
    • retrieve

      public static ReceivedCredit retrieve(String id) throws StripeException
      Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
      Throws:
      StripeException
    • retrieve

      public static ReceivedCredit retrieve(String id, RequestOptions options) throws StripeException
      Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
      Throws:
      StripeException
    • retrieve

      public static ReceivedCredit retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
      Throws:
      StripeException
    • retrieve

      public static ReceivedCredit retrieve(String id, ReceivedCreditRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.
      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.
    • 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.
    • getFailureCode

      public String getFailureCode()
      Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.

      One of account_closed, account_frozen, international_transaction, or other.

    • getFinancialAccount

      public String getFinancialAccount()
      The FinancialAccount that received the funds.
    • getHostedRegulatoryReceiptUrl

      public String getHostedRegulatoryReceiptUrl()
      A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
    • getInitiatingPaymentMethodDetails

      public ReceivedCredit.InitiatingPaymentMethodDetails getInitiatingPaymentMethodDetails()
    • getLinkedFlows

      public ReceivedCredit.LinkedFlows getLinkedFlows()
    • getLivemode

      public Boolean getLivemode()
      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    • getNetwork

      public String getNetwork()
      The rails used to send the funds.

      One of ach, card, rtp, stripe, or us_domestic_wire.

    • getObject

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

      Equal to treasury.received_credit.

    • getReversalDetails

      public ReceivedCredit.ReversalDetails getReversalDetails()
      Details describing when a ReceivedCredit may be reversed.
    • getStatus

      public String getStatus()
      Status of the ReceivedCredit. ReceivedCredits are created either succeeded (approved) or failed (declined). If a ReceivedCredit is declined, the failure reason can be found in the failure_code field.

      One of failed, or succeeded.

    • setAmount

      public void setAmount(Long amount)
      Amount (in cents) transferred.
    • 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.
    • setFailureCode

      public void setFailureCode(String failureCode)
      Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen.

      One of account_closed, account_frozen, international_transaction, or other.

    • setFinancialAccount

      public void setFinancialAccount(String financialAccount)
      The FinancialAccount that received the funds.
    • setHostedRegulatoryReceiptUrl

      public void setHostedRegulatoryReceiptUrl(String hostedRegulatoryReceiptUrl)
      A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses.
    • setId

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

      public void setInitiatingPaymentMethodDetails(ReceivedCredit.InitiatingPaymentMethodDetails initiatingPaymentMethodDetails)
    • setLinkedFlows

      public void setLinkedFlows(ReceivedCredit.LinkedFlows linkedFlows)
    • setLivemode

      public void setLivemode(Boolean livemode)
      If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
    • setNetwork

      public void setNetwork(String network)
      The rails used to send the funds.

      One of ach, card, rtp, stripe, or us_domestic_wire.

    • setObject

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

      Equal to treasury.received_credit.

    • setReversalDetails

      public void setReversalDetails(ReceivedCredit.ReversalDetails reversalDetails)
      Details describing when a ReceivedCredit may be reversed.
    • setStatus

      public void setStatus(String status)
      Status of the ReceivedCredit. ReceivedCredits are created either succeeded (approved) or failed (declined). If a ReceivedCredit is declined, the failure reason can be found in the failure_code field.

      One of failed, or succeeded.

    • 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