square.rb 41.0.0.20250123 → 41.1.0.20250220
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.
- checksums.yaml +4 -4
- data/lib/square/api/base_api.rb +1 -1
- data/lib/square/api/refunds_api.rb +19 -1
- data/lib/square/client.rb +2 -2
- data/lib/square/configuration.rb +1 -1
- data/test/api/test_refunds_api.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66530242d5b7c9a805576a4b51f900819310be6e101db4488d71582a9967a16a
|
4
|
+
data.tar.gz: 6487c60c69d8acff48b510266a31a4f9d8c6806b367078ded65a35fb5d8adf27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfe4e71779d4540e08464b747075afecc0b8bd49c294b7e49c19ed8f470bbd5e1f516217af1591b16ce2d59d6b1855c81d8f9341c5ee0eb568d4dc97537b9d68
|
7
|
+
data.tar.gz: 7d3699b3c787c03319ccf7c17b42f4c1cf023c15bf8c3982bab5e5db87daea25eeca8cc0b56ce3f42d156e7afa8d7d3524045c5fa175d2c2ac02f6f58ce227a6
|
data/lib/square/api/base_api.rb
CHANGED
@@ -5,7 +5,7 @@ module Square
|
|
5
5
|
attr_accessor :config, :http_call_back
|
6
6
|
|
7
7
|
def self.user_agent
|
8
|
-
'Square-Ruby-SDK/41.
|
8
|
+
'Square-Ruby-SDK/41.1.0.20250220 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}'
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.user_agent_parameters
|
@@ -40,6 +40,18 @@ module Square
|
|
40
40
|
# to be returned in a single page. It is possible to receive fewer results
|
41
41
|
# than the specified limit on a given page. If the supplied value is
|
42
42
|
# greater than 100, no more than 100 results are returned. Default: 100
|
43
|
+
# @param [String] updated_at_begin_time Optional parameter: Indicates the
|
44
|
+
# start of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
45
|
+
# format. The range is determined using the `updated_at` field for each
|
46
|
+
# `PaymentRefund`. Default: if omitted, the time range starts at
|
47
|
+
# `begin_time`.
|
48
|
+
# @param [String] updated_at_end_time Optional parameter: Indicates the end
|
49
|
+
# of the time range to retrieve each `PaymentRefund` for, in RFC 3339
|
50
|
+
# format. The range is determined using the `updated_at` field for each
|
51
|
+
# `PaymentRefund`. Default: The current time.
|
52
|
+
# @param [String] sort_field Optional parameter: The field used to sort
|
53
|
+
# results by. The default is `CREATED_AT`. Current values include
|
54
|
+
# `CREATED_AT` and `UPDATED_AT`.
|
43
55
|
# @return [ApiResponse] the complete http response with raw body and status code.
|
44
56
|
def list_payment_refunds(begin_time: nil,
|
45
57
|
end_time: nil,
|
@@ -48,7 +60,10 @@ module Square
|
|
48
60
|
location_id: nil,
|
49
61
|
status: nil,
|
50
62
|
source_type: nil,
|
51
|
-
limit: nil
|
63
|
+
limit: nil,
|
64
|
+
updated_at_begin_time: nil,
|
65
|
+
updated_at_end_time: nil,
|
66
|
+
sort_field: nil)
|
52
67
|
new_api_call_builder
|
53
68
|
.request(new_request_builder(HttpMethodEnum::GET,
|
54
69
|
'/v2/refunds',
|
@@ -61,6 +76,9 @@ module Square
|
|
61
76
|
.query_param(new_parameter(status, key: 'status'))
|
62
77
|
.query_param(new_parameter(source_type, key: 'source_type'))
|
63
78
|
.query_param(new_parameter(limit, key: 'limit'))
|
79
|
+
.query_param(new_parameter(updated_at_begin_time, key: 'updated_at_begin_time'))
|
80
|
+
.query_param(new_parameter(updated_at_end_time, key: 'updated_at_end_time'))
|
81
|
+
.query_param(new_parameter(sort_field, key: 'sort_field'))
|
64
82
|
.header_param(new_parameter('application/json', key: 'accept'))
|
65
83
|
.auth(Single.new('global')))
|
66
84
|
.response(new_response_handler
|
data/lib/square/client.rb
CHANGED
@@ -5,7 +5,7 @@ module Square
|
|
5
5
|
attr_reader :config, :auth_managers
|
6
6
|
|
7
7
|
def sdk_version
|
8
|
-
'41.
|
8
|
+
'41.1.0.20250220'
|
9
9
|
end
|
10
10
|
|
11
11
|
def square_version
|
@@ -274,7 +274,7 @@ module Square
|
|
274
274
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
275
275
|
retry_methods: %i[get put], http_callback: nil, environment: 'production',
|
276
276
|
custom_url: 'https://connect.squareup.com', access_token: nil,
|
277
|
-
bearer_auth_credentials: nil, square_version: '2025-
|
277
|
+
bearer_auth_credentials: nil, square_version: '2025-02-20',
|
278
278
|
user_agent_detail: '', additional_headers: {}, config: nil
|
279
279
|
)
|
280
280
|
@config = if config.nil?
|
data/lib/square/configuration.rb
CHANGED
@@ -24,7 +24,7 @@ module Square
|
|
24
24
|
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
25
25
|
retry_methods: %i[get put], http_callback: nil, environment: 'production',
|
26
26
|
custom_url: 'https://connect.squareup.com', access_token: nil,
|
27
|
-
bearer_auth_credentials: nil, square_version: '2025-
|
27
|
+
bearer_auth_credentials: nil, square_version: '2025-02-20',
|
28
28
|
user_agent_detail: '', additional_headers: {}
|
29
29
|
)
|
30
30
|
|
@@ -22,9 +22,12 @@ class RefundsApiTests < ApiTestBase
|
|
22
22
|
location_id = nil
|
23
23
|
status = nil
|
24
24
|
source_type = nil
|
25
|
+
updated_at_begin_time = nil
|
26
|
+
updated_at_end_time = nil
|
27
|
+
sort_field = nil
|
25
28
|
|
26
29
|
# Perform the API call through the SDK function
|
27
|
-
result = @controller.list_payment_refunds(begin_time: begin_time, end_time: end_time, sort_order: sort_order, cursor: cursor, location_id: location_id, status: status, source_type: source_type)
|
30
|
+
result = @controller.list_payment_refunds(begin_time: begin_time, end_time: end_time, sort_order: sort_order, cursor: cursor, location_id: location_id, status: status, source_type: source_type, updated_at_begin_time: updated_at_begin_time, updated_at_end_time: updated_at_end_time, sort_field: sort_field)
|
28
31
|
|
29
32
|
# Test response code
|
30
33
|
assert_equal(200, @response_catcher.response.status_code)
|
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: 41.
|
4
|
+
version: 41.1.0.20250220
|
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: 2025-
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|