Class: FatZebra::PaymentPlan
- Inherits:
-
APIResource
- Object
- FatZebraObject
- APIResource
- FatZebra::PaymentPlan
- Includes:
- APIOperation::Delete, APIOperation::Find, APIOperation::Save
- Defined in:
- lib/fat_zebra/payment_plan.rb
Overview
FatZebra Payment Plan
Manage payment plan for the API
-
save
-
find
-
delete
-
suspend!
-
active!
Instance Attribute Summary
Attributes inherited from FatZebraObject
Attributes included from ObjectHelper
Instance Method Summary collapse
-
#active!(params = {}, options = {}) ⇒ FatZebra::PaymentPlan
Activate a payment plan.
-
#suspend!(params = {}, options = {}) ⇒ FatZebra::PaymentPlan
Suspend a payment plan.
Methods included from APIOperation::Delete
Methods included from APIOperation::Save
Methods included from APIOperation::Find
Methods inherited from APIResource
Methods included from APIHelper
included, #request, #resource_name, #resource_path
Methods inherited from FatZebraObject
initialize_from, #load_response_api, #update_from
Methods included from Validation
#errors, #valid!, #valid?, #validates
Methods included from ObjectHelper
#[], #[]=, #add_accessor, #add_accessors, #add_data, #initialize, #inspect, #keys, #method_missing, #remove_accessor, #to_hash, #to_json, #update_attributes
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FatZebra::ObjectHelper
Instance Method Details
#active!(params = {}, options = {}) ⇒ FatZebra::PaymentPlan
Activate a payment plan
52 53 54 55 56 57 58 |
# File 'lib/fat_zebra/payment_plan.rb', line 52 def active!(params = {}, = {}) params = { new_status: 'Active' }.merge(params) save(params, ) end |
#suspend!(params = {}, options = {}) ⇒ FatZebra::PaymentPlan
Suspend a payment plan
37 38 39 40 41 42 43 |
# File 'lib/fat_zebra/payment_plan.rb', line 37 def suspend!(params = {}, = {}) params = { new_status: 'Suspended' }.merge(params) save(params, ) end |