<commit_before>require 'lightspeed/base'

module Lightspeed
  class Item < Lightspeed::Base
    attr_accessor :systemSku, :defaultCost, :avgCost, :discountable, :tax,
      :archived, :itemType, :description, :modelYear, :upc, :ean, :customSku,
      :manufacturerSku, :createTime, :timeStamp,

      # Association keys
      :categoryID, :taxClassID, :departmentID, :itemMatrixID, :manufacturerID, :seasonID,
      :defaultVendorID, :itemECommerceID,

      # Embedded
      :ItemMatrix, :ItemAttributes, :ItemShops, :Prices, :Note, :TaxClass, :Category

    def self.id_field
      "itemID"
    end

    # FUNFACT: ItemMatrix data is returned during an `update` request,
    # but not during a `find` request.
    def item_matrix
      return if itemMatrixID.to_i.zero?
      @ItemMatrix ||= owner.item_matrices.find(itemMatrixID) # rubocop:disable VariableName
    end
  end
end<commit_msg>Add Manufacturer to list of Item embedded resources<commit_after>require 'lightspeed/base'

module Lightspeed
  class Item < Lightspeed::Base
    attr_accessor :systemSku, :defaultCost, :avgCost, :discountable, :tax,
      :archived, :itemType, :description, :modelYear, :upc, :ean, :customSku,
      :manufacturerSku, :createTime, :timeStamp,

      # Association keys
      :categoryID, :taxClassID, :departmentID, :itemMatrixID, :manufacturerID, :seasonID,
      :defaultVendorID, :itemECommerceID,

      # Embedded
      :ItemMatrix, :ItemAttributes, :ItemShops, :Prices, :Note, :TaxClass, :Category, :Manufacturer

    def self.id_field
      "itemID"
    end

    # FUNFACT: ItemMatrix data is returned during an `update` request,
    # but not during a `find` request.
    def item_matrix
      return if itemMatrixID.to_i.zero?
      @ItemMatrix ||= owner.item_matrices.find(itemMatrixID) # rubocop:disable VariableName
    end
  end
end
{'fraction_non_alphanumeric': 0.10440456769983687, 'fraction_numerical': 0.0, 'mean_word_length': 3.932975871313673, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7282846', 'n_tokens_mistral': 616, 'n_tokens_neox': 597, 'n_words': 151}