Class: Cardflex::Plan
- Inherits:
-
Object
- Object
- Cardflex::Plan
- Includes:
- BaseModule
- Defined in:
- lib/cardflex/plan.rb
Defined Under Namespace
Modules: Type
Instance Attribute Summary collapse
-
#action_type ⇒ Object
readonly
Returns the value of attribute action_type.
-
#plan ⇒ Object
readonly
Returns the value of attribute plan.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#result_code ⇒ Object
readonly
Returns the value of attribute result_code.
-
#result_text ⇒ Object
readonly
Returns the value of attribute result_text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gateway, attributes) ⇒ Plan
constructor
A new instance of Plan.
Methods included from BaseModule
Methods included from BaseModule::ClassMethods
#create_helper_methods, #set_instance_variables_from_hash, #snakecase
Constructor Details
#initialize(gateway, attributes) ⇒ Plan
Returns a new instance of Plan.
12 13 14 15 16 |
# File 'lib/cardflex/plan.rb', line 12 def initialize(gateway, attributes) @gateway = gateway @type = attributes[:action_type] set_instance_variables_from_hash(attributes) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cardflex::BaseModule
Instance Attribute Details
#action_type ⇒ Object (readonly)
Returns the value of attribute action_type.
9 10 11 |
# File 'lib/cardflex/plan.rb', line 9 def action_type @action_type end |
#plan ⇒ Object (readonly)
Returns the value of attribute plan.
10 11 12 |
# File 'lib/cardflex/plan.rb', line 10 def plan @plan end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
9 10 11 |
# File 'lib/cardflex/plan.rb', line 9 def result @result end |
#result_code ⇒ Object (readonly)
Returns the value of attribute result_code.
9 10 11 |
# File 'lib/cardflex/plan.rb', line 9 def result_code @result_code end |
#result_text ⇒ Object (readonly)
Returns the value of attribute result_text.
9 10 11 |
# File 'lib/cardflex/plan.rb', line 9 def result_text @result_text end |
Class Method Details
.create(attributes) ⇒ Object
18 19 20 |
# File 'lib/cardflex/plan.rb', line 18 def self.create(attributes) Configuration.gateway.plan.request(:add_plan => attributes) end |