square.rb 38.0.0.20240515 → 38.1.1.20240717
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/square/api/apple_pay_api.rb +14 -10
- data/lib/square/api/bank_accounts_api.rb +9 -9
- data/lib/square/api/base_api.rb +1 -1
- data/lib/square/api/booking_custom_attributes_api.rb +33 -33
- data/lib/square/api/bookings_api.rb +39 -39
- data/lib/square/api/cards_api.rb +12 -12
- data/lib/square/api/cash_drawers_api.rb +9 -9
- data/lib/square/api/catalog_api.rb +42 -42
- data/lib/square/api/checkout_api.rb +30 -30
- data/lib/square/api/customer_custom_attributes_api.rb +30 -30
- data/lib/square/api/customer_groups_api.rb +15 -15
- data/lib/square/api/customer_segments_api.rb +6 -6
- data/lib/square/api/customers_api.rb +42 -42
- data/lib/square/api/devices_api.rb +15 -15
- data/lib/square/api/disputes_api.rb +27 -27
- data/lib/square/api/employees_api.rb +6 -6
- data/lib/square/api/events_api.rb +84 -0
- data/lib/square/api/gift_card_activities_api.rb +6 -6
- data/lib/square/api/gift_cards_api.rb +21 -21
- data/lib/square/api/inventory_api.rb +39 -39
- data/lib/square/api/invoices_api.rb +37 -38
- data/lib/square/api/labor_api.rb +48 -48
- data/lib/square/api/location_custom_attributes_api.rb +33 -33
- data/lib/square/api/locations_api.rb +12 -12
- data/lib/square/api/loyalty_api.rb +54 -54
- data/lib/square/api/merchant_custom_attributes_api.rb +33 -33
- data/lib/square/api/merchants_api.rb +6 -6
- data/lib/square/api/mobile_authorization_api.rb +3 -3
- data/lib/square/api/o_auth_api.rb +9 -9
- data/lib/square/api/order_custom_attributes_api.rb +33 -33
- data/lib/square/api/orders_api.rb +24 -24
- data/lib/square/api/payments_api.rb +21 -21
- data/lib/square/api/payouts_api.rb +9 -9
- data/lib/square/api/refunds_api.rb +9 -9
- data/lib/square/api/sites_api.rb +3 -3
- data/lib/square/api/snippets_api.rb +9 -9
- data/lib/square/api/subscriptions_api.rb +36 -36
- data/lib/square/api/team_api.rb +24 -24
- data/lib/square/api/terminal_api.rb +45 -45
- data/lib/square/api/transactions_api.rb +12 -12
- data/lib/square/api/v1_transactions_api.rb +10 -10
- data/lib/square/api/vendors_api.rb +21 -21
- data/lib/square/api/webhook_subscriptions_api.rb +24 -24
- data/lib/square/client.rb +8 -2
- data/lib/square/configuration.rb +3 -3
- data/lib/square.rb +1 -0
- data/test/webhooks/test_webhooks_helper.rb +17 -0
- metadata +9 -8
@@ -47,9 +47,9 @@ module Square
|
|
47
47
|
.header_param(new_parameter('application/json', key: 'accept'))
|
48
48
|
.auth(Single.new('global')))
|
49
49
|
.response(new_response_handler
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
51
|
+
.is_api_response(true)
|
52
|
+
.convertor(ApiResponse.method(:create)))
|
53
53
|
.execute
|
54
54
|
end
|
55
55
|
|
@@ -77,9 +77,9 @@ module Square
|
|
77
77
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
78
78
|
.auth(Single.new('global')))
|
79
79
|
.response(new_response_handler
|
80
|
-
|
81
|
-
|
82
|
-
|
80
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
81
|
+
.is_api_response(true)
|
82
|
+
.convertor(ApiResponse.method(:create)))
|
83
83
|
.execute
|
84
84
|
end
|
85
85
|
|
@@ -108,9 +108,9 @@ module Square
|
|
108
108
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
109
109
|
.auth(Single.new('global')))
|
110
110
|
.response(new_response_handler
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
112
|
+
.is_api_response(true)
|
113
|
+
.convertor(ApiResponse.method(:create)))
|
114
114
|
.execute
|
115
115
|
end
|
116
116
|
|
@@ -131,9 +131,9 @@ module Square
|
|
131
131
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
132
132
|
.auth(Single.new('global')))
|
133
133
|
.response(new_response_handler
|
134
|
-
|
135
|
-
|
136
|
-
|
134
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
135
|
+
.is_api_response(true)
|
136
|
+
.convertor(ApiResponse.method(:create)))
|
137
137
|
.execute
|
138
138
|
end
|
139
139
|
|
@@ -154,9 +154,9 @@ module Square
|
|
154
154
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
155
155
|
.auth(Single.new('global')))
|
156
156
|
.response(new_response_handler
|
157
|
-
|
158
|
-
|
159
|
-
|
157
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
158
|
+
.is_api_response(true)
|
159
|
+
.convertor(ApiResponse.method(:create)))
|
160
160
|
.execute
|
161
161
|
end
|
162
162
|
|
@@ -180,9 +180,9 @@ module Square
|
|
180
180
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
181
181
|
.auth(Single.new('global')))
|
182
182
|
.response(new_response_handler
|
183
|
-
|
184
|
-
|
185
|
-
|
183
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
184
|
+
.is_api_response(true)
|
185
|
+
.convertor(ApiResponse.method(:create)))
|
186
186
|
.execute
|
187
187
|
end
|
188
188
|
|
@@ -212,9 +212,9 @@ module Square
|
|
212
212
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
213
213
|
.auth(Single.new('global')))
|
214
214
|
.response(new_response_handler
|
215
|
-
|
216
|
-
|
217
|
-
|
215
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
216
|
+
.is_api_response(true)
|
217
|
+
.convertor(ApiResponse.method(:create)))
|
218
218
|
.execute
|
219
219
|
end
|
220
220
|
|
@@ -245,9 +245,9 @@ module Square
|
|
245
245
|
.header_param(new_parameter('application/json', key: 'accept'))
|
246
246
|
.auth(Single.new('global')))
|
247
247
|
.response(new_response_handler
|
248
|
-
|
249
|
-
|
250
|
-
|
248
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
249
|
+
.is_api_response(true)
|
250
|
+
.convertor(ApiResponse.method(:create)))
|
251
251
|
.execute
|
252
252
|
end
|
253
253
|
|
@@ -265,9 +265,9 @@ module Square
|
|
265
265
|
.header_param(new_parameter('application/json', key: 'accept'))
|
266
266
|
.auth(Single.new('global')))
|
267
267
|
.response(new_response_handler
|
268
|
-
|
269
|
-
|
270
|
-
|
268
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
269
|
+
.is_api_response(true)
|
270
|
+
.convertor(ApiResponse.method(:create)))
|
271
271
|
.execute
|
272
272
|
end
|
273
273
|
|
@@ -299,9 +299,9 @@ module Square
|
|
299
299
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
300
300
|
.auth(Single.new('global')))
|
301
301
|
.response(new_response_handler
|
302
|
-
|
303
|
-
|
304
|
-
|
302
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
303
|
+
.is_api_response(true)
|
304
|
+
.convertor(ApiResponse.method(:create)))
|
305
305
|
.execute
|
306
306
|
end
|
307
307
|
|
@@ -331,9 +331,9 @@ module Square
|
|
331
331
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
332
332
|
.auth(Single.new('global')))
|
333
333
|
.response(new_response_handler
|
334
|
-
|
335
|
-
|
336
|
-
|
334
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
335
|
+
.is_api_response(true)
|
336
|
+
.convertor(ApiResponse.method(:create)))
|
337
337
|
.execute
|
338
338
|
end
|
339
339
|
|
@@ -357,9 +357,9 @@ module Square
|
|
357
357
|
.header_param(new_parameter('application/json', key: 'accept'))
|
358
358
|
.auth(Single.new('global')))
|
359
359
|
.response(new_response_handler
|
360
|
-
|
361
|
-
|
362
|
-
|
360
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
361
|
+
.is_api_response(true)
|
362
|
+
.convertor(ApiResponse.method(:create)))
|
363
363
|
.execute
|
364
364
|
end
|
365
365
|
|
@@ -384,9 +384,9 @@ module Square
|
|
384
384
|
.header_param(new_parameter('application/json', key: 'accept'))
|
385
385
|
.auth(Single.new('global')))
|
386
386
|
.response(new_response_handler
|
387
|
-
|
388
|
-
|
389
|
-
|
387
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
388
|
+
.is_api_response(true)
|
389
|
+
.convertor(ApiResponse.method(:create)))
|
390
390
|
.execute
|
391
391
|
end
|
392
392
|
|
@@ -411,9 +411,9 @@ module Square
|
|
411
411
|
.header_param(new_parameter('application/json', key: 'accept'))
|
412
412
|
.auth(Single.new('global')))
|
413
413
|
.response(new_response_handler
|
414
|
-
|
415
|
-
|
416
|
-
|
414
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
415
|
+
.is_api_response(true)
|
416
|
+
.convertor(ApiResponse.method(:create)))
|
417
417
|
.execute
|
418
418
|
end
|
419
419
|
end
|
@@ -31,9 +31,9 @@ module Square
|
|
31
31
|
.header_param(new_parameter('application/json', key: 'accept'))
|
32
32
|
.auth(Single.new('global')))
|
33
33
|
.response(new_response_handler
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
35
|
+
.is_api_response(true)
|
36
|
+
.convertor(ApiResponse.method(:create)))
|
37
37
|
.execute
|
38
38
|
end
|
39
39
|
|
@@ -68,9 +68,9 @@ module Square
|
|
68
68
|
.header_param(new_parameter('application/json', key: 'accept'))
|
69
69
|
.auth(Single.new('global')))
|
70
70
|
.response(new_response_handler
|
71
|
-
|
72
|
-
|
73
|
-
|
71
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
72
|
+
.is_api_response(true)
|
73
|
+
.convertor(ApiResponse.method(:create)))
|
74
74
|
.execute
|
75
75
|
end
|
76
76
|
|
@@ -92,9 +92,9 @@ module Square
|
|
92
92
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
93
93
|
.auth(Single.new('global')))
|
94
94
|
.response(new_response_handler
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
96
|
+
.is_api_response(true)
|
97
|
+
.convertor(ApiResponse.method(:create)))
|
98
98
|
.execute
|
99
99
|
end
|
100
100
|
|
@@ -112,9 +112,9 @@ module Square
|
|
112
112
|
.header_param(new_parameter('application/json', key: 'accept'))
|
113
113
|
.auth(Single.new('global')))
|
114
114
|
.response(new_response_handler
|
115
|
-
|
116
|
-
|
117
|
-
|
115
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
116
|
+
.is_api_response(true)
|
117
|
+
.convertor(ApiResponse.method(:create)))
|
118
118
|
.execute
|
119
119
|
end
|
120
120
|
|
@@ -132,9 +132,9 @@ module Square
|
|
132
132
|
.header_param(new_parameter('application/json', key: 'accept'))
|
133
133
|
.auth(Single.new('global')))
|
134
134
|
.response(new_response_handler
|
135
|
-
|
136
|
-
|
137
|
-
|
135
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
136
|
+
.is_api_response(true)
|
137
|
+
.convertor(ApiResponse.method(:create)))
|
138
138
|
.execute
|
139
139
|
end
|
140
140
|
end
|
@@ -27,9 +27,9 @@ module Square
|
|
27
27
|
.header_param(new_parameter('application/json', key: 'accept'))
|
28
28
|
.auth(Single.new('global')))
|
29
29
|
.response(new_response_handler
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
31
|
+
.is_api_response(true)
|
32
|
+
.convertor(ApiResponse.method(:create)))
|
33
33
|
.execute
|
34
34
|
end
|
35
35
|
|
@@ -47,9 +47,9 @@ module Square
|
|
47
47
|
.header_param(new_parameter('application/json', key: 'accept'))
|
48
48
|
.auth(Single.new('global')))
|
49
49
|
.response(new_response_handler
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
51
|
+
.is_api_response(true)
|
52
|
+
.convertor(ApiResponse.method(:create)))
|
53
53
|
.execute
|
54
54
|
end
|
55
55
|
|
@@ -72,9 +72,9 @@ module Square
|
|
72
72
|
.header_param(new_parameter('application/json', key: 'accept'))
|
73
73
|
.auth(Single.new('global')))
|
74
74
|
.response(new_response_handler
|
75
|
-
|
76
|
-
|
77
|
-
|
75
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
76
|
+
.is_api_response(true)
|
77
|
+
.convertor(ApiResponse.method(:create)))
|
78
78
|
.execute
|
79
79
|
end
|
80
80
|
|
@@ -98,9 +98,9 @@ module Square
|
|
98
98
|
.header_param(new_parameter('application/json', key: 'accept'))
|
99
99
|
.auth(Single.new('global')))
|
100
100
|
.response(new_response_handler
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
102
|
+
.is_api_response(true)
|
103
|
+
.convertor(ApiResponse.method(:create)))
|
104
104
|
.execute
|
105
105
|
end
|
106
106
|
|
@@ -130,9 +130,9 @@ module Square
|
|
130
130
|
.header_param(new_parameter('application/json', key: 'accept'))
|
131
131
|
.auth(Single.new('global')))
|
132
132
|
.response(new_response_handler
|
133
|
-
|
134
|
-
|
135
|
-
|
133
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
134
|
+
.is_api_response(true)
|
135
|
+
.convertor(ApiResponse.method(:create)))
|
136
136
|
.execute
|
137
137
|
end
|
138
138
|
|
@@ -157,9 +157,9 @@ module Square
|
|
157
157
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
158
158
|
.auth(Single.new('global')))
|
159
159
|
.response(new_response_handler
|
160
|
-
|
161
|
-
|
162
|
-
|
160
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
161
|
+
.is_api_response(true)
|
162
|
+
.convertor(ApiResponse.method(:create)))
|
163
163
|
.execute
|
164
164
|
end
|
165
165
|
|
@@ -183,9 +183,9 @@ module Square
|
|
183
183
|
.header_param(new_parameter('application/json', key: 'accept'))
|
184
184
|
.auth(Single.new('global')))
|
185
185
|
.response(new_response_handler
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
187
|
+
.is_api_response(true)
|
188
|
+
.convertor(ApiResponse.method(:create)))
|
189
189
|
.execute
|
190
190
|
end
|
191
191
|
|
@@ -210,9 +210,9 @@ module Square
|
|
210
210
|
.header_param(new_parameter('application/json', key: 'accept'))
|
211
211
|
.auth(Single.new('global')))
|
212
212
|
.response(new_response_handler
|
213
|
-
|
214
|
-
|
215
|
-
|
213
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
214
|
+
.is_api_response(true)
|
215
|
+
.convertor(ApiResponse.method(:create)))
|
216
216
|
.execute
|
217
217
|
end
|
218
218
|
|
@@ -238,9 +238,9 @@ module Square
|
|
238
238
|
.header_param(new_parameter('application/json', key: 'accept'))
|
239
239
|
.auth(Single.new('global')))
|
240
240
|
.response(new_response_handler
|
241
|
-
|
242
|
-
|
243
|
-
|
241
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
242
|
+
.is_api_response(true)
|
243
|
+
.convertor(ApiResponse.method(:create)))
|
244
244
|
.execute
|
245
245
|
end
|
246
246
|
end
|
@@ -26,9 +26,9 @@ module Square
|
|
26
26
|
.header_param(new_parameter('application/json', key: 'accept'))
|
27
27
|
.auth(Single.new('global')))
|
28
28
|
.response(new_response_handler
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
30
|
+
.is_api_response(true)
|
31
|
+
.convertor(ApiResponse.method(:create)))
|
32
32
|
.execute
|
33
33
|
end
|
34
34
|
|
@@ -47,9 +47,9 @@ module Square
|
|
47
47
|
.header_param(new_parameter('application/json', key: 'accept'))
|
48
48
|
.auth(Single.new('global')))
|
49
49
|
.response(new_response_handler
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
51
|
+
.is_api_response(true)
|
52
|
+
.convertor(ApiResponse.method(:create)))
|
53
53
|
.execute
|
54
54
|
end
|
55
55
|
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module Square
|
2
|
+
# EventsApi
|
3
|
+
class EventsApi < BaseApi
|
4
|
+
# Search for Square API events that occur within a 28-day timeframe.
|
5
|
+
# @param [SearchEventsRequest] body Required parameter: An object containing
|
6
|
+
# the fields to POST for the request. See the corresponding object
|
7
|
+
# definition for field details.
|
8
|
+
# @return [SearchEventsResponse Hash] response from the API call
|
9
|
+
def search_events(body:)
|
10
|
+
new_api_call_builder
|
11
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
12
|
+
'/v2/events',
|
13
|
+
'default')
|
14
|
+
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
15
|
+
.body_param(new_parameter(body))
|
16
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
17
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
18
|
+
.auth(Single.new('global')))
|
19
|
+
.response(new_response_handler
|
20
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
21
|
+
.is_api_response(true)
|
22
|
+
.convertor(ApiResponse.method(:create)))
|
23
|
+
.execute
|
24
|
+
end
|
25
|
+
|
26
|
+
# Disables events to prevent them from being searchable.
|
27
|
+
# All events are disabled by default. You must enable events to make them
|
28
|
+
# searchable.
|
29
|
+
# Disabling events for a specific time period prevents them from being
|
30
|
+
# searchable, even if you re-enable them later.
|
31
|
+
# @return [DisableEventsResponse Hash] response from the API call
|
32
|
+
def disable_events
|
33
|
+
new_api_call_builder
|
34
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
35
|
+
'/v2/events/disable',
|
36
|
+
'default')
|
37
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
38
|
+
.auth(Single.new('global')))
|
39
|
+
.response(new_response_handler
|
40
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
41
|
+
.is_api_response(true)
|
42
|
+
.convertor(ApiResponse.method(:create)))
|
43
|
+
.execute
|
44
|
+
end
|
45
|
+
|
46
|
+
# Enables events to make them searchable. Only events that occur while in
|
47
|
+
# the enabled state are searchable.
|
48
|
+
# @return [EnableEventsResponse Hash] response from the API call
|
49
|
+
def enable_events
|
50
|
+
new_api_call_builder
|
51
|
+
.request(new_request_builder(HttpMethodEnum::PUT,
|
52
|
+
'/v2/events/enable',
|
53
|
+
'default')
|
54
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
55
|
+
.auth(Single.new('global')))
|
56
|
+
.response(new_response_handler
|
57
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
58
|
+
.is_api_response(true)
|
59
|
+
.convertor(ApiResponse.method(:create)))
|
60
|
+
.execute
|
61
|
+
end
|
62
|
+
|
63
|
+
# Lists all event types that you can subscribe to as webhooks or query using
|
64
|
+
# the Events API.
|
65
|
+
# @param [String] api_version Optional parameter: The API version for which
|
66
|
+
# to list event types. Setting this field overrides the default version used
|
67
|
+
# by the application.
|
68
|
+
# @return [ListEventTypesResponse Hash] response from the API call
|
69
|
+
def list_event_types(api_version: nil)
|
70
|
+
new_api_call_builder
|
71
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
72
|
+
'/v2/events/types',
|
73
|
+
'default')
|
74
|
+
.query_param(new_parameter(api_version, key: 'api_version'))
|
75
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
76
|
+
.auth(Single.new('global')))
|
77
|
+
.response(new_response_handler
|
78
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
79
|
+
.is_api_response(true)
|
80
|
+
.convertor(ApiResponse.method(:create)))
|
81
|
+
.execute
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -65,9 +65,9 @@ module Square
|
|
65
65
|
.header_param(new_parameter('application/json', key: 'accept'))
|
66
66
|
.auth(Single.new('global')))
|
67
67
|
.response(new_response_handler
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
69
|
+
.is_api_response(true)
|
70
|
+
.convertor(ApiResponse.method(:create)))
|
71
71
|
.execute
|
72
72
|
end
|
73
73
|
|
@@ -91,9 +91,9 @@ module Square
|
|
91
91
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
92
92
|
.auth(Single.new('global')))
|
93
93
|
.response(new_response_handler
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
95
|
+
.is_api_response(true)
|
96
|
+
.convertor(ApiResponse.method(:create)))
|
97
97
|
.execute
|
98
98
|
end
|
99
99
|
end
|
@@ -43,9 +43,9 @@ module Square
|
|
43
43
|
.header_param(new_parameter('application/json', key: 'accept'))
|
44
44
|
.auth(Single.new('global')))
|
45
45
|
.response(new_response_handler
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
47
|
+
.is_api_response(true)
|
48
|
+
.convertor(ApiResponse.method(:create)))
|
49
49
|
.execute
|
50
50
|
end
|
51
51
|
|
@@ -70,9 +70,9 @@ module Square
|
|
70
70
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
71
71
|
.auth(Single.new('global')))
|
72
72
|
.response(new_response_handler
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
74
|
+
.is_api_response(true)
|
75
|
+
.convertor(ApiResponse.method(:create)))
|
76
76
|
.execute
|
77
77
|
end
|
78
78
|
|
@@ -92,9 +92,9 @@ module Square
|
|
92
92
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
93
93
|
.auth(Single.new('global')))
|
94
94
|
.response(new_response_handler
|
95
|
-
|
96
|
-
|
97
|
-
|
95
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
96
|
+
.is_api_response(true)
|
97
|
+
.convertor(ApiResponse.method(:create)))
|
98
98
|
.execute
|
99
99
|
end
|
100
100
|
|
@@ -115,9 +115,9 @@ module Square
|
|
115
115
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
116
116
|
.auth(Single.new('global')))
|
117
117
|
.response(new_response_handler
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
119
|
+
.is_api_response(true)
|
120
|
+
.convertor(ApiResponse.method(:create)))
|
121
121
|
.execute
|
122
122
|
end
|
123
123
|
|
@@ -143,9 +143,9 @@ module Square
|
|
143
143
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
144
144
|
.auth(Single.new('global')))
|
145
145
|
.response(new_response_handler
|
146
|
-
|
147
|
-
|
148
|
-
|
146
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
147
|
+
.is_api_response(true)
|
148
|
+
.convertor(ApiResponse.method(:create)))
|
149
149
|
.execute
|
150
150
|
end
|
151
151
|
|
@@ -171,9 +171,9 @@ module Square
|
|
171
171
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
172
172
|
.auth(Single.new('global')))
|
173
173
|
.response(new_response_handler
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
175
|
+
.is_api_response(true)
|
176
|
+
.convertor(ApiResponse.method(:create)))
|
177
177
|
.execute
|
178
178
|
end
|
179
179
|
|
@@ -191,9 +191,9 @@ module Square
|
|
191
191
|
.header_param(new_parameter('application/json', key: 'accept'))
|
192
192
|
.auth(Single.new('global')))
|
193
193
|
.response(new_response_handler
|
194
|
-
|
195
|
-
|
196
|
-
|
194
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
195
|
+
.is_api_response(true)
|
196
|
+
.convertor(ApiResponse.method(:create)))
|
197
197
|
.execute
|
198
198
|
end
|
199
199
|
end
|