Class: LobbyingDisclosureClient::Types::Filing

Inherits:
T::Struct
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/lobbying_disclosure_client/types/filing.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(hash, strict = false) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/lobbying_disclosure_client/types/filing.rb', line 46

def deserialize(hash, strict = false)
  super(
    hash.merge(
      'dt_posted' => hash['dt_posted'] ? DateTime.parse(hash['dt_posted']) : nil,
      'expenses' => hash['expenses']&.to_d,
      'income' => hash['income']&.to_d,
      'termination_date' => hash['termination_date'] ? Date.parse(hash['termination_date']) : nil
    ),
    strict
  )
end