Sha256: c2fb56ce8c04c0d31f1ab858d0574d236dbdf7585e7e5512361c6cf4204ffd30

Contents?: true

Size: 561 Bytes

Versions: 3

Compression:

Stored size: 561 Bytes

Contents

module NetSuiteRails
  module RecordSync
    module PullManager
      extend self

      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

3 entries across 3 versions & 1 rubygems

Version Path
netsuite_rails-0.2.2 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.2.1 lib/netsuite_rails/record_sync/pull_manager.rb
netsuite_rails-0.2.0 lib/netsuite_rails/record_sync/pull_manager.rb