Class: AmznSpApi::SolicitationsApiModel::SolicitationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/solicitations_api_model/api/solicitations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ SolicitationsApi

Returns a new instance of SolicitationsApi.



14
15
16
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 14

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



12
13
14
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 12

def api_client
  @api_client
end

Instance Method Details

#create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, opts = {}) ⇒ CreateProductReviewAndSellerFeedbackSolicitationResponse

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 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



23
24
25
26
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 23

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 = {}) ⇒ Array<(CreateProductReviewAndSellerFeedbackSolicitationResponse, Integer, Hash)>

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 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

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.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 33

def create_product_review_and_seller_feedback_solicitation_with_http_info(amazon_order_id, marketplace_ids, opts = {})
  @api_client.config.logger.debug 'Calling API: SolicitationsApi.create_product_review_and_seller_feedback_solicitation ...' if @api_client.config.debugging
  # verify the required parameter 'amazon_order_id' is set
  raise ArgumentError, "Missing the required parameter 'amazon_order_id' when calling SolicitationsApi.create_product_review_and_seller_feedback_solicitation" if @api_client.config.client_side_validation && amazon_order_id.nil?
  # verify the required parameter 'marketplace_ids' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_ids' when calling SolicitationsApi.create_product_review_and_seller_feedback_solicitation" if @api_client.config.client_side_validation && marketplace_ids.nil?

  # 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)

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

#get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, opts = {}) ⇒ GetSolicitationActionsForOrderResponse

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 | The ‘x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:

  • amazon_order_id

    An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.

  • marketplace_ids

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



78
79
80
81
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 78

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 = {}) ⇒ Array<(GetSolicitationActionsForOrderResponse, Integer, Hash)>

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 | The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

Parameters:

  • amazon_order_id

    An Amazon order identifier. This specifies the order for which you want a list of available solicitation types.

  • marketplace_ids

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

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/solicitations_api_model/api/solicitations_api.rb', line 88

def get_solicitation_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, opts = {})
  @api_client.config.logger.debug 'Calling API: SolicitationsApi.get_solicitation_actions_for_order ...' if @api_client.config.debugging
  # verify the required parameter 'amazon_order_id' is set
  raise ArgumentError, "Missing the required parameter 'amazon_order_id' when calling SolicitationsApi.get_solicitation_actions_for_order" if @api_client.config.client_side_validation && amazon_order_id.nil?
  # verify the required parameter 'marketplace_ids' is set
  raise ArgumentError, "Missing the required parameter 'marketplace_ids' when calling SolicitationsApi.get_solicitation_actions_for_order" if @api_client.config.client_side_validation && marketplace_ids.nil?

  # 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)

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