func (c *ClientWithResponses) GetAuthorizationCodeWithResponse(ctx context.Context, params *GetAuthorizationCodeParams) (*GetAuthorizationCodeResp, error) {
	rsp, err := c.GetAuthorizationCode(ctx, params)
	if err != nil {
		return nil, err
	}
	return ParseGetAuthorizationCodeResp(rsp)
}
GetAuthorizationCodeWithResponse request returning *GetAuthorizationCodeResponse
package authorization
import (
	"context"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	runt "runtime"
	"strings"
	"gopkg.me/selling-partner-api-sdk/pkg/runtime"
)
type RequestBeforeFn func(ctx context.Context, req *http.Request) error
type ResponseAfterFn func(ctx context.Context, rsp *http.Response) error
type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}
type Client struct {
	Endpoint string
	Client HttpRequestDoer
	RequestBefore RequestBeforeFn
	ResponseAfter ResponseAfterFn
	UserAgent string
}
type ClientOption func(*Client) error
func NewClient(endpoint string, opts ...ClientOption) (*Client, error) {
	client := Client{
		Endpoint: endpoint,
	}
	for _, o := range opts {
		if err := o(&client); err != nil {
			return nil, err
		}
	}
	if !strings.HasSuffix(client.Endpoint, "/") {
		client.Endpoint += "/"
	}
	if client.Client == nil {
		client.Client = http.DefaultClient
	}
	if client.UserAgent == "" {
		client.UserAgent = fmt.Sprintf("selling-partner-api-sdk/v1.0 (Language=%s; Platform=%s-%s)", strings.Replace(runt.Version(), "go", "go/", -1), runt.GOOS, runt.GOARCH)
	}
	return &client, nil
}
func WithHTTPClient(doer HttpRequestDoer) ClientOption {
	return func(c *Client) error {
		c.Client = doer
		return nil
	}
}
func WithUserAgent(userAgent string) ClientOption {
	return func(c *Client) error {
		c.UserAgent = userAgent
		return nil
	}
}
func WithRequestBefore(fn RequestBeforeFn) ClientOption {
	return func(c *Client) error {
		c.RequestBefore = fn
		return nil
	}
}
func WithResponseAfter(fn ResponseAfterFn) ClientOption {
	return func(c *Client) error {
		c.ResponseAfter = fn
		return nil
	}
}
type ClientInterface interface {
	GetAuthorizationCode(ctx context.Context, params *GetAuthorizationCodeParams) (*http.Response, error)
}
func (c *Client) GetAuthorizationCode(ctx context.Context, params *GetAuthorizationCodeParams) (*http.Response, error) {
	req, err := NewGetAuthorizationCodeRequest(c.Endpoint, params)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	req.Header.Set("User-Agent", c.UserAgent)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	rsp, err := c.Client.Do(req)
	if err != nil {
		return nil, err
	}
	if c.ResponseAfter != nil {
		err = c.ResponseAfter(ctx, rsp)
		if err != nil {
			return nil, err
		}
	}
	return rsp, nil
}
func NewGetAuthorizationCodeRequest(endpoint string, params *GetAuthorizationCodeParams) (*http.Request, error) {
	var err error
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/authorization/v1/authorizationCode")
	if basePath[0] == '/' {
		basePath = basePath[1:]
	}
	queryUrl, err = queryUrl.Parse(basePath)
	if err != nil {
		return nil, err
	}
	queryValues := queryUrl.Query()
	if queryFrag, err := runtime.StyleParam("form", true, "sellingPartnerId", params.SellingPartnerId); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	if queryFrag, err := runtime.StyleParam("form", true, "developerId", params.DeveloperId); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	if queryFrag, err := runtime.StyleParam("form", true, "mwsAuthToken", params.MwsAuthToken); err != nil {
		return nil, err
	} else if parsed, err := url.ParseQuery(queryFrag); err != nil {
		return nil, err
	} else {
		for k, v := range parsed {
			for _, v2 := range v {
				queryValues.Add(k, v2)
			}
		}
	}
	queryUrl.RawQuery = queryValues.Encode()
	req, err := http.NewRequest("GET", queryUrl.String(), nil)
	if err != nil {
		return nil, err
	}
	return req, nil
}
type ClientWithResponses struct {
	ClientInterface
}
func NewClientWithResponses(endpoint string, opts ...ClientOption) (*ClientWithResponses, error) {
	client, err := NewClient(endpoint, opts...)
	if err != nil {
		return nil, err
	}
	return &ClientWithResponses{client}, nil
}
func WithBaseURL(baseURL string) ClientOption {
	return func(c *Client) error {
		newBaseURL, err := url.Parse(baseURL)
		if err != nil {
			return err
		}
		c.Endpoint = newBaseURL.String()
		return nil
	}
}
type ClientWithResponsesInterface interface {
	GetAuthorizationCodeWithResponse(ctx context.Context, params *GetAuthorizationCodeParams) (*GetAuthorizationCodeResp, error)
}
type GetAuthorizationCodeResp struct {
	Body         []byte
	HTTPResponse *http.Response
	Model        *GetAuthorizationCodeResponse
}
func (r GetAuthorizationCodeResp) Status() string {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.Status
	}
	return http.StatusText(0)
}
func (r GetAuthorizationCodeResp) StatusCode() int {
	if r.HTTPResponse != nil {
		return r.HTTPResponse.StatusCode
	}
	return 0
}