ericcj/amz_sp_api

Create subscription requires camel case to work

Closed this issue · 1 comments

According to this part of the docs you need to create a notification like so:

create_client.create_subscription({payload_version: '1.0', destination_id: [YOUR DESTINATION ID]}, 'ANY_OFFER_CHANGED')

To get it to actually work you need to make the params camel case:

create_client.create_subscription({payloadVersion: '1.0', destinationId: [YOUR DESTINATION ID]}, 'ANY_OFFER_CHANGED')

payload_version -> payloadVersion
destination_id -> destinationId

i think that's because you're passing a hash and not a

object itself, which is fine but the underscores you're referring to are part of the model and then it serializes itself with camelCase