Class: SealineInsurance::Responses::Order
- Inherits:
-
Base
- Object
- Base
- SealineInsurance::Responses::Order
show all
- Defined in:
- lib/sealine_insurance/responses/order.rb
Constant Summary
collapse
- STATUSES =
[
'IN_PROGRESS',
'ERROR',
'UPDATE_IN_PROGRESS',
'NOT_UPDATED',
'NEED_PAYMENT',
'PAYMENT_IN_PROGRESS',
'WAITING_FOR_DOCUMENTS',
'DONE',
'CANCEL_IN_PROGRESS',
'WAITING_CANCELLATION_APPROVAL',
'REPEAT_CANCELLATION',
'NOT_CANCELLED',
'CANCELLED',
].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
34
35
36
|
# File 'lib/sealine_insurance/responses/order.rb', line 34
def coverage
to_money(body.dig('result_data', 'coverage'))
end
|
#documents ⇒ Object
38
39
40
|
# File 'lib/sealine_insurance/responses/order.rb', line 38
def documents
body['documents'] || []
end
|
#external_numbers ⇒ Object
42
43
44
|
# File 'lib/sealine_insurance/responses/order.rb', line 42
def external_numbers
body['external_numbers'] || []
end
|
#order_id ⇒ Object
22
23
24
|
# File 'lib/sealine_insurance/responses/order.rb', line 22
def order_id
body['id']
end
|
#price ⇒ Object
30
31
32
|
# File 'lib/sealine_insurance/responses/order.rb', line 30
def price
to_money(body['price'])
end
|
#status ⇒ Object
26
27
28
|
# File 'lib/sealine_insurance/responses/order.rb', line 26
def status
body['status']
end
|