Class: Lago::Api::Resources::Quote
- Inherits:
-
Base
- Object
- Base
- Lago::Api::Resources::Quote
show all
- Defined in:
- lib/lago/api/resources/quote.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#create, #destroy, #get, #get_all, #initialize, #update, #whitelist_params
Instance Method Details
#api_resource ⇒ Object
11
12
13
|
# File 'lib/lago/api/resources/quote.rb', line 11
def api_resource
'quotes'
end
|
#root_name ⇒ Object
15
16
17
|
# File 'lib/lago/api/resources/quote.rb', line 15
def root_name
'quote'
end
|
#versions(quote_id, options = {}) ⇒ Object
19
20
21
22
23
24
|
# File 'lib/lago/api/resources/quote.rb', line 19
def versions(quote_id, options = {})
path = "/api/v1/quotes/#{quote_id}/versions"
response = connection.get_all(options, path)
JSON.parse(response.to_json, object_class: OpenStruct)
end
|