Class: Dropwallet::Core::Order

Inherits:
Model
  • Object
show all
Defined in:
lib/dropwallet/core/order.rb

Instance Method Summary collapse

Methods inherited from Model

all, baseServiceUrl, count, create, debug?, delete, #delete, field, find, #initialize, #isNew?, pages, #read_attribute, #read_attribute_for_validation, #save, serviceUrl, #to_json, #to_s, #update, #write_attribute

Constructor Details

This class inherits a constructor from Dropwallet::Core::Model

Instance Method Details

#statusObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/dropwallet/core/order.rb', line 11

def status
  canceled = true
  self.items.each do |item|
    if item['status'].upcase != 'CANCELLED'
      canceled= false
    end
  end

  if canceled
    return 'CANCELLED'
  end

  return ''
end