Class: Workarea::GlobalE::Api::UpdateOrderStatus::Canceled

Inherits:
Object
  • Object
show all
Defined in:
app/services/workarea/global_e/api/update_order_status/canceled.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ Canceled

Returns a new instance of Canceled.



11
12
13
# File 'app/services/workarea/global_e/api/update_order_status/canceled.rb', line 11

def initialize(order)
  @order = order
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order.



5
6
7
# File 'app/services/workarea/global_e/api/update_order_status/canceled.rb', line 5

def order
  @order
end

Class Method Details

.perform(order) ⇒ Object



7
8
9
# File 'app/services/workarea/global_e/api/update_order_status/canceled.rb', line 7

def self.perform(order)
  new(order).perform
end

Instance Method Details

#performObject



15
16
17
18
19
# File 'app/services/workarea/global_e/api/update_order_status/canceled.rb', line 15

def perform
  restock
  update_fulfillment
  order.cancel
end