Skip to content

Commit

Permalink
Added omitempty tag for CustomerAddress properties (bold-commerce#28)
Browse files Browse the repository at this point in the history
- was causing unexpected behaviour with partial updates
  • Loading branch information
gordcurrie authored and markstgodard committed Oct 30, 2018
1 parent 7eaff4e commit 7de8b0e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions customer_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@ type CustomerAddressServiceOp struct {
type CustomerAddress struct {
ID int `json:"id,omitempty"`
CustomerID int `json:"customer_id,omitempty"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Company string `json:"company"`
Address1 string `json:"address1"`
Address2 string `json:"address2"`
City string `json:"city"`
Province string `json:"province"`
Country string `json:"country"`
Zip string `json:"zip"`
Phone string `json:"phone"`
Name string `json:"name"`
ProvinceCode string `json:"province_code"`
CountryCode string `json:"country_code"`
CountryName string `json:"country_name"`
Default bool `json:"default"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Company string `json:"company,omitempty"`
Address1 string `json:"address1,omitempty"`
Address2 string `json:"address2,omitempty"`
City string `json:"city,omitempty"`
Province string `json:"province,omitempty"`
Country string `json:"country,omitempty"`
Zip string `json:"zip,omitempty"`
Phone string `json:"phone,omitempty"`
Name string `json:"name,omitempty"`
ProvinceCode string `json:"province_code,omitempty"`
CountryCode string `json:"country_code,omitempty"`
CountryName string `json:"country_name,omitempty"`
Default bool `json:"default,omitempty"`
}

// CustomerAddressResoruce represents the result from the addresses/X.json endpoint
Expand Down

0 comments on commit 7de8b0e

Please sign in to comment.