Class: PciProxy::Model::TokenisedCard

Inherits:
Object
  • Object
show all
Defined in:
lib/pci_proxy/model/tokenised_card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ TokenisedCard

Returns a new instance of TokenisedCard.



7
8
9
10
11
12
13
# File 'lib/pci_proxy/model/tokenised_card.rb', line 7

def initialize(response)
  @response = response
  @pan_token = response["aliasCC"]
  @cvv_token = response["aliasCVV"]
  @masked_pan = response["maskedCard"]
  @type_slug = slug_for(response["paymentMethod"])
end

Instance Attribute Details

#cvv_tokenObject (readonly)

Returns the value of attribute cvv_token.



5
6
7
# File 'lib/pci_proxy/model/tokenised_card.rb', line 5

def cvv_token
  @cvv_token
end

#masked_panObject (readonly)

Returns the value of attribute masked_pan.



5
6
7
# File 'lib/pci_proxy/model/tokenised_card.rb', line 5

def masked_pan
  @masked_pan
end

#pan_tokenObject (readonly)

Returns the value of attribute pan_token.



5
6
7
# File 'lib/pci_proxy/model/tokenised_card.rb', line 5

def pan_token
  @pan_token
end

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/pci_proxy/model/tokenised_card.rb', line 5

def response
  @response
end

#type_slugObject (readonly)

Returns the value of attribute type_slug.



5
6
7
# File 'lib/pci_proxy/model/tokenised_card.rb', line 5

def type_slug
  @type_slug
end