class SealineInsurance::Responses::Calculate
Constants
- STATUSES
Public Instance Methods
coverage()
click to toggle source
# File lib/sealine_insurance/responses/calculate.rb, line 25 def coverage to_money(result.dig('result_data', 'coverage')) end
price()
click to toggle source
# File lib/sealine_insurance/responses/calculate.rb, line 21 def price to_money(result['price']) end
request_id()
click to toggle source
# File lib/sealine_insurance/responses/calculate.rb, line 13 def request_id body['id'] end
status()
click to toggle source
# File lib/sealine_insurance/responses/calculate.rb, line 17 def status body['status'] end
Private Instance Methods
result()
click to toggle source
# File lib/sealine_insurance/responses/calculate.rb, line 31 def result @result ||= body['results']&.detect { |item| item['status'] == 'DONE' } || {} end