sp_api_clients 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +161 -0
  3. data/LICENSE +21 -0
  4. data/README.md +284 -0
  5. data/lib/amazon_sp_clients/adapter_loader.rb +28 -0
  6. data/lib/amazon_sp_clients/api_client.rb +309 -0
  7. data/lib/amazon_sp_clients/api_error.rb +37 -0
  8. data/lib/amazon_sp_clients/api_response.rb +54 -0
  9. data/lib/amazon_sp_clients/configuration.rb +144 -0
  10. data/lib/amazon_sp_clients/marketplaces.rb +63 -0
  11. data/lib/amazon_sp_clients/middlewares/raise_error.rb +166 -0
  12. data/lib/amazon_sp_clients/session.rb +124 -0
  13. data/lib/amazon_sp_clients/sp_fba_inventory.rb +8 -0
  14. data/lib/amazon_sp_clients/sp_feeds_2021.rb +8 -0
  15. data/lib/amazon_sp_clients/sp_fulfillment_outbound_2020.rb +8 -0
  16. data/lib/amazon_sp_clients/sp_listings_items_2021.rb +8 -0
  17. data/lib/amazon_sp_clients/sp_orders_v0.rb +8 -0
  18. data/lib/amazon_sp_clients/sp_reports_2021.rb +8 -0
  19. data/lib/amazon_sp_clients/sp_tokens_2021.rb +8 -0
  20. data/lib/amazon_sp_clients/sp_vdf_inventory_v1.rb +8 -0
  21. data/lib/amazon_sp_clients/sp_vdf_orders_v1.rb +8 -0
  22. data/lib/amazon_sp_clients/sp_vdf_shipping_v1.rb +8 -0
  23. data/lib/amazon_sp_clients/sp_vendor_invoices.rb +8 -0
  24. data/lib/amazon_sp_clients/sp_vendor_orders.rb +8 -0
  25. data/lib/amazon_sp_clients/sp_vendor_transaction_status.rb +8 -0
  26. data/lib/amazon_sp_clients/sp_vendors_shipments.rb +8 -0
  27. data/lib/amazon_sp_clients/token_exchange_auth.rb +82 -0
  28. data/lib/amazon_sp_clients/uploader.rb +77 -0
  29. data/lib/amazon_sp_clients/v2/api.rb +43 -0
  30. data/lib/amazon_sp_clients/v2/apis/fba_inventory.rb +80 -0
  31. data/lib/amazon_sp_clients/v2/apis/feeds_2021.rb +86 -0
  32. data/lib/amazon_sp_clients/v2/apis/fulfillment_outbound_2020.rb +184 -0
  33. data/lib/amazon_sp_clients/v2/apis/listings_items_2021.rb +144 -0
  34. data/lib/amazon_sp_clients/v2/apis/orders_v0.rb +165 -0
  35. data/lib/amazon_sp_clients/v2/apis/reports_2021.rb +117 -0
  36. data/lib/amazon_sp_clients/v2/apis/tokens_2021.rb +25 -0
  37. data/lib/amazon_sp_clients/v2/apis/vdf_inventory_v1.rb +26 -0
  38. data/lib/amazon_sp_clients/v2/apis/vdf_orders_v1.rb +61 -0
  39. data/lib/amazon_sp_clients/v2/apis/vdf_shipping_v1.rb +139 -0
  40. data/lib/amazon_sp_clients/v2/apis/vendor_invoices.rb +25 -0
  41. data/lib/amazon_sp_clients/v2/apis/vendor_orders.rb +106 -0
  42. data/lib/amazon_sp_clients/v2/apis/vendor_transaction_status.rb +25 -0
  43. data/lib/amazon_sp_clients/v2/apis/vendors_shipments.rb +120 -0
  44. data/lib/amazon_sp_clients/v2/apis.rb +82 -0
  45. data/lib/amazon_sp_clients/v2/client.rb +198 -0
  46. data/lib/amazon_sp_clients/v2/config.rb +85 -0
  47. data/lib/amazon_sp_clients/v2/credentials.rb +91 -0
  48. data/lib/amazon_sp_clients/v2/documents.rb +115 -0
  49. data/lib/amazon_sp_clients/v2/error_mapper.rb +235 -0
  50. data/lib/amazon_sp_clients/v2/errors.rb +117 -0
  51. data/lib/amazon_sp_clients/v2/lwa.rb +100 -0
  52. data/lib/amazon_sp_clients/v2/rdt.rb +104 -0
  53. data/lib/amazon_sp_clients/v2/token.rb +39 -0
  54. data/lib/amazon_sp_clients/v2.rb +33 -0
  55. data/lib/amazon_sp_clients/version.rb +3 -0
  56. data/lib/amazon_sp_clients.rb +69 -0
  57. data/lib/sp_api_clients.rb +6 -0
  58. data/sp_api_clients.gemspec +53 -0
  59. data/vendor/fba_inventory/lib/sp_fba_inventory/api/fba_inventory_api.rb +289 -0
  60. data/vendor/fba_inventory/lib/sp_fba_inventory.rb +12 -0
  61. data/vendor/feeds_2021/lib/sp_feeds_2021/api/feeds_api.rb +367 -0
  62. data/vendor/feeds_2021/lib/sp_feeds_2021.rb +12 -0
  63. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020/api/fba_outbound_api.rb +845 -0
  64. data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020.rb +12 -0
  65. data/vendor/listings_items_2021/lib/sp_listings_items_2021/api/listings_api.rb +480 -0
  66. data/vendor/listings_items_2021/lib/sp_listings_items_2021.rb +12 -0
  67. data/vendor/orders_v0/lib/sp_orders_v0/api/orders_v0_api.rb +593 -0
  68. data/vendor/orders_v0/lib/sp_orders_v0/api/shipment_api.rb +83 -0
  69. data/vendor/orders_v0/lib/sp_orders_v0.rb +13 -0
  70. data/vendor/reports_2021/lib/sp_reports_2021/api/reports_api.rb +530 -0
  71. data/vendor/reports_2021/lib/sp_reports_2021.rb +12 -0
  72. data/vendor/tokens_2021/lib/sp_tokens_2021/api/tokens_api.rb +77 -0
  73. data/vendor/tokens_2021/lib/sp_tokens_2021.rb +12 -0
  74. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1/api/update_inventory_api.rb +83 -0
  75. data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1.rb +12 -0
  76. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1/api/vendor_orders_api.rb +217 -0
  77. data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1.rb +12 -0
  78. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/customer_invoices_api.rb +152 -0
  79. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_api.rb +264 -0
  80. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_labels_api.rb +208 -0
  81. data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1.rb +14 -0
  82. data/vendor/vendor_invoices/lib/sp_vendor_invoices/api/vendor_payments_api.rb +77 -0
  83. data/vendor/vendor_invoices/lib/sp_vendor_invoices.rb +12 -0
  84. data/vendor/vendor_orders/lib/sp_vendor_orders/api/vendor_orders_api.rb +323 -0
  85. data/vendor/vendor_orders/lib/sp_vendor_orders.rb +12 -0
  86. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status/api/vendor_transaction_api.rb +75 -0
  87. data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status.rb +12 -0
  88. data/vendor/vendors_shipments/lib/sp_vendors_shipments/api/vendor_shipping_api.rb +337 -0
  89. data/vendor/vendors_shipments/lib/sp_vendors_shipments.rb +12 -0
  90. metadata +321 -0
@@ -0,0 +1,83 @@
1
+ =begin
2
+ #Selling Partner API for Orders
3
+
4
+ #Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools. _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
5
+
6
+ OpenAPI spec version: v0
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpOrdersV0
13
+ class ShipmentApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param body The request body for the `updateShipmentStatus` operation.
21
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [nil]
24
+ def update_shipment_status(body, order_id, opts = {})
25
+ update_shipment_status_with_http_info(body, order_id, opts)
26
+ return nil
27
+ end
28
+
29
+ # Update the shipment status for an order that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 15 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
30
+ # @param body The request body for the `updateShipmentStatus` operation.
31
+ # @param order_id An Amazon-defined order identifier, in 3-7-7 format.
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(nil)>] nil, response status code and response headers
34
+ def update_shipment_status_with_http_info(body, order_id, opts = {})
35
+ if @api_client.config.debugging
36
+ @api_client.config.logger.debug 'Calling API: ShipmentApi.update_shipment_status ...'
37
+ end
38
+ # verify the required parameter 'body' is set
39
+ if @api_client.config.client_side_validation && body.nil?
40
+ fail ArgumentError, "Missing the required parameter 'body' when calling ShipmentApi.update_shipment_status"
41
+ end
42
+ # verify the required parameter 'order_id' is set
43
+ if @api_client.config.client_side_validation && order_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling ShipmentApi.update_shipment_status"
45
+ end
46
+ # resource path
47
+ local_var_path = '/orders/v0/orders/{orderId}/shipment'.sub('{' + 'orderId' + '}', order_id.to_s)
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+ # HTTP header 'Content-Type'
57
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
64
+
65
+ return_type = opts[:return_type]
66
+
67
+ auth_names = opts[:auth_names] || []
68
+ data = @api_client.call_api(:POST, local_var_path,
69
+ :header_params => header_params,
70
+ :query_params => query_params,
71
+ :form_params => form_params,
72
+ :body => post_body,
73
+ :auth_names => auth_names,
74
+ :return_type => return_type)
75
+
76
+ if @api_client.config.debugging
77
+ @api_client.config.logger.debug "API called: ShipmentApi#update_shipment_status\nData: #{data.inspect}"
78
+ end
79
+ return data
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,13 @@
1
+ =begin
2
+ #Selling Partner API for Orders
3
+
4
+ #Use the Orders Selling Partner API to programmatically retrieve order information. With this API, you can develop fast, flexible, and custom applications to manage order synchronization, perform order research, and create demand-based decision support tools. _Note:_ For the JP, AU, and SG marketplaces, the Orders API supports orders from 2016 onward. For all other marketplaces, the Orders API supports orders for the last two years (orders older than this don't show up in the response).
5
+
6
+ OpenAPI spec version: v0
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ # APIs
12
+ require_relative './sp_orders_v0/api/orders_v0_api'
13
+ require_relative './sp_orders_v0/api/shipment_api'
@@ -0,0 +1,530 @@
1
+ =begin
2
+ #Selling Partner API for Reports
3
+
4
+ #The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses.
5
+
6
+ OpenAPI spec version: 2021-06-30
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ module AmazonSpClients
12
+ module SpReports2021
13
+ class ReportsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(session)
17
+ @api_client = AmazonSpClients::ApiClient.new(session)
18
+ end
19
+ # Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled reports are returned in subsequent calls to the `getReport` and `getReports` operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
20
+ # @param report_id The identifier for the report. This identifier is unique only in combination with a seller ID.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [nil]
23
+ def cancel_report(report_id, opts = {})
24
+ cancel_report_with_http_info(report_id, opts)
25
+ return nil
26
+ end
27
+
28
+ # Cancels the report that you specify. Only reports with &#x60;processingStatus&#x3D;IN_QUEUE&#x60; can be cancelled. Cancelled reports are returned in subsequent calls to the &#x60;getReport&#x60; and &#x60;getReports&#x60; operations. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
29
+ # @param report_id The identifier for the report. This identifier is unique only in combination with a seller ID.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(nil)>] nil, response status code and response headers
32
+ def cancel_report_with_http_info(report_id, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: ReportsApi.cancel_report ...'
35
+ end
36
+ # verify the required parameter 'report_id' is set
37
+ if @api_client.config.client_side_validation && report_id.nil?
38
+ fail ArgumentError, "Missing the required parameter 'report_id' when calling ReportsApi.cancel_report"
39
+ end
40
+ # resource path
41
+ local_var_path = '/reports/2021-06-30/reports/{reportId}'.sub('{' + 'reportId' + '}', report_id.to_s)
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ return_type = opts[:return_type]
58
+
59
+ auth_names = opts[:auth_names] || []
60
+ data = @api_client.call_api(:DELETE, local_var_path,
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type)
67
+
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: ReportsApi#cancel_report\nData: #{data.inspect}"
70
+ end
71
+ return data
72
+ end
73
+ # Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
74
+ # @param report_schedule_id The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [nil]
77
+ def cancel_report_schedule(report_schedule_id, opts = {})
78
+ cancel_report_schedule_with_http_info(report_schedule_id, opts)
79
+ return nil
80
+ end
81
+
82
+ # Cancels the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
83
+ # @param report_schedule_id The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(nil)>] nil, response status code and response headers
86
+ def cancel_report_schedule_with_http_info(report_schedule_id, opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: ReportsApi.cancel_report_schedule ...'
89
+ end
90
+ # verify the required parameter 'report_schedule_id' is set
91
+ if @api_client.config.client_side_validation && report_schedule_id.nil?
92
+ fail ArgumentError, "Missing the required parameter 'report_schedule_id' when calling ReportsApi.cancel_report_schedule"
93
+ end
94
+ # resource path
95
+ local_var_path = '/reports/2021-06-30/schedules/{reportScheduleId}'.sub('{' + 'reportScheduleId' + '}', report_schedule_id.to_s)
96
+
97
+ # query parameters
98
+ query_params = opts[:query_params] || {}
99
+
100
+ # header parameters
101
+ header_params = opts[:header_params] || {}
102
+ # HTTP header 'Accept' (if needed)
103
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
104
+
105
+ # form parameters
106
+ form_params = opts[:form_params] || {}
107
+
108
+ # http body (model)
109
+ post_body = opts[:body]
110
+
111
+ return_type = opts[:return_type]
112
+
113
+ auth_names = opts[:auth_names] || []
114
+ data = @api_client.call_api(:DELETE, local_var_path,
115
+ :header_params => header_params,
116
+ :query_params => query_params,
117
+ :form_params => form_params,
118
+ :body => post_body,
119
+ :auth_names => auth_names,
120
+ :return_type => return_type)
121
+
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug "API called: ReportsApi#cancel_report_schedule\nData: #{data.inspect}"
124
+ end
125
+ return data
126
+ end
127
+ # Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
128
+ # @param body Information required to create the report.
129
+ # @param [Hash] opts the optional parameters
130
+ # @return [CreateReportResponse]
131
+ def create_report(body, opts = {})
132
+ data = create_report_with_http_info(body, opts)
133
+ return data
134
+ end
135
+
136
+ # Creates a report. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
137
+ # @param body Information required to create the report.
138
+ # @param [Hash] opts the optional parameters
139
+ # @return [Array<(CreateReportResponse)>] CreateReportResponse data, response status code and response headers
140
+ def create_report_with_http_info(body, opts = {})
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug 'Calling API: ReportsApi.create_report ...'
143
+ end
144
+ # verify the required parameter 'body' is set
145
+ if @api_client.config.client_side_validation && body.nil?
146
+ fail ArgumentError, "Missing the required parameter 'body' when calling ReportsApi.create_report"
147
+ end
148
+ # resource path
149
+ local_var_path = '/reports/2021-06-30/reports'
150
+
151
+ # query parameters
152
+ query_params = opts[:query_params] || {}
153
+
154
+ # header parameters
155
+ header_params = opts[:header_params] || {}
156
+ # HTTP header 'Accept' (if needed)
157
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
158
+ # HTTP header 'Content-Type'
159
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
160
+
161
+ # form parameters
162
+ form_params = opts[:form_params] || {}
163
+
164
+ # http body (model)
165
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
166
+
167
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
168
+
169
+ auth_names = opts[:auth_names] || []
170
+ data = @api_client.call_api(:POST, local_var_path,
171
+ :header_params => header_params,
172
+ :query_params => query_params,
173
+ :form_params => form_params,
174
+ :body => post_body,
175
+ :auth_names => auth_names,
176
+ :return_type => return_type)
177
+
178
+ if @api_client.config.debugging
179
+ @api_client.config.logger.debug "API called: ReportsApi#create_report\nData: #{data.inspect}"
180
+ end
181
+ return data
182
+ end
183
+ # Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
184
+ # @param body Information required to create the report schedule.
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [CreateReportScheduleResponse]
187
+ def create_report_schedule(body, opts = {})
188
+ data = create_report_schedule_with_http_info(body, opts)
189
+ return data
190
+ end
191
+
192
+ # Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it will be cancelled and replaced with this one. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
193
+ # @param body Information required to create the report schedule.
194
+ # @param [Hash] opts the optional parameters
195
+ # @return [Array<(CreateReportScheduleResponse)>] CreateReportScheduleResponse data, response status code and response headers
196
+ def create_report_schedule_with_http_info(body, opts = {})
197
+ if @api_client.config.debugging
198
+ @api_client.config.logger.debug 'Calling API: ReportsApi.create_report_schedule ...'
199
+ end
200
+ # verify the required parameter 'body' is set
201
+ if @api_client.config.client_side_validation && body.nil?
202
+ fail ArgumentError, "Missing the required parameter 'body' when calling ReportsApi.create_report_schedule"
203
+ end
204
+ # resource path
205
+ local_var_path = '/reports/2021-06-30/schedules'
206
+
207
+ # query parameters
208
+ query_params = opts[:query_params] || {}
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+ # HTTP header 'Content-Type'
215
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
216
+
217
+ # form parameters
218
+ form_params = opts[:form_params] || {}
219
+
220
+ # http body (model)
221
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
222
+
223
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
224
+
225
+ auth_names = opts[:auth_names] || []
226
+ data = @api_client.call_api(:POST, local_var_path,
227
+ :header_params => header_params,
228
+ :query_params => query_params,
229
+ :form_params => form_params,
230
+ :body => post_body,
231
+ :auth_names => auth_names,
232
+ :return_type => return_type)
233
+
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug "API called: ReportsApi#create_report_schedule\nData: #{data.inspect}"
236
+ end
237
+ return data
238
+ end
239
+ # Returns report details (including the `reportDocumentId`, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
240
+ # @param report_id The identifier for the report. This identifier is unique only in combination with a seller ID.
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [Report]
243
+ def get_report(report_id, opts = {})
244
+ data = get_report_with_http_info(report_id, opts)
245
+ return data
246
+ end
247
+
248
+ # Returns report details (including the &#x60;reportDocumentId&#x60;, if available) for the report that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 2 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
249
+ # @param report_id The identifier for the report. This identifier is unique only in combination with a seller ID.
250
+ # @param [Hash] opts the optional parameters
251
+ # @return [Array<(Report)>] Report data, response status code and response headers
252
+ def get_report_with_http_info(report_id, opts = {})
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug 'Calling API: ReportsApi.get_report ...'
255
+ end
256
+ # verify the required parameter 'report_id' is set
257
+ if @api_client.config.client_side_validation && report_id.nil?
258
+ fail ArgumentError, "Missing the required parameter 'report_id' when calling ReportsApi.get_report"
259
+ end
260
+ # resource path
261
+ local_var_path = '/reports/2021-06-30/reports/{reportId}'.sub('{' + 'reportId' + '}', report_id.to_s)
262
+
263
+ # query parameters
264
+ query_params = opts[:query_params] || {}
265
+
266
+ # header parameters
267
+ header_params = opts[:header_params] || {}
268
+ # HTTP header 'Accept' (if needed)
269
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
270
+
271
+ # form parameters
272
+ form_params = opts[:form_params] || {}
273
+
274
+ # http body (model)
275
+ post_body = opts[:body]
276
+
277
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
278
+
279
+ auth_names = opts[:auth_names] || []
280
+ data = @api_client.call_api(:GET, local_var_path,
281
+ :header_params => header_params,
282
+ :query_params => query_params,
283
+ :form_params => form_params,
284
+ :body => post_body,
285
+ :auth_names => auth_names,
286
+ :return_type => return_type)
287
+
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: ReportsApi#get_report\nData: #{data.inspect}"
290
+ end
291
+ return data
292
+ end
293
+ # Returns the information required for retrieving a report document's contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
294
+ # @param report_document_id The identifier for the report document.
295
+ # @param [Hash] opts the optional parameters
296
+ # @return [ReportDocument]
297
+ def get_report_document(report_document_id, opts = {})
298
+ data = get_report_document_with_http_info(report_document_id, opts)
299
+ return data
300
+ end
301
+
302
+ # Returns the information required for retrieving a report document&#x27;s contents. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0167 | 15 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
303
+ # @param report_document_id The identifier for the report document.
304
+ # @param [Hash] opts the optional parameters
305
+ # @return [Array<(ReportDocument)>] ReportDocument data, response status code and response headers
306
+ def get_report_document_with_http_info(report_document_id, opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_document ...'
309
+ end
310
+ # verify the required parameter 'report_document_id' is set
311
+ if @api_client.config.client_side_validation && report_document_id.nil?
312
+ fail ArgumentError, "Missing the required parameter 'report_document_id' when calling ReportsApi.get_report_document"
313
+ end
314
+ # resource path
315
+ local_var_path = '/reports/2021-06-30/documents/{reportDocumentId}'.sub('{' + 'reportDocumentId' + '}', report_document_id.to_s)
316
+
317
+ # query parameters
318
+ query_params = opts[:query_params] || {}
319
+
320
+ # header parameters
321
+ header_params = opts[:header_params] || {}
322
+ # HTTP header 'Accept' (if needed)
323
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:body]
330
+
331
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
332
+
333
+ auth_names = opts[:auth_names] || []
334
+ data = @api_client.call_api(:GET, local_var_path,
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => return_type)
341
+
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "API called: ReportsApi#get_report_document\nData: #{data.inspect}"
344
+ end
345
+ return data
346
+ end
347
+ # Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
348
+ # @param report_schedule_id The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
349
+ # @param [Hash] opts the optional parameters
350
+ # @return [ReportSchedule]
351
+ def get_report_schedule(report_schedule_id, opts = {})
352
+ data = get_report_schedule_with_http_info(report_schedule_id, opts)
353
+ return data
354
+ end
355
+
356
+ # Returns report schedule details for the report schedule that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
357
+ # @param report_schedule_id The identifier for the report schedule. This identifier is unique only in combination with a seller ID.
358
+ # @param [Hash] opts the optional parameters
359
+ # @return [Array<(ReportSchedule)>] ReportSchedule data, response status code and response headers
360
+ def get_report_schedule_with_http_info(report_schedule_id, opts = {})
361
+ if @api_client.config.debugging
362
+ @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_schedule ...'
363
+ end
364
+ # verify the required parameter 'report_schedule_id' is set
365
+ if @api_client.config.client_side_validation && report_schedule_id.nil?
366
+ fail ArgumentError, "Missing the required parameter 'report_schedule_id' when calling ReportsApi.get_report_schedule"
367
+ end
368
+ # resource path
369
+ local_var_path = '/reports/2021-06-30/schedules/{reportScheduleId}'.sub('{' + 'reportScheduleId' + '}', report_schedule_id.to_s)
370
+
371
+ # query parameters
372
+ query_params = opts[:query_params] || {}
373
+
374
+ # header parameters
375
+ header_params = opts[:header_params] || {}
376
+ # HTTP header 'Accept' (if needed)
377
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
378
+
379
+ # form parameters
380
+ form_params = opts[:form_params] || {}
381
+
382
+ # http body (model)
383
+ post_body = opts[:body]
384
+
385
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
386
+
387
+ auth_names = opts[:auth_names] || []
388
+ data = @api_client.call_api(:GET, local_var_path,
389
+ :header_params => header_params,
390
+ :query_params => query_params,
391
+ :form_params => form_params,
392
+ :body => post_body,
393
+ :auth_names => auth_names,
394
+ :return_type => return_type)
395
+
396
+ if @api_client.config.debugging
397
+ @api_client.config.logger.debug "API called: ReportsApi#get_report_schedule\nData: #{data.inspect}"
398
+ end
399
+ return data
400
+ end
401
+ # Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
402
+ # @param report_types A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
403
+ # @param [Hash] opts the optional parameters
404
+ # @return [ReportScheduleList]
405
+ def get_report_schedules(report_types, opts = {})
406
+ data = get_report_schedules_with_http_info(report_types, opts)
407
+ return data
408
+ end
409
+
410
+ # Returns report schedule details that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
411
+ # @param report_types A list of report types used to filter report schedules. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information.
412
+ # @param [Hash] opts the optional parameters
413
+ # @return [Array<(ReportScheduleList)>] ReportScheduleList data, response status code and response headers
414
+ def get_report_schedules_with_http_info(report_types, opts = {})
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug 'Calling API: ReportsApi.get_report_schedules ...'
417
+ end
418
+ # verify the required parameter 'report_types' is set
419
+ if @api_client.config.client_side_validation && report_types.nil?
420
+ fail ArgumentError, "Missing the required parameter 'report_types' when calling ReportsApi.get_report_schedules"
421
+ end
422
+ # resource path
423
+ local_var_path = '/reports/2021-06-30/schedules'
424
+
425
+ # query parameters
426
+ query_params = opts[:query_params] || {}
427
+ query_params[:'reportTypes'] = @api_client.build_collection_param(report_types, :csv)
428
+
429
+ # header parameters
430
+ header_params = opts[:header_params] || {}
431
+ # HTTP header 'Accept' (if needed)
432
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
433
+
434
+ # form parameters
435
+ form_params = opts[:form_params] || {}
436
+
437
+ # http body (model)
438
+ post_body = opts[:body]
439
+
440
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
441
+
442
+ auth_names = opts[:auth_names] || []
443
+ data = @api_client.call_api(:GET, local_var_path,
444
+ :header_params => header_params,
445
+ :query_params => query_params,
446
+ :form_params => form_params,
447
+ :body => post_body,
448
+ :auth_names => auth_names,
449
+ :return_type => return_type)
450
+
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug "API called: ReportsApi#get_report_schedules\nData: #{data.inspect}"
453
+ end
454
+ return data
455
+ end
456
+ # Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
457
+ # @param [Hash] opts the optional parameters
458
+ # @option opts [Array<String>] :report_types A list of report types used to filter reports. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required.
459
+ # @option opts [Array<String>] :processing_statuses A list of processing statuses used to filter reports.
460
+ # @option opts [Array<String>] :marketplace_ids A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify.
461
+ # @option opts [Integer] :page_size The maximum number of reports to return in a single call. (default to 10)
462
+ # @option opts [DateTime] :created_since The earliest report creation date and time for reports to include in the response, in &lt;a href&#x3D;&#x27;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#x27;&gt;ISO 8601&lt;/a&gt; date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days.
463
+ # @option opts [DateTime] :created_until The latest report creation date and time for reports to include in the response, in &lt;a href&#x3D;&#x27;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#x27;&gt;ISO 8601&lt;/a&gt; date time format. The default is now.
464
+ # @option opts [String] :next_token A string token returned in the response to your previous request. &#x60;nextToken&#x60; is returned when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the &#x60;getReports&#x60; operation and include this token as the only parameter. Specifying &#x60;nextToken&#x60; with any other parameters will cause the request to fail.
465
+ # @return [GetReportsResponse]
466
+ def get_reports(opts = {})
467
+ data = get_reports_with_http_info(opts)
468
+ return data
469
+ end
470
+
471
+ # Returns report details for the reports that match the filters that you specify. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 0.0222 | 10 | 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, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
472
+ # @param [Hash] opts the optional parameters
473
+ # @option opts [Array<String>] :report_types A list of report types used to filter reports. Refer to [Report Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required.
474
+ # @option opts [Array<String>] :processing_statuses A list of processing statuses used to filter reports.
475
+ # @option opts [Array<String>] :marketplace_ids A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify.
476
+ # @option opts [Integer] :page_size The maximum number of reports to return in a single call.
477
+ # @option opts [DateTime] :created_since The earliest report creation date and time for reports to include in the response, in &lt;a href&#x3D;&#x27;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#x27;&gt;ISO 8601&lt;/a&gt; date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days.
478
+ # @option opts [DateTime] :created_until The latest report creation date and time for reports to include in the response, in &lt;a href&#x3D;&#x27;https://developer-docs.amazon.com/sp-api/docs/iso-8601&#x27;&gt;ISO 8601&lt;/a&gt; date time format. The default is now.
479
+ # @option opts [String] :next_token A string token returned in the response to your previous request. &#x60;nextToken&#x60; is returned when the number of results exceeds the specified &#x60;pageSize&#x60; value. To get the next page of results, call the &#x60;getReports&#x60; operation and include this token as the only parameter. Specifying &#x60;nextToken&#x60; with any other parameters will cause the request to fail.
480
+ # @return [Array<(GetReportsResponse)>] GetReportsResponse data, response status code and response headers
481
+ def get_reports_with_http_info(opts = {})
482
+ if @api_client.config.debugging
483
+ @api_client.config.logger.debug 'Calling API: ReportsApi.get_reports ...'
484
+ end
485
+ if @api_client.config.client_side_validation && opts[:'processing_statuses'] && !opts[:'processing_statuses'].all? { |item| ['CANCELLED', 'DONE', 'FATAL', 'IN_PROGRESS', 'IN_QUEUE'].include?(item) }
486
+ fail ArgumentError, 'invalid value for "processing_statuses", must include one of CANCELLED, DONE, FATAL, IN_PROGRESS, IN_QUEUE'
487
+ end
488
+ # resource path
489
+ local_var_path = '/reports/2021-06-30/reports'
490
+
491
+ # query parameters
492
+ query_params = opts[:query_params] || {}
493
+ query_params[:'reportTypes'] = @api_client.build_collection_param(opts[:'report_types'], :csv) if !opts[:'report_types'].nil?
494
+ query_params[:'processingStatuses'] = @api_client.build_collection_param(opts[:'processing_statuses'], :csv) if !opts[:'processing_statuses'].nil?
495
+ query_params[:'marketplaceIds'] = @api_client.build_collection_param(opts[:'marketplace_ids'], :csv) if !opts[:'marketplace_ids'].nil?
496
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
497
+ query_params[:'createdSince'] = opts[:'created_since'] if !opts[:'created_since'].nil?
498
+ query_params[:'createdUntil'] = opts[:'created_until'] if !opts[:'created_until'].nil?
499
+ query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
500
+
501
+ # header parameters
502
+ header_params = opts[:header_params] || {}
503
+ # HTTP header 'Accept' (if needed)
504
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
505
+
506
+ # form parameters
507
+ form_params = opts[:form_params] || {}
508
+
509
+ # http body (model)
510
+ post_body = opts[:body]
511
+
512
+ return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
513
+
514
+ auth_names = opts[:auth_names] || []
515
+ data = @api_client.call_api(:GET, local_var_path,
516
+ :header_params => header_params,
517
+ :query_params => query_params,
518
+ :form_params => form_params,
519
+ :body => post_body,
520
+ :auth_names => auth_names,
521
+ :return_type => return_type)
522
+
523
+ if @api_client.config.debugging
524
+ @api_client.config.logger.debug "API called: ReportsApi#get_reports\nData: #{data.inspect}"
525
+ end
526
+ return data
527
+ end
528
+ end
529
+ end
530
+ end
@@ -0,0 +1,12 @@
1
+ =begin
2
+ #Selling Partner API for Reports
3
+
4
+ #The Selling Partner API for Reports lets you retrieve and manage a variety of reports that can help selling partners manage their businesses.
5
+
6
+ OpenAPI spec version: 2021-06-30
7
+
8
+ Generated by: lib/generator (bundle exec rake generate)
9
+ =end
10
+
11
+ # APIs
12
+ require_relative './sp_reports_2021/api/reports_api'