Sha256: 89a435c503e122f2ea5f9038fa1459f5e864850d151a0767883e92bec18202fb
Contents?: true
Size: 522 Bytes
Versions: 7
Compression:
Stored size: 522 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).where(code: sku).first.boms.any? end alias billing_of_materials? bom? end end end end
Version data entries
7 entries across 7 versions & 1 rubygems