Class: SealineInsurance::Responses::Calculate
- Inherits:
-
Base
- Object
- Base
- SealineInsurance::Responses::Calculate
show all
- Defined in:
- lib/sealine_insurance/responses/calculate.rb
Constant Summary
collapse
- STATUSES =
[
'IN_PROGRESS',
'DONE',
'DONE_WITH_ERRORS',
'ERROR',
].freeze
Instance Attribute Summary
Attributes inherited from Base
#body
Instance Method Summary
collapse
Methods inherited from Base
#error?, #error_code, #error_message, #initialize, #success?
Instance Method Details
#coverage ⇒ Object
25
26
27
|
# File 'lib/sealine_insurance/responses/calculate.rb', line 25
def coverage
to_money(result.dig('result_data', 'coverage'))
end
|
#price ⇒ Object
21
22
23
|
# File 'lib/sealine_insurance/responses/calculate.rb', line 21
def price
to_money(result['price'])
end
|
#request_id ⇒ Object
13
14
15
|
# File 'lib/sealine_insurance/responses/calculate.rb', line 13
def request_id
body['id']
end
|
#status ⇒ Object
17
18
19
|
# File 'lib/sealine_insurance/responses/calculate.rb', line 17
def status
body['status']
end
|