Class: NetSuite::Records::PricingMatrix

Inherits:
Object
  • Object
show all
Includes:
Namespaces::PlatformCore
Defined in:
lib/netsuite/records/pricing_matrix.rb

Instance Method Summary collapse

Methods included from Namespaces::PlatformCore

#record_namespace

Constructor Details

#initialize(attributes = {}) ⇒ PricingMatrix

Returns a new instance of PricingMatrix.



6
7
8
9
10
# File 'lib/netsuite/records/pricing_matrix.rb', line 6

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

Instance Method Details

#pricesObject



12
13
14
# File 'lib/netsuite/records/pricing_matrix.rb', line 12

def prices
  @prices ||= []
end

#to_recordObject



16
17
18
# File 'lib/netsuite/records/pricing_matrix.rb', line 16

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