Class: DIDWW::Resource::Order

Inherits:
Base
  • Object
show all
Includes:
CONST
Defined in:
lib/didww/resources/order.rb

Defined Under Namespace

Modules: CONST

Constant Summary

Constants included from CONST

CONST::STATUSES, CONST::STATUS_CANCELLED, CONST::STATUS_COMPLETED, CONST::STATUS_PENDING

Instance Method Summary collapse

Methods inherited from Base

#as_json_api

Constructor Details

#initialize(*args) ⇒ Order

Type: String Description: GET or POST



58
59
60
61
# File 'lib/didww/resources/order.rb', line 58

def initialize(*args)
  super
  self.items ||= []
end

Instance Method Details

#cancelled?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/didww/resources/order.rb', line 71

def cancelled?
  STATUS_CANCELLED == status
end

#completed?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/didww/resources/order.rb', line 67

def completed?
  STATUS_COMPLETED == status
end

#pending?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/didww/resources/order.rb', line 63

def pending?
  STATUS_PENDING == status
end