Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #35 from sunznx/master
Browse files Browse the repository at this point in the history
fix: change type of `CreateTrackingParams.Slug` to string
  • Loading branch information
Bossa573 authored Jan 13, 2022
2 parents 5bba80d + 0b3c315 commit d6725ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion trackings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion trackings_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion trackings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestCreateTracking(t *testing.T) {
})

params := CreateTrackingParams{
Slug: []string{"dhl"},
Slug: "dhl",
TrackingNumber: "123456789",
Title: "Title Name",
SMSes: []string{
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit d6725ca

Please sign in to comment.