Skip to content

Commit

Permalink
Stop using . import
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Jul 30, 2018
1 parent 92aa254 commit 450d529
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package client

import (
. "github.com/stripe/stripe-go"
stripe "github.com/stripe/stripe-go"
"github.com/stripe/stripe-go/account"
"github.com/stripe/stripe-go/applepaydomain"
"github.com/stripe/stripe-go/balance"
Expand Down Expand Up @@ -155,9 +155,12 @@ type API struct {

// Init initializes the Stripe client with the appropriate secret key
// as well as providing the ability to override the backend as needed.
func (a *API) Init(key string, backends *Backends) {
func (a *API) Init(key string, backends *stripe.Backends) {
if backends == nil {
backends = &Backends{API: GetBackend(APIBackend), Uploads: GetBackend(UploadsBackend)}
backends = &stripe.Backends{
API: stripe.GetBackend(stripe.APIBackend),
Uploads: stripe.GetBackend(stripe.UploadsBackend),
}
}

a.Account = &account.Client{B: backends.API, Key: key}
Expand Down Expand Up @@ -212,7 +215,7 @@ func (a *API) Init(key string, backends *Backends) {

// New creates a new Stripe client with the appropriate secret key
// as well as providing the ability to override the backends as needed.
func New(key string, backends *Backends) *API {
func New(key string, backends *stripe.Backends) *API {
api := API{}
api.Init(key, backends)
return &api
Expand Down

0 comments on commit 450d529

Please sign in to comment.