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

AmzSpApi::OrdersApiModel::GetOrderResponse payload? #46

Open
jheathco opened this issue Apr 21, 2023 · 3 comments
Open

AmzSpApi::OrdersApiModel::GetOrderResponse payload? #46

jheathco opened this issue Apr 21, 2023 · 3 comments

Comments

@jheathco
Copy link
Contributor

jheathco commented Apr 21, 2023

Are attributes supposed to be accessible for get_order?

I see that get_order returns a AmzSpApi::OrdersApiModel::GetOrderResponse object, but then you've got to access the payload member which appears to be a simple hash requiring order.payload[:BuyerInfo] type access, rather than using order.payload.buyer_info.

Is this intended?

@WebDeverDan
Copy link

Are you not getting any order attributes in the response? There should be a large bit of data that comes with the successful response. When I've gotten good responses, they've included necessary attributes. If you can show the response here, that would be helpful. Thanks!

@jheathco
Copy link
Contributor Author

I'm getting them, but thought I wouldn't have to do order.payload[:BuyerInfo] - assumed I'd be able to do order.buyer_info.

@cassio-maletich
Copy link

I'm getting them, but thought I wouldn't have to do order.payload[:BuyerInfo] - assumed I'd be able to do order.buyer_info.

This is how I'm fetching buyer email from the response: amazon_order.dig('BuyerInfo', 'BuyerEmail')

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

3 participants