Class: Cardflex::CustomerVault

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/cardflex/customer_vault.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) ⇒ CustomerVault

Returns a new instance of CustomerVault.



19
20
21
22
23
24
25
# File 'lib/cardflex/customer_vault.rb', line 19

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

Returns the value of attribute action_type.



15
16
17
# File 'lib/cardflex/customer_vault.rb', line 15

def action_type
  @action_type
end

#billingObject (readonly)

Returns the value of attribute billing.



17
18
19
# File 'lib/cardflex/customer_vault.rb', line 17

def billing
  @billing
end

#configObject (readonly)

Returns the value of attribute config.



14
15
16
# File 'lib/cardflex/customer_vault.rb', line 14

def config
  @config
end

#customer_vault_idObject (readonly)

Returns the value of attribute customer_vault_id.



16
17
18
# File 'lib/cardflex/customer_vault.rb', line 16

def customer_vault_id
  @customer_vault_id
end

#resultObject (readonly)

Returns the value of attribute result.



15
16
17
# File 'lib/cardflex/customer_vault.rb', line 15

def result
  @result
end

#result_codeObject (readonly)

Returns the value of attribute result_code.



15
16
17
# File 'lib/cardflex/customer_vault.rb', line 15

def result_code
  @result_code
end

#result_textObject (readonly)

Returns the value of attribute result_text.



15
16
17
# File 'lib/cardflex/customer_vault.rb', line 15

def result_text
  @result_text
end

#shippingObject (readonly)

Returns the value of attribute shipping.



17
18
19
# File 'lib/cardflex/customer_vault.rb', line 17

def shipping
  @shipping
end

#typeObject (readonly)

Returns the value of attribute type.



17
18
19
# File 'lib/cardflex/customer_vault.rb', line 17

def type
  @type
end

Class Method Details

.request(attributes) ⇒ Object



27
28
29
# File 'lib/cardflex/customer_vault.rb', line 27

def self.request(attributes)
  Configuration.gateway.customer_vault.request(attributes)
end