square.rb 46.1.0.20260819 → 47.0.0.20260916
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/.fern/metadata.json +2 -2
- data/.fern/replay.lock +7 -1
- data/lib/square/client.rb +1 -1
- data/lib/square/inventory/client.rb +0 -25
- data/lib/square/locations/transactions/client.rb +0 -82
- data/lib/square/version.rb +1 -1
- data/lib/square.rb +0 -5
- data/reference.md +0 -204
- data/wiremock/wiremock-mappings.json +1 -1
- metadata +2 -7
- data/lib/square/inventory/types/get_transfer_inventory_request.rb +0 -11
- data/lib/square/locations/transactions/types/capture_transactions_request.rb +0 -14
- data/lib/square/locations/transactions/types/void_transactions_request.rb +0 -14
- data/lib/square/types/capture_transaction_response.rb +0 -11
- data/lib/square/types/void_transaction_response.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9d17f61ce18b7ebf510871533eeea0193eec9ae13394845d0ea206e5b9ce9363
|
|
4
|
+
data.tar.gz: 4340f9e0a1da7a9d74b0cbc8c05fdbfc0ae18e15870e1679522fa277f32eb5f4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cb9e1c552005559ec72d7394e41a482543e3136866d7e804498206d2535ff23f9391df1d14b66d90f2e278385d16f2def9107b91cc116e086f24449d78a09c6
|
|
7
|
+
data.tar.gz: f2ff8e7e19d59c8a321fdd5c17a41998074e17506abd2ba30768c9301c8539eb6eacf4aef269cea0b76343c58711d28a94cabe3174df9492b350f19c3f15e0f6
|
data/.fern/metadata.json
CHANGED
data/.fern/replay.lock
CHANGED
|
@@ -24,5 +24,11 @@ generations:
|
|
|
24
24
|
cli_version: unknown
|
|
25
25
|
generator_versions:
|
|
26
26
|
fernapi/fern-ruby-sdk: 1.0.0-rc84
|
|
27
|
-
|
|
27
|
+
- commit_sha: 7da5bc01e7361877608311c5b904b38317ee4bc8
|
|
28
|
+
tree_hash: e7dd7fecf9a3a00da227b02790601543c85a05e6
|
|
29
|
+
timestamp: 2026-09-15T18:47:45.322Z
|
|
30
|
+
cli_version: unknown
|
|
31
|
+
generator_versions:
|
|
32
|
+
fernapi/fern-ruby-sdk: 1.0.0-rc84
|
|
33
|
+
current_generation: 7da5bc01e7361877608311c5b904b38317ee4bc8
|
|
28
34
|
patches: []
|
data/lib/square/client.rb
CHANGED
|
@@ -10,7 +10,7 @@ module Square
|
|
|
10
10
|
@raw_client = Square::Internal::Http::RawClient.new(
|
|
11
11
|
base_url: base_url || Square::Environment::PRODUCTION,
|
|
12
12
|
headers: {
|
|
13
|
-
"User-Agent" => "square.rb/
|
|
13
|
+
"User-Agent" => "square.rb/47.0.0.20260916",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
Authorization: "Bearer #{token}"
|
|
16
16
|
}
|
|
@@ -296,31 +296,6 @@ module Square
|
|
|
296
296
|
end
|
|
297
297
|
end
|
|
298
298
|
|
|
299
|
-
# Returns the [InventoryTransfer](entity:InventoryTransfer) object
|
|
300
|
-
# with the provided `transfer_id`.
|
|
301
|
-
#
|
|
302
|
-
# @return [Square::Types::GetInventoryTransferResponse]
|
|
303
|
-
def get_transfer(request_options: {}, **params)
|
|
304
|
-
_request = Square::Internal::JSON::Request.new(
|
|
305
|
-
base_url: request_options[:base_url],
|
|
306
|
-
method: "GET",
|
|
307
|
-
path: "v2/inventory/transfers/#{params[:transfer_id]}",
|
|
308
|
-
request_options: request_options
|
|
309
|
-
)
|
|
310
|
-
begin
|
|
311
|
-
_response = @client.send(_request)
|
|
312
|
-
rescue Net::HTTPRequestTimeout
|
|
313
|
-
raise Square::Errors::TimeoutError
|
|
314
|
-
end
|
|
315
|
-
code = _response.code.to_i
|
|
316
|
-
if code.between?(200, 299)
|
|
317
|
-
Square::Types::GetInventoryTransferResponse.load(_response.body)
|
|
318
|
-
else
|
|
319
|
-
error_class = Square::Errors::ResponseError.subclass_for_code(code)
|
|
320
|
-
raise error_class.new(_response.body, code: code)
|
|
321
|
-
end
|
|
322
|
-
end
|
|
323
|
-
|
|
324
299
|
# Retrieves the current calculated stock count for a given
|
|
325
300
|
# [CatalogObject](entity:CatalogObject) at a given set of
|
|
326
301
|
# [Location](entity:Location)s. Responses are paginated and unsorted.
|
|
@@ -97,88 +97,6 @@ module Square
|
|
|
97
97
|
raise error_class.new(response.body, code: code)
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
|
-
|
|
101
|
-
# Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
|
|
102
|
-
# endpoint with a `delay_capture` value of `true`.
|
|
103
|
-
#
|
|
104
|
-
#
|
|
105
|
-
# See [Delayed capture
|
|
106
|
-
# transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
|
|
107
|
-
# for more information.
|
|
108
|
-
#
|
|
109
|
-
# @param request_options [Hash]
|
|
110
|
-
# @param params [Hash]
|
|
111
|
-
# @option request_options [String] :base_url
|
|
112
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
113
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
114
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
115
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
116
|
-
# @option params [String] :location_id
|
|
117
|
-
# @option params [String] :transaction_id
|
|
118
|
-
#
|
|
119
|
-
# @return [Square::Types::CaptureTransactionResponse]
|
|
120
|
-
def capture(request_options: {}, **params)
|
|
121
|
-
params = Square::Internal::Types::Utils.normalize_keys(params)
|
|
122
|
-
request = Square::Internal::JSON::Request.new(
|
|
123
|
-
base_url: request_options[:base_url],
|
|
124
|
-
method: "POST",
|
|
125
|
-
path: "v2/locations/#{params[:location_id]}/transactions/#{params[:transaction_id]}/capture",
|
|
126
|
-
request_options: request_options
|
|
127
|
-
)
|
|
128
|
-
begin
|
|
129
|
-
response = @client.send(request)
|
|
130
|
-
rescue Net::HTTPRequestTimeout
|
|
131
|
-
raise Square::Errors::TimeoutError
|
|
132
|
-
end
|
|
133
|
-
code = response.code.to_i
|
|
134
|
-
if code.between?(200, 299)
|
|
135
|
-
Square::Types::CaptureTransactionResponse.load(response.body)
|
|
136
|
-
else
|
|
137
|
-
error_class = Square::Errors::ResponseError.subclass_for_code(code)
|
|
138
|
-
raise error_class.new(response.body, code: code)
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
|
|
142
|
-
# Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
|
|
143
|
-
# endpoint with a `delay_capture` value of `true`.
|
|
144
|
-
#
|
|
145
|
-
#
|
|
146
|
-
# See [Delayed capture
|
|
147
|
-
# transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
|
|
148
|
-
# for more information.
|
|
149
|
-
#
|
|
150
|
-
# @param request_options [Hash]
|
|
151
|
-
# @param params [Hash]
|
|
152
|
-
# @option request_options [String] :base_url
|
|
153
|
-
# @option request_options [Hash{String => Object}] :additional_headers
|
|
154
|
-
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
155
|
-
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
156
|
-
# @option request_options [Integer] :timeout_in_seconds
|
|
157
|
-
# @option params [String] :location_id
|
|
158
|
-
# @option params [String] :transaction_id
|
|
159
|
-
#
|
|
160
|
-
# @return [Square::Types::VoidTransactionResponse]
|
|
161
|
-
def void(request_options: {}, **params)
|
|
162
|
-
params = Square::Internal::Types::Utils.normalize_keys(params)
|
|
163
|
-
request = Square::Internal::JSON::Request.new(
|
|
164
|
-
base_url: request_options[:base_url],
|
|
165
|
-
method: "POST",
|
|
166
|
-
path: "v2/locations/#{params[:location_id]}/transactions/#{params[:transaction_id]}/void",
|
|
167
|
-
request_options: request_options
|
|
168
|
-
)
|
|
169
|
-
begin
|
|
170
|
-
response = @client.send(request)
|
|
171
|
-
rescue Net::HTTPRequestTimeout
|
|
172
|
-
raise Square::Errors::TimeoutError
|
|
173
|
-
end
|
|
174
|
-
code = response.code.to_i
|
|
175
|
-
if code.between?(200, 299)
|
|
176
|
-
Square::Types::VoidTransactionResponse.load(response.body)
|
|
177
|
-
else
|
|
178
|
-
error_class = Square::Errors::ResponseError.subclass_for_code(code)
|
|
179
|
-
raise error_class.new(response.body, code: code)
|
|
180
|
-
end
|
|
181
|
-
end
|
|
182
100
|
end
|
|
183
101
|
end
|
|
184
102
|
end
|
data/lib/square/version.rb
CHANGED
data/lib/square.rb
CHANGED
|
@@ -483,7 +483,6 @@ require_relative "square/types/transfer_order_line"
|
|
|
483
483
|
require_relative "square/types/transfer_order_status"
|
|
484
484
|
require_relative "square/types/transfer_order"
|
|
485
485
|
require_relative "square/types/cancel_transfer_order_response"
|
|
486
|
-
require_relative "square/types/capture_transaction_response"
|
|
487
486
|
require_relative "square/types/card_automatically_updated_event_object"
|
|
488
487
|
require_relative "square/types/card_automatically_updated_event_data"
|
|
489
488
|
require_relative "square/types/card_automatically_updated_event"
|
|
@@ -1378,7 +1377,6 @@ require_relative "square/types/vendor_updated_event_object"
|
|
|
1378
1377
|
require_relative "square/types/vendor_updated_event_data"
|
|
1379
1378
|
require_relative "square/types/vendor_updated_event"
|
|
1380
1379
|
require_relative "square/types/visibility_filter"
|
|
1381
|
-
require_relative "square/types/void_transaction_response"
|
|
1382
1380
|
require_relative "square/types/get_loyalty_account_request"
|
|
1383
1381
|
require_relative "square/types/get_loyalty_program_request"
|
|
1384
1382
|
require_relative "square/types/get_loyalty_promotion_request"
|
|
@@ -1538,7 +1536,6 @@ require_relative "square/inventory/types/deprecated_get_physical_count_inventory
|
|
|
1538
1536
|
require_relative "square/inventory/types/get_physical_count_inventory_request"
|
|
1539
1537
|
require_relative "square/inventory/types/get_inventory_request"
|
|
1540
1538
|
require_relative "square/inventory/types/changes_inventory_request"
|
|
1541
|
-
require_relative "square/inventory/types/get_transfer_inventory_request"
|
|
1542
1539
|
require_relative "square/invoices/client"
|
|
1543
1540
|
require_relative "square/invoices/types/list_invoices_request"
|
|
1544
1541
|
require_relative "square/invoices/types/create_invoice_request"
|
|
@@ -1762,8 +1759,6 @@ require_relative "square/locations/custom_attributes/types/delete_custom_attribu
|
|
|
1762
1759
|
require_relative "square/locations/transactions/client"
|
|
1763
1760
|
require_relative "square/locations/transactions/types/list_transactions_request"
|
|
1764
1761
|
require_relative "square/locations/transactions/types/get_transactions_request"
|
|
1765
|
-
require_relative "square/locations/transactions/types/capture_transactions_request"
|
|
1766
|
-
require_relative "square/locations/transactions/types/void_transactions_request"
|
|
1767
1762
|
require_relative "square/loyalty/accounts/client"
|
|
1768
1763
|
require_relative "square/loyalty/accounts/types/create_loyalty_account_request"
|
|
1769
1764
|
require_relative "square/loyalty/accounts/types/search_loyalty_accounts_request"
|
data/reference.md
CHANGED
|
@@ -7799,54 +7799,6 @@ See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagin
|
|
|
7799
7799
|
</dl>
|
|
7800
7800
|
|
|
7801
7801
|
|
|
7802
|
-
</dd>
|
|
7803
|
-
</dl>
|
|
7804
|
-
</details>
|
|
7805
|
-
|
|
7806
|
-
<details><summary><code>client.inventory.<a href="/lib/square/inventory/client.rb">get_transfer</a>(transfer_id) -> </code></summary>
|
|
7807
|
-
<dl>
|
|
7808
|
-
<dd>
|
|
7809
|
-
|
|
7810
|
-
#### 🔌 Usage
|
|
7811
|
-
|
|
7812
|
-
<dl>
|
|
7813
|
-
<dd>
|
|
7814
|
-
|
|
7815
|
-
<dl>
|
|
7816
|
-
<dd>
|
|
7817
|
-
|
|
7818
|
-
```ruby
|
|
7819
|
-
client.inventory.get_transfer(transfer_id: 'transfer_id');
|
|
7820
|
-
```
|
|
7821
|
-
</dd>
|
|
7822
|
-
</dl>
|
|
7823
|
-
</dd>
|
|
7824
|
-
</dl>
|
|
7825
|
-
|
|
7826
|
-
#### ⚙️ Parameters
|
|
7827
|
-
|
|
7828
|
-
<dl>
|
|
7829
|
-
<dd>
|
|
7830
|
-
|
|
7831
|
-
<dl>
|
|
7832
|
-
<dd>
|
|
7833
|
-
|
|
7834
|
-
**transfer_id:** `String`
|
|
7835
|
-
|
|
7836
|
-
</dd>
|
|
7837
|
-
</dl>
|
|
7838
|
-
|
|
7839
|
-
<dl>
|
|
7840
|
-
<dd>
|
|
7841
|
-
|
|
7842
|
-
**request_options:** `Square::Inventory::RequestOptions`
|
|
7843
|
-
|
|
7844
|
-
</dd>
|
|
7845
|
-
</dl>
|
|
7846
|
-
</dd>
|
|
7847
|
-
</dl>
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
7802
|
</dd>
|
|
7851
7803
|
</dl>
|
|
7852
7804
|
</details>
|
|
@@ -24931,162 +24883,6 @@ client.locations.transactions.get(
|
|
|
24931
24883
|
</dl>
|
|
24932
24884
|
|
|
24933
24885
|
|
|
24934
|
-
</dd>
|
|
24935
|
-
</dl>
|
|
24936
|
-
</details>
|
|
24937
|
-
|
|
24938
|
-
<details><summary><code>client.locations.transactions.<a href="/lib/square/locations/transactions/client.rb">capture</a>(location_id, transaction_id) -> Square::Types::CaptureTransactionResponse</code></summary>
|
|
24939
|
-
<dl>
|
|
24940
|
-
<dd>
|
|
24941
|
-
|
|
24942
|
-
#### 📝 Description
|
|
24943
|
-
|
|
24944
|
-
<dl>
|
|
24945
|
-
<dd>
|
|
24946
|
-
|
|
24947
|
-
<dl>
|
|
24948
|
-
<dd>
|
|
24949
|
-
|
|
24950
|
-
Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
|
|
24951
|
-
endpoint with a `delay_capture` value of `true`.
|
|
24952
|
-
|
|
24953
|
-
|
|
24954
|
-
See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
|
|
24955
|
-
for more information.
|
|
24956
|
-
</dd>
|
|
24957
|
-
</dl>
|
|
24958
|
-
</dd>
|
|
24959
|
-
</dl>
|
|
24960
|
-
|
|
24961
|
-
#### 🔌 Usage
|
|
24962
|
-
|
|
24963
|
-
<dl>
|
|
24964
|
-
<dd>
|
|
24965
|
-
|
|
24966
|
-
<dl>
|
|
24967
|
-
<dd>
|
|
24968
|
-
|
|
24969
|
-
```ruby
|
|
24970
|
-
client.locations.transactions.capture(
|
|
24971
|
-
location_id: 'location_id',
|
|
24972
|
-
transaction_id: 'transaction_id'
|
|
24973
|
-
);
|
|
24974
|
-
```
|
|
24975
|
-
</dd>
|
|
24976
|
-
</dl>
|
|
24977
|
-
</dd>
|
|
24978
|
-
</dl>
|
|
24979
|
-
|
|
24980
|
-
#### ⚙️ Parameters
|
|
24981
|
-
|
|
24982
|
-
<dl>
|
|
24983
|
-
<dd>
|
|
24984
|
-
|
|
24985
|
-
<dl>
|
|
24986
|
-
<dd>
|
|
24987
|
-
|
|
24988
|
-
**location_id:** `String` —
|
|
24989
|
-
|
|
24990
|
-
</dd>
|
|
24991
|
-
</dl>
|
|
24992
|
-
|
|
24993
|
-
<dl>
|
|
24994
|
-
<dd>
|
|
24995
|
-
|
|
24996
|
-
**transaction_id:** `String` —
|
|
24997
|
-
|
|
24998
|
-
</dd>
|
|
24999
|
-
</dl>
|
|
25000
|
-
|
|
25001
|
-
<dl>
|
|
25002
|
-
<dd>
|
|
25003
|
-
|
|
25004
|
-
**request_options:** `Square::Locations::Transactions::RequestOptions`
|
|
25005
|
-
|
|
25006
|
-
</dd>
|
|
25007
|
-
</dl>
|
|
25008
|
-
</dd>
|
|
25009
|
-
</dl>
|
|
25010
|
-
|
|
25011
|
-
|
|
25012
|
-
</dd>
|
|
25013
|
-
</dl>
|
|
25014
|
-
</details>
|
|
25015
|
-
|
|
25016
|
-
<details><summary><code>client.locations.transactions.<a href="/lib/square/locations/transactions/client.rb">void</a>(location_id, transaction_id) -> Square::Types::VoidTransactionResponse</code></summary>
|
|
25017
|
-
<dl>
|
|
25018
|
-
<dd>
|
|
25019
|
-
|
|
25020
|
-
#### 📝 Description
|
|
25021
|
-
|
|
25022
|
-
<dl>
|
|
25023
|
-
<dd>
|
|
25024
|
-
|
|
25025
|
-
<dl>
|
|
25026
|
-
<dd>
|
|
25027
|
-
|
|
25028
|
-
Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
|
|
25029
|
-
endpoint with a `delay_capture` value of `true`.
|
|
25030
|
-
|
|
25031
|
-
|
|
25032
|
-
See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
|
|
25033
|
-
for more information.
|
|
25034
|
-
</dd>
|
|
25035
|
-
</dl>
|
|
25036
|
-
</dd>
|
|
25037
|
-
</dl>
|
|
25038
|
-
|
|
25039
|
-
#### 🔌 Usage
|
|
25040
|
-
|
|
25041
|
-
<dl>
|
|
25042
|
-
<dd>
|
|
25043
|
-
|
|
25044
|
-
<dl>
|
|
25045
|
-
<dd>
|
|
25046
|
-
|
|
25047
|
-
```ruby
|
|
25048
|
-
client.locations.transactions.void(
|
|
25049
|
-
location_id: 'location_id',
|
|
25050
|
-
transaction_id: 'transaction_id'
|
|
25051
|
-
);
|
|
25052
|
-
```
|
|
25053
|
-
</dd>
|
|
25054
|
-
</dl>
|
|
25055
|
-
</dd>
|
|
25056
|
-
</dl>
|
|
25057
|
-
|
|
25058
|
-
#### ⚙️ Parameters
|
|
25059
|
-
|
|
25060
|
-
<dl>
|
|
25061
|
-
<dd>
|
|
25062
|
-
|
|
25063
|
-
<dl>
|
|
25064
|
-
<dd>
|
|
25065
|
-
|
|
25066
|
-
**location_id:** `String` —
|
|
25067
|
-
|
|
25068
|
-
</dd>
|
|
25069
|
-
</dl>
|
|
25070
|
-
|
|
25071
|
-
<dl>
|
|
25072
|
-
<dd>
|
|
25073
|
-
|
|
25074
|
-
**transaction_id:** `String` —
|
|
25075
|
-
|
|
25076
|
-
</dd>
|
|
25077
|
-
</dl>
|
|
25078
|
-
|
|
25079
|
-
<dl>
|
|
25080
|
-
<dd>
|
|
25081
|
-
|
|
25082
|
-
**request_options:** `Square::Locations::Transactions::RequestOptions`
|
|
25083
|
-
|
|
25084
|
-
</dd>
|
|
25085
|
-
</dl>
|
|
25086
|
-
</dd>
|
|
25087
|
-
</dl>
|
|
25088
|
-
|
|
25089
|
-
|
|
25090
24886
|
</dd>
|
|
25091
24887
|
</dl>
|
|
25092
24888
|
</details>
|