Skip to content

Commit 01b4d96

Browse files
authored
OMG-25702 - Fixes (#6)
2 parents 56b909b + 58825c8 commit 01b4d96

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

client/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"io"
8-
"io/ioutil"
98
"log"
109
"net/http"
1110

@@ -170,7 +169,7 @@ func (c *Client) executeRequest(req *http.Request, output interface{}) (err erro
170169
}
171170
defer res.Body.Close()
172171

173-
resData, err := ioutil.ReadAll(res.Body)
172+
resData, err := io.ReadAll(res.Body)
174173
if err != nil {
175174
return fmt.Errorf("Error reading response body data: %s", err.Error())
176175
}

models/address.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type AddressInput struct {
1616
Street3 string `json:"street3,omitempty"`
1717
City string `json:"city,omitempty"`
1818
Zip string `json:"zip,omitempty"`
19-
State string `json:"state,omtiempty"`
19+
State string `json:"state,omitempty"`
2020
Country string `json:"country,omitempty"`
2121
Phone string `json:"phone,omitempty"`
2222
Email string `json:"email,omitempty"`

models/customs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type CustomsDeclarationInput struct {
5353
ContentsType string `json:"contents_type"`
5454
ContentsExplanation string `json:"contents_explanation,omitempty"`
5555
ExporterReference string `json:"exporter_reference,omitempty"`
56-
importerReference string `json:"importer_reference,omitempty"`
56+
ImporterReference string `json:"importer_reference,omitempty"`
5757
Invoice string `json:"invoice,omitempty"`
5858
License string `json:"license,omitempty"`
5959
Certificate string `json:"certificate,omitempty"`

models/transaction.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ type TransactionInput struct {
99
LabelFileType string `json:"label_file_type"`
1010
Async bool `json:"async"`
1111

12-
Shipment *ShipmentInput `json:"shipment,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
13-
CarrierAccount string `json:"carrier_account,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
14-
ServerLevelToken string `json:"servericelevel_token, omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
12+
Shipment *ShipmentInput `json:"shipment,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
13+
CarrierAccount string `json:"carrier_account,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
14+
ServerLevelToken string `json:"servicelevel_token,omitempty"` // instant call only: https://goshippo.com/docs/reference#transactions-create-instant
1515
}
1616

1717
// See https://goshippo.com/docs/reference#transactions

shippo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "github.com/OrderMyGear/go-shippo/client"
44

55
const (
66
APIVersion20140211 = "2014-02-11"
7-
APIVesrion20161025 = "2016-10-25"
7+
APIVersion20161025 = "2016-10-25"
88
APIVersion20170329 = "2017-03-29"
99
APIVersion20180208 = "2018-02-08"
1010
)

0 commit comments

Comments
 (0)