Skip to content

Commit

Permalink
Further patch get_payments; see
Browse files Browse the repository at this point in the history
  • Loading branch information
jomz committed Dec 23, 2019
1 parent 2af2b50 commit 62480a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xero_gateway/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def self.from_xml(payment_element)
when 'CurrencyRate' then payment.currency_rate = BigDecimal(element.text)
when 'Invoice'
payment.invoice_id = element.elements["InvoiceID"].text
payment.invoice_number = element.elements["InvoiceNumber"].text
payment.invoice_number = element.elements["InvoiceNumber"].try(:text)
when 'IsReconciled' then payment.reconciled = (element.text == "true")
when 'Account' then payment.account_id = element.elements["AccountID"].text
end
Expand Down

0 comments on commit 62480a9

Please sign in to comment.