lib/tikkie/api/responses/user.rb in tikkie-api-0.2.1 vs lib/tikkie/api/responses/user.rb in tikkie-api-0.2.2
- old
+ new
@@ -24,11 +24,13 @@
def bank_accounts
@bank_accounts ||= begin
bank_accounts = []
- data[:bankAccounts].each do |data|
- bank_accounts << Tikkie::Api::Responses::BankAccount.new(data)
+ if data[:bankAccounts]
+ data[:bankAccounts].each do |data|
+ bank_accounts << Tikkie::Api::Responses::BankAccount.new(data)
+ end
end
bank_accounts
end
end