forked from OrderMyGear/go-shippo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshippo.go
30 lines (24 loc) · 1.15 KB
/
shippo.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package shippo
import "github.com/campustech/go-shippo/client"
const (
APIVersion20140211 = "2014-02-11"
APIVesrion20161025 = "2016-10-25"
APIVersion20170329 = "2017-03-29"
APIVersion20180208 = "2018-02-08"
)
// NewClient creates a new Shippo client.
func NewClient(privateToken string) *client.Client {
return client.NewClient(privateToken, "", "")
}
// NewClientWithVersion creates a new Shippo client with API version explicitly specified.
func NewClientWithVersion(privateToken, apiVersion string) *client.Client {
return client.NewClient(privateToken, apiVersion, "")
}
// NewClientWithPlatformAccountID creates a new Shippo client with platform account ID explicitly specified.
func NewClientWithPlatformAccountID(privateToken, platformAccountID string) *client.Client {
return client.NewClient(privateToken, "", platformAccountID)
}
// NewClientWithVersionAndPlatformAccountID creates a new Shippo client with API version and platform account ID explicitly specified.
func NewClientWithVersionAndPlatformAccountID(privateToken, apiVersion, platformAccountID string) *client.Client {
return client.NewClient(privateToken, apiVersion, platformAccountID)
}