Class: BasecommSdk::BankCard

Inherits:
Base
  • Object
show all
Defined in:
lib/basecomm_sdk/bank_card.rb

Constant Summary collapse

STATUS =
{
  xs_bc_status_active:  'ACTIVE',
  xs_bc_status_deleted: 'DELETED',
  xs_bc_status_failed:  'FAILED'
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attr_accessor, attributes, #attributes, #format, json_prefix, #messages, #qualified_attributes, #qualified_key, #status_description, #status_name, #to_json

Constructor Details

#initialize(options = {}) ⇒ BankCard

Returns a new instance of BankCard.



17
18
19
20
# File 'lib/basecomm_sdk/bank_card.rb', line 17

def initialize(options = {})
  super
  @billing_address = Address.new
end

Instance Attribute Details

#aliasObject

Returns the value of attribute alias.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def alias
  @alias
end

#billing_addressObject

Returns the value of attribute billing_address.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def billing_address
  @billing_address
end

#creation_dateObject

Returns the value of attribute creation_date.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def creation_date
  @creation_date
end

#expiration_monthObject

Returns the value of attribute expiration_month.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def expiration_month
  @expiration_month
end

#expiration_yearObject

Returns the value of attribute expiration_year.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def expiration_year
  @expiration_year
end

#last_used_dateObject

Returns the value of attribute last_used_date.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def last_used_date
  @last_used_date
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def name
  @name
end

#numberObject

Returns the value of attribute number.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def number
  @number
end

#statusObject

Returns the value of attribute status.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def status
  @status
end

#tokenObject

Returns the value of attribute token.



9
10
11
# File 'lib/basecomm_sdk/bank_card.rb', line 9

def token
  @token
end

Class Method Details

.build_from_json(json) ⇒ Object



12
13
14
# File 'lib/basecomm_sdk/bank_card.rb', line 12

def self.build_from_json(json)
  BankCard.new(JSON.parse(json).recursively_symbolize_keys!)
end

Instance Method Details

#json_prefixObject



22
23
24
# File 'lib/basecomm_sdk/bank_card.rb', line 22

def json_prefix
  :bank_card
end