solidgate-ruby-sdk 0.1.11 → 0.1.13
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/Gemfile.lock +1 -1
- data/README.md +12 -0
- data/lib/solidgate/client.rb +30 -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: 9c09e01ee5693446c15395118e8cfbdaa984a116958ea3ca0b40571edfc792dc
|
|
4
|
+
data.tar.gz: 350e5a68b64c761e858dfe43b1be5543737cd439e9a3e7c008a42bd1ccceee05
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de3b3b8769772bd367f27bea5be25afa57c4e469e3ee267ca02d3dc930e47d34dff03f0f133e25b7ea48083c1efc4c5134aa617a8a60a36738188dfe5377216b
|
|
7
|
+
data.tar.gz: 9170f1bca57c7dc5b9a0a5f73cb5b05a0c9668b1bb564c59f9dfcc576d647fa7e81169cdf7016e6a8f69b89a90d9fe1170f576e9bb2d982886e84e2ee645b742
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -105,6 +105,9 @@ client.void_payment('payment_id_123')
|
|
|
105
105
|
|
|
106
106
|
# Refund by order ID (pay.solidgate.com)
|
|
107
107
|
client.refund(order_id: 'order_123', amount: 1000)
|
|
108
|
+
|
|
109
|
+
# Check order status (pay.solidgate.com)
|
|
110
|
+
client.order_status(order_id: 'order_123')
|
|
108
111
|
```
|
|
109
112
|
|
|
110
113
|
### Subscription Management
|
|
@@ -194,6 +197,15 @@ all_products = client.products
|
|
|
194
197
|
|
|
195
198
|
# Get prices for a specific product
|
|
196
199
|
prices = client.product_prices('product_id_123')
|
|
200
|
+
|
|
201
|
+
# Update an existing price
|
|
202
|
+
client.update_product_price('product_id_123', 'price_id_456',
|
|
203
|
+
status: "active",
|
|
204
|
+
product_price: 1000,
|
|
205
|
+
trial_price: 500,
|
|
206
|
+
currency: "USD",
|
|
207
|
+
country: "USA"
|
|
208
|
+
)
|
|
197
209
|
```
|
|
198
210
|
|
|
199
211
|
### Signature Generation
|
data/lib/solidgate/client.rb
CHANGED
|
@@ -289,6 +289,22 @@ module Solidgate
|
|
|
289
289
|
encrypt_payload(params)
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
+
# Updates an existing price for a product.
|
|
293
|
+
# Use this to modify the amount, currency, or billing interval of a price.
|
|
294
|
+
#
|
|
295
|
+
# @param product_id [String] the product identifier that owns the price
|
|
296
|
+
# @param price_id [String] the price identifier to update
|
|
297
|
+
# @param params [Hash] price update parameters:
|
|
298
|
+
# @return [Hash] updated price details including price_id
|
|
299
|
+
# @raise [InvalidRequestError] if product_id, price_id, or params are invalid
|
|
300
|
+
#
|
|
301
|
+
# @example Update a price amount
|
|
302
|
+
# client.update_product_price('prod_123', 'price_456', amount: 2000)
|
|
303
|
+
#
|
|
304
|
+
def update_product_price(product_id, price_id, params)
|
|
305
|
+
patch("/api/v1/products/#{product_id}/prices/#{price_id}", body: params)
|
|
306
|
+
end
|
|
307
|
+
|
|
292
308
|
# Generates an HMAC-SHA512 signature for API request authentication.
|
|
293
309
|
# The signature is required for all API requests and webhook validation.
|
|
294
310
|
#
|
|
@@ -357,6 +373,20 @@ module Solidgate
|
|
|
357
373
|
post("/api/v1/subscription/update-token", body: params)
|
|
358
374
|
end
|
|
359
375
|
|
|
376
|
+
# Retrieves order status from Solidgate pay domain.
|
|
377
|
+
#
|
|
378
|
+
# @param params [Hash] status request parameters:
|
|
379
|
+
# - :order_id [String] unique order identifier
|
|
380
|
+
# - :payment_id [String] optional payment identifier
|
|
381
|
+
# @return [Hash] order status response
|
|
382
|
+
# @raise [InvalidRequestError] if params are invalid
|
|
383
|
+
#
|
|
384
|
+
# @example Get order status
|
|
385
|
+
# client.order_status(order_id: 'order_123')
|
|
386
|
+
def order_status(params)
|
|
387
|
+
post('/api/v1/status', body: params, base_url: "https://pay.solidgate.com")
|
|
388
|
+
end
|
|
389
|
+
|
|
360
390
|
private
|
|
361
391
|
|
|
362
392
|
# 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.13
|
|
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-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|