From 56523fc6a304c09f252449342b10c52f7836c4aa Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Wed, 13 May 2026 10:44:57 -0400 Subject: create print job --- ship.go | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'ship.go') diff --git a/ship.go b/ship.go index 0cfd733..030c80d 100644 --- a/ship.go +++ b/ship.go @@ -29,42 +29,43 @@ const ( ) type ShippingAddress struct { - Country string // ISO 3166-2 country code + // ISO 3166-2 country code + Country string `json:"country_code"` - // 2 or 3 letter state codes (officially called ISO-3166-2 + // 2 or 3 letter state code (officially called ISO-3166-2 // subdivision codes). They are required for some countries (e.g. // US, MX, CA, AU). - State string + State string `json:"state"` - City string - Street1 string // First address line - Street2 string // Second address line - PostCode string // Required for most countries + City string `json:"city"` + Street1 string `json:"street1"` // First address line + Street2 string `json:"street2"` // Second address line + PostCode string `json:"postcode"` // Required for most countries // Only relevant for US addresses. Some US carriers don't deliver // to business-addresses on Saturday. - IsBusiness bool + IsBusiness bool `json:"is_business"` // Full name of the person, including first and last name. - Name string - Title Title + Name string `json:"name"` + Title Title `json:"title"` // Name of an organization. Required if no person name is given. - Organization string + Organization string `json:"organization"` // Shipping carriers require an email address for notifications // or handling delivery issues. If no email is given, the default // email in the user profile will be used. - Email EmailAddress + Email EmailAddress `json:"email"` // Shipping carriers require a phone number for handling delivery // issues. If no phone number is given, the default in the API // user profile will be used. - Phone PhoneNumber + Phone PhoneNumber `json:"phone_number"` // The recipient's tax identification number. Required for // shipping addresses to Brazil, Chile, and Mexico. - TaxId string + TaxId string `json:"recipient_tax_id"` } func (a *ShippingAddress) UnmarshalJSON(data []byte) error { -- cgit v1.2.3