square.rb 9.0.0.20210226 → 11.0.0.20210513

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,8 @@ module Square
9
9
  # @param [String] cursor Optional parameter: A pagination cursor returned by
10
10
  # a previous call to this endpoint. Provide this to retrieve the next set of
11
11
  # results for your original query. See [Paginating
12
- # results](#paginatingresults) for more information.
12
+ # results](https://developer.squareup.com/docs/working-with-apis/pagination)
13
+ # for more information.
13
14
  # @param [String] location_id Optional parameter: If specified, only returns
14
15
  # DeviceCodes of the specified location. Returns DeviceCodes of all
15
16
  # locations if empty.
@@ -167,8 +167,7 @@ module Square
167
167
  # Square does not send the bank any evidence that is removed. Also, you
168
168
  # cannot remove evidence after
169
169
  # submitting it to the bank using
170
- # [SubmitEvidence](https://developer.squareup.com/docs/reference/square/disp
171
- # utes-api/submit-evidence).
170
+ # [SubmitEvidence]($e/Disputes/SubmitEvidence).
172
171
  # @param [String] dispute_id Required parameter: The ID of the dispute you
173
172
  # want to remove evidence from.
174
173
  # @param [String] evidence_id Required parameter: The ID of the evidence you
@@ -359,10 +358,9 @@ module Square
359
358
  # Before submitting evidence, Square compiles all available evidence. This
360
359
  # includes evidence uploaded
361
360
  # using the
362
- # [CreateDisputeEvidenceFile](https://developer.squareup.com/docs/reference/
363
- # square/disputes-api/create-dispute-evidence-file) and
364
- # [CreateDisputeEvidenceText](https://developer.squareup.com/docs/reference/
365
- # square/disputes-api/create-dispute-evidence-text) endpoints and
361
+ # [CreateDisputeEvidenceFile]($e/Disputes/CreateDisputeEvidenceFile) and
362
+ # [CreateDisputeEvidenceText]($e/Disputes/CreateDisputeEvidenceText)
363
+ # endpoints and
366
364
  # evidence automatically provided by Square, when available.
367
365
  # @param [String] dispute_id Required parameter: The ID of the dispute that
368
366
  # you want to submit evidence for.
@@ -5,10 +5,10 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Returns the [InventoryAdjustment](#type-inventoryadjustment) object
8
+ # Returns the [InventoryAdjustment]($m/InventoryAdjustment) object
9
9
  # with the provided `adjustment_id`.
10
10
  # @param [String] adjustment_id Required parameter: ID of the
11
- # [InventoryAdjustment](#type-inventoryadjustment) to retrieve.
11
+ # [InventoryAdjustment]($m/InventoryAdjustment) to retrieve.
12
12
  # @return [RetrieveInventoryAdjustmentResponse Hash] response from the API call
13
13
  def retrieve_inventory_adjustment(adjustment_id:)
14
14
  # Prepare query url.
@@ -118,8 +118,8 @@ module Square
118
118
  end
119
119
 
120
120
  # Returns current counts for the provided
121
- # [CatalogObject](#type-catalogobject)s at the requested
122
- # [Location](#type-location)s.
121
+ # [CatalogObject]($m/CatalogObject)s at the requested
122
+ # [Location]($m/Location)s.
123
123
  # Results are paginated and sorted in descending order according to their
124
124
  # `calculated_at` timestamp (newest first).
125
125
  # When `updated_after` is specified, only counts that have changed since
@@ -160,10 +160,10 @@ module Square
160
160
  )
161
161
  end
162
162
 
163
- # Returns the [InventoryPhysicalCount](#type-inventoryphysicalcount)
163
+ # Returns the [InventoryPhysicalCount]($m/InventoryPhysicalCount)
164
164
  # object with the provided `physical_count_id`.
165
165
  # @param [String] physical_count_id Required parameter: ID of the
166
- # [InventoryPhysicalCount](#type-inventoryphysicalcount) to retrieve.
166
+ # [InventoryPhysicalCount]($m/InventoryPhysicalCount) to retrieve.
167
167
  # @return [RetrieveInventoryPhysicalCountResponse Hash] response from the API call
168
168
  def retrieve_inventory_physical_count(physical_count_id:)
169
169
  # Prepare query url.
@@ -197,14 +197,14 @@ module Square
197
197
  end
198
198
 
199
199
  # Retrieves the current calculated stock count for a given
200
- # [CatalogObject](#type-catalogobject) at a given set of
201
- # [Location](#type-location)s. Responses are paginated and unsorted.
200
+ # [CatalogObject]($m/CatalogObject) at a given set of
201
+ # [Location]($m/Location)s. Responses are paginated and unsorted.
202
202
  # For more sophisticated queries, use a batch endpoint.
203
203
  # @param [String] catalog_object_id Required parameter: ID of the
204
- # [CatalogObject](#type-catalogobject) to retrieve.
204
+ # [CatalogObject]($m/CatalogObject) to retrieve.
205
205
  # @param [String] location_ids Optional parameter: The
206
- # [Location](#type-location) IDs to look up as a comma-separated list. An
207
- # empty list queries all locations.
206
+ # [Location]($m/Location) IDs to look up as a comma-separated list. An empty
207
+ # list queries all locations.
208
208
  # @param [String] cursor Optional parameter: A pagination cursor returned by
209
209
  # a previous call to this endpoint. Provide this to retrieve the next set of
210
210
  # results for the original query. See the
@@ -250,8 +250,8 @@ module Square
250
250
  end
251
251
 
252
252
  # Returns a set of physical counts and inventory adjustments for the
253
- # provided [CatalogObject](#type-catalogobject) at the requested
254
- # [Location](#type-location)s.
253
+ # provided [CatalogObject]($m/CatalogObject) at the requested
254
+ # [Location]($m/Location)s.
255
255
  # Results are paginated and sorted in descending order according to their
256
256
  # `occurred_at` timestamp (newest first).
257
257
  # There are no limits on how far back the caller can page. This endpoint can
@@ -259,10 +259,10 @@ module Square
259
259
  # used to display recent changes for a specific item. For more
260
260
  # sophisticated queries, use a batch endpoint.
261
261
  # @param [String] catalog_object_id Required parameter: ID of the
262
- # [CatalogObject](#type-catalogobject) to retrieve.
262
+ # [CatalogObject]($m/CatalogObject) to retrieve.
263
263
  # @param [String] location_ids Optional parameter: The
264
- # [Location](#type-location) IDs to look up as a comma-separated list. An
265
- # empty list queries all locations.
264
+ # [Location]($m/Location) IDs to look up as a comma-separated list. An empty
265
+ # list queries all locations.
266
266
  # @param [String] cursor Optional parameter: A pagination cursor returned by
267
267
  # a previous call to this endpoint. Provide this to retrieve the next set of
268
268
  # results for the original query. See the
@@ -7,7 +7,7 @@ module Square
7
7
 
8
8
  # Returns a list of invoices for a given location. The response
9
9
  # is paginated. If truncated, the response includes a `cursor` that you
10
- # use in a subsequent request to fetch the next set of invoices.
10
+ # use in a subsequent request to retrieve the next set of invoices.
11
11
  # @param [String] location_id Required parameter: The ID of the location for
12
12
  # which to list invoices.
13
13
  # @param [String] cursor Optional parameter: A pagination cursor returned by
@@ -16,7 +16,7 @@ module Square
16
16
  # [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
17
17
  # ion).
18
18
  # @param [Integer] limit Optional parameter: The maximum number of invoices
19
- # to return (200 is the maximum `limit`). If not provided, the server uses
19
+ # to return (200 is the maximum `limit`). If not provided, the server uses
20
20
  # a default limit of 100 invoices.
21
21
  # @return [ListInvoicesResponse Hash] response from the API call
22
22
  def list_invoices(location_id:,
@@ -54,7 +54,7 @@ module Square
54
54
  )
55
55
  end
56
56
 
57
- # Creates a draft [invoice](#type-invoice)
57
+ # Creates a draft [invoice]($m/Invoice)
58
58
  # for an order created using the Orders API.
59
59
  # A draft invoice remains in your account and no action is taken.
60
60
  # You must publish the invoice before Square can process it (send it to the
@@ -98,7 +98,7 @@ module Square
98
98
  # location and
99
99
  # optionally one customer.
100
100
  # The response is paginated. If truncated, the response includes a `cursor`
101
- # that you use in a subsequent request to fetch the next set of invoices.
101
+ # that you use in a subsequent request to retrieve the next set of invoices.
102
102
  # @param [SearchInvoicesRequest] body Required parameter: An object
103
103
  # containing the fields to POST for the request. See the corresponding
104
104
  # object definition for field details.
@@ -133,15 +133,15 @@ module Square
133
133
  end
134
134
 
135
135
  # Deletes the specified invoice. When an invoice is deleted, the
136
- # associated Order status changes to CANCELED. You can only delete a draft
136
+ # associated order status changes to CANCELED. You can only delete a draft
137
137
  # invoice (you cannot delete a published invoice, including one that is
138
138
  # scheduled for processing).
139
139
  # @param [String] invoice_id Required parameter: The ID of the invoice to
140
140
  # delete.
141
141
  # @param [Integer] version Optional parameter: The version of the
142
- # [invoice](#type-invoice) to delete. If you do not know the version, you
143
- # can call [GetInvoice](#endpoint-Invoices-GetInvoice) or
144
- # [ListInvoices](#endpoint-Invoices-ListInvoices).
142
+ # [invoice]($m/Invoice) to delete. If you do not know the version, you can
143
+ # call [GetInvoice]($e/Invoices/GetInvoice) or
144
+ # [ListInvoices]($e/Invoices/ListInvoices).
145
145
  # @return [DeleteInvoiceResponse Hash] response from the API call
146
146
  def delete_invoice(invoice_id:,
147
147
  version: nil)
@@ -180,7 +180,7 @@ module Square
180
180
  end
181
181
 
182
182
  # Retrieves an invoice by invoice ID.
183
- # @param [String] invoice_id Required parameter: The id of the invoice to
183
+ # @param [String] invoice_id Required parameter: The ID of the invoice to
184
184
  # retrieve.
185
185
  # @return [GetInvoiceResponse Hash] response from the API call
186
186
  def get_invoice(invoice_id:)
@@ -216,10 +216,10 @@ module Square
216
216
 
217
217
  # Updates an invoice by modifying fields, clearing fields, or both. For most
218
218
  # updates, you can use a sparse
219
- # `Invoice` object to add fields or change values, and use the
219
+ # `Invoice` object to add fields or change values and use the
220
220
  # `fields_to_clear` field to specify fields to clear.
221
221
  # However, some restrictions apply. For example, you cannot change the
222
- # `order_id` or `location_id` field, and you
222
+ # `order_id` or `location_id` field and you
223
223
  # must provide the complete `custom_fields` list to update a custom field.
224
224
  # Published invoices have additional restrictions.
225
225
  # @param [String] invoice_id Required parameter: The ID of the invoice to
@@ -267,7 +267,7 @@ module Square
267
267
  # You cannot cancel an invoice in the `DRAFT` state or in a terminal state:
268
268
  # `PAID`, `REFUNDED`, `CANCELED`, or `FAILED`.
269
269
  # @param [String] invoice_id Required parameter: The ID of the
270
- # [invoice](#type-invoice) to cancel.
270
+ # [invoice]($m/Invoice) to cancel.
271
271
  # @param [CancelInvoiceRequest] body Required parameter: An object
272
272
  # containing the fields to POST for the request. See the corresponding
273
273
  # object definition for field details.
@@ -318,8 +318,8 @@ module Square
318
318
  # `UNPAID` if
319
319
  # Square emails the invoice or `PARTIALLY_PAID` if Square charge a card on
320
320
  # file for a portion of the
321
- # invoice amount).
322
- # @param [String] invoice_id Required parameter: The id of the invoice to
321
+ # invoice amount.
322
+ # @param [String] invoice_id Required parameter: The ID of the invoice to
323
323
  # publish.
324
324
  # @param [PublishInvoiceRequest] body Required parameter: An object
325
325
  # containing the fields to POST for the request. See the corresponding
@@ -7,8 +7,7 @@ module Square
7
7
 
8
8
  # Provides information of all locations of a business.
9
9
  # Many Square API endpoints require a `location_id` parameter.
10
- # The `id` field of the [`Location`](#type-location) objects returned by
11
- # this
10
+ # The `id` field of the [`Location`]($m/Location) objects returned by this
12
11
  # endpoint correspond to that `location_id` parameter.
13
12
  # @return [ListLocationsResponse Hash] response from the API call
14
13
  def list_locations
@@ -5,7 +5,8 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Creates a loyalty account.
8
+ # Creates a loyalty account. To create a loyalty account, you must provide
9
+ # the `program_id` and a `mapping` with the `phone_number` of the buyer.
9
10
  # @param [CreateLoyaltyAccountRequest] body Required parameter: An object
10
11
  # containing the fields to POST for the request. See the corresponding
11
12
  # object definition for field details.
@@ -79,7 +80,7 @@ module Square
79
80
 
80
81
  # Retrieves a loyalty account.
81
82
  # @param [String] account_id Required parameter: The ID of the [loyalty
82
- # account](#type-LoyaltyAccount) to retrieve.
83
+ # account]($m/LoyaltyAccount) to retrieve.
83
84
  # @return [RetrieveLoyaltyAccountResponse Hash] response from the API call
84
85
  def retrieve_loyalty_account(account_id:)
85
86
  # Prepare query url.
@@ -120,13 +121,13 @@ module Square
120
121
  # - If you are not using the Orders API to manage orders,
121
122
  # you first perform a client-side computation to compute the points.
122
123
  # For spend-based and visit-based programs, you can call
123
- # [CalculateLoyaltyPoints](#endpoint-Loyalty-CalculateLoyaltyPoints) to
124
- # compute the points. For more information,
124
+ # [CalculateLoyaltyPoints]($e/Loyalty/CalculateLoyaltyPoints) to compute the
125
+ # points. For more information,
125
126
  # see [Loyalty Program
126
127
  # Overview](https://developer.squareup.com/docs/loyalty/overview).
127
128
  # You then provide the points in a request to this endpoint.
128
129
  # @param [String] account_id Required parameter: The [loyalty
129
- # account](#type-LoyaltyAccount) ID to which to add the points.
130
+ # account]($m/LoyaltyAccount) ID to which to add the points.
130
131
  # @param [AccumulateLoyaltyPointsRequest] body Required parameter: An object
131
132
  # containing the fields to POST for the request. See the corresponding
132
133
  # object definition for field details.
@@ -168,10 +169,10 @@ module Square
168
169
  # Adds points to or subtracts points from a buyer's account.
169
170
  # Use this endpoint only when you need to manually adjust points. Otherwise,
170
171
  # in your application flow, you call
171
- # [AccumulateLoyaltyPoints](#endpoint-Loyalty-AccumulateLoyaltyPoints)
172
+ # [AccumulateLoyaltyPoints]($e/Loyalty/AccumulateLoyaltyPoints)
172
173
  # to add points when a buyer pays for the purchase.
173
174
  # @param [String] account_id Required parameter: The ID of the [loyalty
174
- # account](#type-LoyaltyAccount) in which to adjust the points.
175
+ # account]($m/LoyaltyAccount) in which to adjust the points.
175
176
  # @param [AdjustLoyaltyPointsRequest] body Required parameter: An object
176
177
  # containing the fields to POST for the request. See the corresponding
177
178
  # object definition for field details.
@@ -217,6 +218,7 @@ module Square
217
218
  # (for example, points earned, points redeemed, and points expired) is
218
219
  # recorded in the ledger. Using this endpoint, you can search the ledger for
219
220
  # events.
221
+ # Search results are sorted by `created_at` in descending order.
220
222
  # @param [SearchLoyaltyEventsRequest] body Required parameter: An object
221
223
  # containing the fields to POST for the request. See the corresponding
222
224
  # object definition for field details.
@@ -251,9 +253,16 @@ module Square
251
253
  end
252
254
 
253
255
  # Returns a list of loyalty programs in the seller's account.
254
- # Currently, a seller can only have one loyalty program.
256
+ # Loyalty programs define how buyers can earn points and redeem points for
257
+ # rewards. Square sellers can have only one loyalty program, which is
258
+ # created and managed from the Seller Dashboard. For more information, see
259
+ # [Loyalty Program
260
+ # Overview](https://developer.squareup.com/docs/loyalty/overview).
261
+ # Replaced with [RetrieveLoyaltyProgram]($e/Loyalty/RetrieveLoyaltyProgram)
262
+ # when used with the keyword `main`.
255
263
  # @return [ListLoyaltyProgramsResponse Hash] response from the API call
256
264
  def list_loyalty_programs
265
+ warn 'Endpoint list_loyalty_programs in LoyaltyApi is deprecated'
257
266
  # Prepare query url.
258
267
  _query_builder = config.get_base_uri
259
268
  _query_builder << '/v2/loyalty/programs'
@@ -280,6 +289,48 @@ module Square
280
289
  )
281
290
  end
282
291
 
292
+ # Retrieves the loyalty program in a seller's account, specified by the
293
+ # program ID or the keyword `main`.
294
+ # Loyalty programs define how buyers can earn points and redeem points for
295
+ # rewards. Square sellers can have only one loyalty program, which is
296
+ # created and managed from the Seller Dashboard. For more information, see
297
+ # [Loyalty Program
298
+ # Overview](https://developer.squareup.com/docs/loyalty/overview).
299
+ # @param [String] program_id Required parameter: The ID of the loyalty
300
+ # program or the keyword `main`. Either value can be used to retrieve the
301
+ # single loyalty program that belongs to the seller.
302
+ # @return [RetrieveLoyaltyProgramResponse Hash] response from the API call
303
+ def retrieve_loyalty_program(program_id:)
304
+ # Prepare query url.
305
+ _query_builder = config.get_base_uri
306
+ _query_builder << '/v2/loyalty/programs/{program_id}'
307
+ _query_builder = APIHelper.append_url_with_template_parameters(
308
+ _query_builder,
309
+ 'program_id' => { 'value' => program_id, 'encode' => true }
310
+ )
311
+ _query_url = APIHelper.clean_url _query_builder
312
+
313
+ # Prepare headers.
314
+ _headers = {
315
+ 'accept' => 'application/json'
316
+ }
317
+
318
+ # Prepare and execute HttpRequest.
319
+ _request = config.http_client.get(
320
+ _query_url,
321
+ headers: _headers
322
+ )
323
+ OAuth2.apply(config, _request)
324
+ _response = execute_request(_request)
325
+
326
+ # Return appropriate response type.
327
+ decoded = APIHelper.json_deserialize(_response.raw_body)
328
+ _errors = APIHelper.map_response(decoded, ['errors'])
329
+ ApiResponse.new(
330
+ _response, data: decoded, errors: _errors
331
+ )
332
+ end
333
+
283
334
  # Calculates the points a purchase earns.
284
335
  # - If you are using the Orders API to manage orders, you provide `order_id`
285
336
  # in the request. The
@@ -291,7 +342,7 @@ module Square
291
342
  # can earn with the
292
343
  # specific purchase.
293
344
  # @param [String] program_id Required parameter: The [loyalty
294
- # program](#type-LoyaltyProgram) ID, which defines the rules for accruing
345
+ # program]($m/LoyaltyProgram) ID, which defines the rules for accruing
295
346
  # points.
296
347
  # @param [CalculateLoyaltyPointsRequest] body Required parameter: An object
297
348
  # containing the fields to POST for the request. See the corresponding
@@ -376,7 +427,8 @@ module Square
376
427
  # In the current implementation, the endpoint supports search by the reward
377
428
  # `status`.
378
429
  # If you know a reward ID, use the
379
- # [RetrieveLoyaltyReward](#endpoint-Loyalty-RetrieveLoyaltyReward) endpoint.
430
+ # [RetrieveLoyaltyReward]($e/Loyalty/RetrieveLoyaltyReward) endpoint.
431
+ # Search results are sorted by `updated_at` in descending order.
380
432
  # @param [SearchLoyaltyRewardsRequest] body Required parameter: An object
381
433
  # containing the fields to POST for the request. See the corresponding
382
434
  # object definition for field details.
@@ -413,12 +465,12 @@ module Square
413
465
  # Deletes a loyalty reward by doing the following:
414
466
  # - Returns the loyalty points back to the loyalty account.
415
467
  # - If an order ID was specified when the reward was created
416
- # (see [CreateLoyaltyReward](#endpoint-Loyalty-CreateLoyaltyReward)),
468
+ # (see [CreateLoyaltyReward]($e/Loyalty/CreateLoyaltyReward)),
417
469
  # it updates the order by removing the reward and related
418
470
  # discounts.
419
471
  # You cannot delete a reward that has reached the terminal state (REDEEMED).
420
472
  # @param [String] reward_id Required parameter: The ID of the [loyalty
421
- # reward](#type-LoyaltyReward) to delete.
473
+ # reward]($m/LoyaltyReward) to delete.
422
474
  # @return [DeleteLoyaltyRewardResponse Hash] response from the API call
423
475
  def delete_loyalty_reward(reward_id:)
424
476
  # Prepare query url.
@@ -453,7 +505,7 @@ module Square
453
505
 
454
506
  # Retrieves a loyalty reward.
455
507
  # @param [String] reward_id Required parameter: The ID of the [loyalty
456
- # reward](#type-LoyaltyReward) to retrieve.
508
+ # reward]($m/LoyaltyReward) to retrieve.
457
509
  # @return [RetrieveLoyaltyRewardResponse Hash] response from the API call
458
510
  def retrieve_loyalty_reward(reward_id:)
459
511
  # Prepare query url.
@@ -495,7 +547,7 @@ module Square
495
547
  # In other words, points used for the reward cannot be returned
496
548
  # to the account.
497
549
  # @param [String] reward_id Required parameter: The ID of the [loyalty
498
- # reward](#type-LoyaltyReward) to redeem.
550
+ # reward]($m/LoyaltyReward) to redeem.
499
551
  # @param [RedeemLoyaltyRewardRequest] body Required parameter: An object
500
552
  # containing the fields to POST for the request. See the corresponding
501
553
  # object definition for field details.
@@ -12,7 +12,7 @@ module Square
12
12
  # information or specify an OAuth token
13
13
  # to get the information for the merchant that granted you access.
14
14
  # If you know the merchant ID, you can also use the
15
- # [RetrieveMerchant](#endpoint-merchants-retrievemerchant)
15
+ # [RetrieveMerchant]($e/Merchants/RetrieveMerchant)
16
16
  # endpoint to get the merchant information.
17
17
  # @param [Integer] cursor Optional parameter: The cursor generated by the
18
18
  # previous response.
@@ -5,14 +5,14 @@ module Square
5
5
  super(config, http_call_back: http_call_back)
6
6
  end
7
7
 
8
- # Creates a new [Order](#type-order) which can include information on
8
+ # Creates a new [order]($m/Order) that can include information about
9
9
  # products for
10
10
  # purchase and settings to apply to the purchase.
11
- # To pay for a created order, please refer to the [Pay for
12
- # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
13
- # guide.
14
- # You can modify open orders using the
15
- # [UpdateOrder](#endpoint-orders-updateorder) endpoint.
11
+ # To pay for a created order, see
12
+ # [Pay for
13
+ # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders).
14
+ # You can modify open orders using the [UpdateOrder]($e/Orders/UpdateOrder)
15
+ # endpoint.
16
16
  # @param [CreateOrderRequest] body Required parameter: An object containing
17
17
  # the fields to POST for the request. See the corresponding object
18
18
  # definition for field details.
@@ -46,8 +46,8 @@ module Square
46
46
  )
47
47
  end
48
48
 
49
- # Retrieves a set of [Order](#type-order)s by their IDs.
50
- # If a given Order ID does not exist, the ID is ignored instead of
49
+ # Retrieves a set of [orders]($m/Order) by their IDs.
50
+ # If a given order ID does not exist, the ID is ignored instead of
51
51
  # generating an error.
52
52
  # @param [BatchRetrieveOrdersRequest] body Required parameter: An object
53
53
  # containing the fields to POST for the request. See the corresponding
@@ -82,7 +82,7 @@ module Square
82
82
  )
83
83
  end
84
84
 
85
- # Calculates an [Order](#type-order).
85
+ # Enables applications to preview order pricing without creating an order.
86
86
  # @param [CalculateOrderRequest] body Required parameter: An object
87
87
  # containing the fields to POST for the request. See the corresponding
88
88
  # object definition for field details.
@@ -118,17 +118,18 @@ module Square
118
118
 
119
119
  # Search all orders for one or more locations. Orders include all sales,
120
120
  # returns, and exchanges regardless of how or when they entered the Square
121
- # Ecosystem (e.g. Point of Sale, Invoices, Connect APIs, etc).
122
- # SearchOrders requests need to specify which locations to search and define
123
- # a
124
- # [`SearchOrdersQuery`](#type-searchordersquery) object which controls
125
- # how to sort or filter the results. Your SearchOrdersQuery can:
121
+ # ecosystem (such as Point of Sale, Invoices, and Connect APIs).
122
+ # `SearchOrders` requests need to specify which locations to search and
123
+ # define a
124
+ # [SearchOrdersQuery]($m/SearchOrdersQuery) object that controls
125
+ # how to sort or filter the results. Your `SearchOrdersQuery` can:
126
126
  # Set filter criteria.
127
- # Set sort order.
128
- # Determine whether to return results as complete Order objects, or as
129
- # [OrderEntry](#type-orderentry) objects.
127
+ # Set the sort order.
128
+ # Determine whether to return results as complete `Order` objects or as
129
+ # [OrderEntry]($m/OrderEntry) objects.
130
130
  # Note that details for orders processed with Square Point of Sale while in
131
- # offline mode may not be transmitted to Square for up to 72 hours. Offline
131
+ # offline mode might not be transmitted to Square for up to 72 hours.
132
+ # Offline
132
133
  # orders have a `created_at` value that reflects the time the order was
133
134
  # created,
134
135
  # not the time it was subsequently transmitted to Square.
@@ -165,7 +166,7 @@ module Square
165
166
  )
166
167
  end
167
168
 
168
- # Retrieves an [Order](#type-order) by ID.
169
+ # Retrieves an [Order]($m/Order) by ID.
169
170
  # @param [String] order_id Required parameter: The ID of the order to
170
171
  # retrieve.
171
172
  # @return [RetrieveOrderResponse Hash] response from the API call
@@ -200,23 +201,24 @@ module Square
200
201
  )
201
202
  end
202
203
 
203
- # Updates an open [Order](#type-order) by adding, replacing, or deleting
204
+ # Updates an open [order]($m/Order) by adding, replacing, or deleting
204
205
  # fields. Orders with a `COMPLETED` or `CANCELED` state cannot be updated.
205
- # An UpdateOrder request requires the following:
206
+ # An `UpdateOrder` request requires the following:
206
207
  # - The `order_id` in the endpoint path, identifying the order to update.
207
208
  # - The latest `version` of the order to update.
208
209
  # - The [sparse
209
210
  # order](https://developer.squareup.com/docs/orders-api/manage-orders#sparse
210
211
  # -order-objects)
211
- # containing only the fields to update and the version the update is
212
- # being applied to.
212
+ # containing only the fields to update and the version to which the update
213
+ # is
214
+ # being applied.
213
215
  # - If deleting fields, the [dot notation
214
216
  # paths](https://developer.squareup.com/docs/orders-api/manage-orders#on-dot
215
217
  # -notation)
216
- # identifying fields to clear.
217
- # To pay for an order, please refer to the [Pay for
218
- # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders)
219
- # guide.
218
+ # identifying the fields to clear.
219
+ # To pay for an order, see
220
+ # [Pay for
221
+ # Orders](https://developer.squareup.com/docs/orders-api/pay-for-orders).
220
222
  # @param [String] order_id Required parameter: The ID of the order to
221
223
  # update.
222
224
  # @param [UpdateOrderRequest] body Required parameter: An object containing
@@ -257,24 +259,24 @@ module Square
257
259
  )
258
260
  end
259
261
 
260
- # Pay for an [order](#type-order) using one or more approved
261
- # [payments](#type-payment),
262
+ # Pay for an [order]($m/Order) using one or more approved
263
+ # [payments]($m/Payment)
262
264
  # or settle an order with a total of `0`.
263
265
  # The total of the `payment_ids` listed in the request must be equal to the
264
266
  # order
265
267
  # total. Orders with a total amount of `0` can be marked as paid by
266
268
  # specifying an empty
267
269
  # array of `payment_ids` in the request.
268
- # To be used with PayOrder, a payment must:
270
+ # To be used with `PayOrder`, a payment must:
269
271
  # - Reference the order by specifying the `order_id` when [creating the
270
- # payment](#endpoint-payments-createpayment).
272
+ # payment]($e/Payments/CreatePayment).
271
273
  # Any approved payments that reference the same `order_id` not specified in
272
274
  # the
273
- # `payment_ids` will be canceled.
275
+ # `payment_ids` is canceled.
274
276
  # - Be approved with [delayed
275
277
  # capture](https://developer.squareup.com/docs/payments-api/take-payments#de
276
278
  # layed-capture).
277
- # Using a delayed capture payment with PayOrder will complete the approved
279
+ # Using a delayed capture payment with `PayOrder` completes the approved
278
280
  # payment.
279
281
  # @param [String] order_id Required parameter: The ID of the order being
280
282
  # paid.