diff --git a/trackings.go b/trackings.go index 2a7ea84..dba1ff3 100644 --- a/trackings.go +++ b/trackings.go @@ -13,7 +13,7 @@ import ( // CreateTrackingParams provides parameters for new Tracking API request type CreateTrackingParams struct { TrackingNumber string `json:"tracking_number"` // Tracking number of a shipment. - Slug []string `json:"slug,omitempty"` // Unique code of each courier. If you do not specify a slug, AfterShip will automatically detect the courier based on the tracking number format and your selected couriers. + Slug string `json:"slug,omitempty"` // Unique code of each courier. If you do not specify a slug, AfterShip will automatically detect the courier based on the tracking number format and your selected couriers. TrackingPostalCode string `json:"tracking_postal_code,omitempty"` // The postal code of receiver's address. Required by some couriers, such as deutsch-post TrackingShipDate string `json:"tracking_ship_date,omitempty"` // Shipping date in YYYYMMDD format. Required by some couriers, such as deutsch-post TrackingAccountNumber string `json:"tracking_account_number,omitempty"` // Account number of the shipper for a specific courier. Required by some couriers, such as dynamic-logistics diff --git a/trackings_example_test.go b/trackings_example_test.go index 22d836e..ec6df3e 100644 --- a/trackings_example_test.go +++ b/trackings_example_test.go @@ -23,7 +23,7 @@ func ExampleClient_CreateTracking() { trackingNumber := strconv.FormatInt(time.Now().Unix(), 10) newTracking := aftership.CreateTrackingParams{ TrackingNumber: trackingNumber, - Slug: []string{"dhl"}, + Slug: "dhl", Title: "Title Name", SMSes: []string{ "+18555072509", diff --git a/trackings_test.go b/trackings_test.go index 8a45aa8..f652110 100644 --- a/trackings_test.go +++ b/trackings_test.go @@ -83,7 +83,7 @@ func TestCreateTracking(t *testing.T) { }) params := CreateTrackingParams{ - Slug: []string{"dhl"}, + Slug: "dhl", TrackingNumber: "123456789", Title: "Title Name", SMSes: []string{ diff --git a/version.go b/version.go index 23295e6..a086af4 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package aftership // VERSION is the version number of this package -const VERSION string = "2.0.0" +const VERSION string = "2.0.2"