Class: AmzSpApi::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.



16
17
18
# File 'lib/solicitations-api-model/api/solicitations_api.rb', line 16

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/solicitations-api-model/api/solicitations_api.rb', line 14

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 | 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.

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

    the optional parameters

Returns:



24
25
26
27
# 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 = {}) ⇒ 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 | For more information, see &quot;Usage Plans and Rate Limits&quot; 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.

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

    the optional parameters

Returns:



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
72
73
74
75
76
77
78
79
# 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 = {}) ⇒ 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 | 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 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:



85
86
87
88
# 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 = {}) ⇒ 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 | For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

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:



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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# 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