class AmzSpApi::SolicitationsApiModel::SolicitationsApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/solicitations-api-model/api/solicitations_api.rb, line 16
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, opts = {}) click to toggle source

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. @param amazon_order_id An Amazon order identifier. This specifies the order for which a solicitation is sent. @param marketplace_ids A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. @param [Hash] opts the optional parameters @return [CreateProductReviewAndSellerFeedbackSolicitationResponse]

# File lib/solicitations-api-model/api/solicitations_api.rb, line 24
def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, opts = {})
  data, _status_code, _headers = create_product_review_and_seller_feedback_solicitation_with_http_info(amazon_order_id, marketplace_ids, opts)
  data
end
create_product_review_and_seller_feedback_solicitation_with_http_info(amazon_order_id, marketplace_ids, opts = {}) click to toggle source

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&quot; in the Selling Partner API documentation. @param amazon_order_id An Amazon order identifier. This specifies the order for which a solicitation is sent. @param marketplace_ids A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. @param [Hash] opts the optional parameters @return [Array<(CreateProductReviewAndSellerFeedbackSolicitationResponse, Integer, Hash)>] CreateProductReviewAndSellerFeedbackSolicitationResponse data, response status code and response headers

# File lib/solicitations-api-model/api/solicitations_api.rb, line 34
def create_product_review_and_seller_feedback_solicitation_with_http_info(amazon_order_id, marketplace_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SolicitationsApi.create_product_review_and_seller_feedback_solicitation ...'
  end
  # verify the required parameter 'amazon_order_id' is set
  if @api_client.config.client_side_validation && amazon_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'amazon_order_id' when calling SolicitationsApi.create_product_review_and_seller_feedback_solicitation"
  end
  # verify the required parameter 'marketplace_ids' is set
  if @api_client.config.client_side_validation && marketplace_ids.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling SolicitationsApi.create_product_review_and_seller_feedback_solicitation"
  end
  # resource path
  local_var_path = '/solicitations/v1/orders/{amazonOrderId}/solicitations/productReviewAndSellerFeedback'.sub('{' + 'amazonOrderId' + '}', amazon_order_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'CreateProductReviewAndSellerFeedbackSolicitationResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SolicitationsApi#create_product_review_and_seller_feedback_solicitation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, opts = {}) click to toggle source

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. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation. @param amazon_order_id An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. @param marketplace_ids A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. @param [Hash] opts the optional parameters @return [GetSolicitationActionsForOrderResponse]

# File lib/solicitations-api-model/api/solicitations_api.rb, line 85
def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, opts = {})
  data, _status_code, _headers = get_solicitation_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, opts)
  data
end
get_solicitation_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, opts = {}) click to toggle source

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. **Usage Plan:** | Rate (requests per second) | Burst | | —- | —- | | 1 | 5 | For more information, see "Usage Plans and Rate Limits&quot; in the Selling Partner API documentation. @param amazon_order_id An Amazon order identifier. This specifies the order for which you want a list of available solicitation types. @param marketplace_ids A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified. @param [Hash] opts the optional parameters @return [Array<(GetSolicitationActionsForOrderResponse, Integer, Hash)>] GetSolicitationActionsForOrderResponse data, response status code and response headers

# File lib/solicitations-api-model/api/solicitations_api.rb, line 95
def get_solicitation_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: SolicitationsApi.get_solicitation_actions_for_order ...'
  end
  # verify the required parameter 'amazon_order_id' is set
  if @api_client.config.client_side_validation && amazon_order_id.nil?
    fail ArgumentError, "Missing the required parameter 'amazon_order_id' when calling SolicitationsApi.get_solicitation_actions_for_order"
  end
  # verify the required parameter 'marketplace_ids' is set
  if @api_client.config.client_side_validation && marketplace_ids.nil?
    fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling SolicitationsApi.get_solicitation_actions_for_order"
  end
  # resource path
  local_var_path = '/solicitations/v1/orders/{amazonOrderId}'.sub('{' + 'amazonOrderId' + '}', amazon_order_id.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetSolicitationActionsForOrderResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: SolicitationsApi#get_solicitation_actions_for_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end