Class: Workarea::Zipco::Order

Inherits:
Object
  • Object
show all
Defined in:
app/services/workarea/zipco/order.rb

Defined Under Namespace

Modules: ProductImageUrl, ProductUrl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ Order

Returns a new instance of Order.

Parameters:

  • ::Workarea::Order


25
26
27
# File 'app/services/workarea/zipco/order.rb', line 25

def initialize(order)
  @order = Workarea::Storefront::OrderViewModel.new(order)
end

Instance Attribute Details

#orderObject (readonly)

Returns the value of attribute order.



22
23
24
# File 'app/services/workarea/zipco/order.rb', line 22

def order
  @order
end

Instance Method Details

#to_hObject



29
30
31
32
33
34
35
# File 'app/services/workarea/zipco/order.rb', line 29

def to_h
  {
    shopper: zipco_shopper,
    order: zipco_order,
    config: zipco_config
  }
end