Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"generatorConfig": {
"enableWireTests": true
},
"originGitCommit": "b05364cda2b85e35d8daa9ff2c24bbabbbd9652a",
"sdkVersion": "46.1.0.20260819"
"originGitCommit": "37b3f34f979590cc8d882c9ab2fe92748bfb0556",
"sdkVersion": "47.0.0.20260916"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
PATH
remote: .
specs:
square.rb (46.1.0.20260819)
square.rb (47.0.0.20260916)

GEM
remote: https://rubygems.org/
specs:
addressable (2.9.0)
public_suffix (>= 2.0.2, < 8.0)
ast (2.4.3)
bigdecimal (4.1.2)
bigdecimal (4.1.3)
coderay (1.1.3)
crack (1.0.1)
bigdecimal
rexml
hashdiff (1.2.1)
io-console (0.9.2)
json (2.21.2)
io-console (0.9.3)
json (3.0.2)
language_server-protocol (3.17.0.6)
lint_roller (1.1.0)
method_source (1.1.0)
minitest (5.27.0)
minitest-rg (5.4.0)
minitest (>= 5.0, < 7)
parallel (2.1.0)
parallel (2.2.0)
parser (3.3.12.0)
ast (~> 2.4.1)
racc
Expand All @@ -40,8 +40,8 @@ GEM
reline (0.7.0)
io-console (~> 0.5)
rexml (3.4.4)
rubocop (1.89.0)
json (~> 2.3)
rubocop (1.91.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
Expand All @@ -62,14 +62,14 @@ GEM
unicode-display_width (3.2.0)
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
webmock (3.26.2)
webmock (3.26.4)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
ruby
x86_64-linux
x86_64-linux-musl

DEPENDENCIES
minitest (~> 5.16)
Expand Down
2 changes: 0 additions & 2 deletions lib/square.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@
require_relative "square/types/transfer_order_status"
require_relative "square/types/transfer_order"
require_relative "square/types/cancel_transfer_order_response"
require_relative "square/types/capture_transaction_response"
require_relative "square/types/card_automatically_updated_event_object"
require_relative "square/types/card_automatically_updated_event_data"
require_relative "square/types/card_automatically_updated_event"
Expand Down Expand Up @@ -1378,7 +1377,6 @@
require_relative "square/types/vendor_updated_event_data"
require_relative "square/types/vendor_updated_event"
require_relative "square/types/visibility_filter"
require_relative "square/types/void_transaction_response"
require_relative "square/types/get_loyalty_account_request"
require_relative "square/types/get_loyalty_program_request"
require_relative "square/types/get_loyalty_promotion_request"
Expand Down
2 changes: 1 addition & 1 deletion lib/square/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def initialize(base_url: nil, token: ENV.fetch("SQUARE_TOKEN", nil))
@raw_client = Square::Internal::Http::RawClient.new(
base_url: base_url || Square::Environment::PRODUCTION,
headers: {
"User-Agent" => "square.rb/46.1.0.20260819",
"User-Agent" => "square.rb/47.0.0.20260916",
"X-Fern-Language" => "Ruby",
Authorization: "Bearer #{token}"
}
Expand Down
40 changes: 10 additions & 30 deletions lib/square/locations/transactions/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ def get(request_options: {}, **params)
end
end

# Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
# endpoint with a `delay_capture` value of `true`.
#
#
# See [Delayed capture
# transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
# for more information.
#
# @param request_options [Hash]
# @param params [Hash]
# @option request_options [String] :base_url
Expand All @@ -116,7 +108,7 @@ def get(request_options: {}, **params)
# @option params [String] :location_id
# @option params [String] :transaction_id
#
# @return [Square::Types::CaptureTransactionResponse]
# @return [untyped]
def capture(request_options: {}, **params)
params = Square::Internal::Types::Utils.normalize_keys(params)
request = Square::Internal::JSON::Request.new(
Expand All @@ -131,22 +123,12 @@ def capture(request_options: {}, **params)
raise Square::Errors::TimeoutError
end
code = response.code.to_i
if code.between?(200, 299)
Square::Types::CaptureTransactionResponse.load(response.body)
else
error_class = Square::Errors::ResponseError.subclass_for_code(code)
raise error_class.new(response.body, code: code)
end
return if code.between?(200, 299)

error_class = Square::Errors::ResponseError.subclass_for_code(code)
raise error_class.new(response.body, code: code)
end

# Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
# endpoint with a `delay_capture` value of `true`.
#
#
# See [Delayed capture
# transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
# for more information.
#
# @param request_options [Hash]
# @param params [Hash]
# @option request_options [String] :base_url
Expand All @@ -157,7 +139,7 @@ def capture(request_options: {}, **params)
# @option params [String] :location_id
# @option params [String] :transaction_id
#
# @return [Square::Types::VoidTransactionResponse]
# @return [untyped]
def void(request_options: {}, **params)
params = Square::Internal::Types::Utils.normalize_keys(params)
request = Square::Internal::JSON::Request.new(
Expand All @@ -172,12 +154,10 @@ def void(request_options: {}, **params)
raise Square::Errors::TimeoutError
end
code = response.code.to_i
if code.between?(200, 299)
Square::Types::VoidTransactionResponse.load(response.body)
else
error_class = Square::Errors::ResponseError.subclass_for_code(code)
raise error_class.new(response.body, code: code)
end
return if code.between?(200, 299)

error_class = Square::Errors::ResponseError.subclass_for_code(code)
raise error_class.new(response.body, code: code)
end
end
end
Expand Down
11 changes: 0 additions & 11 deletions lib/square/types/capture_transaction_response.rb

This file was deleted.

11 changes: 0 additions & 11 deletions lib/square/types/void_transaction_response.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/square/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Square
VERSION = "46.1.0.20260819"
VERSION = "47.0.0.20260916"
end
50 changes: 6 additions & 44 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -24935,29 +24935,10 @@ client.locations.transactions.get(
</dl>
</details>

<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>
<details><summary><code>client.locations.transactions.<a href="/lib/square/locations/transactions/client.rb">capture</a>(location_id, transaction_id) -> </code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Captures a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -24985,15 +24966,15 @@ client.locations.transactions.capture(
<dl>
<dd>

**location_id:** `String` —
**location_id:** `String`

</dd>
</dl>

<dl>
<dd>

**transaction_id:** `String` —
**transaction_id:** `String`

</dd>
</dl>
Expand All @@ -25013,29 +24994,10 @@ client.locations.transactions.capture(
</dl>
</details>

<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>
<details><summary><code>client.locations.transactions.<a href="/lib/square/locations/transactions/client.rb">void</a>(location_id, transaction_id) -> </code></summary>
<dl>
<dd>

#### 📝 Description

<dl>
<dd>

<dl>
<dd>

Cancels a transaction that was created with the [Charge](api-endpoint:Transactions-Charge)
endpoint with a `delay_capture` value of `true`.


See [Delayed capture transactions](https://developer.squareup.com/docs/payments/transactions/overview#delayed-capture)
for more information.
</dd>
</dl>
</dd>
</dl>

#### 🔌 Usage

<dl>
Expand Down Expand Up @@ -25063,15 +25025,15 @@ client.locations.transactions.void(
<dl>
<dd>

**location_id:** `String` —
**location_id:** `String`

</dd>
</dl>

<dl>
<dd>

**transaction_id:** `String` —
**transaction_id:** `String`

</dd>
</dl>
Expand Down
2 changes: 1 addition & 1 deletion wiremock/wiremock-mappings.json

Large diffs are not rendered by default.

Loading