Class: Peddler::APIs::SolicitationsV1
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::SolicitationsV1
- Defined in:
- lib/peddler/apis/solicitations_v1.rb,
lib/peddler/apis/solicitations_v1/error.rb,
lib/peddler/apis/solicitations_v1/error_list.rb,
lib/peddler/apis/solicitations_v1/link_object.rb,
lib/peddler/apis/solicitations_v1/get_schema_response.rb,
lib/peddler/apis/solicitations_v1/solicitations_action.rb,
lib/peddler/apis/solicitations_v1/get_solicitation_action_response.rb,
lib/peddler/apis/solicitations_v1/get_solicitation_actions_for_order_response.rb,
lib/peddler/apis/solicitations_v1/create_product_review_and_seller_feedback_solicitation_response.rb
Overview
Selling Partner API for Solicitations
With the Solicitations API you can build applications that send non-critical solicitations to buyers. You can get a list of solicitation types that are available for an order that you specify, then call an operation that sends a solicitation to the buyer for that order. Buyers cannot respond to solicitations sent by this API, and these solicitations do not appear in the Messaging section of Seller Central or in the recipient's Message Center. The Solicitations API returns responses that are formed according to the JSON Hypertext Application Language (HAL) standard.
Defined Under Namespace
Classes: ErrorList
Constant Summary collapse
- Error =
Error response returned when the request is unsuccessful.
Structure.new do # @return [String] An error code that identifies the type of error that occurred. attribute(:code, String) # @return [String] A message that describes the error condition. attribute(:message, String) # @return [String] Additional details that can help the caller understand or fix the issue. attribute?(:details, String) end
- LinkObject =
A Link object.
Structure.new do # @return [String] A URI for this object. attribute(:href, String) # @return [String] An identifier for this object. attribute?(:name, String) end
- GetSchemaResponse =
Structure.new do # @return [Hash] attribute?(:_links, Hash) # @return [Array<Error>] attribute?(:errors, [Error]) # @return [Hash] attribute?(:payload, Hash) end
- SolicitationsAction =
A simple object containing the name of the template.
Structure.new do # @return [String] attribute(:name, String) end
- GetSolicitationActionResponse =
Describes a solicitation action that can be taken for an order. Provides a JSON Hypertext Application Language (HAL) link to the JSON schema document that describes the expected input.
Structure.new do # @return [Hash] attribute?(:_embedded, Hash) # @return [Hash] attribute?(:_links, Hash) # @return [Array<Error>] attribute?(:errors, [Error]) # @return [SolicitationsAction] attribute?(:payload, SolicitationsAction) end
- GetSolicitationActionsForOrderResponse =
The response schema for the getSolicitationActionsForOrder operation.
Structure.new do # @return [Hash] attribute?(:_embedded, Hash) # @return [Hash] attribute?(:_links, Hash) # @return [Array<Error>] attribute?(:errors, [Error]) end
- CreateProductReviewAndSellerFeedbackSolicitationResponse =
The response schema for the createProductReviewAndSellerFeedbackSolicitation operation.
Structure.new do # @return [Array<Error>] attribute?(:errors, [Error]) end
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #retries
Instance Method Summary collapse
-
#create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0) ⇒ Peddler::Response
Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order.
-
#get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0) ⇒ Peddler::Response
Returns a list of solicitation types that are available for an order that you specify.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
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.
sent. order was placed. Only one marketplace can be specified.
49 50 51 52 53 54 55 56 |
# File 'lib/peddler/apis/solicitations_v1.rb', line 49 def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0) path = "/solicitations/v1/orders/#{percent_encode(amazon_order_id)}/solicitations/productReviewAndSellerFeedback" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { CreateProductReviewAndSellerFeedbackSolicitationResponse } meter(rate_limit).post(path, params:, parser:) end |
#get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns a list of solicitation types that are available for an order that you specify. A solicitation type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a solicitation. Currently only the productReviewAndSellerFeedbackSolicitation solicitation type is available.
of available solicitation types. order was placed. Only one marketplace can be specified.
30 31 32 33 34 35 36 37 |
# File 'lib/peddler/apis/solicitations_v1.rb', line 30 def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0) path = "/solicitations/v1/orders/#{percent_encode(amazon_order_id)}" params = { "marketplaceIds" => stringify_array(marketplace_ids), }.compact parser = -> { GetSolicitationActionsForOrderResponse } meter(rate_limit).get(path, params:, parser:) end |