diff --git a/invoices.go b/invoices.go index cc111f87..abc9d2de 100644 --- a/invoices.go +++ b/invoices.go @@ -49,6 +49,7 @@ type InvoiceItem struct { StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` ProjectName string `json:"project_name"` + Category string `json:"category"` } // InvoiceList contains a paginated list of all of a customer's invoices. diff --git a/invoices_test.go b/invoices_test.go index a3d53d5a..2c5fc942 100644 --- a/invoices_test.go +++ b/invoices_test.go @@ -28,7 +28,8 @@ func TestInvoices_GetInvoices(t *testing.T) { "duration_unit": "Hours", "start_time": "2018-06-20T08:44:38Z", "end_time": "2018-06-21T08:44:38Z", - "project_name": "My project" + "project_name": "My project", + "category": "iaas" }, { "product": "Load Balancers", @@ -41,7 +42,8 @@ func TestInvoices_GetInvoices(t *testing.T) { "duration_unit": "Hours", "start_time": "2018-06-20T08:44:38Z", "end_time": "2018-06-21T08:44:38Z", - "project_name": "My Second Project" + "project_name": "My Second Project", + "category": "paas" } ], "meta": { @@ -68,6 +70,7 @@ func TestInvoices_GetInvoices(t *testing.T) { StartTime: time.Date(2018, 6, 20, 8, 44, 38, 0, time.UTC), EndTime: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC), ProjectName: "My project", + Category: "iaas", }, { Product: "Load Balancers", @@ -81,6 +84,7 @@ func TestInvoices_GetInvoices(t *testing.T) { StartTime: time.Date(2018, 6, 20, 8, 44, 38, 0, time.UTC), EndTime: time.Date(2018, 6, 21, 8, 44, 38, 0, time.UTC), ProjectName: "My Second Project", + Category: "paas", }, } actualItems := invoice.InvoiceItems