solidgate-ruby-sdk 0.1.10 → 0.1.11
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/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/README.md +11 -5
- data/lib/solidgate/client.rb +17 -0
- data/lib/solidgate/version.rb +1 -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: ba80035d65a601fc4acd8eef2809b188d165589931403b8fa2b7b05d8766b393
|
|
4
|
+
data.tar.gz: dcb4ec3eac2443669916e75eefcc040a65cfe00e271aab353473305b07c23b57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 46322d80c7d7694a1e662be9545740af7fb16f2bb6b6d4189476a17ba01d7f65cba006ad22e3c7986c755ed8d5333bc16d7557bff30ce26560984cacf5f16d63
|
|
7
|
+
data.tar.gz: bfa35892c6ec90740614e4d773abe38e22d800b52196ff5b287135d8ca0214f95ba66d673eb613c76147a7fc2371d3db3c08494030bb35842433529106f07cc7
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.10] - 2026-02-03
|
|
11
|
+
- Added refund method example to README
|
|
12
|
+
|
|
10
13
|
## [0.1.9] - 2026-02-03
|
|
11
14
|
- Added documentation for restore_subscription method
|
|
12
15
|
- Added restore_subscription to README.md usage examples
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -103,11 +103,8 @@ client.capture_payment('payment_id_123', amount: 500)
|
|
|
103
103
|
# Void an authorized payment (before settlement)
|
|
104
104
|
client.void_payment('payment_id_123')
|
|
105
105
|
|
|
106
|
-
# Refund
|
|
107
|
-
client.
|
|
108
|
-
|
|
109
|
-
# Partial refund
|
|
110
|
-
client.refund_payment('payment_id_123', amount: 500, reason: 'Customer request')
|
|
106
|
+
# Refund by order ID (pay.solidgate.com)
|
|
107
|
+
client.refund(order_id: 'order_123', amount: 1000)
|
|
111
108
|
```
|
|
112
109
|
|
|
113
110
|
### Subscription Management
|
|
@@ -142,6 +139,15 @@ client.cancel_subscription(
|
|
|
142
139
|
client.restore_subscription(
|
|
143
140
|
subscription_id: 'sub_123'
|
|
144
141
|
)
|
|
142
|
+
|
|
143
|
+
### Update subscription payment method
|
|
144
|
+
|
|
145
|
+
# Update the payment token associated with an existing subscription
|
|
146
|
+
client.update_subscription_payment_method(
|
|
147
|
+
subscription_id: 'sub_123',
|
|
148
|
+
token: 'tok_abc123'
|
|
149
|
+
)
|
|
150
|
+
|
|
145
151
|
```
|
|
146
152
|
|
|
147
153
|
### Subscription Pause Scheduling
|
data/lib/solidgate/client.rb
CHANGED
|
@@ -340,6 +340,23 @@ module Solidgate
|
|
|
340
340
|
post("/api/v1/refund", body: params, base_url: "https://pay.solidgate.com")
|
|
341
341
|
end
|
|
342
342
|
|
|
343
|
+
# Updates the payment method (token) associated with an existing subscription.
|
|
344
|
+
#
|
|
345
|
+
# @param params [Hash] update parameters including:
|
|
346
|
+
# - :subscription_id [String] the subscription to update
|
|
347
|
+
# - :token [String] new payment token / payment method identifier
|
|
348
|
+
# @return [Hash] response from the API with updated subscription/payment method details
|
|
349
|
+
# @raise [InvalidRequestError] if params are invalid
|
|
350
|
+
#
|
|
351
|
+
# @example Update a subscription's payment method
|
|
352
|
+
# client.update_subscription_payment_method(
|
|
353
|
+
# subscription_id: 'sub_123',
|
|
354
|
+
# token: 'tok_abc123'
|
|
355
|
+
# )
|
|
356
|
+
def update_subscription_payment_method(params)
|
|
357
|
+
post("/api/v1/subscription/update-token", body: params)
|
|
358
|
+
end
|
|
359
|
+
|
|
343
360
|
private
|
|
344
361
|
|
|
345
362
|
# Builds a Configuration object from the provided options.
|
data/lib/solidgate/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solidgate-ruby-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hector Carrillo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|