Sha256: d9efe99dbd73393130e58d785d5bd807d09b4fa1555d6961203246470555e32e

Contents?: true

Size: 422 Bytes

Versions: 8

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      module Serialization
        module Type
          class IntegerToAmountFloatType < LedgerSync::Type::Value
            def cast_value(args = {})
              value = args.fetch(:value)

              return if value.nil?

              value / 100.0
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.4.4 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/serialization/type/integer_to_amount_float_type.rb