square.rb 38.1.0.20240604 → 39.0.0.20240821
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 +12 -12
- data/lib/square/api/gift_card_activities_api.rb +8 -9
- data/lib/square/api/gift_cards_api.rb +29 -26
- 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 +12 -14
- 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 +44 -22
- 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 +2 -2
- data/lib/square/configuration.rb +1 -1
- data/test/webhooks/test_webhooks_helper.rb +17 -0
- metadata +10 -16
@@ -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
|
@@ -17,9 +17,9 @@ module Square
|
|
17
17
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
18
18
|
.auth(Single.new('global')))
|
19
19
|
.response(new_response_handler
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
21
|
+
.is_api_response(true)
|
22
|
+
.convertor(ApiResponse.method(:create)))
|
23
23
|
.execute
|
24
24
|
end
|
25
25
|
|
@@ -37,9 +37,9 @@ module Square
|
|
37
37
|
.header_param(new_parameter('application/json', key: 'accept'))
|
38
38
|
.auth(Single.new('global')))
|
39
39
|
.response(new_response_handler
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
41
|
+
.is_api_response(true)
|
42
|
+
.convertor(ApiResponse.method(:create)))
|
43
43
|
.execute
|
44
44
|
end
|
45
45
|
|
@@ -54,9 +54,9 @@ module Square
|
|
54
54
|
.header_param(new_parameter('application/json', key: 'accept'))
|
55
55
|
.auth(Single.new('global')))
|
56
56
|
.response(new_response_handler
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
58
|
+
.is_api_response(true)
|
59
|
+
.convertor(ApiResponse.method(:create)))
|
60
60
|
.execute
|
61
61
|
end
|
62
62
|
|
@@ -75,9 +75,9 @@ module Square
|
|
75
75
|
.header_param(new_parameter('application/json', key: 'accept'))
|
76
76
|
.auth(Single.new('global')))
|
77
77
|
.response(new_response_handler
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
79
|
+
.is_api_response(true)
|
80
|
+
.convertor(ApiResponse.method(:create)))
|
81
81
|
.execute
|
82
82
|
end
|
83
83
|
end
|
@@ -65,17 +65,16 @@ 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
|
|
74
74
|
# Creates a gift card activity to manage the balance or state of a [gift
|
75
75
|
# card]($m/GiftCard).
|
76
|
-
# For example,
|
77
|
-
#
|
78
|
-
# before the gift card can be used.
|
76
|
+
# For example, create an `ACTIVATE` activity to activate a gift card with an
|
77
|
+
# initial balance before first use.
|
79
78
|
# @param [CreateGiftCardActivityRequest] body Required parameter: An object
|
80
79
|
# containing the fields to POST for the request. See the corresponding
|
81
80
|
# object definition for field details.
|
@@ -91,9 +90,9 @@ module Square
|
|
91
90
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
92
91
|
.auth(Single.new('global')))
|
93
92
|
.response(new_response_handler
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
94
|
+
.is_api_response(true)
|
95
|
+
.convertor(ApiResponse.method(:create)))
|
97
96
|
.execute
|
98
97
|
end
|
99
98
|
end
|
@@ -43,18 +43,21 @@ 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
|
|
52
52
|
# Creates a digital gift card or registers a physical (plastic) gift card.
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
53
|
+
# The resulting gift card
|
54
|
+
# has a `PENDING` state. To activate a gift card so that it can be redeemed
|
55
|
+
# for purchases, call
|
56
|
+
# [CreateGiftCardActivity]($e/GiftCardActivities/CreateGiftCardActivity) and
|
57
|
+
# create an `ACTIVATE`
|
58
|
+
# activity with the initial balance. Alternatively, you can use
|
59
|
+
# [RefundPayment]($e/Refunds/RefundPayment)
|
60
|
+
# to refund a payment to the new gift card.
|
58
61
|
# @param [CreateGiftCardRequest] body Required parameter: An object
|
59
62
|
# containing the fields to POST for the request. See the corresponding
|
60
63
|
# object definition for field details.
|
@@ -70,9 +73,9 @@ module Square
|
|
70
73
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
71
74
|
.auth(Single.new('global')))
|
72
75
|
.response(new_response_handler
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
77
|
+
.is_api_response(true)
|
78
|
+
.convertor(ApiResponse.method(:create)))
|
76
79
|
.execute
|
77
80
|
end
|
78
81
|
|
@@ -92,9 +95,9 @@ module Square
|
|
92
95
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
93
96
|
.auth(Single.new('global')))
|
94
97
|
.response(new_response_handler
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
99
|
+
.is_api_response(true)
|
100
|
+
.convertor(ApiResponse.method(:create)))
|
98
101
|
.execute
|
99
102
|
end
|
100
103
|
|
@@ -115,9 +118,9 @@ module Square
|
|
115
118
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
116
119
|
.auth(Single.new('global')))
|
117
120
|
.response(new_response_handler
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
122
|
+
.is_api_response(true)
|
123
|
+
.convertor(ApiResponse.method(:create)))
|
121
124
|
.execute
|
122
125
|
end
|
123
126
|
|
@@ -143,9 +146,9 @@ module Square
|
|
143
146
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
144
147
|
.auth(Single.new('global')))
|
145
148
|
.response(new_response_handler
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
150
|
+
.is_api_response(true)
|
151
|
+
.convertor(ApiResponse.method(:create)))
|
149
152
|
.execute
|
150
153
|
end
|
151
154
|
|
@@ -171,9 +174,9 @@ module Square
|
|
171
174
|
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
172
175
|
.auth(Single.new('global')))
|
173
176
|
.response(new_response_handler
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
178
|
+
.is_api_response(true)
|
179
|
+
.convertor(ApiResponse.method(:create)))
|
177
180
|
.execute
|
178
181
|
end
|
179
182
|
|
@@ -191,9 +194,9 @@ module Square
|
|
191
194
|
.header_param(new_parameter('application/json', key: 'accept'))
|
192
195
|
.auth(Single.new('global')))
|
193
196
|
.response(new_response_handler
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
+
.deserializer(APIHelper.method(:json_deserialize))
|
198
|
+
.is_api_response(true)
|
199
|
+
.convertor(ApiResponse.method(:create)))
|
197
200
|
.execute
|
198
201
|
end
|
199
202
|
end
|