func NewGetFeaturesRequest(endpoint string, params *GetFeaturesParams) (*http.Request, error) {
	var err error
	queryUrl, err := url.Parse(endpoint)
	if err != nil {
		return nil, err
	}
	basePath := fmt.Sprintf("/fba/outbound/2020-07-01/features")
	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, "marketplaceId", params.MarketplaceId); 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
}
NewGetFeaturesRequest generates requests for GetFeatures
package fbaOutbound
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	"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 {
	GetFeatures(ctx context.Context, params *GetFeaturesParams) (*http.Response, error)
	GetFeatureInventory(ctx context.Context, featureName string, params *GetFeatureInventoryParams) (*http.Response, error)
	GetFeatureSKU(ctx context.Context, featureName string, sellerSku string, params *GetFeatureSKUParams) (*http.Response, error)
	ListAllFulfillmentOrders(ctx context.Context, params *ListAllFulfillmentOrdersParams) (*http.Response, error)
	CreateFulfillmentOrderWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
	CreateFulfillmentOrder(ctx context.Context, body CreateFulfillmentOrderJSONRequestBody) (*http.Response, error)
	GetFulfillmentPreviewWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error)
	GetFulfillmentPreview(ctx context.Context, body GetFulfillmentPreviewJSONRequestBody) (*http.Response, error)
	GetFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string) (*http.Response, error)
	UpdateFulfillmentOrderWithBody(ctx context.Context, sellerFulfillmentOrderId string, contentType string, body io.Reader) (*http.Response, error)
	UpdateFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string, body UpdateFulfillmentOrderJSONRequestBody) (*http.Response, error)
	CancelFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string) (*http.Response, error)
	CreateFulfillmentReturnWithBody(ctx context.Context, sellerFulfillmentOrderId string, contentType string, body io.Reader) (*http.Response, error)
	CreateFulfillmentReturn(ctx context.Context, sellerFulfillmentOrderId string, body CreateFulfillmentReturnJSONRequestBody) (*http.Response, error)
	ListReturnReasonCodes(ctx context.Context, params *ListReturnReasonCodesParams) (*http.Response, error)
	GetPackageTrackingDetails(ctx context.Context, params *GetPackageTrackingDetailsParams) (*http.Response, error)
}
func (c *Client) GetFeatures(ctx context.Context, params *GetFeaturesParams) (*http.Response, error) {
	req, err := NewGetFeaturesRequest(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 (c *Client) GetFeatureInventory(ctx context.Context, featureName string, params *GetFeatureInventoryParams) (*http.Response, error) {
	req, err := NewGetFeatureInventoryRequest(c.Endpoint, featureName, 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 (c *Client) GetFeatureSKU(ctx context.Context, featureName string, sellerSku string, params *GetFeatureSKUParams) (*http.Response, error) {
	req, err := NewGetFeatureSKURequest(c.Endpoint, featureName, sellerSku, 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 (c *Client) ListAllFulfillmentOrders(ctx context.Context, params *ListAllFulfillmentOrdersParams) (*http.Response, error) {
	req, err := NewListAllFulfillmentOrdersRequest(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 (c *Client) CreateFulfillmentOrderWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) {
	req, err := NewCreateFulfillmentOrderRequestWithBody(c.Endpoint, contentType, body)
	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 (c *Client) CreateFulfillmentOrder(ctx context.Context, body CreateFulfillmentOrderJSONRequestBody) (*http.Response, error) {
	req, err := NewCreateFulfillmentOrderRequest(c.Endpoint, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	return c.Client.Do(req)
}
func (c *Client) GetFulfillmentPreviewWithBody(ctx context.Context, contentType string, body io.Reader) (*http.Response, error) {
	req, err := NewGetFulfillmentPreviewRequestWithBody(c.Endpoint, contentType, body)
	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 (c *Client) GetFulfillmentPreview(ctx context.Context, body GetFulfillmentPreviewJSONRequestBody) (*http.Response, error) {
	req, err := NewGetFulfillmentPreviewRequest(c.Endpoint, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	return c.Client.Do(req)
}
func (c *Client) GetFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string) (*http.Response, error) {
	req, err := NewGetFulfillmentOrderRequest(c.Endpoint, sellerFulfillmentOrderId)
	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 (c *Client) UpdateFulfillmentOrderWithBody(ctx context.Context, sellerFulfillmentOrderId string, contentType string, body io.Reader) (*http.Response, error) {
	req, err := NewUpdateFulfillmentOrderRequestWithBody(c.Endpoint, sellerFulfillmentOrderId, contentType, body)
	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 (c *Client) UpdateFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string, body UpdateFulfillmentOrderJSONRequestBody) (*http.Response, error) {
	req, err := NewUpdateFulfillmentOrderRequest(c.Endpoint, sellerFulfillmentOrderId, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	return c.Client.Do(req)
}
func (c *Client) CancelFulfillmentOrder(ctx context.Context, sellerFulfillmentOrderId string) (*http.Response, error) {
	req, err := NewCancelFulfillmentOrderRequest(c.Endpoint, sellerFulfillmentOrderId)
	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 (c *Client) CreateFulfillmentReturnWithBody(ctx context.Context, sellerFulfillmentOrderId string, contentType string, body io.Reader) (*http.Response, error) {
	req, err := NewCreateFulfillmentReturnRequestWithBody(c.Endpoint, sellerFulfillmentOrderId, contentType, body)
	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 (c *Client) CreateFulfillmentReturn(ctx context.Context, sellerFulfillmentOrderId string, body CreateFulfillmentReturnJSONRequestBody) (*http.Response, error) {
	req, err := NewCreateFulfillmentReturnRequest(c.Endpoint, sellerFulfillmentOrderId, body)
	if err != nil {
		return nil, err
	}
	req = req.WithContext(ctx)
	if c.RequestBefore != nil {
		err = c.RequestBefore(ctx, req)
		if err != nil {
			return nil, err
		}
	}
	return c.Client.Do(req)
}
func (c *Client) ListReturnReasonCodes(ctx context.Context, params *ListReturnReasonCodesParams) (*http.Response, error) {
	req, err := NewListReturnReasonCodesRequest(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 (c *Client) GetPackageTrackingDetails(ctx context.Context, params *GetPackageTrackingDetailsParams) (*http.Response, error) {
	req, err := NewGetPackageTrackingDetailsRequest(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
}