forked from go-packages/paypal
SetAccessToken
This commit is contained in:
parent
01a9cc8bc9
commit
5fa983e86a
|
@ -23,6 +23,15 @@ func NewClient(clientID string, secret string, APIBase string) (*Client, error)
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetAccessToken sets saved token to current client
|
||||||
|
func (c *Client) SetAccessToken(token string) error {
|
||||||
|
c.Token = &TokenResponse{
|
||||||
|
Token: token,
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Send makes a request to the API, the response body will be
|
// Send makes a request to the API, the response body will be
|
||||||
// unmarshaled into v, or if v is an io.Writer, the response will
|
// unmarshaled into v, or if v is an io.Writer, the response will
|
||||||
// be written to it without decoding
|
// be written to it without decoding
|
||||||
|
|
Loading…
Reference in New Issue
Block a user