Skip to content

Commit f482279

Browse files
author
autobot
committed
Generated PR for Release: 38.1.1.20240717
1 parent a0ae86f commit f482279

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+973
-945
lines changed

doc/api/apple-pay.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ an Apple Pay enabled domain.
1818
This endpoint provides an easy way for platform developers to bulk activate
1919
Apple Pay on the Web with Square for merchants using their platform.
2020

21-
Note: The SqPaymentForm library is deprecated as of May 13, 2021, and will only receive critical security updates until it is retired on October 31, 2022.
22-
You must migrate your payment form code to the Web Payments SDK to continue using your domain for Apple Pay. For more information on migrating to the Web Payments SDK, see [Migrate to the Web Payments SDK](https://developer.squareup.com/docs/web-payments/migrate).
21+
Note: You will need to host a valid domain verification file on your domain to support Apple Pay. The
22+
current version of this file is always available at https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merchantid-domain-association,
23+
and should be hosted at `.well_known/apple-developer-merchantid-domain-association` on your
24+
domain. This file is subject to change; we strongly recommend checking for updates regularly and avoiding
25+
long-lived caches that might not keep in sync with the correct file version.
2326

2427
To learn more about the Web Payments SDK and how to add Apple Pay, see [Take an Apple Pay Payment](https://developer.squareup.com/docs/web-payments/apple-pay).
2528

doc/api/invoices.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,10 @@ end
278278

279279
# Update Invoice
280280

281-
Updates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse
282-
`Invoice` object to add fields or change values and use the `fields_to_clear` field to specify fields to clear.
283-
However, some restrictions apply. For example, you cannot change the `order_id` or `location_id` field and you
284-
must provide the complete `custom_fields` list to update a custom field. Published invoices have additional restrictions.
281+
Updates an invoice. This endpoint supports sparse updates, so you only need
282+
to specify the fields you want to change along with the required `version` field.
283+
Some restrictions apply to updating invoices. For example, you cannot change the
284+
`order_id` or `location_id` field.
285285

286286
```ruby
287287
def update_invoice(invoice_id:,
@@ -310,14 +310,16 @@ body = {
310310
:payment_requests => [
311311
{
312312
:uid => '2da7964f-f3d2-4f43-81e8-5aa220bf3355',
313-
:tipping_enabled => false
313+
:tipping_enabled => false,
314+
:reminders => [
315+
{},
316+
{},
317+
{}
318+
]
314319
}
315320
]
316321
},
317-
:idempotency_key => '4ee82288-0910-499e-ab4c-5d0071dad1be',
318-
:fields_to_clear => [
319-
'payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders'
320-
]
322+
:idempotency_key => '4ee82288-0910-499e-ab4c-5d0071dad1be'
321323
}
322324

323325

doc/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `square_version` | `String` | Square Connect API versions<br>*Default*: `'2024-06-04'` |
8+
| `square_version` | `String` | Square Connect API versions<br>*Default*: `'2024-07-17'` |
99
| `custom_url` | `String` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
@@ -25,7 +25,7 @@ The API client can be initialized as follows:
2525

2626
```ruby
2727
client = Square::Client.new(
28-
square_version: '2024-06-04',
28+
square_version: '2024-07-17',
2929
bearer_auth_credentials: BearerAuthCredentials.new(
3030
access_token: 'AccessToken'
3131
),

doc/models/update-invoice-request.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,17 @@ Describes a `UpdateInvoice` request.
1313
| --- | --- | --- | --- |
1414
| `invoice` | [`Invoice Hash`](../../doc/models/invoice.md) | Required | Stores information about an invoice. You use the Invoices API to create and manage<br>invoices. For more information, see [Invoices API Overview](https://developer.squareup.com/docs/invoices-api/overview). |
1515
| `idempotency_key` | `String` | Optional | A unique string that identifies the `UpdateInvoice` request. If you do not<br>provide `idempotency_key` (or provide an empty string as the value), the endpoint<br>treats each request as independent.<br><br>For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency).<br>**Constraints**: *Maximum Length*: `128` |
16-
| `fields_to_clear` | `Array<String>` | Optional | The list of fields to clear.<br>For examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). |
16+
| `fields_to_clear` | `Array<String>` | Optional | The list of fields to clear. Although this field is currently supported, we<br>recommend using null values or the `remove` field when possible. For examples, see<br>[Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). |
1717

1818
## Example (as JSON)
1919

2020
```json
2121
{
22-
"fields_to_clear": [
23-
"payments_requests[2da7964f-f3d2-4f43-81e8-5aa220bf3355].reminders"
24-
],
2522
"idempotency_key": "4ee82288-0910-499e-ab4c-5d0071dad1be",
2623
"invoice": {
2724
"payment_requests": [
2825
{
26+
"reminders": null,
2927
"tipping_enabled": false,
3028
"uid": "2da7964f-f3d2-4f43-81e8-5aa220bf3355"
3129
}
@@ -47,7 +45,12 @@ Describes a `UpdateInvoice` request.
4745
"sublocality": "sublocality6"
4846
}
4947
}
50-
}
48+
},
49+
"fields_to_clear": [
50+
"fields_to_clear1",
51+
"fields_to_clear2",
52+
"fields_to_clear3"
53+
]
5154
}
5255
```
5356

lib/square/api/apple_pay_api.rb

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ class ApplePayApi < BaseApi
99
# This endpoint provides an easy way for platform developers to bulk
1010
# activate
1111
# Apple Pay on the Web with Square for merchants using their platform.
12-
# Note: The SqPaymentForm library is deprecated as of May 13, 2021, and will
13-
# only receive critical security updates until it is retired on October 31,
14-
# 2022.
15-
# You must migrate your payment form code to the Web Payments SDK to
16-
# continue using your domain for Apple Pay. For more information on
17-
# migrating to the Web Payments SDK, see [Migrate to the Web Payments
18-
# SDK](https://developer.squareup.com/docs/web-payments/migrate).
12+
# Note: You will need to host a valid domain verification file on your
13+
# domain to support Apple Pay. The
14+
# current version of this file is always available at
15+
# https://app.squareup.com/digital-wallets/apple-pay/apple-developer-merchan
16+
# tid-domain-association,
17+
# and should be hosted at
18+
# `.well_known/apple-developer-merchantid-domain-association` on your
19+
# domain. This file is subject to change; we strongly recommend checking
20+
# for updates regularly and avoiding
21+
# long-lived caches that might not keep in sync with the correct file
22+
# version.
1923
# To learn more about the Web Payments SDK and how to add Apple Pay, see
2024
# [Take an Apple Pay
2125
# Payment](https://developer.squareup.com/docs/web-payments/apple-pay).
@@ -34,9 +38,9 @@ def register_domain(body:)
3438
.body_serializer(proc do |param| param.to_json unless param.nil? end)
3539
.auth(Single.new('global')))
3640
.response(new_response_handler
37-
.deserializer(APIHelper.method(:json_deserialize))
38-
.is_api_response(true)
39-
.convertor(ApiResponse.method(:create)))
41+
.deserializer(APIHelper.method(:json_deserialize))
42+
.is_api_response(true)
43+
.convertor(ApiResponse.method(:create)))
4044
.execute
4145
end
4246
end

lib/square/api/bank_accounts_api.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def list_bank_accounts(cursor: nil,
2929
.header_param(new_parameter('application/json', key: 'accept'))
3030
.auth(Single.new('global')))
3131
.response(new_response_handler
32-
.deserializer(APIHelper.method(:json_deserialize))
33-
.is_api_response(true)
34-
.convertor(ApiResponse.method(:create)))
32+
.deserializer(APIHelper.method(:json_deserialize))
33+
.is_api_response(true)
34+
.convertor(ApiResponse.method(:create)))
3535
.execute
3636
end
3737

@@ -53,9 +53,9 @@ def get_bank_account_by_v1_id(v1_bank_account_id:)
5353
.header_param(new_parameter('application/json', key: 'accept'))
5454
.auth(Single.new('global')))
5555
.response(new_response_handler
56-
.deserializer(APIHelper.method(:json_deserialize))
57-
.is_api_response(true)
58-
.convertor(ApiResponse.method(:create)))
56+
.deserializer(APIHelper.method(:json_deserialize))
57+
.is_api_response(true)
58+
.convertor(ApiResponse.method(:create)))
5959
.execute
6060
end
6161

@@ -74,9 +74,9 @@ def get_bank_account(bank_account_id:)
7474
.header_param(new_parameter('application/json', key: 'accept'))
7575
.auth(Single.new('global')))
7676
.response(new_response_handler
77-
.deserializer(APIHelper.method(:json_deserialize))
78-
.is_api_response(true)
79-
.convertor(ApiResponse.method(:create)))
77+
.deserializer(APIHelper.method(:json_deserialize))
78+
.is_api_response(true)
79+
.convertor(ApiResponse.method(:create)))
8080
.execute
8181
end
8282
end

lib/square/api/base_api.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class BaseApi
55
attr_accessor :config, :http_call_back
66

77
def self.user_agent
8-
'Square-Ruby-SDK/38.1.0.20240604 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
8+
'Square-Ruby-SDK/38.1.1.20240717 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
99
end
1010

1111
def self.user_agent_parameters

lib/square/api/booking_custom_attributes_api.rb

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def list_booking_custom_attribute_definitions(limit: nil,
3030
.header_param(new_parameter('application/json', key: 'accept'))
3131
.auth(Single.new('global')))
3232
.response(new_response_handler
33-
.deserializer(APIHelper.method(:json_deserialize))
34-
.is_api_response(true)
35-
.convertor(ApiResponse.method(:create)))
33+
.deserializer(APIHelper.method(:json_deserialize))
34+
.is_api_response(true)
35+
.convertor(ApiResponse.method(:create)))
3636
.execute
3737
end
3838

@@ -59,9 +59,9 @@ def create_booking_custom_attribute_definition(body:)
5959
.body_serializer(proc do |param| param.to_json unless param.nil? end)
6060
.auth(Single.new('global')))
6161
.response(new_response_handler
62-
.deserializer(APIHelper.method(:json_deserialize))
63-
.is_api_response(true)
64-
.convertor(ApiResponse.method(:create)))
62+
.deserializer(APIHelper.method(:json_deserialize))
63+
.is_api_response(true)
64+
.convertor(ApiResponse.method(:create)))
6565
.execute
6666
end
6767

@@ -86,9 +86,9 @@ def delete_booking_custom_attribute_definition(key:)
8686
.header_param(new_parameter('application/json', key: 'accept'))
8787
.auth(Single.new('global')))
8888
.response(new_response_handler
89-
.deserializer(APIHelper.method(:json_deserialize))
90-
.is_api_response(true)
91-
.convertor(ApiResponse.method(:create)))
89+
.deserializer(APIHelper.method(:json_deserialize))
90+
.is_api_response(true)
91+
.convertor(ApiResponse.method(:create)))
9292
.execute
9393
end
9494

@@ -119,9 +119,9 @@ def retrieve_booking_custom_attribute_definition(key:,
119119
.header_param(new_parameter('application/json', key: 'accept'))
120120
.auth(Single.new('global')))
121121
.response(new_response_handler
122-
.deserializer(APIHelper.method(:json_deserialize))
123-
.is_api_response(true)
124-
.convertor(ApiResponse.method(:create)))
122+
.deserializer(APIHelper.method(:json_deserialize))
123+
.is_api_response(true)
124+
.convertor(ApiResponse.method(:create)))
125125
.execute
126126
end
127127

@@ -153,9 +153,9 @@ def update_booking_custom_attribute_definition(key:,
153153
.body_serializer(proc do |param| param.to_json unless param.nil? end)
154154
.auth(Single.new('global')))
155155
.response(new_response_handler
156-
.deserializer(APIHelper.method(:json_deserialize))
157-
.is_api_response(true)
158-
.convertor(ApiResponse.method(:create)))
156+
.deserializer(APIHelper.method(:json_deserialize))
157+
.is_api_response(true)
158+
.convertor(ApiResponse.method(:create)))
159159
.execute
160160
end
161161

@@ -182,9 +182,9 @@ def bulk_delete_booking_custom_attributes(body:)
182182
.body_serializer(proc do |param| param.to_json unless param.nil? end)
183183
.auth(Single.new('global')))
184184
.response(new_response_handler
185-
.deserializer(APIHelper.method(:json_deserialize))
186-
.is_api_response(true)
187-
.convertor(ApiResponse.method(:create)))
185+
.deserializer(APIHelper.method(:json_deserialize))
186+
.is_api_response(true)
187+
.convertor(ApiResponse.method(:create)))
188188
.execute
189189
end
190190

@@ -211,9 +211,9 @@ def bulk_upsert_booking_custom_attributes(body:)
211211
.body_serializer(proc do |param| param.to_json unless param.nil? end)
212212
.auth(Single.new('global')))
213213
.response(new_response_handler
214-
.deserializer(APIHelper.method(:json_deserialize))
215-
.is_api_response(true)
216-
.convertor(ApiResponse.method(:create)))
214+
.deserializer(APIHelper.method(:json_deserialize))
215+
.is_api_response(true)
216+
.convertor(ApiResponse.method(:create)))
217217
.execute
218218
end
219219

@@ -259,9 +259,9 @@ def list_booking_custom_attributes(booking_id:,
259259
.header_param(new_parameter('application/json', key: 'accept'))
260260
.auth(Single.new('global')))
261261
.response(new_response_handler
262-
.deserializer(APIHelper.method(:json_deserialize))
263-
.is_api_response(true)
264-
.convertor(ApiResponse.method(:create)))
262+
.deserializer(APIHelper.method(:json_deserialize))
263+
.is_api_response(true)
264+
.convertor(ApiResponse.method(:create)))
265265
.execute
266266
end
267267

@@ -293,9 +293,9 @@ def delete_booking_custom_attribute(booking_id:,
293293
.header_param(new_parameter('application/json', key: 'accept'))
294294
.auth(Single.new('global')))
295295
.response(new_response_handler
296-
.deserializer(APIHelper.method(:json_deserialize))
297-
.is_api_response(true)
298-
.convertor(ApiResponse.method(:create)))
296+
.deserializer(APIHelper.method(:json_deserialize))
297+
.is_api_response(true)
298+
.convertor(ApiResponse.method(:create)))
299299
.execute
300300
end
301301

@@ -340,9 +340,9 @@ def retrieve_booking_custom_attribute(booking_id:,
340340
.header_param(new_parameter('application/json', key: 'accept'))
341341
.auth(Single.new('global')))
342342
.response(new_response_handler
343-
.deserializer(APIHelper.method(:json_deserialize))
344-
.is_api_response(true)
345-
.convertor(ApiResponse.method(:create)))
343+
.deserializer(APIHelper.method(:json_deserialize))
344+
.is_api_response(true)
345+
.convertor(ApiResponse.method(:create)))
346346
.execute
347347
end
348348

@@ -381,9 +381,9 @@ def upsert_booking_custom_attribute(booking_id:,
381381
.body_serializer(proc do |param| param.to_json unless param.nil? end)
382382
.auth(Single.new('global')))
383383
.response(new_response_handler
384-
.deserializer(APIHelper.method(:json_deserialize))
385-
.is_api_response(true)
386-
.convertor(ApiResponse.method(:create)))
384+
.deserializer(APIHelper.method(:json_deserialize))
385+
.is_api_response(true)
386+
.convertor(ApiResponse.method(:create)))
387387
.execute
388388
end
389389
end

0 commit comments

Comments
 (0)