figpay_gateway 1.0.4 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0fe878288323339cb8ff06b8a483a4966c21aadfbec9cac083b2fd251e3e5737
4
- data.tar.gz: c44c285af844da93fbc5bf874a742156590a6d8739ba2fb31cef4ef64edeb89b
3
+ metadata.gz: 9ec923a60a61aeb5312deb111f005184b4833b05eedf3a9337fb965a16204f21
4
+ data.tar.gz: fa75941e6843f2826fbf2e138441b97b7a677d5689b93c18bc7d1d54e94554f9
5
5
  SHA512:
6
- metadata.gz: db4f813d03fdd3fdbc398206c2ced3dc0e4043376b72c5a41cb4f882cbb5918285b9f8e170732021445579eddf00c123a9794e3989d00756eab12bfb3cddbdfc
7
- data.tar.gz: 2863a295a038446ae9a2fb07e422ce754e75db67cd4ab47e2e2067925158a01129e546543a105822940c436bb3da8840b1980f518a54f0efd4e17a1f920e8eb3
6
+ metadata.gz: faabba1898d07806adde203e1a819d1806a37160c58633ce2c9476d69e6b325efd9f91e59535ca73624ae0990940ec0325be1892cc9da7044ce23b82aee38629
7
+ data.tar.gz: 233b6175e7e2fffa3c7b2cbde0ec9b098aeeded6f08ac9a2d1213867432558a2b680335b3009f6f1c6222e30ce8500d856f89855389caf4f3aa7cc027dfa1096
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:
@@ -1,3 +1,3 @@
1
1
  module FigpayGateway
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -93,6 +93,7 @@ module NMIGateway
93
93
  # Recurring Billing
94
94
  query[:recurring] = options[:recurring ] # add_subscription
95
95
  query[:plan_id] = options [:plan_id]
96
+ query[:current_plan_id] = options [:current_plan_id] # identifies plan when editing
96
97
  query[:plan_name] = options [:plan_name]
97
98
  query[:plan_payments] = options [:plan_payments] # 0 until canceled
98
99
  query[:plan_amount] = options [:plan_amount]
@@ -11,6 +11,21 @@ module NMIGateway
11
11
  post query
12
12
  end
13
13
 
14
+ # NMIGateway::Recurring.new.edit_plan current_plan_id: "test-1"", plan_name: "Plan Name",, plan_amount: 2.99, month_frequency: 1, day_of_month: 1
15
+ def edit_plan(options = {})
16
+ query = set_query(options)
17
+ query[:recurring] = 'edit_plan'
18
+ query[:type] = 'recurring'
19
+ require_fields(:current_plan_id, :month_frequency, :day_of_month)
20
+ post query
21
+ end
22
+
23
+ # NMIGateway::Recurring.new.list_plans
24
+ def list_plans(options = {})
25
+ query = set_query(options)
26
+ query[:report_type] = 'recurring_plans'
27
+ get query
28
+ end
14
29
 
15
30
  # NMIGateway::Recurring.new.add_subscription_to_plan plan_id: "test-1", customer_vault_id: 664625840
16
31
  def add_subscription_to_plan(options = {})
@@ -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']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: figpay_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eggett