diff --git a/account_invoices.go b/account_invoices.go index fb50db451..8412e1a2c 100644 --- a/account_invoices.go +++ b/account_invoices.go @@ -29,7 +29,7 @@ type InvoiceTaxSummary struct { type InvoiceItem struct { Label string `json:"label"` Type string `json:"type"` - UnitPrice float32 `json:"unit_price"` + UnitPrice string `json:"unit_price"` Quantity int `json:"quantity"` Amount float32 `json:"amount"` Tax float32 `json:"tax"` diff --git a/test/unit/account_invoices_test.go b/test/unit/account_invoices_test.go index 55b0dc800..b2d90275e 100644 --- a/test/unit/account_invoices_test.go +++ b/test/unit/account_invoices_test.go @@ -83,5 +83,5 @@ func TestAccountInvoiceItems_List(t *testing.T) { assert.Equal(t, float32(1.25), invoiceItem.Tax) assert.Equal(t, float32(21.45), invoiceItem.Total) assert.Equal(t, "hourly", invoiceItem.Type) - assert.Equal(t, float32(5.05), invoiceItem.UnitPrice) + assert.Equal(t, "5.05", invoiceItem.UnitPrice) } diff --git a/test/unit/fixtures/account_invoice_items_list.json b/test/unit/fixtures/account_invoice_items_list.json index b9623f4a8..f963c9d82 100644 --- a/test/unit/fixtures/account_invoice_items_list.json +++ b/test/unit/fixtures/account_invoice_items_list.json @@ -10,7 +10,7 @@ "to": "2018-01-31T11:59:59", "total": 21.45, "type": "hourly", - "unit_price": 5.05 + "unit_price": "5.05" } ], "page": 1,