lib/xero_gateway/invoice.rb in xero_gateway-2.6.0 vs lib/xero_gateway/invoice.rb in xero_gateway-2.7.0
- old
+ new
@@ -207,27 +207,27 @@
case(element.name)
when "InvoiceID" then invoice.invoice_id = element.text
when "InvoiceNumber" then invoice.invoice_number = element.text
when "Type" then invoice.invoice_type = element.text
when "CurrencyCode" then invoice.currency_code = element.text
- when "CurrencyRate" then invoice.currency_rate = BigDecimal.new(element.text)
+ when "CurrencyRate" then invoice.currency_rate = BigDecimal(element.text)
when "Contact" then invoice.contact = Contact.from_xml(element)
when "Date" then invoice.date = parse_date(element.text)
when "DueDate" then invoice.due_date = parse_date(element.text)
when "FullyPaidOnDate" then invoice.fully_paid_on = parse_date(element.text)
when "UpdatedDateUTC" then invoice.updated_date_utc = parse_date(element.text)
when "Status" then invoice.invoice_status = element.text
when "Reference" then invoice.reference = element.text
when "BrandingThemeID" then invoice.branding_theme_id = element.text
when "LineAmountTypes" then invoice.line_amount_types = element.text
when "LineItems" then element.children.each {|line_item| invoice.line_items_downloaded = true; invoice.line_items << LineItem.from_xml(line_item) }
- when "SubTotal" then invoice.sub_total = BigDecimal.new(element.text)
- when "TotalTax" then invoice.total_tax = BigDecimal.new(element.text)
- when "Total" then invoice.total = BigDecimal.new(element.text)
+ when "SubTotal" then invoice.sub_total = BigDecimal(element.text)
+ when "TotalTax" then invoice.total_tax = BigDecimal(element.text)
+ when "Total" then invoice.total = BigDecimal(element.text)
when "Payments" then element.children.each { | payment | invoice.payments << Payment.from_xml(payment) }
- when "AmountDue" then invoice.amount_due = BigDecimal.new(element.text)
- when "AmountPaid" then invoice.amount_paid = BigDecimal.new(element.text)
- when "AmountCredited" then invoice.amount_credited = BigDecimal.new(element.text)
+ when "AmountDue" then invoice.amount_due = BigDecimal(element.text)
+ when "AmountPaid" then invoice.amount_paid = BigDecimal(element.text)
+ when "AmountCredited" then invoice.amount_credited = BigDecimal(element.text)
when "SentToContact" then invoice.sent_to_contact = (element.text.strip.downcase == "true")
when "Url" then invoice.url = element.text
when "ValidationErrors" then invoice.errors = element.children.map { |error| Error.parse(error) }
end
end