Sha256: 5c2216d5c3c483075562ca1ce7f587a075852215725c971c5eb46383531b1a75

Contents?: true

Size: 437 Bytes

Versions: 43

Compression:

Stored size: 437 Bytes

Contents

module NetSuite
  module Records
    class PricingMatrix
      include Namespaces::PlatformCore

      def initialize(attributes = {})
        attributes[:pricing].each do |pricing|
          prices << RecordRef.new(pricing)
        end if attributes[:pricing]
      end

      def prices
        @prices ||= []
      end

      def to_record
        { "#{record_namespace}:item" => prices.map(&:to_record) }
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
netsuite-0.6.7 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.6 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.5 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.4 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.3 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.2 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.1 lib/netsuite/records/pricing_matrix.rb
netsuite-0.6.0 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.9 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.8 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.7 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.6 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.5 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.4 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.3 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.2 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.1 lib/netsuite/records/pricing_matrix.rb
netsuite-0.5.0 lib/netsuite/records/pricing_matrix.rb
netsuite-0.4.9 lib/netsuite/records/pricing_matrix.rb
netsuite-0.4.8 lib/netsuite/records/pricing_matrix.rb