Sha256: c9699038e4c54faad5b946c2f0d1f90aaab21a3bac30973d7ad58e95e1a7119d

Contents?: true

Size: 637 Bytes

Versions: 6

Compression:

Stored size: 637 Bytes

Contents

module NetSuiteRails
  module RecordSync
    module PullManager
      extend self

      # TODO pull relevant methods out of poll manager and into this class

      def extract_custom_field_value(custom_field_value)
        if custom_field_value.present? && custom_field_value.is_a?(Hash) && custom_field_value.has_key?(:name)
          custom_field_value = custom_field_value[:name]
        end

        if custom_field_value.present? && custom_field_value.is_a?(NetSuite::Records::CustomRecordRef)
          custom_field_value = custom_field_value.attributes[:name]
        end

        custom_field_value
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
netsuite_rails-0.3.6 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.3.5 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.3.4 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.3.3 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.3.2 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.3.1 lib/netsuite_rails/record_sync/pull_manager.rb