square.rb 6.0.0.20200625 → 6.5.0.20201028

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -30
  3. data/lib/square.rb +61 -60
  4. data/lib/square/api/apple_pay_api.rb +3 -1
  5. data/lib/square/api/bank_accounts_api.rb +12 -15
  6. data/lib/square/api/base_api.rb +2 -2
  7. data/lib/square/api/cash_drawers_api.rb +11 -5
  8. data/lib/square/api/catalog_api.rb +119 -49
  9. data/lib/square/api/checkout_api.rb +4 -2
  10. data/lib/square/api/customer_groups_api.rb +18 -8
  11. data/lib/square/api/customer_segments_api.rb +7 -3
  12. data/lib/square/api/customers_api.rb +47 -27
  13. data/lib/square/api/devices_api.rb +17 -6
  14. data/lib/square/api/disputes_api.rb +39 -34
  15. data/lib/square/api/employees_api.rb +10 -5
  16. data/lib/square/api/inventory_api.rb +30 -15
  17. data/lib/square/api/invoices_api.rb +359 -0
  18. data/lib/square/api/labor_api.rb +131 -22
  19. data/lib/square/api/locations_api.rb +20 -12
  20. data/lib/square/api/loyalty_api.rb +59 -65
  21. data/lib/square/api/merchants_api.rb +9 -4
  22. data/lib/square/api/mobile_authorization_api.rb +3 -1
  23. data/lib/square/api/o_auth_api.rb +10 -4
  24. data/lib/square/api/orders_api.rb +111 -90
  25. data/lib/square/api/payments_api.rb +75 -65
  26. data/lib/square/api/refunds_api.rb +21 -11
  27. data/lib/square/api/subscriptions_api.rb +263 -0
  28. data/lib/square/api/team_api.rb +32 -16
  29. data/lib/square/api/terminal_api.rb +156 -7
  30. data/lib/square/api/transactions_api.rb +32 -18
  31. data/lib/square/api/v1_employees_api.rb +59 -27
  32. data/lib/square/api/v1_items_api.rb +195 -115
  33. data/lib/square/api/v1_locations_api.rb +6 -2
  34. data/lib/square/api/v1_transactions_api.rb +49 -27
  35. data/lib/square/api_helper.rb +14 -9
  36. data/lib/square/client.rb +23 -16
  37. data/lib/square/configuration.rb +12 -4
  38. data/lib/square/http/api_response.rb +2 -0
  39. data/lib/square/http/faraday_client.rb +1 -0
  40. data/spec/user_journey_spec.rb +2 -5
  41. data/test/api/api_test_base.rb +1 -6
  42. data/test/api/test_catalog_api.rb +1 -4
  43. data/test/api/test_customers_api.rb +1 -4
  44. data/test/api/test_employees_api.rb +1 -4
  45. data/test/api/test_labor_api.rb +2 -6
  46. data/test/api/test_locations_api.rb +22 -33
  47. data/test/api/test_merchants_api.rb +1 -4
  48. data/test/api/test_payments_api.rb +3 -6
  49. data/test/api/test_refunds_api.rb +3 -6
  50. data/test/http_response_catcher.rb +0 -5
  51. data/test/test_helper.rb +0 -5
  52. metadata +33 -14
  53. data/lib/square/api/reporting_api.rb +0 -138
@@ -6,7 +6,7 @@ module Square
6
6
  end
7
7
 
8
8
  # Retrieves a list of refunds for the account making the request.
9
- # Max results per page: 100
9
+ # The maximum results per page is 100.
10
10
  # @param [String] begin_time Optional parameter: Timestamp for the beginning
11
11
  # of the requested reporting period, in RFC 3339 format. Default: The
12
12
  # current time minus one year.
@@ -32,6 +32,10 @@ module Square
32
32
  # with the given source type are returned. - `CARD` - List refunds only for
33
33
  # payments where card was specified as payment source. Default: If omitted
34
34
  # refunds are returned regardless of source type.
35
+ # @param [Integer] limit Optional parameter: Maximum number of results to be
36
+ # returned in a single page. It is possible to receive fewer results than
37
+ # the specified limit on a given page. If the supplied value is greater
38
+ # than 100, at most 100 results will be returned. Default: `100`
35
39
  # @return [ListPaymentRefundsResponse Hash] response from the API call
36
40
  def list_payment_refunds(begin_time: nil,
37
41
  end_time: nil,
@@ -39,7 +43,8 @@ module Square
39
43
  cursor: nil,
40
44
  location_id: nil,
41
45
  status: nil,
42
- source_type: nil)
46
+ source_type: nil,
47
+ limit: nil)
43
48
  # Prepare query url.
44
49
  _query_builder = config.get_base_uri
45
50
  _query_builder << '/v2/refunds'
@@ -51,7 +56,8 @@ module Square
51
56
  'cursor' => cursor,
52
57
  'location_id' => location_id,
53
58
  'status' => status,
54
- 'source_type' => source_type
59
+ 'source_type' => source_type,
60
+ 'limit' => limit
55
61
  )
56
62
  _query_url = APIHelper.clean_url _query_builder
57
63
 
@@ -71,13 +77,13 @@ module Square
71
77
  # Return appropriate response type.
72
78
  decoded = APIHelper.json_deserialize(_response.raw_body)
73
79
  _errors = APIHelper.map_response(decoded, ['errors'])
74
- ApiResponse.new(_response, data: decoded, errors: _errors)
80
+ ApiResponse.new(
81
+ _response, data: decoded, errors: _errors
82
+ )
75
83
  end
76
84
 
77
85
  # Refunds a payment. You can refund the entire payment amount or a
78
- # portion of it. For more information, see
79
- # [Payments and Refunds
80
- # Overview](https://developer.squareup.com/docs/payments-api/overview).
86
+ # portion of it.
81
87
  # @param [RefundPaymentRequest] body Required parameter: An object
82
88
  # containing the fields to POST for the request. See the corresponding
83
89
  # object definition for field details.
@@ -106,10 +112,12 @@ module Square
106
112
  # Return appropriate response type.
107
113
  decoded = APIHelper.json_deserialize(_response.raw_body)
108
114
  _errors = APIHelper.map_response(decoded, ['errors'])
109
- ApiResponse.new(_response, data: decoded, errors: _errors)
115
+ ApiResponse.new(
116
+ _response, data: decoded, errors: _errors
117
+ )
110
118
  end
111
119
 
112
- # Retrieves a specific `Refund` using the `refund_id`.
120
+ # Retrieves a specific refund using the `refund_id`.
113
121
  # @param [String] refund_id Required parameter: Unique ID for the desired
114
122
  # `PaymentRefund`.
115
123
  # @return [GetPaymentRefundResponse Hash] response from the API call
@@ -119,7 +127,7 @@ module Square
119
127
  _query_builder << '/v2/refunds/{refund_id}'
120
128
  _query_builder = APIHelper.append_url_with_template_parameters(
121
129
  _query_builder,
122
- 'refund_id' => refund_id
130
+ 'refund_id' => { 'value' => refund_id, 'encode' => true }
123
131
  )
124
132
  _query_url = APIHelper.clean_url _query_builder
125
133
 
@@ -139,7 +147,9 @@ module Square
139
147
  # Return appropriate response type.
140
148
  decoded = APIHelper.json_deserialize(_response.raw_body)
141
149
  _errors = APIHelper.map_response(decoded, ['errors'])
142
- ApiResponse.new(_response, data: decoded, errors: _errors)
150
+ ApiResponse.new(
151
+ _response, data: decoded, errors: _errors
152
+ )
143
153
  end
144
154
  end
145
155
  end
@@ -0,0 +1,263 @@
1
+ module Square
2
+ # SubscriptionsApi
3
+ class SubscriptionsApi < BaseApi
4
+ def initialize(config, http_call_back: nil)
5
+ super(config, http_call_back: http_call_back)
6
+ end
7
+
8
+ # Creates a subscription for a customer to a subscription plan.
9
+ # If you provide a card on file in the request, Square charges the card for
10
+ # the subscription. Otherwise, Square bills an invoice to the customer's
11
+ # email
12
+ # address. The subscription starts immediately, unless the request includes
13
+ # the optional `start_date`. Each individual subscription is associated with
14
+ # a particular location.
15
+ # @param [CreateSubscriptionRequest] body Required parameter: An object
16
+ # containing the fields to POST for the request. See the corresponding
17
+ # object definition for field details.
18
+ # @return [CreateSubscriptionResponse Hash] response from the API call
19
+ def create_subscription(body:)
20
+ # Prepare query url.
21
+ _query_builder = config.get_base_uri
22
+ _query_builder << '/v2/subscriptions'
23
+ _query_url = APIHelper.clean_url _query_builder
24
+
25
+ # Prepare headers.
26
+ _headers = {
27
+ 'accept' => 'application/json',
28
+ 'content-type' => 'application/json; charset=utf-8'
29
+ }
30
+
31
+ # Prepare and execute HttpRequest.
32
+ _request = config.http_client.post(
33
+ _query_url,
34
+ headers: _headers,
35
+ parameters: body.to_json
36
+ )
37
+ OAuth2.apply(config, _request)
38
+ _response = execute_request(_request)
39
+
40
+ # Return appropriate response type.
41
+ decoded = APIHelper.json_deserialize(_response.raw_body)
42
+ _errors = APIHelper.map_response(decoded, ['errors'])
43
+ ApiResponse.new(
44
+ _response, data: decoded, errors: _errors
45
+ )
46
+ end
47
+
48
+ # Searches for subscriptions.
49
+ # Results are ordered chronologically by subscription creation date. If
50
+ # the request specifies more than one location ID,
51
+ # the endpoint orders the result
52
+ # by location ID, and then by creation date within each location. If no
53
+ # locations are given
54
+ # in the query, all locations are searched.
55
+ # You can also optionally specify `customer_ids` to search by customer.
56
+ # If left unset, all customers
57
+ # associated with the specified locations are returned.
58
+ # If the request specifies customer IDs, the endpoint orders results
59
+ # first by location, within location by customer ID, and within
60
+ # customer by subscription creation date.
61
+ # For more information, see
62
+ # [Retrieve
63
+ # subscriptions](https://developer.squareup.com/docs/docs/subscriptions-api/
64
+ # overview#retrieve-subscriptions).
65
+ # @param [SearchSubscriptionsRequest] body Required parameter: An object
66
+ # containing the fields to POST for the request. See the corresponding
67
+ # object definition for field details.
68
+ # @return [SearchSubscriptionsResponse Hash] response from the API call
69
+ def search_subscriptions(body:)
70
+ # Prepare query url.
71
+ _query_builder = config.get_base_uri
72
+ _query_builder << '/v2/subscriptions/search'
73
+ _query_url = APIHelper.clean_url _query_builder
74
+
75
+ # Prepare headers.
76
+ _headers = {
77
+ 'accept' => 'application/json',
78
+ 'content-type' => 'application/json; charset=utf-8'
79
+ }
80
+
81
+ # Prepare and execute HttpRequest.
82
+ _request = config.http_client.post(
83
+ _query_url,
84
+ headers: _headers,
85
+ parameters: body.to_json
86
+ )
87
+ OAuth2.apply(config, _request)
88
+ _response = execute_request(_request)
89
+
90
+ # Return appropriate response type.
91
+ decoded = APIHelper.json_deserialize(_response.raw_body)
92
+ _errors = APIHelper.map_response(decoded, ['errors'])
93
+ ApiResponse.new(
94
+ _response, data: decoded, errors: _errors
95
+ )
96
+ end
97
+
98
+ # Retrieves a subscription.
99
+ # @param [String] subscription_id Required parameter: The ID of the
100
+ # subscription to retrieve.
101
+ # @return [RetrieveSubscriptionResponse Hash] response from the API call
102
+ def retrieve_subscription(subscription_id:)
103
+ # Prepare query url.
104
+ _query_builder = config.get_base_uri
105
+ _query_builder << '/v2/subscriptions/{subscription_id}'
106
+ _query_builder = APIHelper.append_url_with_template_parameters(
107
+ _query_builder,
108
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
109
+ )
110
+ _query_url = APIHelper.clean_url _query_builder
111
+
112
+ # Prepare headers.
113
+ _headers = {
114
+ 'accept' => 'application/json'
115
+ }
116
+
117
+ # Prepare and execute HttpRequest.
118
+ _request = config.http_client.get(
119
+ _query_url,
120
+ headers: _headers
121
+ )
122
+ OAuth2.apply(config, _request)
123
+ _response = execute_request(_request)
124
+
125
+ # Return appropriate response type.
126
+ decoded = APIHelper.json_deserialize(_response.raw_body)
127
+ _errors = APIHelper.map_response(decoded, ['errors'])
128
+ ApiResponse.new(
129
+ _response, data: decoded, errors: _errors
130
+ )
131
+ end
132
+
133
+ # Updates a subscription. You can set, modify, and clear the
134
+ # `subscription` field values.
135
+ # @param [String] subscription_id Required parameter: The ID for the
136
+ # subscription to update.
137
+ # @param [UpdateSubscriptionRequest] body Required parameter: An object
138
+ # containing the fields to POST for the request. See the corresponding
139
+ # object definition for field details.
140
+ # @return [UpdateSubscriptionResponse Hash] response from the API call
141
+ def update_subscription(subscription_id:,
142
+ body:)
143
+ # Prepare query url.
144
+ _query_builder = config.get_base_uri
145
+ _query_builder << '/v2/subscriptions/{subscription_id}'
146
+ _query_builder = APIHelper.append_url_with_template_parameters(
147
+ _query_builder,
148
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
149
+ )
150
+ _query_url = APIHelper.clean_url _query_builder
151
+
152
+ # Prepare headers.
153
+ _headers = {
154
+ 'accept' => 'application/json',
155
+ 'content-type' => 'application/json; charset=utf-8'
156
+ }
157
+
158
+ # Prepare and execute HttpRequest.
159
+ _request = config.http_client.put(
160
+ _query_url,
161
+ headers: _headers,
162
+ parameters: body.to_json
163
+ )
164
+ OAuth2.apply(config, _request)
165
+ _response = execute_request(_request)
166
+
167
+ # Return appropriate response type.
168
+ decoded = APIHelper.json_deserialize(_response.raw_body)
169
+ _errors = APIHelper.map_response(decoded, ['errors'])
170
+ ApiResponse.new(
171
+ _response, data: decoded, errors: _errors
172
+ )
173
+ end
174
+
175
+ # Sets the `canceled_date` field to the end of the active billing period.
176
+ # After this date, the status changes from ACTIVE to CANCELED.
177
+ # @param [String] subscription_id Required parameter: The ID of the
178
+ # subscription to cancel.
179
+ # @return [CancelSubscriptionResponse Hash] response from the API call
180
+ def cancel_subscription(subscription_id:)
181
+ # Prepare query url.
182
+ _query_builder = config.get_base_uri
183
+ _query_builder << '/v2/subscriptions/{subscription_id}/cancel'
184
+ _query_builder = APIHelper.append_url_with_template_parameters(
185
+ _query_builder,
186
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
187
+ )
188
+ _query_url = APIHelper.clean_url _query_builder
189
+
190
+ # Prepare headers.
191
+ _headers = {
192
+ 'accept' => 'application/json'
193
+ }
194
+
195
+ # Prepare and execute HttpRequest.
196
+ _request = config.http_client.post(
197
+ _query_url,
198
+ headers: _headers
199
+ )
200
+ OAuth2.apply(config, _request)
201
+ _response = execute_request(_request)
202
+
203
+ # Return appropriate response type.
204
+ decoded = APIHelper.json_deserialize(_response.raw_body)
205
+ _errors = APIHelper.map_response(decoded, ['errors'])
206
+ ApiResponse.new(
207
+ _response, data: decoded, errors: _errors
208
+ )
209
+ end
210
+
211
+ # Lists all events for a specific subscription.
212
+ # In the current implementation, only `START_SUBSCRIPTION` and
213
+ # `STOP_SUBSCRIPTION` (when the subscription was canceled) events are
214
+ # returned.
215
+ # @param [String] subscription_id Required parameter: The ID of the
216
+ # subscription to retrieve the events for.
217
+ # @param [String] cursor Optional parameter: A pagination cursor returned by
218
+ # a previous call to this endpoint. Provide this to retrieve the next set of
219
+ # results for the original query. For more information, see
220
+ # [Pagination](https://developer.squareup.com/docs/docs/working-with-apis/pa
221
+ # gination).
222
+ # @param [Integer] limit Optional parameter: The upper limit on the number
223
+ # of subscription events to return in the response. Default: `200`
224
+ # @return [ListSubscriptionEventsResponse Hash] response from the API call
225
+ def list_subscription_events(subscription_id:,
226
+ cursor: nil,
227
+ limit: nil)
228
+ # Prepare query url.
229
+ _query_builder = config.get_base_uri
230
+ _query_builder << '/v2/subscriptions/{subscription_id}/events'
231
+ _query_builder = APIHelper.append_url_with_template_parameters(
232
+ _query_builder,
233
+ 'subscription_id' => { 'value' => subscription_id, 'encode' => true }
234
+ )
235
+ _query_builder = APIHelper.append_url_with_query_parameters(
236
+ _query_builder,
237
+ 'cursor' => cursor,
238
+ 'limit' => limit
239
+ )
240
+ _query_url = APIHelper.clean_url _query_builder
241
+
242
+ # Prepare headers.
243
+ _headers = {
244
+ 'accept' => 'application/json'
245
+ }
246
+
247
+ # Prepare and execute HttpRequest.
248
+ _request = config.http_client.get(
249
+ _query_url,
250
+ headers: _headers
251
+ )
252
+ OAuth2.apply(config, _request)
253
+ _response = execute_request(_request)
254
+
255
+ # Return appropriate response type.
256
+ decoded = APIHelper.json_deserialize(_response.raw_body)
257
+ _errors = APIHelper.map_response(decoded, ['errors'])
258
+ ApiResponse.new(
259
+ _response, data: decoded, errors: _errors
260
+ )
261
+ end
262
+ end
263
+ end
@@ -8,8 +8,8 @@ module Square
8
8
  # Creates a single `TeamMember` object. The `TeamMember` will be returned on
9
9
  # successful creates.
10
10
  # You must provide the following values in your request to this endpoint:
11
- # - `first_name`
12
- # - `last_name`
11
+ # - `given_name`
12
+ # - `family_name`
13
13
  # Learn about [Troubleshooting the Teams
14
14
  # API](https://developer.squareup.com/docs/docs/team/troubleshooting#createt
15
15
  # eammember).
@@ -41,7 +41,9 @@ module Square
41
41
  # Return appropriate response type.
42
42
  decoded = APIHelper.json_deserialize(_response.raw_body)
43
43
  _errors = APIHelper.map_response(decoded, ['errors'])
44
- ApiResponse.new(_response, data: decoded, errors: _errors)
44
+ ApiResponse.new(
45
+ _response, data: decoded, errors: _errors
46
+ )
45
47
  end
46
48
 
47
49
  # Creates multiple `TeamMember` objects. The created `TeamMember` objects
@@ -82,7 +84,9 @@ module Square
82
84
  # Return appropriate response type.
83
85
  decoded = APIHelper.json_deserialize(_response.raw_body)
84
86
  _errors = APIHelper.map_response(decoded, ['errors'])
85
- ApiResponse.new(_response, data: decoded, errors: _errors)
87
+ ApiResponse.new(
88
+ _response, data: decoded, errors: _errors
89
+ )
86
90
  end
87
91
 
88
92
  # Updates multiple `TeamMember` objects. The updated `TeamMember` objects
@@ -123,13 +127,15 @@ module Square
123
127
  # Return appropriate response type.
124
128
  decoded = APIHelper.json_deserialize(_response.raw_body)
125
129
  _errors = APIHelper.map_response(decoded, ['errors'])
126
- ApiResponse.new(_response, data: decoded, errors: _errors)
130
+ ApiResponse.new(
131
+ _response, data: decoded, errors: _errors
132
+ )
127
133
  end
128
134
 
129
135
  # Returns a paginated list of `TeamMember` objects for a business.
130
136
  # The list to be returned can be filtered by:
131
137
  # - location IDs **and**
132
- # - `is_active`
138
+ # - `status`
133
139
  # @param [SearchTeamMembersRequest] body Required parameter: An object
134
140
  # containing the fields to POST for the request. See the corresponding
135
141
  # object definition for field details.
@@ -158,10 +164,12 @@ module Square
158
164
  # Return appropriate response type.
159
165
  decoded = APIHelper.json_deserialize(_response.raw_body)
160
166
  _errors = APIHelper.map_response(decoded, ['errors'])
161
- ApiResponse.new(_response, data: decoded, errors: _errors)
167
+ ApiResponse.new(
168
+ _response, data: decoded, errors: _errors
169
+ )
162
170
  end
163
171
 
164
- # Retrieve a `TeamMember` object for the given `TeamMember.id`
172
+ # Retrieve a `TeamMember` object for the given `TeamMember.id`.
165
173
  # Learn about [Troubleshooting the Teams
166
174
  # API](https://developer.squareup.com/docs/docs/team/troubleshooting#retriev
167
175
  # eteammember).
@@ -174,7 +182,7 @@ module Square
174
182
  _query_builder << '/v2/team-members/{team_member_id}'
175
183
  _query_builder = APIHelper.append_url_with_template_parameters(
176
184
  _query_builder,
177
- 'team_member_id' => team_member_id
185
+ 'team_member_id' => { 'value' => team_member_id, 'encode' => true }
178
186
  )
179
187
  _query_url = APIHelper.clean_url _query_builder
180
188
 
@@ -194,7 +202,9 @@ module Square
194
202
  # Return appropriate response type.
195
203
  decoded = APIHelper.json_deserialize(_response.raw_body)
196
204
  _errors = APIHelper.map_response(decoded, ['errors'])
197
- ApiResponse.new(_response, data: decoded, errors: _errors)
205
+ ApiResponse.new(
206
+ _response, data: decoded, errors: _errors
207
+ )
198
208
  end
199
209
 
200
210
  # Updates a single `TeamMember` object. The `TeamMember` will be returned on
@@ -215,7 +225,7 @@ module Square
215
225
  _query_builder << '/v2/team-members/{team_member_id}'
216
226
  _query_builder = APIHelper.append_url_with_template_parameters(
217
227
  _query_builder,
218
- 'team_member_id' => team_member_id
228
+ 'team_member_id' => { 'value' => team_member_id, 'encode' => true }
219
229
  )
220
230
  _query_url = APIHelper.clean_url _query_builder
221
231
 
@@ -237,7 +247,9 @@ module Square
237
247
  # Return appropriate response type.
238
248
  decoded = APIHelper.json_deserialize(_response.raw_body)
239
249
  _errors = APIHelper.map_response(decoded, ['errors'])
240
- ApiResponse.new(_response, data: decoded, errors: _errors)
250
+ ApiResponse.new(
251
+ _response, data: decoded, errors: _errors
252
+ )
241
253
  end
242
254
 
243
255
  # Retrieve a `WageSetting` object for a team member specified
@@ -254,7 +266,7 @@ module Square
254
266
  _query_builder << '/v2/team-members/{team_member_id}/wage-setting'
255
267
  _query_builder = APIHelper.append_url_with_template_parameters(
256
268
  _query_builder,
257
- 'team_member_id' => team_member_id
269
+ 'team_member_id' => { 'value' => team_member_id, 'encode' => true }
258
270
  )
259
271
  _query_url = APIHelper.clean_url _query_builder
260
272
 
@@ -274,7 +286,9 @@ module Square
274
286
  # Return appropriate response type.
275
287
  decoded = APIHelper.json_deserialize(_response.raw_body)
276
288
  _errors = APIHelper.map_response(decoded, ['errors'])
277
- ApiResponse.new(_response, data: decoded, errors: _errors)
289
+ ApiResponse.new(
290
+ _response, data: decoded, errors: _errors
291
+ )
278
292
  end
279
293
 
280
294
  # Creates or updates a `WageSetting` object. The object is created if a
@@ -298,7 +312,7 @@ module Square
298
312
  _query_builder << '/v2/team-members/{team_member_id}/wage-setting'
299
313
  _query_builder = APIHelper.append_url_with_template_parameters(
300
314
  _query_builder,
301
- 'team_member_id' => team_member_id
315
+ 'team_member_id' => { 'value' => team_member_id, 'encode' => true }
302
316
  )
303
317
  _query_url = APIHelper.clean_url _query_builder
304
318
 
@@ -320,7 +334,9 @@ module Square
320
334
  # Return appropriate response type.
321
335
  decoded = APIHelper.json_deserialize(_response.raw_body)
322
336
  _errors = APIHelper.map_response(decoded, ['errors'])
323
- ApiResponse.new(_response, data: decoded, errors: _errors)
337
+ ApiResponse.new(
338
+ _response, data: decoded, errors: _errors
339
+ )
324
340
  end
325
341
  end
326
342
  end