Class: NetSuite::Records::BillingScheduleRecurrenceList

Inherits:
Object
  • Object
show all
Includes:
Namespaces::ListAcct, Support::Fields
Defined in:
lib/netsuite/records/billing_schedule_recurrence_list.rb

Instance Method Summary collapse

Methods included from Namespaces::ListAcct

#record_namespace

Methods included from Support::Fields

included

Methods included from Support::Attributes

#attributes, #attributes=, #initialize_from_attributes_hash

Constructor Details

#initialize(attributes = {}) ⇒ BillingScheduleRecurrenceList

Returns a new instance of BillingScheduleRecurrenceList.



9
10
11
# File 'lib/netsuite/records/billing_schedule_recurrence_list.rb', line 9

def initialize(attributes = {})
  initialize_from_attributes_hash(attributes)
end

Instance Method Details

#recurrence=(recurrences) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/netsuite/records/billing_schedule_recurrence_list.rb', line 13

def recurrence=(recurrences)
  case recurrences
  when Hash
    self.recurrences << BillingScheduleRecurrence.new(recurrences)
  when Array
    recurrences.each { |recurrence| self.recurrences << BillingScheduleRecurrence.new(recurrence) }
  end
end

#recurrencesObject



22
23
24
# File 'lib/netsuite/records/billing_schedule_recurrence_list.rb', line 22

def recurrences
  @recurrences ||= []
end

#to_recordObject



26
27
28
# File 'lib/netsuite/records/billing_schedule_recurrence_list.rb', line 26

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