Skip to content

Commit

Permalink
Merge pull request #8 from panxl6/2024-07
Browse files Browse the repository at this point in the history
doc: updated example.
  • Loading branch information
panxl6 authored Jul 26, 2024
2 parents 0d00ca4 + cb2c790 commit 0fb4cc3
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ The AfterShip instance has the following properties which are exactly the same a

```go
data := model.CreateTrackingRequest{
&model.TrackingCreateTrackingRequest{
TrackingNumber: "<tracking_number>",
Slug: "usps",
},
TrackingNumber: "<tracking_number>",
Slug: "<slug>",
}
result, err := sdk.Tracking.CreateTracking().BuildBody(data).Execute()
if err != nil {
Expand Down Expand Up @@ -203,9 +201,9 @@ fmt.Println(result)
result, err := sdk.Tracking.
UpdateTrackingById().
BuildPath("<tracking_id>").
BuildBody(model.UpdateTrackingByIdRequest{&model.TrackingUpdateTrackingByIdRequest{
BuildBody(model.UpdateTrackingByIdRequest{
Smses: []string{"+85291239123"},
}}).Execute()
}).Execute()
if err != nil {
fmt.Println(err)
return
Expand Down Expand Up @@ -271,9 +269,7 @@ fmt.Println(result)
result, err := sdk.Courier.
DetectCourier().
BuildBody(model.DetectCourierRequest{
Tracking: &model.TrackingDetectCourierRequest{
TrackingNumber: "<tracking_number>",
},
TrackingNumber: "<tracking_number>",
}).
Execute()
if err != nil {
Expand Down

0 comments on commit 0fb4cc3

Please sign in to comment.