Sha256: 461508dba7120eb906f90bd69363aee22e3f288022337a47d4631da1918dfe0a

Contents?: true

Size: 1.1 KB

Versions: 5

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

module LedgerSync
  module Adaptors
    module NetSuite
      module Customer
        class LedgerSerializer < NetSuite::LedgerSerializer
          api_resource_type :customer

          attribute ledger_attribute: :companyName,
                    resource_attribute: :name

          attribute ledger_attribute: :entityId,
                    resource_attribute: :external_id

          attribute ledger_attribute: :externalId,
                    resource_attribute: :external_id

          attribute ledger_attribute: :email,
                    resource_attribute: :email

          attribute ledger_attribute: :phone,
                    resource_attribute: :phone_number

          # attribute ledger_attribute: :firstName,
          #           resource_attribute: :first_name

          # attribute ledger_attribute: :lastName,
          #           resource_attribute: :last_name

          attribute ledger_attribute: :subsidiary,
                    resource_attribute: :subsidiary,
                    type: LedgerSerializerType::ReferenceType
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ledger_sync-1.3.5 lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb
ledger_sync-1.3.4 lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb
ledger_sync-1.3.3 lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb
ledger_sync-1.3.2 lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb
ledger_sync-1.3.1 lib/ledger_sync/adaptors/netsuite/customer/ledger_serializer.rb