Class: LobbyingDisclosureClient::Types::ContributionItem

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

Instance Method Summary collapse

Instance Method Details

#deserialize(hash, strict = false) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/lobbying_disclosure_client/types/contribution_item.rb', line 23

def deserialize(hash, strict = false)
  super(
    hash.merge(
      'amount' => hash['amount']&.to_d,
      'date' => hash['date'] ? Date.parse(hash['date']) : nil
    ),
    strict
  )
end