Class: Raas::UnregisterCreditCardRequestModel

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/raas/models/unregister_credit_card_request_model.rb

Overview

Represents the request to remove a credit card

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(customer_identifier = nil, account_identifier = nil, credit_card_token = nil) ⇒ UnregisterCreditCardRequestModel

Returns a new instance of UnregisterCreditCardRequestModel.



28
29
30
31
32
33
34
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 28

def initialize(customer_identifier = nil,
                = nil,
               credit_card_token = nil)
  @customer_identifier = customer_identifier
  @account_identifier = 
  @credit_card_token = credit_card_token
end

Instance Attribute Details

#account_identifierString

The account identifier

Returns:



13
14
15
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 13

def 
  @account_identifier
end

#credit_card_tokenString

The credit card token

Returns:



17
18
19
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 17

def credit_card_token
  @credit_card_token
end

#customer_identifierString

The customer identifier

Returns:



9
10
11
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 9

def customer_identifier
  @customer_identifier
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 37

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  customer_identifier = hash['customerIdentifier']
   = hash['accountIdentifier']
  credit_card_token = hash['creditCardToken']

  # Create object from extracted values.

  UnregisterCreditCardRequestModel.new(customer_identifier,
                                       ,
                                       credit_card_token)
end

.namesObject

A mapping from model property names to API property names.



20
21
22
23
24
25
26
# File 'lib/raas/models/unregister_credit_card_request_model.rb', line 20

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['customer_identifier'] = 'customerIdentifier'
  @_hash['account_identifier'] = 'accountIdentifier'
  @_hash['credit_card_token'] = 'creditCardToken'
  @_hash
end