Class: DIDWW::Resource::Order
- Includes:
- Callback::CONST
- Defined in:
- lib/didww/resource/order.rb
Constant Summary collapse
- STATUS_PENDING =
Possible values for order.status
'Pending'
- STATUS_COMPLETED =
'Completed'
- STATUS_CANCELLED =
'Canceled'
- STATUSES =
[ STATUS_PENDING, STATUS_COMPLETED, STATUS_CANCELLED ].freeze
Constants included from Callback::CONST
Callback::CONST::CALLBACK_METHODS, Callback::CONST::CALLBACK_METHOD_GET, Callback::CONST::CALLBACK_METHOD_POST
Instance Method Summary collapse
- #cancelled? ⇒ Boolean
- #completed? ⇒ Boolean
-
#initialize(*args) ⇒ Order
constructor
Type: String Description: GET or POST.
- #pending? ⇒ Boolean
Methods inherited from Base
Constructor Details
#initialize(*args) ⇒ Order
Type: String Description: GET or POST
57 58 59 60 |
# File 'lib/didww/resource/order.rb', line 57 def initialize(*args) super self.items ||= [] end |
Instance Method Details
#cancelled? ⇒ Boolean
70 71 72 |
# File 'lib/didww/resource/order.rb', line 70 def cancelled? STATUS_CANCELLED == status end |
#completed? ⇒ Boolean
66 67 68 |
# File 'lib/didww/resource/order.rb', line 66 def completed? STATUS_COMPLETED == status end |
#pending? ⇒ Boolean
62 63 64 |
# File 'lib/didww/resource/order.rb', line 62 def pending? STATUS_PENDING == status end |