figpay_gateway 1.0.4 → 1.0.5
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/README.md +14 -0
- data/lib/figpay_gateway/version.rb +1 -1
- data/lib/nmi_gateway/recurring.rb +6 -0
- data/lib/nmi_gateway/response.rb +4 -0
- 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: 68c11ff01e6b80e582293dea14fada0b65e335f50f5125e86863522b6438173f
|
|
4
|
+
data.tar.gz: d1fda8b1abc5233cc39a35eb849b8896143726c4a456724e8128edcd381ecfd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4f1b9a51388850aa23f9768e7025710f8fb8ba1140ca509800ed08c4d7c3753519abecdc07ad05870d7ff6c0d2d1de8da3bf797bf10796ec4a422d73f381140
|
|
7
|
+
data.tar.gz: 31ad9e10483fd543a809ad9176af4fd659b4013105f1e38454ae67586e6ac7e50617e8ac7174370ac881a86799b65672bac9296f5cd6b1676a7463ebc97da053
|
data/README.md
CHANGED
|
@@ -329,6 +329,20 @@ plan = recurring.create_plan(
|
|
|
329
329
|
)
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
+
#### List All Plans
|
|
333
|
+
|
|
334
|
+
Retrieve all recurring billing plans:
|
|
335
|
+
|
|
336
|
+
```ruby
|
|
337
|
+
plans = FigpayGateway::Recurring.new.list_plans
|
|
338
|
+
|
|
339
|
+
if plans.success?
|
|
340
|
+
puts "Plans retrieved successfully"
|
|
341
|
+
end
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
**Note:** The Query API may not be available on all accounts. Contact FigPay support if you encounter issues.
|
|
345
|
+
|
|
332
346
|
#### Subscribe Customer to a Plan
|
|
333
347
|
|
|
334
348
|
Add a vaulted customer to an existing plan:
|
|
@@ -11,6 +11,12 @@ module NMIGateway
|
|
|
11
11
|
post query
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# NMIGateway::Recurring.new.list_plans
|
|
15
|
+
def list_plans(options = {})
|
|
16
|
+
query = set_query(options)
|
|
17
|
+
query[:report_type] = 'recurring_plans'
|
|
18
|
+
get query
|
|
19
|
+
end
|
|
14
20
|
|
|
15
21
|
# NMIGateway::Recurring.new.add_subscription_to_plan plan_id: "test-1", customer_vault_id: 664625840
|
|
16
22
|
def add_subscription_to_plan(options = {})
|
data/lib/nmi_gateway/response.rb
CHANGED
|
@@ -89,6 +89,10 @@ module NMIGateway
|
|
|
89
89
|
parsed_response
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
def set_recurring_plans
|
|
93
|
+
parsed_response
|
|
94
|
+
end
|
|
95
|
+
|
|
92
96
|
def set_customer_vault
|
|
93
97
|
parsed_response
|
|
94
98
|
if parsed_response && parsed_response['nm_response'] && parsed_response['nm_response']['customer_vault'] && customers = parsed_response['nm_response']['customer_vault']['customer']
|