Class: MuffinMan::Solicitations::V1

Inherits:
MuffinMan::SpApiClient show all
Defined in:
lib/muffin_man/solicitations/v1.rb

Constant Summary collapse

SANDBOX_AMAZON_ORDER_ID =
"123-1234567-1234567"
SANDBOX_MARKETPLACE_IDS =
"ATVPDKIKX0DER"

Constants inherited from MuffinMan::SpApiClient

MuffinMan::SpApiClient::ACCESS_TOKEN_URL, MuffinMan::SpApiClient::AWS_REGION_MAP, MuffinMan::SpApiClient::SERVICE_NAME, MuffinMan::SpApiClient::UNPROCESSABLE_ENTITY_STATUS_CODE

Instance Attribute Summary collapse

Attributes inherited from MuffinMan::SpApiClient

#access_token_cache_key, #aws_access_key_id, #aws_secret_access_key, #client_id, #client_secret, #config, #credentials, #local_var_path, #pii_data_elements, #query_params, #refresh_token, #region, #request_body, #request_type, #sandbox, #scope, #sts_iam_role_arn

Instance Method Summary collapse

Methods inherited from MuffinMan::SpApiClient

#initialize

Constructor Details

This class inherits a constructor from MuffinMan::SpApiClient

Instance Attribute Details

#amazon_order_idObject (readonly)

Returns the value of attribute amazon_order_id.



6
7
8
# File 'lib/muffin_man/solicitations/v1.rb', line 6

def amazon_order_id
  @amazon_order_id
end

#marketplace_idsObject (readonly)

Returns the value of attribute marketplace_ids.



6
7
8
# File 'lib/muffin_man/solicitations/v1.rb', line 6

def marketplace_ids
  @marketplace_ids
end

Instance Method Details

#create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids) ⇒ Object

Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send only one productReviewAndSellerFeedback or free form proactive message per order. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • amazon_order_id

    An Amazon order identifier. This specifies the order for which a solicitation is sent.

  • marketplace_ids

    A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.



11
12
13
14
15
16
17
18
19
20
# File 'lib/muffin_man/solicitations/v1.rb', line 11

def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids)
  @amazon_order_id = sandbox ? SANDBOX_AMAZON_ORDER_ID : amazon_order_id
  @marketplace_ids = sandbox ? SANDBOX_MARKETPLACE_IDS : marketplace_ids
  @local_var_path = "/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback".sub(
    "{" + "amazonOrderId" + "}", @amazon_order_id
  )
  @query_params = { "marketplaceIds" => @marketplace_ids }
  @request_type = "POST"
  call_api
end