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

shipping.getShipment and merchantFulfillment.getShipment #33

Closed
littleGauze opened this issue Apr 19, 2021 · 3 comments
Closed

shipping.getShipment and merchantFulfillment.getShipment #33

littleGauze opened this issue Apr 19, 2021 · 3 comments

Comments

@littleGauze
Copy link

how do I invoke shipping.getShipment and merchantFulfillment.getShipment api with operation?
Do i have to use the api_path to invoke it individually.

@amz-tools
Copy link
Owner

Hi @littleGauze,

yes, I'm afraid that's the only way of calling it right now, as the operation "getShipment" will always call the "shipping.getShipment" endpoint.

To be honest, we totally missed the possibility of operations existing more than once with the exact same name! We chose the operation centric design because it seemed like the shortest and easiest way of calling the API and under the impression that Amazon is never using the same operation name twice.

Not quite sure how to come up with a fix yet that will not include breaking changes and doesn't end up in patching around here and there. We might force the use of an endpoint parameter for all "duplicate" operations or we might have to think about a new major version in the future that can include some breaking changes but without forcing people to restructure too much.

The same problem also exists for the "createShipment" and "cancelShipment" operations.

@littleGauze
Copy link
Author

Hi @littleGauze,

yes, I'm afraid that's the only way of calling it right now, as the operation "getShipment" will always call the "shipping.getShipment" endpoint.

To be honest, we totally missed the possibility of operations existing more than once with the exact same name! We chose the operation centric design because it seemed like the shortest and easiest way of calling the API and under the impression that Amazon is never using the same operation name twice.

Not quite sure how to come up with a fix yet that will not include breaking changes and doesn't end up in patching around here and there. We might force the use of an endpoint parameter for all "duplicate" operations or we might have to think about a new major version in the future that can include some breaking changes but without forcing people to restructure too much.

The same problem also exists for the "createShipment" and "cancelShipment" operations.

got it.

@amz-tools
Copy link
Owner

Just added a new client version (0.5.0) that includes the possibility of specifying an endpoint to use, so. i.e. "shipping" or "merchantFulfillment", either as a separate parameter endpoint:'shipping' or shorthand as operation:'shipping.getShipment'.

Using .callAPI() without specifying an endpoint is still possible and working, but is considered deprecated and is discouraged.

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

2 participants