Sha256: 4720dab9c554f40a8283782e2d140d057ae52987b09c50baafbbe66b52dc109c
Contents?: true
Size: 519 Bytes
Versions: 34
Compression:
Stored size: 519 Bytes
Contents
# frozen_string_literal: true require_relative '../api_resource' module ErpIntegration module Fulfil module Resources class Product < ApiResource self.model_name = 'product.product' # Checks whether a certain product is a BOM. # @param sku [String] The product's SKU. # @return [Boolean] Whether it's a BOM or not. def bom?(sku) select(:boms).find_by!(code: sku).boms.any? end alias billing_of_materials? bom? end end end end
Version data entries
34 entries across 34 versions & 1 rubygems