square.rb 38.1.1.20240717 → 39.1.0.20240919
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 +1 -1
- data/lib/square/api/bank_accounts_api.rb +3 -3
- data/lib/square/api/base_api.rb +1 -1
- data/lib/square/api/booking_custom_attributes_api.rb +11 -11
- data/lib/square/api/bookings_api.rb +13 -13
- data/lib/square/api/cards_api.rb +4 -4
- data/lib/square/api/cash_drawers_api.rb +3 -3
- data/lib/square/api/catalog_api.rb +14 -14
- data/lib/square/api/checkout_api.rb +10 -10
- data/lib/square/api/customer_custom_attributes_api.rb +10 -10
- data/lib/square/api/customer_groups_api.rb +5 -5
- data/lib/square/api/customer_segments_api.rb +2 -2
- data/lib/square/api/customers_api.rb +14 -14
- data/lib/square/api/devices_api.rb +5 -5
- data/lib/square/api/disputes_api.rb +9 -9
- data/lib/square/api/employees_api.rb +2 -2
- data/lib/square/api/events_api.rb +4 -4
- data/lib/square/api/gift_card_activities_api.rb +4 -5
- data/lib/square/api/gift_cards_api.rb +15 -12
- data/lib/square/api/inventory_api.rb +13 -13
- data/lib/square/api/invoices_api.rb +10 -10
- data/lib/square/api/labor_api.rb +16 -16
- data/lib/square/api/location_custom_attributes_api.rb +11 -11
- data/lib/square/api/locations_api.rb +4 -4
- data/lib/square/api/loyalty_api.rb +18 -18
- data/lib/square/api/merchant_custom_attributes_api.rb +11 -11
- data/lib/square/api/merchants_api.rb +2 -2
- data/lib/square/api/mobile_authorization_api.rb +1 -1
- data/lib/square/api/o_auth_api.rb +6 -8
- data/lib/square/api/order_custom_attributes_api.rb +11 -11
- data/lib/square/api/orders_api.rb +8 -8
- data/lib/square/api/payments_api.rb +30 -8
- data/lib/square/api/payouts_api.rb +3 -3
- data/lib/square/api/refunds_api.rb +3 -3
- data/lib/square/api/sites_api.rb +1 -1
- data/lib/square/api/snippets_api.rb +3 -3
- data/lib/square/api/subscriptions_api.rb +12 -12
- data/lib/square/api/team_api.rb +8 -8
- data/lib/square/api/terminal_api.rb +15 -15
- data/lib/square/api/transactions_api.rb +4 -4
- data/lib/square/api/v1_transactions_api.rb +3 -3
- data/lib/square/api/vendors_api.rb +7 -7
- data/lib/square/api/webhook_subscriptions_api.rb +8 -8
- data/lib/square/client.rb +2 -2
- data/lib/square/configuration.rb +1 -1
- metadata +4 -10
@@ -14,7 +14,7 @@ module Square
|
|
14
14
|
# @param [Integer] limit Optional parameter: The maximum number of invoices
|
15
15
|
# to return (200 is the maximum `limit`). If not provided, the server uses
|
16
16
|
# a default limit of 100 invoices.
|
17
|
-
# @return [
|
17
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
18
18
|
def list_invoices(location_id:,
|
19
19
|
cursor: nil,
|
20
20
|
limit: nil)
|
@@ -42,7 +42,7 @@ module Square
|
|
42
42
|
# @param [CreateInvoiceRequest] body Required parameter: An object
|
43
43
|
# containing the fields to POST for the request. See the corresponding
|
44
44
|
# object definition for field details.
|
45
|
-
# @return [
|
45
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
46
46
|
def create_invoice(body:)
|
47
47
|
new_api_call_builder
|
48
48
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -70,7 +70,7 @@ module Square
|
|
70
70
|
# @param [SearchInvoicesRequest] body Required parameter: An object
|
71
71
|
# containing the fields to POST for the request. See the corresponding
|
72
72
|
# object definition for field details.
|
73
|
-
# @return [
|
73
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
74
74
|
def search_invoices(body:)
|
75
75
|
new_api_call_builder
|
76
76
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -98,7 +98,7 @@ module Square
|
|
98
98
|
# [invoice](entity:Invoice) to delete. If you do not know the version, you
|
99
99
|
# can call [GetInvoice](api-endpoint:Invoices-GetInvoice) or
|
100
100
|
# [ListInvoices](api-endpoint:Invoices-ListInvoices).
|
101
|
-
# @return [
|
101
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
102
102
|
def delete_invoice(invoice_id:,
|
103
103
|
version: nil)
|
104
104
|
new_api_call_builder
|
@@ -120,7 +120,7 @@ module Square
|
|
120
120
|
# Retrieves an invoice by invoice ID.
|
121
121
|
# @param [String] invoice_id Required parameter: The ID of the invoice to
|
122
122
|
# retrieve.
|
123
|
-
# @return [
|
123
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
124
124
|
def get_invoice(invoice_id:)
|
125
125
|
new_api_call_builder
|
126
126
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -149,7 +149,7 @@ module Square
|
|
149
149
|
# @param [UpdateInvoiceRequest] body Required parameter: An object
|
150
150
|
# containing the fields to POST for the request. See the corresponding
|
151
151
|
# object definition for field details.
|
152
|
-
# @return [
|
152
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
153
153
|
def update_invoice(invoice_id:,
|
154
154
|
body:)
|
155
155
|
new_api_call_builder
|
@@ -184,7 +184,7 @@ module Square
|
|
184
184
|
# Represents a
|
185
185
|
# [CreateInvoiceAttachment]($e/Invoices/CreateInvoiceAttachment) request.
|
186
186
|
# @param [File | UploadIO] image_file Optional parameter: Example:
|
187
|
-
# @return [
|
187
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
188
188
|
def create_invoice_attachment(invoice_id:,
|
189
189
|
request: nil,
|
190
190
|
image_file: nil)
|
@@ -215,7 +215,7 @@ module Square
|
|
215
215
|
# [invoice](entity:Invoice) to delete the attachment from.
|
216
216
|
# @param [String] attachment_id Required parameter: The ID of the
|
217
217
|
# [attachment](entity:InvoiceAttachment) to delete.
|
218
|
-
# @return [
|
218
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
219
219
|
def delete_invoice_attachment(invoice_id:,
|
220
220
|
attachment_id:)
|
221
221
|
new_api_call_builder
|
@@ -244,7 +244,7 @@ module Square
|
|
244
244
|
# @param [CancelInvoiceRequest] body Required parameter: An object
|
245
245
|
# containing the fields to POST for the request. See the corresponding
|
246
246
|
# object definition for field details.
|
247
|
-
# @return [
|
247
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
248
248
|
def cancel_invoice(invoice_id:,
|
249
249
|
body:)
|
250
250
|
new_api_call_builder
|
@@ -287,7 +287,7 @@ module Square
|
|
287
287
|
# @param [PublishInvoiceRequest] body Required parameter: An object
|
288
288
|
# containing the fields to POST for the request. See the corresponding
|
289
289
|
# object definition for field details.
|
290
|
-
# @return [
|
290
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
291
291
|
def publish_invoice(invoice_id:,
|
292
292
|
body:)
|
293
293
|
new_api_call_builder
|
data/lib/square/api/labor_api.rb
CHANGED
@@ -10,7 +10,7 @@ module Square
|
|
10
10
|
# 200. The default is 200.
|
11
11
|
# @param [String] cursor Optional parameter: A pointer to the next page of
|
12
12
|
# `BreakType` results to fetch.
|
13
|
-
# @return [
|
13
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
14
14
|
def list_break_types(location_id: nil,
|
15
15
|
limit: nil,
|
16
16
|
cursor: nil)
|
@@ -46,7 +46,7 @@ module Square
|
|
46
46
|
# @param [CreateBreakTypeRequest] body Required parameter: An object
|
47
47
|
# containing the fields to POST for the request. See the corresponding
|
48
48
|
# object definition for field details.
|
49
|
-
# @return [
|
49
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
50
50
|
def create_break_type(body:)
|
51
51
|
new_api_call_builder
|
52
52
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -68,7 +68,7 @@ module Square
|
|
68
68
|
# A `BreakType` can be deleted even if it is referenced from a `Shift`.
|
69
69
|
# @param [String] id Required parameter: The UUID for the `BreakType` being
|
70
70
|
# deleted.
|
71
|
-
# @return [
|
71
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
72
72
|
def delete_break_type(id:)
|
73
73
|
new_api_call_builder
|
74
74
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -88,7 +88,7 @@ module Square
|
|
88
88
|
# Returns a single `BreakType` specified by `id`.
|
89
89
|
# @param [String] id Required parameter: The UUID for the `BreakType` being
|
90
90
|
# retrieved.
|
91
|
-
# @return [
|
91
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
92
92
|
def get_break_type(id:)
|
93
93
|
new_api_call_builder
|
94
94
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -111,7 +111,7 @@ module Square
|
|
111
111
|
# @param [UpdateBreakTypeRequest] body Required parameter: An object
|
112
112
|
# containing the fields to POST for the request. See the corresponding
|
113
113
|
# object definition for field details.
|
114
|
-
# @return [
|
114
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
115
115
|
def update_break_type(id:,
|
116
116
|
body:)
|
117
117
|
new_api_call_builder
|
@@ -140,7 +140,7 @@ module Square
|
|
140
140
|
# and 200. The default is 200.
|
141
141
|
# @param [String] cursor Optional parameter: A pointer to the next page of
|
142
142
|
# `EmployeeWage` results to fetch.
|
143
|
-
# @return [
|
143
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
144
144
|
def list_employee_wages(employee_id: nil,
|
145
145
|
limit: nil,
|
146
146
|
cursor: nil)
|
@@ -164,7 +164,7 @@ module Square
|
|
164
164
|
# Returns a single `EmployeeWage` specified by `id`.
|
165
165
|
# @param [String] id Required parameter: The UUID for the `EmployeeWage`
|
166
166
|
# being retrieved.
|
167
|
-
# @return [
|
167
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
168
168
|
def get_employee_wage(id:)
|
169
169
|
warn 'Endpoint get_employee_wage in LaborApi is deprecated'
|
170
170
|
new_api_call_builder
|
@@ -203,7 +203,7 @@ module Square
|
|
203
203
|
# @param [CreateShiftRequest] body Required parameter: An object containing
|
204
204
|
# the fields to POST for the request. See the corresponding object
|
205
205
|
# definition for field details.
|
206
|
-
# @return [
|
206
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
207
207
|
def create_shift(body:)
|
208
208
|
new_api_call_builder
|
209
209
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -237,7 +237,7 @@ module Square
|
|
237
237
|
# @param [SearchShiftsRequest] body Required parameter: An object containing
|
238
238
|
# the fields to POST for the request. See the corresponding object
|
239
239
|
# definition for field details.
|
240
|
-
# @return [
|
240
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
241
241
|
def search_shifts(body:)
|
242
242
|
new_api_call_builder
|
243
243
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -258,7 +258,7 @@ module Square
|
|
258
258
|
# Deletes a `Shift`.
|
259
259
|
# @param [String] id Required parameter: The UUID for the `Shift` being
|
260
260
|
# deleted.
|
261
|
-
# @return [
|
261
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
262
262
|
def delete_shift(id:)
|
263
263
|
new_api_call_builder
|
264
264
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -278,7 +278,7 @@ module Square
|
|
278
278
|
# Returns a single `Shift` specified by `id`.
|
279
279
|
# @param [String] id Required parameter: The UUID for the `Shift` being
|
280
280
|
# retrieved.
|
281
|
-
# @return [
|
281
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
282
282
|
def get_shift(id:)
|
283
283
|
new_api_call_builder
|
284
284
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -307,7 +307,7 @@ module Square
|
|
307
307
|
# @param [UpdateShiftRequest] body Required parameter: An object containing
|
308
308
|
# the fields to POST for the request. See the corresponding object
|
309
309
|
# definition for field details.
|
310
|
-
# @return [
|
310
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
311
311
|
def update_shift(id:,
|
312
312
|
body:)
|
313
313
|
new_api_call_builder
|
@@ -336,7 +336,7 @@ module Square
|
|
336
336
|
# 1 and 200. The default is 200.
|
337
337
|
# @param [String] cursor Optional parameter: A pointer to the next page of
|
338
338
|
# `EmployeeWage` results to fetch.
|
339
|
-
# @return [
|
339
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
340
340
|
def list_team_member_wages(team_member_id: nil,
|
341
341
|
limit: nil,
|
342
342
|
cursor: nil)
|
@@ -359,7 +359,7 @@ module Square
|
|
359
359
|
# Returns a single `TeamMemberWage` specified by `id`.
|
360
360
|
# @param [String] id Required parameter: The UUID for the `TeamMemberWage`
|
361
361
|
# being retrieved.
|
362
|
-
# @return [
|
362
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
363
363
|
def get_team_member_wage(id:)
|
364
364
|
new_api_call_builder
|
365
365
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -381,7 +381,7 @@ module Square
|
|
381
381
|
# `WorkweekConfigs` results to return per page.
|
382
382
|
# @param [String] cursor Optional parameter: A pointer to the next page of
|
383
383
|
# `WorkweekConfig` results to fetch.
|
384
|
-
# @return [
|
384
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
385
385
|
def list_workweek_configs(limit: nil,
|
386
386
|
cursor: nil)
|
387
387
|
new_api_call_builder
|
@@ -405,7 +405,7 @@ module Square
|
|
405
405
|
# @param [UpdateWorkweekConfigRequest] body Required parameter: An object
|
406
406
|
# containing the fields to POST for the request. See the corresponding
|
407
407
|
# object definition for field details.
|
408
|
-
# @return [
|
408
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
409
409
|
def update_workweek_config(id:,
|
410
410
|
body:)
|
411
411
|
new_api_call_builder
|
@@ -24,7 +24,7 @@ module Square
|
|
24
24
|
# more information, see
|
25
25
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
26
26
|
# atterns/pagination).
|
27
|
-
# @return [
|
27
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
28
28
|
def list_location_custom_attribute_definitions(visibility_filter: nil,
|
29
29
|
limit: nil,
|
30
30
|
cursor: nil)
|
@@ -59,7 +59,7 @@ module Square
|
|
59
59
|
# @param [CreateLocationCustomAttributeDefinitionRequest] body Required
|
60
60
|
# parameter: An object containing the fields to POST for the request. See
|
61
61
|
# the corresponding object definition for field details.
|
62
|
-
# @return [
|
62
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
63
63
|
def create_location_custom_attribute_definition(body:)
|
64
64
|
new_api_call_builder
|
65
65
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -85,7 +85,7 @@ module Square
|
|
85
85
|
# Only the definition owner can delete a custom attribute definition.
|
86
86
|
# @param [String] key Required parameter: The key of the custom attribute
|
87
87
|
# definition to delete.
|
88
|
-
# @return [
|
88
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
89
89
|
def delete_location_custom_attribute_definition(key:)
|
90
90
|
new_api_call_builder
|
91
91
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -116,7 +116,7 @@ module Square
|
|
116
116
|
# the request, Square returns the specified version or a higher version if
|
117
117
|
# one exists. If the specified version is higher than the current version,
|
118
118
|
# Square returns a `BAD_REQUEST` error.
|
119
|
-
# @return [
|
119
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
120
120
|
def retrieve_location_custom_attribute_definition(key:,
|
121
121
|
version: nil)
|
122
122
|
new_api_call_builder
|
@@ -146,7 +146,7 @@ module Square
|
|
146
146
|
# @param [UpdateLocationCustomAttributeDefinitionRequest] body Required
|
147
147
|
# parameter: An object containing the fields to POST for the request. See
|
148
148
|
# the corresponding object definition for field details.
|
149
|
-
# @return [
|
149
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
150
150
|
def update_location_custom_attribute_definition(key:,
|
151
151
|
body:)
|
152
152
|
new_api_call_builder
|
@@ -175,7 +175,7 @@ module Square
|
|
175
175
|
# @param [BulkDeleteLocationCustomAttributesRequest] body Required
|
176
176
|
# parameter: An object containing the fields to POST for the request. See
|
177
177
|
# the corresponding object definition for field details.
|
178
|
-
# @return [
|
178
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
179
179
|
def bulk_delete_location_custom_attributes(body:)
|
180
180
|
new_api_call_builder
|
181
181
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -215,7 +215,7 @@ module Square
|
|
215
215
|
# @param [BulkUpsertLocationCustomAttributesRequest] body Required
|
216
216
|
# parameter: An object containing the fields to POST for the request. See
|
217
217
|
# the corresponding object definition for field details.
|
218
|
-
# @return [
|
218
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
219
219
|
def bulk_upsert_location_custom_attributes(body:)
|
220
220
|
new_api_call_builder
|
221
221
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -265,7 +265,7 @@ module Square
|
|
265
265
|
# each custom attribute. Set this parameter to `true` to get the name and
|
266
266
|
# description of each custom attribute, information about the data type, or
|
267
267
|
# other definition details. The default value is `false`.
|
268
|
-
# @return [
|
268
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
269
269
|
def list_location_custom_attributes(location_id:,
|
270
270
|
visibility_filter: nil,
|
271
271
|
limit: nil,
|
@@ -301,7 +301,7 @@ module Square
|
|
301
301
|
# delete. This key must match the `key` of a custom attribute definition in
|
302
302
|
# the Square seller account. If the requesting application is not the
|
303
303
|
# definition owner, you must use the qualified key.
|
304
|
-
# @return [
|
304
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
305
305
|
def delete_location_custom_attribute(location_id:,
|
306
306
|
key:)
|
307
307
|
new_api_call_builder
|
@@ -347,7 +347,7 @@ module Square
|
|
347
347
|
# Square returns the specified version or a higher version if one exists. If
|
348
348
|
# the specified version is higher than the current version, Square returns a
|
349
349
|
# `BAD_REQUEST` error.
|
350
|
-
# @return [
|
350
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
351
351
|
def retrieve_location_custom_attribute(location_id:,
|
352
352
|
key:,
|
353
353
|
with_definition: false,
|
@@ -392,7 +392,7 @@ module Square
|
|
392
392
|
# @param [UpsertLocationCustomAttributeRequest] body Required parameter: An
|
393
393
|
# object containing the fields to POST for the request. See the
|
394
394
|
# corresponding object definition for field details.
|
395
|
-
# @return [
|
395
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
396
396
|
def upsert_location_custom_attribute(location_id:,
|
397
397
|
key:,
|
398
398
|
body:)
|
@@ -5,7 +5,7 @@ module Square
|
|
5
5
|
# [locations](https://developer.squareup.com/docs/locations-api),
|
6
6
|
# including those with an inactive status. Locations are listed
|
7
7
|
# alphabetically by `name`.
|
8
|
-
# @return [
|
8
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
9
9
|
def list_locations
|
10
10
|
new_api_call_builder
|
11
11
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -33,7 +33,7 @@ module Square
|
|
33
33
|
# @param [CreateLocationRequest] body Required parameter: An object
|
34
34
|
# containing the fields to POST for the request. See the corresponding
|
35
35
|
# object definition for field details.
|
36
|
-
# @return [
|
36
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
37
37
|
def create_location(body:)
|
38
38
|
new_api_call_builder
|
39
39
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -57,7 +57,7 @@ module Square
|
|
57
57
|
# -location).
|
58
58
|
# @param [String] location_id Required parameter: The ID of the location to
|
59
59
|
# retrieve. Specify the string "main" to return the main location.
|
60
|
-
# @return [
|
60
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
61
61
|
def retrieve_location(location_id:)
|
62
62
|
new_api_call_builder
|
63
63
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -80,7 +80,7 @@ module Square
|
|
80
80
|
# @param [UpdateLocationRequest] body Required parameter: An object
|
81
81
|
# containing the fields to POST for the request. See the corresponding
|
82
82
|
# object definition for field details.
|
83
|
-
# @return [
|
83
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
84
84
|
def update_location(location_id:,
|
85
85
|
body:)
|
86
86
|
new_api_call_builder
|
@@ -6,7 +6,7 @@ module Square
|
|
6
6
|
# @param [CreateLoyaltyAccountRequest] body Required parameter: An object
|
7
7
|
# containing the fields to POST for the request. See the corresponding
|
8
8
|
# object definition for field details.
|
9
|
-
# @return [
|
9
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
10
10
|
def create_loyalty_account(body:)
|
11
11
|
new_api_call_builder
|
12
12
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -32,7 +32,7 @@ module Square
|
|
32
32
|
# @param [SearchLoyaltyAccountsRequest] body Required parameter: An object
|
33
33
|
# containing the fields to POST for the request. See the corresponding
|
34
34
|
# object definition for field details.
|
35
|
-
# @return [
|
35
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
36
36
|
def search_loyalty_accounts(body:)
|
37
37
|
new_api_call_builder
|
38
38
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -53,7 +53,7 @@ module Square
|
|
53
53
|
# Retrieves a loyalty account.
|
54
54
|
# @param [String] account_id Required parameter: The ID of the [loyalty
|
55
55
|
# account](entity:LoyaltyAccount) to retrieve.
|
56
|
-
# @return [
|
56
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
57
57
|
def retrieve_loyalty_account(account_id:)
|
58
58
|
new_api_call_builder
|
59
59
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -100,7 +100,7 @@ module Square
|
|
100
100
|
# @param [AccumulateLoyaltyPointsRequest] body Required parameter: An object
|
101
101
|
# containing the fields to POST for the request. See the corresponding
|
102
102
|
# object definition for field details.
|
103
|
-
# @return [
|
103
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
104
104
|
def accumulate_loyalty_points(account_id:,
|
105
105
|
body:)
|
106
106
|
new_api_call_builder
|
@@ -131,7 +131,7 @@ module Square
|
|
131
131
|
# @param [AdjustLoyaltyPointsRequest] body Required parameter: An object
|
132
132
|
# containing the fields to POST for the request. See the corresponding
|
133
133
|
# object definition for field details.
|
134
|
-
# @return [
|
134
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
135
135
|
def adjust_loyalty_points(account_id:,
|
136
136
|
body:)
|
137
137
|
new_api_call_builder
|
@@ -163,7 +163,7 @@ module Square
|
|
163
163
|
# @param [SearchLoyaltyEventsRequest] body Required parameter: An object
|
164
164
|
# containing the fields to POST for the request. See the corresponding
|
165
165
|
# object definition for field details.
|
166
|
-
# @return [
|
166
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
167
167
|
def search_loyalty_events(body:)
|
168
168
|
new_api_call_builder
|
169
169
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -190,7 +190,7 @@ module Square
|
|
190
190
|
# Replaced with
|
191
191
|
# [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram) when
|
192
192
|
# used with the keyword `main`.
|
193
|
-
# @return [
|
193
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
194
194
|
def list_loyalty_programs
|
195
195
|
warn 'Endpoint list_loyalty_programs in LoyaltyApi is deprecated'
|
196
196
|
new_api_call_builder
|
@@ -216,7 +216,7 @@ module Square
|
|
216
216
|
# @param [String] program_id Required parameter: The ID of the loyalty
|
217
217
|
# program or the keyword `main`. Either value can be used to retrieve the
|
218
218
|
# single loyalty program that belongs to the seller.
|
219
|
-
# @return [
|
219
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
220
220
|
def retrieve_loyalty_program(program_id:)
|
221
221
|
new_api_call_builder
|
222
222
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -263,7 +263,7 @@ module Square
|
|
263
263
|
# @param [CalculateLoyaltyPointsRequest] body Required parameter: An object
|
264
264
|
# containing the fields to POST for the request. See the corresponding
|
265
265
|
# object definition for field details.
|
266
|
-
# @return [
|
266
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
267
267
|
def calculate_loyalty_points(program_id:,
|
268
268
|
body:)
|
269
269
|
new_api_call_builder
|
@@ -307,7 +307,7 @@ module Square
|
|
307
307
|
# maximum value is 30. The default value is 30. For more information, see
|
308
308
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
309
309
|
# atterns/pagination).
|
310
|
-
# @return [
|
310
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
311
311
|
def list_loyalty_promotions(program_id:,
|
312
312
|
status: nil,
|
313
313
|
cursor: nil,
|
@@ -347,7 +347,7 @@ module Square
|
|
347
347
|
# @param [CreateLoyaltyPromotionRequest] body Required parameter: An object
|
348
348
|
# containing the fields to POST for the request. See the corresponding
|
349
349
|
# object definition for field details.
|
350
|
-
# @return [
|
350
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
351
351
|
def create_loyalty_promotion(program_id:,
|
352
352
|
body:)
|
353
353
|
new_api_call_builder
|
@@ -375,7 +375,7 @@ module Square
|
|
375
375
|
# program](entity:LoyaltyProgram). To get the program ID, call
|
376
376
|
# [RetrieveLoyaltyProgram](api-endpoint:Loyalty-RetrieveLoyaltyProgram)
|
377
377
|
# using the `main` keyword.
|
378
|
-
# @return [
|
378
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
379
379
|
def retrieve_loyalty_promotion(promotion_id:,
|
380
380
|
program_id:)
|
381
381
|
new_api_call_builder
|
@@ -408,7 +408,7 @@ module Square
|
|
408
408
|
# that has an `ACTIVE` or `SCHEDULED` status.
|
409
409
|
# @param [String] program_id Required parameter: The ID of the base [loyalty
|
410
410
|
# program](entity:LoyaltyProgram).
|
411
|
-
# @return [
|
411
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
412
412
|
def cancel_loyalty_promotion(promotion_id:,
|
413
413
|
program_id:)
|
414
414
|
new_api_call_builder
|
@@ -439,7 +439,7 @@ module Square
|
|
439
439
|
# @param [CreateLoyaltyRewardRequest] body Required parameter: An object
|
440
440
|
# containing the fields to POST for the request. See the corresponding
|
441
441
|
# object definition for field details.
|
442
|
-
# @return [
|
442
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
443
443
|
def create_loyalty_reward(body:)
|
444
444
|
new_api_call_builder
|
445
445
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -467,7 +467,7 @@ module Square
|
|
467
467
|
# @param [SearchLoyaltyRewardsRequest] body Required parameter: An object
|
468
468
|
# containing the fields to POST for the request. See the corresponding
|
469
469
|
# object definition for field details.
|
470
|
-
# @return [
|
470
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
471
471
|
def search_loyalty_rewards(body:)
|
472
472
|
new_api_call_builder
|
473
473
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -494,7 +494,7 @@ module Square
|
|
494
494
|
# You cannot delete a reward that has reached the terminal state (REDEEMED).
|
495
495
|
# @param [String] reward_id Required parameter: The ID of the [loyalty
|
496
496
|
# reward](entity:LoyaltyReward) to delete.
|
497
|
-
# @return [
|
497
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
498
498
|
def delete_loyalty_reward(reward_id:)
|
499
499
|
new_api_call_builder
|
500
500
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -514,7 +514,7 @@ module Square
|
|
514
514
|
# Retrieves a loyalty reward.
|
515
515
|
# @param [String] reward_id Required parameter: The ID of the [loyalty
|
516
516
|
# reward](entity:LoyaltyReward) to retrieve.
|
517
|
-
# @return [
|
517
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
518
518
|
def retrieve_loyalty_reward(reward_id:)
|
519
519
|
new_api_call_builder
|
520
520
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -544,7 +544,7 @@ module Square
|
|
544
544
|
# @param [RedeemLoyaltyRewardRequest] body Required parameter: An object
|
545
545
|
# containing the fields to POST for the request. See the corresponding
|
546
546
|
# object definition for field details.
|
547
|
-
# @return [
|
547
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
548
548
|
def redeem_loyalty_reward(reward_id:,
|
549
549
|
body:)
|
550
550
|
new_api_call_builder
|
@@ -24,7 +24,7 @@ module Square
|
|
24
24
|
# more information, see
|
25
25
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
26
26
|
# atterns/pagination).
|
27
|
-
# @return [
|
27
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
28
28
|
def list_merchant_custom_attribute_definitions(visibility_filter: nil,
|
29
29
|
limit: nil,
|
30
30
|
cursor: nil)
|
@@ -59,7 +59,7 @@ module Square
|
|
59
59
|
# @param [CreateMerchantCustomAttributeDefinitionRequest] body Required
|
60
60
|
# parameter: An object containing the fields to POST for the request. See
|
61
61
|
# the corresponding object definition for field details.
|
62
|
-
# @return [
|
62
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
63
63
|
def create_merchant_custom_attribute_definition(body:)
|
64
64
|
new_api_call_builder
|
65
65
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -85,7 +85,7 @@ module Square
|
|
85
85
|
# Only the definition owner can delete a custom attribute definition.
|
86
86
|
# @param [String] key Required parameter: The key of the custom attribute
|
87
87
|
# definition to delete.
|
88
|
-
# @return [
|
88
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
89
89
|
def delete_merchant_custom_attribute_definition(key:)
|
90
90
|
new_api_call_builder
|
91
91
|
.request(new_request_builder(HttpMethodEnum::DELETE,
|
@@ -116,7 +116,7 @@ module Square
|
|
116
116
|
# the request, Square returns the specified version or a higher version if
|
117
117
|
# one exists. If the specified version is higher than the current version,
|
118
118
|
# Square returns a `BAD_REQUEST` error.
|
119
|
-
# @return [
|
119
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
120
120
|
def retrieve_merchant_custom_attribute_definition(key:,
|
121
121
|
version: nil)
|
122
122
|
new_api_call_builder
|
@@ -146,7 +146,7 @@ module Square
|
|
146
146
|
# @param [UpdateMerchantCustomAttributeDefinitionRequest] body Required
|
147
147
|
# parameter: An object containing the fields to POST for the request. See
|
148
148
|
# the corresponding object definition for field details.
|
149
|
-
# @return [
|
149
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
150
150
|
def update_merchant_custom_attribute_definition(key:,
|
151
151
|
body:)
|
152
152
|
new_api_call_builder
|
@@ -175,7 +175,7 @@ module Square
|
|
175
175
|
# @param [BulkDeleteMerchantCustomAttributesRequest] body Required
|
176
176
|
# parameter: An object containing the fields to POST for the request. See
|
177
177
|
# the corresponding object definition for field details.
|
178
|
-
# @return [
|
178
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
179
179
|
def bulk_delete_merchant_custom_attributes(body:)
|
180
180
|
new_api_call_builder
|
181
181
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -215,7 +215,7 @@ module Square
|
|
215
215
|
# @param [BulkUpsertMerchantCustomAttributesRequest] body Required
|
216
216
|
# parameter: An object containing the fields to POST for the request. See
|
217
217
|
# the corresponding object definition for field details.
|
218
|
-
# @return [
|
218
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
219
219
|
def bulk_upsert_merchant_custom_attributes(body:)
|
220
220
|
new_api_call_builder
|
221
221
|
.request(new_request_builder(HttpMethodEnum::POST,
|
@@ -265,7 +265,7 @@ module Square
|
|
265
265
|
# each custom attribute. Set this parameter to `true` to get the name and
|
266
266
|
# description of each custom attribute, information about the data type, or
|
267
267
|
# other definition details. The default value is `false`.
|
268
|
-
# @return [
|
268
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
269
269
|
def list_merchant_custom_attributes(merchant_id:,
|
270
270
|
visibility_filter: nil,
|
271
271
|
limit: nil,
|
@@ -301,7 +301,7 @@ module Square
|
|
301
301
|
# delete. This key must match the `key` of a custom attribute definition in
|
302
302
|
# the Square seller account. If the requesting application is not the
|
303
303
|
# definition owner, you must use the qualified key.
|
304
|
-
# @return [
|
304
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
305
305
|
def delete_merchant_custom_attribute(merchant_id:,
|
306
306
|
key:)
|
307
307
|
new_api_call_builder
|
@@ -347,7 +347,7 @@ module Square
|
|
347
347
|
# Square returns the specified version or a higher version if one exists. If
|
348
348
|
# the specified version is higher than the current version, Square returns a
|
349
349
|
# `BAD_REQUEST` error.
|
350
|
-
# @return [
|
350
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
351
351
|
def retrieve_merchant_custom_attribute(merchant_id:,
|
352
352
|
key:,
|
353
353
|
with_definition: false,
|
@@ -392,7 +392,7 @@ module Square
|
|
392
392
|
# @param [UpsertMerchantCustomAttributeRequest] body Required parameter: An
|
393
393
|
# object containing the fields to POST for the request. See the
|
394
394
|
# corresponding object definition for field details.
|
395
|
-
# @return [
|
395
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
396
396
|
def upsert_merchant_custom_attribute(merchant_id:,
|
397
397
|
key:,
|
398
398
|
body:)
|
@@ -14,7 +14,7 @@ module Square
|
|
14
14
|
# endpoint to retrieve the merchant information.
|
15
15
|
# @param [Integer] cursor Optional parameter: The cursor generated by the
|
16
16
|
# previous response.
|
17
|
-
# @return [
|
17
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
18
18
|
def list_merchants(cursor: nil)
|
19
19
|
new_api_call_builder
|
20
20
|
.request(new_request_builder(HttpMethodEnum::GET,
|
@@ -34,7 +34,7 @@ module Square
|
|
34
34
|
# @param [String] merchant_id Required parameter: The ID of the merchant to
|
35
35
|
# retrieve. If the string "me" is supplied as the ID, then retrieve the
|
36
36
|
# merchant that is currently accessible to this call.
|
37
|
-
# @return [
|
37
|
+
# @return [ApiResponse] the complete http response with raw body and status code.
|
38
38
|
def retrieve_merchant(merchant_id:)
|
39
39
|
new_api_call_builder
|
40
40
|
.request(new_request_builder(HttpMethodEnum::GET,
|