Class: Workarea::Admin::FulfillmentSkuViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::FulfillmentSkuViewModel
- Defined in:
- app/view_models/workarea/admin/fulfillment_sku_view_model.rb
Instance Method Summary collapse
Instance Method Details
#product ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/view_models/workarea/admin/fulfillment_sku_view_model.rb', line 13 def product @product ||= begin product = Catalog::Product.find_by_sku(model.id) ProductViewModel.wrap(product, ) if product.present? end end |
#timeline ⇒ Object
4 5 6 |
# File 'app/view_models/workarea/admin/fulfillment_sku_view_model.rb', line 4 def timeline @timeline ||= TimelineViewModel.new(model) end |
#tokens ⇒ Object
8 9 10 11 |
# File 'app/view_models/workarea/admin/fulfillment_sku_view_model.rb', line 8 def tokens return [] unless download? @tokens ||= Fulfillment::Token.for_sku(id) end |