Class: LedgerSync::Adaptors::QuickBooksOnline::LedgerSerializerType::DateType

Inherits:
LedgerSerializerType::MappingType show all
Defined in:
lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb

Instance Attribute Summary

Attributes inherited from LedgerSerializerType::MappingType

#source, #value

Instance Method Summary collapse

Methods inherited from LedgerSerializerType::MappingType

mapping

Instance Method Details

#convert_from_ledger(value:) ⇒ Object



8
9
10
11
12
# File 'lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb', line 8

def convert_from_ledger(value:)
  return value if value.nil?

  value.to_date
end

#convert_from_local(value:) ⇒ Object



14
15
16
17
18
# File 'lib/ledger_sync/adaptors/quickbooks_online/ledger_serializer_type/date_type.rb', line 14

def convert_from_local(value:)
  return value if value.nil?

  value.to_s
end