Class: ModernTreasury::Resources::ForeignExchangeQuotes
- Inherits:
-
Object
- Object
- ModernTreasury::Resources::ForeignExchangeQuotes
- Defined in:
- lib/modern_treasury/resources/foreign_exchange_quotes.rb
Instance Method Summary collapse
-
#create(internal_account_id: , target_currency: , base_amount: nil, base_currency: nil, effective_at: nil, target_amount: nil, request_options: {}) ⇒ ModernTreasury::Models::ForeignExchangeQuote
Some parameter documentations has been truncated, see Models::ForeignExchangeQuoteCreateParams for more details.
-
#initialize(client:) ⇒ ForeignExchangeQuotes
constructor
private
A new instance of ForeignExchangeQuotes.
-
#list(after_cursor: nil, base_currency: nil, effective_at_end: nil, effective_at_start: nil, expires_at: nil, internal_account_id: nil, metadata: nil, per_page: nil, target_currency: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::ForeignExchangeQuote>
Some parameter documentations has been truncated, see Models::ForeignExchangeQuoteListParams for more details.
-
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::ForeignExchangeQuote
get foreign_exchange_quote.
Constructor Details
#initialize(client:) ⇒ ForeignExchangeQuotes
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ForeignExchangeQuotes.
106 107 108 |
# File 'lib/modern_treasury/resources/foreign_exchange_quotes.rb', line 106 def initialize(client:) @client = client end |
Instance Method Details
#create(internal_account_id: , target_currency: , base_amount: nil, base_currency: nil, effective_at: nil, target_amount: nil, request_options: {}) ⇒ ModernTreasury::Models::ForeignExchangeQuote
Some parameter documentations has been truncated, see Models::ForeignExchangeQuoteCreateParams for more details.
create foreign_exchange_quote
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/modern_treasury/resources/foreign_exchange_quotes.rb', line 30 def create(params) parsed, = ModernTreasury::ForeignExchangeQuoteCreateParams.dump_request(params) @client.request( method: :post, path: "api/foreign_exchange_quotes", body: parsed, model: ModernTreasury::ForeignExchangeQuote, options: ) end |
#list(after_cursor: nil, base_currency: nil, effective_at_end: nil, effective_at_start: nil, expires_at: nil, internal_account_id: nil, metadata: nil, per_page: nil, target_currency: nil, request_options: {}) ⇒ ModernTreasury::Internal::Page<ModernTreasury::Models::ForeignExchangeQuote>
Some parameter documentations has been truncated, see Models::ForeignExchangeQuoteListParams for more details.
list foreign_exchange_quotes
91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/modern_treasury/resources/foreign_exchange_quotes.rb', line 91 def list(params = {}) parsed, = ModernTreasury::ForeignExchangeQuoteListParams.dump_request(params) @client.request( method: :get, path: "api/foreign_exchange_quotes", query: parsed, page: ModernTreasury::Internal::Page, model: ModernTreasury::ForeignExchangeQuote, options: ) end |
#retrieve(id, request_options: {}) ⇒ ModernTreasury::Models::ForeignExchangeQuote
get foreign_exchange_quote
52 53 54 55 56 57 58 59 |
# File 'lib/modern_treasury/resources/foreign_exchange_quotes.rb', line 52 def retrieve(id, params = {}) @client.request( method: :get, path: ["api/foreign_exchange_quotes/%1$s", id], model: ModernTreasury::ForeignExchangeQuote, options: params[:request_options] ) end |