Sha256: 8be11e7e8506f6686500fcc6c485b419402fdbaa9110acffd2e255a5497ac5f4

Contents?: true

Size: 785 Bytes

Versions: 36

Compression:

Stored size: 785 Bytes

Contents

module NetSuite
  module Records
    class BillingScheduleRecurrenceList
      include Support::Fields
      include Namespaces::ListAcct

      fields :billing_schedule_recurrence

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

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

      def recurrences
        @recurrences ||= []
      end

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

    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
netsuite-0.7.1 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.7.0 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.9 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.8 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.7 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.6 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.5 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.4 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.3 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.2 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.1 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.6.0 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.9 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.8 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.7 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.6 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.5 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.4 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.3 lib/netsuite/records/billing_schedule_recurrence_list.rb
netsuite-0.5.2 lib/netsuite/records/billing_schedule_recurrence_list.rb