Sha256: a24b089d2ce3701405c612190d76bfc0a9a476f2a4e7278562baac6923d112f3

Contents?: true

Size: 516 Bytes

Versions: 17

Compression:

Stored size: 516 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module QuickBooksOnline
    module Serialization
      module Type
        class MappingType < LedgerSync::Type::Value
          attr_reader :mapping

          def initialize(args = {})
            @mapping = args.fetch(:mapping)

            super()
          end

          def cast_value(args = {})
            value = args.fetch(:value)

            return if value.nil?

            mapping.fetch(:value)
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
ledger_sync-quickbooks_online-2.0.0 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-1.0.1 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-1.0.0 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.4.0 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.3.1 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.3.0 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.6 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.5 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.4 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.2 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.1 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.2.0 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-quickbooks_online-0.1.1 lib/ledger_sync/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-1.6.0 lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/quickbooks_online/serialziation/type/mapping_type.rb