Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are APIs where ResponseAfter is not called #36

Open
katonium opened this issue May 13, 2024 · 0 comments
Open

There are APIs where ResponseAfter is not called #36

katonium opened this issue May 13, 2024 · 0 comments

Comments

@katonium
Copy link

Hello, thank you for the useful SDK.
I think there may be some APIs where ResponseAfter is not called.

example 1: https://github.com/amzapi/selling-partner-api-sdk/blob/master/fees/api.gen.go#L179

func (c *Client) GetMyFeesEstimateForASIN(ctx context.Context, asin string, body GetMyFeesEstimateForASINJSONRequestBody) (*http.Response, error) {
	req, err := NewGetMyFeesEstimateForASINRequest(c.Endpoint, asin, 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)
}

example 2: https://github.com/amzapi/selling-partner-api-sdk/blob/master/fbaOutbound/api.gen.go#L373

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)
}

I don't know why this happens because I think the code is automatically generated, but I think these are not the your intended implementation.
Please let me know if there is anything I can do to help fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant