solidgate-ruby-sdk 0.1.12 → 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 +14 -0
- data/lib/solidgate/version.rb +1 -1
- metadata +1 -1
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
|
@@ -373,6 +373,20 @@ module Solidgate
|
|
|
373
373
|
post("/api/v1/subscription/update-token", body: params)
|
|
374
374
|
end
|
|
375
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
|
+
|
|
376
390
|
private
|
|
377
391
|
|
|
378
392
|
# Builds a Configuration object from the provided options.
|
data/lib/solidgate/version.rb
CHANGED