square.rb 3.20190814.0 → 3.20190925.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/lib/square.rb +53 -52
  4. data/lib/square/api/apple_pay_api.rb +55 -55
  5. data/lib/square/api/base_api.rb +48 -45
  6. data/lib/square/api/catalog_api.rb +461 -461
  7. data/lib/square/api/checkout_api.rb +54 -54
  8. data/lib/square/api/customers_api.rb +335 -335
  9. data/lib/square/api/employees_api.rb +91 -91
  10. data/lib/square/api/inventory_api.rb +300 -300
  11. data/lib/square/api/labor_api.rb +558 -558
  12. data/lib/square/api/locations_api.rb +117 -45
  13. data/lib/square/api/merchants_api.rb +46 -0
  14. data/lib/square/api/mobile_authorization_api.rb +56 -56
  15. data/lib/square/api/o_auth_api.rb +168 -168
  16. data/lib/square/api/orders_api.rb +271 -269
  17. data/lib/square/api/payments_api.rb +282 -282
  18. data/lib/square/api/refunds_api.rb +149 -149
  19. data/lib/square/api/reporting_api.rb +145 -143
  20. data/lib/square/api/transactions_api.rb +379 -379
  21. data/lib/square/api/v1_employees_api.rb +720 -720
  22. data/lib/square/api/v1_items_api.rb +1651 -1651
  23. data/lib/square/api/v1_locations_api.rb +67 -67
  24. data/lib/square/api/v1_transactions_api.rb +574 -574
  25. data/lib/square/api_helper.rb +281 -281
  26. data/lib/square/client.rb +155 -139
  27. data/lib/square/configuration.rb +98 -88
  28. data/lib/square/exceptions/api_exception.rb +20 -20
  29. data/lib/square/http/api_response.rb +50 -50
  30. data/lib/square/http/auth/o_auth2.rb +17 -17
  31. data/lib/square/http/faraday_client.rb +64 -64
  32. data/lib/square/http/http_call_back.rb +24 -24
  33. data/lib/square/http/http_client.rb +104 -104
  34. data/lib/square/http/http_method_enum.rb +13 -13
  35. data/lib/square/http/http_request.rb +50 -50
  36. data/lib/square/http/http_response.rb +29 -29
  37. data/test/api/test_labor_api.rb +74 -0
  38. metadata +4 -3
  39. data/lib/square/api/v1_locations_api.rbe +0 -67
@@ -1,269 +1,271 @@
1
- # square
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module Square
7
- # OrdersApi
8
- class OrdersApi < BaseApi
9
- def initialize(config, http_call_back: nil)
10
- super(config, http_call_back: http_call_back)
11
- end
12
-
13
- # Creates a new [Order](#type-order) which can include information on
14
- # products for
15
- # purchase and settings to apply to the purchase.
16
- # To pay for a created order, please refer to the [Pay for
17
- # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
18
- # guide.
19
- # You can modify open orders using the
20
- # [UpdateOrder](#endpoint-orders-updateorder) endpoint.
21
- # To learn more about the Orders API, see the
22
- # [Orders API
23
- # Overview](https://developer.squareup.com/docs/orders-api/what-it-does).
24
- # @param [String] location_id Required parameter: The ID of the business
25
- # location to associate the order with.
26
- # @param [CreateOrderRequest] body Required parameter: An object containing
27
- # the fields to POST for the request. See the corresponding object
28
- # definition for field details.
29
- # @return [CreateOrderResponse Hash] response from the API call
30
- def create_order(location_id:,
31
- body:)
32
- # Prepare query url.
33
- _query_builder = config.get_base_uri
34
- _query_builder << '/v2/locations/{location_id}/orders'
35
- _query_builder = APIHelper.append_url_with_template_parameters(
36
- _query_builder,
37
- 'location_id' => location_id
38
- )
39
- _query_url = APIHelper.clean_url _query_builder
40
-
41
- # Prepare headers.
42
- _headers = {
43
- 'accept' => 'application/json',
44
- 'content-type' => 'application/json; charset=utf-8'
45
- }
46
-
47
- # Prepare and execute HttpRequest.
48
- _request = config.http_client.post(
49
- _query_url,
50
- headers: _headers,
51
- parameters: body.to_json
52
- )
53
- OAuth2.apply(config, _request)
54
- _response = execute_request(_request)
55
-
56
- # Return appropriate response type.
57
- decoded = APIHelper.json_deserialize(_response.raw_body)
58
- _errors = APIHelper.map_response(decoded, ['errors'])
59
- ApiResponse.new(_response, data: decoded, errors: _errors)
60
- end
61
-
62
- # Retrieves a set of [Order](#type-order)s by their IDs.
63
- # If a given Order ID does not exist, the ID is ignored instead of
64
- # generating an error.
65
- # @param [String] location_id Required parameter: The ID of the orders'
66
- # associated location.
67
- # @param [BatchRetrieveOrdersRequest] body Required parameter: An object
68
- # containing the fields to POST for the request. See the corresponding
69
- # object definition for field details.
70
- # @return [BatchRetrieveOrdersResponse Hash] response from the API call
71
- def batch_retrieve_orders(location_id:,
72
- body:)
73
- # Prepare query url.
74
- _query_builder = config.get_base_uri
75
- _query_builder << '/v2/locations/{location_id}/orders/batch-retrieve'
76
- _query_builder = APIHelper.append_url_with_template_parameters(
77
- _query_builder,
78
- 'location_id' => location_id
79
- )
80
- _query_url = APIHelper.clean_url _query_builder
81
-
82
- # Prepare headers.
83
- _headers = {
84
- 'accept' => 'application/json',
85
- 'content-type' => 'application/json; charset=utf-8'
86
- }
87
-
88
- # Prepare and execute HttpRequest.
89
- _request = config.http_client.post(
90
- _query_url,
91
- headers: _headers,
92
- parameters: body.to_json
93
- )
94
- OAuth2.apply(config, _request)
95
- _response = execute_request(_request)
96
-
97
- # Return appropriate response type.
98
- decoded = APIHelper.json_deserialize(_response.raw_body)
99
- _errors = APIHelper.map_response(decoded, ['errors'])
100
- ApiResponse.new(_response, data: decoded, errors: _errors)
101
- end
102
-
103
- # Updates an open [Order](#type-order) by adding, replacing, or deleting
104
- # fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated.
105
- # An UpdateOrder request requires the following:
106
- # - The `order_id` in the endpoint path, identifying the order to update.
107
- # - The latest `version` of the order to update.
108
- # - The [sparse
109
- # order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse
110
- # -order-objects)
111
- # containing only the fields to update and the version the update is
112
- # being applied to.
113
- # - If deleting fields, the [dot notation
114
- # paths](https://developer.squareup.com/docs/orders-api/manage-orders#on-dot
115
- # -notation)
116
- # identifying fields to clear.
117
- # To pay for an order, please refer to the [Pay for
118
- # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
119
- # guide.
120
- # To learn more about the Orders API, see the
121
- # [Orders API
122
- # Overview](https://developer.squareup.com/docs/orders-api/what-it-does).
123
- # @param [UpdateOrderRequest] body Required parameter: An object containing
124
- # the fields to POST for the request. See the corresponding object
125
- # definition for field details.
126
- # @param [String] location_id Required parameter: Example:
127
- # @param [String] order_id Required parameter: Example:
128
- # @return [UpdateOrderResponse Hash] response from the API call
129
- def update_order(body:,
130
- location_id:,
131
- order_id:)
132
- # Prepare query url.
133
- _query_builder = config.get_base_uri
134
- _query_builder << '/v2/locations/{location_id}/orders/{order_id}'
135
- _query_builder = APIHelper.append_url_with_template_parameters(
136
- _query_builder,
137
- 'location_id' => location_id,
138
- 'order_id' => order_id
139
- )
140
- _query_url = APIHelper.clean_url _query_builder
141
-
142
- # Prepare headers.
143
- _headers = {
144
- 'accept' => 'application/json',
145
- 'content-type' => 'application/json; charset=utf-8'
146
- }
147
-
148
- # Prepare and execute HttpRequest.
149
- _request = config.http_client.put(
150
- _query_url,
151
- headers: _headers,
152
- parameters: body.to_json
153
- )
154
- OAuth2.apply(config, _request)
155
- _response = execute_request(_request)
156
-
157
- # Return appropriate response type.
158
- decoded = APIHelper.json_deserialize(_response.raw_body)
159
- _errors = APIHelper.map_response(decoded, ['errors'])
160
- ApiResponse.new(_response, data: decoded, errors: _errors)
161
- end
162
-
163
- # Search all orders for one or more locations. Orders include all sales,
164
- # returns, and exchanges regardless of how or when they entered the Square
165
- # Ecosystem (e.g. Point of Sale, Invoices, Connect APIs, etc).
166
- # SearchOrders requests need to specify which locations to search and define
167
- # a
168
- # [`SearchOrdersQuery`](#type-searchordersquery) object which controls
169
- # how to sort or filter the results. Your SearchOrdersQuery can:
170
- # Set filter criteria.
171
- # Set sort order.
172
- # Determine whether to return results as complete Order objects, or as
173
- # [OrderEntry](#type-orderentry) objects.
174
- # Note that details for orders processed with Square Point of Sale while in
175
- # offline mode may not be transmitted to Square for up to 72 hours. Offline
176
- # orders have a `created_at` value that reflects the time the order was
177
- # created,
178
- # not the time it was subsequently transmitted to Square.
179
- # @param [SearchOrdersRequest] body Required parameter: An object containing
180
- # the fields to POST for the request. See the corresponding object
181
- # definition for field details.
182
- # @return [SearchOrdersResponse Hash] response from the API call
183
- def search_orders(body:)
184
- # Prepare query url.
185
- _query_builder = config.get_base_uri
186
- _query_builder << '/v2/orders/search'
187
- _query_url = APIHelper.clean_url _query_builder
188
-
189
- # Prepare headers.
190
- _headers = {
191
- 'accept' => 'application/json',
192
- 'content-type' => 'application/json; charset=utf-8'
193
- }
194
-
195
- # Prepare and execute HttpRequest.
196
- _request = config.http_client.post(
197
- _query_url,
198
- headers: _headers,
199
- parameters: body.to_json
200
- )
201
- OAuth2.apply(config, _request)
202
- _response = execute_request(_request)
203
-
204
- # Return appropriate response type.
205
- decoded = APIHelper.json_deserialize(_response.raw_body)
206
- _errors = APIHelper.map_response(decoded, ['errors'])
207
- ApiResponse.new(_response, data: decoded, errors: _errors)
208
- end
209
-
210
- # Pay for an [order](#type-order) using one or more approved
211
- # [payments](#type-payment),
212
- # or settle an order with a total of `0`.
213
- # The total of the `payment_ids` listed in the request must be equal to the
214
- # order
215
- # total. Orders with a total amount of `0` can be marked as paid by
216
- # specifying an empty
217
- # array of `payment_ids` in the request.
218
- # To be used with PayOrder, a payment must:
219
- # - Reference the order by specifying the `order_id` when [creating the
220
- # payment](#endpoint-payments-createpayment).
221
- # Any approved payments that reference the same `order_id` not specified in
222
- # the
223
- # `payment_ids` will be canceled.
224
- # - Be approved with [delayed
225
- # capture](https://developer.squareup.com/docs/payments-api/take-payments#de
226
- # layed-capture).
227
- # Using a delayed capture payment with PayOrder will complete the approved
228
- # payment.
229
- # Learn how to [pay for orders with a single payment using the Payments
230
- # API](https://developer.squareup.com/docs/orders-api/pay-for-orders).
231
- # @param [String] order_id Required parameter: The ID of the order being
232
- # paid.
233
- # @param [PayOrderRequest] body Required parameter: An object containing the
234
- # fields to POST for the request. See the corresponding object definition
235
- # for field details.
236
- # @return [PayOrderResponse Hash] response from the API call
237
- def pay_order(order_id:,
238
- body:)
239
- # Prepare query url.
240
- _query_builder = config.get_base_uri
241
- _query_builder << '/v2/orders/{order_id}/pay'
242
- _query_builder = APIHelper.append_url_with_template_parameters(
243
- _query_builder,
244
- 'order_id' => order_id
245
- )
246
- _query_url = APIHelper.clean_url _query_builder
247
-
248
- # Prepare headers.
249
- _headers = {
250
- 'accept' => 'application/json',
251
- 'content-type' => 'application/json; charset=utf-8'
252
- }
253
-
254
- # Prepare and execute HttpRequest.
255
- _request = config.http_client.post(
256
- _query_url,
257
- headers: _headers,
258
- parameters: body.to_json
259
- )
260
- OAuth2.apply(config, _request)
261
- _response = execute_request(_request)
262
-
263
- # Return appropriate response type.
264
- decoded = APIHelper.json_deserialize(_response.raw_body)
265
- _errors = APIHelper.map_response(decoded, ['errors'])
266
- ApiResponse.new(_response, data: decoded, errors: _errors)
267
- end
268
- end
269
- end
1
+ # square
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Square
7
+ # OrdersApi
8
+ class OrdersApi < BaseApi
9
+ def initialize(config, http_call_back: nil)
10
+ super(config, http_call_back: http_call_back)
11
+ end
12
+
13
+ # Creates a new [Order](#type-order) which can include information on
14
+ # products for
15
+ # purchase and settings to apply to the purchase.
16
+ # To pay for a created order, please refer to the [Pay for
17
+ # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
18
+ # guide.
19
+ # You can modify open orders using the
20
+ # [UpdateOrder](#endpoint-orders-updateorder) endpoint.
21
+ # To learn more about the Orders API, see the
22
+ # [Orders API
23
+ # Overview](https://developer.squareup.com/docs/orders-api/what-it-does).
24
+ # @param [String] location_id Required parameter: The ID of the business
25
+ # location to associate the order with.
26
+ # @param [CreateOrderRequest] body Required parameter: An object containing
27
+ # the fields to POST for the request. See the corresponding object
28
+ # definition for field details.
29
+ # @return [CreateOrderResponse Hash] response from the API call
30
+ def create_order(location_id:,
31
+ body:)
32
+ # Prepare query url.
33
+ _query_builder = config.get_base_uri
34
+ _query_builder << '/v2/locations/{location_id}/orders'
35
+ _query_builder = APIHelper.append_url_with_template_parameters(
36
+ _query_builder,
37
+ 'location_id' => location_id
38
+ )
39
+ _query_url = APIHelper.clean_url _query_builder
40
+
41
+ # Prepare headers.
42
+ _headers = {
43
+ 'accept' => 'application/json',
44
+ 'content-type' => 'application/json; charset=utf-8'
45
+ }
46
+
47
+ # Prepare and execute HttpRequest.
48
+ _request = config.http_client.post(
49
+ _query_url,
50
+ headers: _headers,
51
+ parameters: body.to_json
52
+ )
53
+ OAuth2.apply(config, _request)
54
+ _response = execute_request(_request)
55
+
56
+ # Return appropriate response type.
57
+ decoded = APIHelper.json_deserialize(_response.raw_body)
58
+ _errors = APIHelper.map_response(decoded, ['errors'])
59
+ ApiResponse.new(_response, data: decoded, errors: _errors)
60
+ end
61
+
62
+ # Retrieves a set of [Order](#type-order)s by their IDs.
63
+ # If a given Order ID does not exist, the ID is ignored instead of
64
+ # generating an error.
65
+ # @param [String] location_id Required parameter: The ID of the orders'
66
+ # associated location.
67
+ # @param [BatchRetrieveOrdersRequest] body Required parameter: An object
68
+ # containing the fields to POST for the request. See the corresponding
69
+ # object definition for field details.
70
+ # @return [BatchRetrieveOrdersResponse Hash] response from the API call
71
+ def batch_retrieve_orders(location_id:,
72
+ body:)
73
+ # Prepare query url.
74
+ _query_builder = config.get_base_uri
75
+ _query_builder << '/v2/locations/{location_id}/orders/batch-retrieve'
76
+ _query_builder = APIHelper.append_url_with_template_parameters(
77
+ _query_builder,
78
+ 'location_id' => location_id
79
+ )
80
+ _query_url = APIHelper.clean_url _query_builder
81
+
82
+ # Prepare headers.
83
+ _headers = {
84
+ 'accept' => 'application/json',
85
+ 'content-type' => 'application/json; charset=utf-8'
86
+ }
87
+
88
+ # Prepare and execute HttpRequest.
89
+ _request = config.http_client.post(
90
+ _query_url,
91
+ headers: _headers,
92
+ parameters: body.to_json
93
+ )
94
+ OAuth2.apply(config, _request)
95
+ _response = execute_request(_request)
96
+
97
+ # Return appropriate response type.
98
+ decoded = APIHelper.json_deserialize(_response.raw_body)
99
+ _errors = APIHelper.map_response(decoded, ['errors'])
100
+ ApiResponse.new(_response, data: decoded, errors: _errors)
101
+ end
102
+
103
+ # Updates an open [Order](#type-order) by adding, replacing, or deleting
104
+ # fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated.
105
+ # An UpdateOrder request requires the following:
106
+ # - The `order_id` in the endpoint path, identifying the order to update.
107
+ # - The latest `version` of the order to update.
108
+ # - The [sparse
109
+ # order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse
110
+ # -order-objects)
111
+ # containing only the fields to update and the version the update is
112
+ # being applied to.
113
+ # - If deleting fields, the [dot notation
114
+ # paths](https://developer.squareup.com/docs/orders-api/manage-orders#on-dot
115
+ # -notation)
116
+ # identifying fields to clear.
117
+ # To pay for an order, please refer to the [Pay for
118
+ # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
119
+ # guide.
120
+ # To learn more about the Orders API, see the
121
+ # [Orders API
122
+ # Overview](https://developer.squareup.com/docs/orders-api/what-it-does).
123
+ # @param [String] location_id Required parameter: The ID of the order's
124
+ # associated location.
125
+ # @param [String] order_id Required parameter: The ID of the order to
126
+ # update.
127
+ # @param [UpdateOrderRequest] body Required parameter: An object containing
128
+ # the fields to POST for the request. See the corresponding object
129
+ # definition for field details.
130
+ # @return [UpdateOrderResponse Hash] response from the API call
131
+ def update_order(location_id:,
132
+ order_id:,
133
+ body:)
134
+ # Prepare query url.
135
+ _query_builder = config.get_base_uri
136
+ _query_builder << '/v2/locations/{location_id}/orders/{order_id}'
137
+ _query_builder = APIHelper.append_url_with_template_parameters(
138
+ _query_builder,
139
+ 'location_id' => location_id,
140
+ 'order_id' => order_id
141
+ )
142
+ _query_url = APIHelper.clean_url _query_builder
143
+
144
+ # Prepare headers.
145
+ _headers = {
146
+ 'accept' => 'application/json',
147
+ 'content-type' => 'application/json; charset=utf-8'
148
+ }
149
+
150
+ # Prepare and execute HttpRequest.
151
+ _request = config.http_client.put(
152
+ _query_url,
153
+ headers: _headers,
154
+ parameters: body.to_json
155
+ )
156
+ OAuth2.apply(config, _request)
157
+ _response = execute_request(_request)
158
+
159
+ # Return appropriate response type.
160
+ decoded = APIHelper.json_deserialize(_response.raw_body)
161
+ _errors = APIHelper.map_response(decoded, ['errors'])
162
+ ApiResponse.new(_response, data: decoded, errors: _errors)
163
+ end
164
+
165
+ # Search all orders for one or more locations. Orders include all sales,
166
+ # returns, and exchanges regardless of how or when they entered the Square
167
+ # Ecosystem (e.g. Point of Sale, Invoices, Connect APIs, etc).
168
+ # SearchOrders requests need to specify which locations to search and define
169
+ # a
170
+ # [`SearchOrdersQuery`](#type-searchordersquery) object which controls
171
+ # how to sort or filter the results. Your SearchOrdersQuery can:
172
+ # Set filter criteria.
173
+ # Set sort order.
174
+ # Determine whether to return results as complete Order objects, or as
175
+ # [OrderEntry](#type-orderentry) objects.
176
+ # Note that details for orders processed with Square Point of Sale while in
177
+ # offline mode may not be transmitted to Square for up to 72 hours. Offline
178
+ # orders have a `created_at` value that reflects the time the order was
179
+ # created,
180
+ # not the time it was subsequently transmitted to Square.
181
+ # @param [SearchOrdersRequest] body Required parameter: An object containing
182
+ # the fields to POST for the request. See the corresponding object
183
+ # definition for field details.
184
+ # @return [SearchOrdersResponse Hash] response from the API call
185
+ def search_orders(body:)
186
+ # Prepare query url.
187
+ _query_builder = config.get_base_uri
188
+ _query_builder << '/v2/orders/search'
189
+ _query_url = APIHelper.clean_url _query_builder
190
+
191
+ # Prepare headers.
192
+ _headers = {
193
+ 'accept' => 'application/json',
194
+ 'content-type' => 'application/json; charset=utf-8'
195
+ }
196
+
197
+ # Prepare and execute HttpRequest.
198
+ _request = config.http_client.post(
199
+ _query_url,
200
+ headers: _headers,
201
+ parameters: body.to_json
202
+ )
203
+ OAuth2.apply(config, _request)
204
+ _response = execute_request(_request)
205
+
206
+ # Return appropriate response type.
207
+ decoded = APIHelper.json_deserialize(_response.raw_body)
208
+ _errors = APIHelper.map_response(decoded, ['errors'])
209
+ ApiResponse.new(_response, data: decoded, errors: _errors)
210
+ end
211
+
212
+ # Pay for an [order](#type-order) using one or more approved
213
+ # [payments](#type-payment),
214
+ # or settle an order with a total of `0`.
215
+ # The total of the `payment_ids` listed in the request must be equal to the
216
+ # order
217
+ # total. Orders with a total amount of `0` can be marked as paid by
218
+ # specifying an empty
219
+ # array of `payment_ids` in the request.
220
+ # To be used with PayOrder, a payment must:
221
+ # - Reference the order by specifying the `order_id` when [creating the
222
+ # payment](#endpoint-payments-createpayment).
223
+ # Any approved payments that reference the same `order_id` not specified in
224
+ # the
225
+ # `payment_ids` will be canceled.
226
+ # - Be approved with [delayed
227
+ # capture](https://developer.squareup.com/docs/payments-api/take-payments#de
228
+ # layed-capture).
229
+ # Using a delayed capture payment with PayOrder will complete the approved
230
+ # payment.
231
+ # Learn how to [pay for orders with a single payment using the Payments
232
+ # API](https://developer.squareup.com/docs/orders-api/pay-for-orders).
233
+ # @param [String] order_id Required parameter: The ID of the order being
234
+ # paid.
235
+ # @param [PayOrderRequest] body Required parameter: An object containing the
236
+ # fields to POST for the request. See the corresponding object definition
237
+ # for field details.
238
+ # @return [PayOrderResponse Hash] response from the API call
239
+ def pay_order(order_id:,
240
+ body:)
241
+ # Prepare query url.
242
+ _query_builder = config.get_base_uri
243
+ _query_builder << '/v2/orders/{order_id}/pay'
244
+ _query_builder = APIHelper.append_url_with_template_parameters(
245
+ _query_builder,
246
+ 'order_id' => order_id
247
+ )
248
+ _query_url = APIHelper.clean_url _query_builder
249
+
250
+ # Prepare headers.
251
+ _headers = {
252
+ 'accept' => 'application/json',
253
+ 'content-type' => 'application/json; charset=utf-8'
254
+ }
255
+
256
+ # Prepare and execute HttpRequest.
257
+ _request = config.http_client.post(
258
+ _query_url,
259
+ headers: _headers,
260
+ parameters: body.to_json
261
+ )
262
+ OAuth2.apply(config, _request)
263
+ _response = execute_request(_request)
264
+
265
+ # Return appropriate response type.
266
+ decoded = APIHelper.json_deserialize(_response.raw_body)
267
+ _errors = APIHelper.map_response(decoded, ['errors'])
268
+ ApiResponse.new(_response, data: decoded, errors: _errors)
269
+ end
270
+ end
271
+ end