Class: Cardflex::ThreeStep

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/cardflex/three_step.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included, #method_missing

Methods included from BaseModule::ClassMethods

#create_helper_methods, #set_instance_variables_from_hash, #snakecase

Constructor Details

#initialize(gateway, attributes = {}) ⇒ ThreeStep

Returns a new instance of ThreeStep.



24
25
26
27
28
# File 'lib/cardflex/three_step.rb', line 24

def initialize(gateway, attributes={})
  @gateway = gateway
  @config = gateway.config
  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

#configObject (readonly)

Returns the value of attribute config.



19
20
21
# File 'lib/cardflex/three_step.rb', line 19

def config
  @config
end

#form_urlObject (readonly)

Returns the value of attribute form_url.



20
21
22
# File 'lib/cardflex/three_step.rb', line 20

def form_url
  @form_url
end

#resultObject (readonly)

Returns the value of attribute result.



22
23
24
# File 'lib/cardflex/three_step.rb', line 22

def result
  @result
end

#result_codeObject (readonly)

Returns the value of attribute result_code.



22
23
24
# File 'lib/cardflex/three_step.rb', line 22

def result_code
  @result_code
end

#result_textObject (readonly)

Returns the value of attribute result_text.



22
23
24
# File 'lib/cardflex/three_step.rb', line 22

def result_text
  @result_text
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



21
22
23
# File 'lib/cardflex/three_step.rb', line 21

def transaction_id
  @transaction_id
end

Class Method Details

.complete(token_id) ⇒ Object



34
35
36
# File 'lib/cardflex/three_step.rb', line 34

def self.complete(token_id)
  Configuration.gateway.three_step.complete(token_id)
end

.get_form_url(attributes) ⇒ Object



30
31
32
# File 'lib/cardflex/three_step.rb', line 30

def self.get_form_url(attributes)
  Configuration.gateway.three_step.get_form_url(attributes)
end