Sha256: c667ee5428c5da7ba5454e933c88403e7d568cee0bd9ccc70947527243e20998

Contents?: true

Size: 1.64 KB

Versions: 4

Compression:

Stored size: 1.64 KB

Contents

# frozen_string_literal: true

module Afterpay
  module Components
    class Item < Base
      # @attribute name
      # @return [String]
      # Product's name
      attr_accessor :name

      # @attribute sku
      # @return [String]
      # Product's SKU
      attr_accessor :sku

      # @attribute page_url
      # @return [String]
      # The canonical URL for the item's Product Detail Page. Limited to 2048 characters.
      attr_accessor :page_url

      # @attribute image_url
      # @return [String]
      # A URL for a web-optimised photo of the item, suitable for use directly as the src attribute of an img tag. Limited to 2048 characters.
      attr_accessor :image_url

      # @attribute quantity
      # @return [Integer]
      # The quantity of the item.
      attr_accessor :quantity

      # @attribute price
      # @return [Afterpay::Components::Money]
      # The unit price of the individual item. Must be a positive value.
      attr_accessor :price

      # @attribute categories
      # @return [Array]
      # An array of arrays to accommodate multiple categories that apply to the item.
      # Each array represents a hierarchical path to a category, with the left-most category being the top-level parent category.
      attr_accessor :categories

      # @attribute estimated_shipment_date
      # @return [String]
      # The estimated date when the order will be shipped, in YYYY-MM or YYYY-MM-DD format
      attr_accessor :estimated_shipment_date

      # @attribute preorder
      # @return boolean
      # Should return false when the estimated_shipment_date is already passed otherwise true
      attr_accessor :preorder
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
afterpay-0.6.0 lib/afterpay/components/item.rb
afterpay-0.5.0 lib/afterpay/components/item.rb
afterpay-0.4.0 lib/afterpay/components/item.rb
afterpay-0.3.0 lib/afterpay/components/item.rb