Class: Stripe::FxQuoteService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/fx_quote_service.rb

Instance Method Summary collapse

Methods inherited from StripeService

#initialize, #request, #request_stream

Constructor Details

This class inherits a constructor from Stripe::StripeService

Instance Method Details

#create(params = {}, opts = {}) ⇒ Object

Creates an FX Quote object



7
8
9
# File 'lib/stripe/services/fx_quote_service.rb', line 7

def create(params = {}, opts = {})
  request(method: :post, path: "/v1/fx_quotes", params: params, opts: opts, base_address: :api)
end

#list(params = {}, opts = {}) ⇒ Object

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.



12
13
14
# File 'lib/stripe/services/fx_quote_service.rb', line 12

def list(params = {}, opts = {})
  request(method: :get, path: "/v1/fx_quotes", params: params, opts: opts, base_address: :api)
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieve an FX Quote object



17
18
19
20
21
22
23
24
25
# File 'lib/stripe/services/fx_quote_service.rb', line 17

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/fx_quotes/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end