Sha256: 130ab2eab3a0691ab5c67f01c96b9425ffaec312e051957696ceaf9f4a7a3923

Contents?: true

Size: 513 Bytes

Versions: 28

Compression:

Stored size: 513 Bytes

Contents

module Workarea
  module Admin
    class FulfillmentSkuViewModel < ApplicationViewModel
      def timeline
        @timeline ||= TimelineViewModel.new(model)
      end

      def tokens
        return [] unless download?
        @tokens ||= Fulfillment::Token.for_sku(id)
      end

      def product
        @product ||=
          begin
            product = Catalog::Product.find_by_sku(model.id)
            ProductViewModel.wrap(product, options) if product.present?
          end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.6 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.5 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.4 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.3 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.2 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.1 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.0 app/view_models/workarea/admin/fulfillment_sku_view_model.rb
workarea-admin-3.5.0.beta.1 app/view_models/workarea/admin/fulfillment_sku_view_model.rb