Class: LedgerSync::Ledgers::NetSuite::Check::Serializer

Inherits:
Serializer show all
Defined in:
lib/ledger_sync/ledgers/netsuite/check/serializer.rb

Instance Method Summary collapse

Methods inherited from Serializer

attribute, attribute_class, attributes, references_many, references_one, #serialize, serializer_from

Methods included from Serialization::Mixin

included

Instance Method Details

#account_present?(args = {}) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
# File 'lib/ledger_sync/ledgers/netsuite/check/serializer.rb', line 30

def (args = {})
  resource = args.fetch(:resource)

  resource..present?
end

#currency_present?(args = {}) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
45
46
# File 'lib/ledger_sync/ledgers/netsuite/check/serializer.rb', line 42

def currency_present?(args = {})
  resource = args.fetch(:resource)

  resource.currency.present?
end

#department_present?(args = {}) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
39
40
# File 'lib/ledger_sync/ledgers/netsuite/check/serializer.rb', line 36

def department_present?(args = {})
  resource = args.fetch(:resource)

  resource.department.present?
end