Class: SecureTrading::Objects::PaymentCard

Inherits:
DataObject
  • Object
show all
Defined in:
lib/secure_trading/objects/payment_card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

#initialize, #to_xml

Constructor Details

This class inherits a constructor from SecureTrading::DataObject

Instance Attribute Details

#expiry_dateObject

Returns the value of attribute expiry_date.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def expiry_date
  @expiry_date
end

#issueObject

Returns the value of attribute issue.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def issue
  @issue
end

#numberObject

Returns the value of attribute number.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def number
  @number
end

#referenceObject

Returns the value of attribute reference.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def reference
  @reference
end

#security_codeObject

Returns the value of attribute security_code.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def security_code
  @security_code
end

#start_dateObject

Returns the value of attribute start_date.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def start_date
  @start_date
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/secure_trading/objects/payment_card.rb', line 5

def type
  @type
end

Instance Method Details

#to_hashObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/secure_trading/objects/payment_card.rb', line 7

def to_hash
  { 
    'Type' => self.type,
    'Number' => self.number,
    'Issue' => self.issue,
    'StartDate' => self.start_date,
    'ExpiryDate' => self.expiry_date,
    'SecurityCode' => self.security_code,
    'ParentTransactionReference' => self.reference
  }
end