Class: InstantQuote::Adapters::Optimum
- Inherits:
-
InstantQuote::Adapter
- Object
- InstantQuote::Adapter
- InstantQuote::Adapters::Optimum
- Defined in:
- lib/instant_quote/adapters/optimum.rb
Constant Summary
Constants inherited from InstantQuote::Adapter
InstantQuote::Adapter::DEFAULT_ADDITIONAL_FIELDS
Instance Method Summary collapse
-
#get_link(_connection) ⇒ Object
Gets the URL for the given state key.
- #get_quote(params, _connection) ⇒ Object
- #get_status(application_id, _connection) ⇒ Object
Methods inherited from InstantQuote::Adapter
#accept_offer, accept_offer, additional_fields, #get_approval, get_approval, get_link, get_preapproval, #get_preapproval, get_quote, get_status
Instance Method Details
#get_link(_connection) ⇒ Object
Gets the URL for the given state key.
116 117 118 |
# File 'lib/instant_quote/adapters/optimum.rb', line 116 def get_link(_connection) '' end |
#get_quote(params, _connection) ⇒ Object
99 100 101 102 103 104 105 |
# File 'lib/instant_quote/adapters/optimum.rb', line 99 def get_quote(params, _connection) response = ::Optimum::Decision.create(params) return response.data[:opportunityId] if response.success? raise_error(response) end |
#get_status(application_id, _connection) ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/instant_quote/adapters/optimum.rb', line 107 def get_status(application_id, _connection) response = ::Optimum::Decision.update(application_id) raise_error(response) unless response.success? decision_parser.new(response.body) end |