Class FxQuote

All Implemented Interfaces:
HasId, StripeActiveObject, StripeObjectInterface

public class FxQuote extends ApiResource implements HasId
The FX Quotes API provides three functions: - View Stripe's current exchange rate for any given currency pair. - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing uncertainty from FX fluctuations. - Preview the FX fees Stripe will charge on your FX transaction, allowing you to anticipate specific settlement amounts before payment costs.

View the docs

  • Constructor Details

    • FxQuote

      public FxQuote()
  • Method Details

    • create

      public static FxQuote create(Map<String,Object> params) throws StripeException
      Creates an FX Quote object.
      Throws:
      StripeException
    • create

      public static FxQuote create(Map<String,Object> params, RequestOptions options) throws StripeException
      Creates an FX Quote object.
      Throws:
      StripeException
    • create

      public static FxQuote create(FxQuoteCreateParams params) throws StripeException
      Creates an FX Quote object.
      Throws:
      StripeException
    • create

      public static FxQuote create(FxQuoteCreateParams params, RequestOptions options) throws StripeException
      Creates an FX Quote object.
      Throws:
      StripeException
    • list

      public static FxQuoteCollection list(Map<String,Object> params) throws StripeException
      Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
      Throws:
      StripeException
    • list

      public static FxQuoteCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
      Throws:
      StripeException
    • list

      public static FxQuoteCollection list(FxQuoteListParams params) throws StripeException
      Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
      Throws:
      StripeException
    • list

      public static FxQuoteCollection list(FxQuoteListParams params, RequestOptions options) throws StripeException
      Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first.
      Throws:
      StripeException
    • retrieve

      public static FxQuote retrieve(String id) throws StripeException
      Retrieve an FX Quote object.
      Throws:
      StripeException
    • retrieve

      public static FxQuote retrieve(String id, RequestOptions options) throws StripeException
      Retrieve an FX Quote object.
      Throws:
      StripeException
    • retrieve

      public static FxQuote retrieve(String id, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieve an FX Quote object.
      Throws:
      StripeException
    • retrieve

      public static FxQuote retrieve(String id, FxQuoteRetrieveParams params, RequestOptions options) throws StripeException
      Retrieve an FX Quote object.
      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      The Stripe account ID that the funds will be transferred to.

      This field should match the account ID that would be used in the Transfer’s destination field.

      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getCreated

      public Long getCreated()
      Time at which the quote was created, measured in seconds since the Unix epoch.
    • getLockDuration

      public String getLockDuration()
      The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions.

      One of day, five_minutes, hour, or none.

    • getLockExpiresAt

      public Long getLockExpiresAt()
      Time at which the quote will expire, measured in seconds since the Unix epoch.

      If lock_duration is set to ‘none’ this field will be set to null.

    • getLockStatus

      public String getLockStatus()
      Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp.

      Can return value none, active, or expired.

      One of active, expired, or none.

    • getObject

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

      Equal to fx_quote.

    • getRates

      public Map<String,FxQuote.Rate> getRates()
      Information about the rates.
    • getToCurrency

      public String getToCurrency()
      The currency to convert into, typically this is the currency that you want to settle to your Stripe balance. Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getUsage

      public FxQuote.Usage getUsage()
    • setCreated

      public void setCreated(Long created)
      Time at which the quote was created, measured in seconds since the Unix epoch.
    • setId

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

      public void setLockDuration(String lockDuration)
      The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions.

      One of day, five_minutes, hour, or none.

    • setLockExpiresAt

      public void setLockExpiresAt(Long lockExpiresAt)
      Time at which the quote will expire, measured in seconds since the Unix epoch.

      If lock_duration is set to ‘none’ this field will be set to null.

    • setLockStatus

      public void setLockStatus(String lockStatus)
      Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp.

      Can return value none, active, or expired.

      One of active, expired, or none.

    • setObject

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

      Equal to fx_quote.

    • setRates

      public void setRates(Map<String,FxQuote.Rate> rates)
      Information about the rates.
    • setToCurrency

      public void setToCurrency(String toCurrency)
      The currency to convert into, typically this is the currency that you want to settle to your Stripe balance. Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setUsage

      public void setUsage(FxQuote.Usage usage)
    • 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