square.rb 29.0.1.20230608 → 30.0.0.20230720
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/base_api.rb +2 -2
- data/lib/square/api/booking_custom_attributes_api.rb +2 -2
- data/lib/square/api/bookings_api.rb +3 -3
- data/lib/square/api/cards_api.rb +1 -1
- data/lib/square/api/catalog_api.rb +14 -14
- data/lib/square/api/customer_custom_attributes_api.rb +2 -2
- data/lib/square/api/customers_api.rb +6 -1
- data/lib/square/api/location_custom_attributes_api.rb +2 -2
- data/lib/square/api/merchant_custom_attributes_api.rb +2 -2
- data/lib/square/api/order_custom_attributes_api.rb +2 -2
- data/lib/square/api/refunds_api.rb +1 -1
- data/lib/square/api/v1_transactions_api.rb +5 -5
- data/lib/square/api/webhook_subscriptions_api.rb +1 -1
- data/lib/square/client.rb +2 -3
- data/lib/square/configuration.rb +1 -1
- data/test/api/test_locations_api.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 148935067852283c97b96532924b8990240a8471eb1fb004af84547db7a46e6f
|
4
|
+
data.tar.gz: f831947407ebced9aacc23b3db7cfae06b658899b21212c2548ca00a2acce842
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7045748e5af0118787c3658002f2c43a6e4db0e044e2707b58ae2d6690abd16ce01ae360889552611c43967261c93b33fd2bcd610c305b349b687e0d8c77605
|
7
|
+
data.tar.gz: 65360d7cd4eebb01bddba58ad85124a51d4a60ea21c8095235ce58182a2c58f26db1353374c4b914f3f1e96fd72e774efd0c0ba19c40bc231095998e1303d544
|
data/lib/square/api/base_api.rb
CHANGED
@@ -4,7 +4,7 @@ module Square
|
|
4
4
|
attr_accessor :config, :http_call_back
|
5
5
|
|
6
6
|
def self.user_agent
|
7
|
-
'Square-Ruby-SDK/
|
7
|
+
'Square-Ruby-SDK/30.0.0.20230720 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.user_agent_parameters
|
@@ -31,7 +31,7 @@ module Square
|
|
31
31
|
end
|
32
32
|
|
33
33
|
# Creates a new instance of the request builder.
|
34
|
-
# @param [
|
34
|
+
# @param [String] http_method The HTTP method to use in the request.
|
35
35
|
# @param [String] path The endpoint path to use in the request.
|
36
36
|
# @param [String] server The server to extract the base uri for the request.
|
37
37
|
# @return [RequestBuilder] The instance of RequestBuilder.
|
@@ -236,7 +236,7 @@ module Square
|
|
236
236
|
# more information, see
|
237
237
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
238
238
|
# atterns/pagination).
|
239
|
-
# @param [TrueClass|FalseClass] with_definitions Optional parameter:
|
239
|
+
# @param [TrueClass | FalseClass] with_definitions Optional parameter:
|
240
240
|
# Indicates whether to return the [custom attribute
|
241
241
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
242
242
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -310,7 +310,7 @@ module Square
|
|
310
310
|
# retrieve. This key must match the `key` of a custom attribute definition
|
311
311
|
# in the Square seller account. If the requesting application is not the
|
312
312
|
# definition owner, you must use the qualified key.
|
313
|
-
# @param [TrueClass|FalseClass] with_definition Optional parameter:
|
313
|
+
# @param [TrueClass | FalseClass] with_definition Optional parameter:
|
314
314
|
# Indicates whether to return the [custom attribute
|
315
315
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
316
316
|
# the custom attribute. Set this parameter to `true` to get the name and
|
@@ -127,9 +127,9 @@ module Square
|
|
127
127
|
end
|
128
128
|
|
129
129
|
# Lists booking profiles for team members.
|
130
|
-
# @param [TrueClass|FalseClass] bookable_only Optional parameter:
|
131
|
-
# whether to include only bookable team members in the returned
|
132
|
-
# (`true`) or not (`false`).
|
130
|
+
# @param [TrueClass | FalseClass] bookable_only Optional parameter:
|
131
|
+
# Indicates whether to include only bookable team members in the returned
|
132
|
+
# result (`true`) or not (`false`).
|
133
133
|
# @param [Integer] limit Optional parameter: The maximum number of results
|
134
134
|
# to return in a paged response.
|
135
135
|
# @param [String] cursor Optional parameter: The pagination cursor from the
|
data/lib/square/api/cards_api.rb
CHANGED
@@ -11,7 +11,7 @@ module Square
|
|
11
11
|
# @param [String] customer_id Optional parameter: Limit results to cards
|
12
12
|
# associated with the customer supplied. By default, all cards owned by the
|
13
13
|
# merchant are returned.
|
14
|
-
# @param [TrueClass|FalseClass] include_disabled Optional parameter:
|
14
|
+
# @param [TrueClass | FalseClass] include_disabled Optional parameter:
|
15
15
|
# Includes disabled cards. By default, all enabled cards owned by the
|
16
16
|
# merchant are returned.
|
17
17
|
# @param [String] reference_id Optional parameter: Limit results to cards
|
@@ -308,20 +308,20 @@ module Square
|
|
308
308
|
# any [CatalogTax]($m/CatalogTax) objects that apply to it.
|
309
309
|
# @param [String] object_id Required parameter: The object ID of any type of
|
310
310
|
# catalog objects to be retrieved.
|
311
|
-
# @param [TrueClass|FalseClass] include_related_objects Optional
|
312
|
-
# If `true`, the response will include additional objects that
|
313
|
-
# to the requested objects. Related objects are defined as any
|
314
|
-
# referenced by ID by the results in the `objects` field of the
|
315
|
-
# These objects are put in the `related_objects` field. Setting
|
316
|
-
# `true` is helpful when the objects are needed for immediate
|
317
|
-
# user. This process only goes one level deep. Objects
|
318
|
-
# related objects will not be included. For example, if
|
319
|
-
# of the response contains a CatalogItem, its associated
|
320
|
-
# objects, CatalogTax objects, CatalogImage objects and
|
321
|
-
# will be returned in the `related_objects` field of
|
322
|
-
# `objects` field of the response contains a
|
323
|
-
# parent CatalogItem will be returned in the
|
324
|
-
# response. Default value: `false`
|
311
|
+
# @param [TrueClass | FalseClass] include_related_objects Optional
|
312
|
+
# parameter: If `true`, the response will include additional objects that
|
313
|
+
# are related to the requested objects. Related objects are defined as any
|
314
|
+
# objects referenced by ID by the results in the `objects` field of the
|
315
|
+
# response. These objects are put in the `related_objects` field. Setting
|
316
|
+
# this to `true` is helpful when the objects are needed for immediate
|
317
|
+
# display to a user. This process only goes one level deep. Objects
|
318
|
+
# referenced by the related objects will not be included. For example, if
|
319
|
+
# the `objects` field of the response contains a CatalogItem, its associated
|
320
|
+
# CatalogCategory objects, CatalogTax objects, CatalogImage objects and
|
321
|
+
# CatalogModifierLists will be returned in the `related_objects` field of
|
322
|
+
# the response. If the `objects` field of the response contains a
|
323
|
+
# CatalogItemVariation, its parent CatalogItem will be returned in the
|
324
|
+
# `related_objects` field of the response. Default value: `false`
|
325
325
|
# @param [Integer] catalog_version Optional parameter: Requests objects as
|
326
326
|
# of a specific version of the catalog. This allows you to retrieve
|
327
327
|
# historical versions of objects. The value to retrieve a specific version
|
@@ -242,7 +242,7 @@ module Square
|
|
242
242
|
# more information, see
|
243
243
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
244
244
|
# atterns/pagination).
|
245
|
-
# @param [TrueClass|FalseClass] with_definitions Optional parameter:
|
245
|
+
# @param [TrueClass | FalseClass] with_definitions Optional parameter:
|
246
246
|
# Indicates whether to return the [custom attribute
|
247
247
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
248
248
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -321,7 +321,7 @@ module Square
|
|
321
321
|
# retrieve. This key must match the `key` of a custom attribute definition
|
322
322
|
# in the Square seller account. If the requesting application is not the
|
323
323
|
# definition owner, you must use the qualified key.
|
324
|
-
# @param [TrueClass|FalseClass] with_definition Optional parameter:
|
324
|
+
# @param [TrueClass | FalseClass] with_definition Optional parameter:
|
325
325
|
# Indicates whether to return the [custom attribute
|
326
326
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
327
327
|
# the custom attribute. Set this parameter to `true` to get the name and
|
@@ -26,11 +26,15 @@ module Square
|
|
26
26
|
# @param [SortOrder] sort_order Optional parameter: Indicates whether
|
27
27
|
# customers should be sorted in ascending (`ASC`) or descending (`DESC`)
|
28
28
|
# order. The default value is `ASC`.
|
29
|
+
# @param [TrueClass | FalseClass] count Optional parameter: Indicates
|
30
|
+
# whether to return the total count of customers in the `count` field of the
|
31
|
+
# response. The default value is `false`.
|
29
32
|
# @return [ListCustomersResponse Hash] response from the API call
|
30
33
|
def list_customers(cursor: nil,
|
31
34
|
limit: nil,
|
32
35
|
sort_field: nil,
|
33
|
-
sort_order: nil
|
36
|
+
sort_order: nil,
|
37
|
+
count: false)
|
34
38
|
new_api_call_builder
|
35
39
|
.request(new_request_builder(HttpMethodEnum::GET,
|
36
40
|
'/v2/customers',
|
@@ -39,6 +43,7 @@ module Square
|
|
39
43
|
.query_param(new_parameter(limit, key: 'limit'))
|
40
44
|
.query_param(new_parameter(sort_field, key: 'sort_field'))
|
41
45
|
.query_param(new_parameter(sort_order, key: 'sort_order'))
|
46
|
+
.query_param(new_parameter(count, key: 'count'))
|
42
47
|
.header_param(new_parameter('application/json', key: 'accept'))
|
43
48
|
.auth(Single.new('global')))
|
44
49
|
.response(new_response_handler
|
@@ -259,7 +259,7 @@ module Square
|
|
259
259
|
# more information, see
|
260
260
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
261
261
|
# atterns/pagination).
|
262
|
-
# @param [TrueClass|FalseClass] with_definitions Optional parameter:
|
262
|
+
# @param [TrueClass | FalseClass] with_definitions Optional parameter:
|
263
263
|
# Indicates whether to return the [custom attribute
|
264
264
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
265
265
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -335,7 +335,7 @@ module Square
|
|
335
335
|
# retrieve. This key must match the `key` of a custom attribute definition
|
336
336
|
# in the Square seller account. If the requesting application is not the
|
337
337
|
# definition owner, you must use the qualified key.
|
338
|
-
# @param [TrueClass|FalseClass] with_definition Optional parameter:
|
338
|
+
# @param [TrueClass | FalseClass] with_definition Optional parameter:
|
339
339
|
# Indicates whether to return the [custom attribute
|
340
340
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
341
341
|
# the custom attribute. Set this parameter to `true` to get the name and
|
@@ -259,7 +259,7 @@ module Square
|
|
259
259
|
# more information, see
|
260
260
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
261
261
|
# atterns/pagination).
|
262
|
-
# @param [TrueClass|FalseClass] with_definitions Optional parameter:
|
262
|
+
# @param [TrueClass | FalseClass] with_definitions Optional parameter:
|
263
263
|
# Indicates whether to return the [custom attribute
|
264
264
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
265
265
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -335,7 +335,7 @@ module Square
|
|
335
335
|
# retrieve. This key must match the `key` of a custom attribute definition
|
336
336
|
# in the Square seller account. If the requesting application is not the
|
337
337
|
# definition owner, you must use the qualified key.
|
338
|
-
# @param [TrueClass|FalseClass] with_definition Optional parameter:
|
338
|
+
# @param [TrueClass | FalseClass] with_definition Optional parameter:
|
339
339
|
# Indicates whether to return the [custom attribute
|
340
340
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
341
341
|
# the custom attribute. Set this parameter to `true` to get the name and
|
@@ -274,7 +274,7 @@ module Square
|
|
274
274
|
# see
|
275
275
|
# [Pagination](https://developer.squareup.com/docs/working-with-apis/paginat
|
276
276
|
# ion).
|
277
|
-
# @param [TrueClass|FalseClass] with_definitions Optional parameter:
|
277
|
+
# @param [TrueClass | FalseClass] with_definitions Optional parameter:
|
278
278
|
# Indicates whether to return the [custom attribute
|
279
279
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
280
280
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -357,7 +357,7 @@ module Square
|
|
357
357
|
# concurrency](https://developer.squareup.com/docs/build-basics/common-api-p
|
358
358
|
# atterns/optimistic-concurrency) control, include this optional field and
|
359
359
|
# specify the current version of the custom attribute.
|
360
|
-
# @param [TrueClass|FalseClass] with_definition Optional parameter:
|
360
|
+
# @param [TrueClass | FalseClass] with_definition Optional parameter:
|
361
361
|
# Indicates whether to return the [custom attribute
|
362
362
|
# definition](entity:CustomAttributeDefinition) in the `definition` field of
|
363
363
|
# each custom attribute. Set this parameter to `true` to get the name and
|
@@ -7,7 +7,7 @@ module Square
|
|
7
7
|
# seconds to appear.
|
8
8
|
# The maximum results per page is 100.
|
9
9
|
# @param [String] begin_time Optional parameter: Indicates the start of the
|
10
|
-
# time range to retrieve each PaymentRefund` for, in RFC 3339 format. The
|
10
|
+
# time range to retrieve each `PaymentRefund` for, in RFC 3339 format. The
|
11
11
|
# range is determined using the `created_at` field for each `PaymentRefund`.
|
12
12
|
# Default: The current time minus one year.
|
13
13
|
# @param [String] end_time Optional parameter: Indicates the end of the time
|
@@ -11,7 +11,7 @@ module Square
|
|
11
11
|
# @param [String] batch_token Optional parameter: A pagination cursor to
|
12
12
|
# retrieve the next set of results for your original query to the
|
13
13
|
# endpoint.
|
14
|
-
# @return [
|
14
|
+
# @return [Array[V1Order] Hash] response from the API call
|
15
15
|
def v1_list_orders(location_id:,
|
16
16
|
order: nil,
|
17
17
|
limit: nil,
|
@@ -127,11 +127,11 @@ module Square
|
|
127
127
|
# @param [String] batch_token Optional parameter: A pagination cursor to
|
128
128
|
# retrieve the next set of results for your original query to the
|
129
129
|
# endpoint.
|
130
|
-
# @param [TrueClass|FalseClass] include_partial Optional parameter:
|
130
|
+
# @param [TrueClass | FalseClass] include_partial Optional parameter:
|
131
131
|
# Indicates whether or not to include partial payments in the response.
|
132
132
|
# Partial payments will have the tenders collected so far, but the
|
133
133
|
# itemizations will be empty until the payment is completed.
|
134
|
-
# @return [
|
134
|
+
# @return [Array[V1Payment] Hash] response from the API call
|
135
135
|
def v1_list_payments(location_id:,
|
136
136
|
order: nil,
|
137
137
|
begin_time: nil,
|
@@ -213,7 +213,7 @@ module Square
|
|
213
213
|
# @param [String] batch_token Optional parameter: A pagination cursor to
|
214
214
|
# retrieve the next set of results for your original query to the
|
215
215
|
# endpoint.
|
216
|
-
# @return [
|
216
|
+
# @return [Array[V1Refund] Hash] response from the API call
|
217
217
|
def v1_list_refunds(location_id:,
|
218
218
|
order: nil,
|
219
219
|
begin_time: nil,
|
@@ -306,7 +306,7 @@ module Square
|
|
306
306
|
# @param [String] batch_token Optional parameter: A pagination cursor to
|
307
307
|
# retrieve the next set of results for your original query to the
|
308
308
|
# endpoint.
|
309
|
-
# @return [
|
309
|
+
# @return [Array[V1Settlement] Hash] response from the API call
|
310
310
|
def v1_list_settlements(location_id:,
|
311
311
|
order: nil,
|
312
312
|
begin_time: nil,
|
@@ -27,7 +27,7 @@ module Square
|
|
27
27
|
# results for your original query. For more information, see
|
28
28
|
# [Pagination](https://developer.squareup.com/docs/build-basics/common-api-p
|
29
29
|
# atterns/pagination).
|
30
|
-
# @param [TrueClass|FalseClass] include_disabled Optional parameter:
|
30
|
+
# @param [TrueClass | FalseClass] include_disabled Optional parameter:
|
31
31
|
# Includes disabled [Subscription](entity:WebhookSubscription)s. By default,
|
32
32
|
# all enabled [Subscription](entity:WebhookSubscription)s are returned.
|
33
33
|
# @param [SortOrder] sort_order Optional parameter: Sorts the returned list
|
data/lib/square/client.rb
CHANGED
@@ -4,7 +4,7 @@ module Square
|
|
4
4
|
attr_reader :config, :auth_managers
|
5
5
|
|
6
6
|
def sdk_version
|
7
|
-
'
|
7
|
+
'30.0.0.20230720'
|
8
8
|
end
|
9
9
|
|
10
10
|
def square_version
|
@@ -267,7 +267,7 @@ module Square
|
|
267
267
|
retry_methods: %i[get put], http_callback: nil,
|
268
268
|
environment: 'production',
|
269
269
|
custom_url: 'https://connect.squareup.com', access_token: '',
|
270
|
-
square_version: '2023-
|
270
|
+
square_version: '2023-07-20', user_agent_detail: '',
|
271
271
|
additional_headers: {}, config: nil)
|
272
272
|
@config = if config.nil?
|
273
273
|
Configuration.new(connection: connection, adapter: adapter,
|
@@ -300,7 +300,6 @@ module Square
|
|
300
300
|
agent_parameters: user_agent_params)
|
301
301
|
.additional_headers(@config.additional_headers)
|
302
302
|
.global_header('Square-Version', @config.square_version)
|
303
|
-
.sdk_module(Square)
|
304
303
|
.symbolize_hash(true)
|
305
304
|
|
306
305
|
initialize_auth_managers(@global_configuration)
|
data/lib/square/configuration.rb
CHANGED
@@ -19,7 +19,7 @@ module Square
|
|
19
19
|
retry_methods: %i[get put], http_callback: nil,
|
20
20
|
environment: 'production',
|
21
21
|
custom_url: 'https://connect.squareup.com', access_token: '',
|
22
|
-
square_version: '2023-
|
22
|
+
square_version: '2023-07-20', user_agent_detail: '',
|
23
23
|
additional_headers: {})
|
24
24
|
|
25
25
|
super connection: connection, adapter: adapter, timeout: timeout,
|
@@ -10,7 +10,7 @@ class LocationsApiTests < ApiTestBase
|
|
10
10
|
|
11
11
|
# Provides details about all of the seller's [locations](https://developer.squareup.com/docs/locations-api),
|
12
12
|
#including those with an inactive status.
|
13
|
-
def test_list_locations
|
13
|
+
def test_list_locations
|
14
14
|
|
15
15
|
# Perform the API call through the SDK function
|
16
16
|
result = @controller.list_locations()
|
@@ -19,4 +19,4 @@ class LocationsApiTests < ApiTestBase
|
|
19
19
|
assert_equal(200, @response_catcher.response.status_code)
|
20
20
|
end
|
21
21
|
|
22
|
-
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: square.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 30.0.0.20230720
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Square Developer Platform
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: apimatic_core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.3.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: apimatic_faraday_client_adapter
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|