Class: Tpaga::CreditCard

Inherits:
BaseObject show all
Defined in:
lib/tpaga/models/credit_card.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash

Constructor Details

#initialize(attributes = {}) ⇒ CreditCard

Returns a new instance of CreditCard.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/tpaga/models/credit_card.rb', line 83

def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'id']
    @id = attributes[:'id']
  end
  
  if attributes[:'bin']
    @bin = attributes[:'bin']
  end
  
  if attributes[:'type']
    @type = attributes[:'type']
  end
  
  if attributes[:'expirationMonth']
    @expiration_month = attributes[:'expirationMonth']
  end
  
  if attributes[:'expirationYear']
    @expiration_year = attributes[:'expirationYear']
  end
  
  if attributes[:'cardVerificationCode']
    @card_verification_code = attributes[:'cardVerificationCode']
  end
  
  if attributes[:'cardHolderName']
    @card_holder_name = attributes[:'cardHolderName']
  end
  
  if attributes[:'lastFour']
    @last_four = attributes[:'lastFour']
  end
  
  if attributes[:'customer']
    @customer = attributes[:'customer']
  end
  
  if attributes[:'addressLine1']
    @address_line1 = attributes[:'addressLine1']
  end
  
  if attributes[:'addressLine2']
    @address_line2 = attributes[:'addressLine2']
  end
  
  if attributes[:'addressCity']
    @address_city = attributes[:'addressCity']
  end
  
  if attributes[:'addressState']
    @address_state = attributes[:'addressState']
  end
  
  if attributes[:'addressPostalCode']
    @address_postal_code = attributes[:'addressPostalCode']
  end
  
  if attributes[:'addressCountry']
    @address_country = attributes[:'addressCountry']
  end

  if attributes[:'validationCharge']
    @validation_charge = attributes[:'validationCharge']
  end
  
end

Instance Attribute Details

#address_cityObject

Returns the value of attribute address_city.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_city
  @address_city
end

#address_countryObject

Returns the value of attribute address_country.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_country
  @address_country
end

#address_line1Object

Returns the value of attribute address_line1.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_line1
  @address_line1
end

#address_line2Object

Returns the value of attribute address_line2.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_line2
  @address_line2
end

#address_postal_codeObject

Returns the value of attribute address_postal_code.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_postal_code
  @address_postal_code
end

#address_stateObject

Returns the value of attribute address_state.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def address_state
  @address_state
end

#binObject

Returns the value of attribute bin.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def bin
  @bin
end

#card_holder_nameObject

Returns the value of attribute card_holder_name.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def card_holder_name
  @card_holder_name
end

#card_verification_codeObject

Returns the value of attribute card_verification_code.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def card_verification_code
  @card_verification_code
end

#customerObject

Returns the value of attribute customer.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def customer
  @customer
end

#expiration_monthObject

Returns the value of attribute expiration_month.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def expiration_month
  @expiration_month
end

#expiration_yearObject

Returns the value of attribute expiration_year.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def expiration_year
  @expiration_year
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def id
  @id
end

#last_fourObject

Returns the value of attribute last_four.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def last_four
  @last_four
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def type
  @type
end

#validation_chargeObject

Returns the value of attribute validation_charge.



4
5
6
# File 'lib/tpaga/models/credit_card.rb', line 4

def validation_charge
  @validation_charge
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/tpaga/models/credit_card.rb', line 6

def self.attribute_map
  {
    
    # 
    :'id' => :'id',
    
    # 
    :'bin' => :'bin',
    
    # 
    :'type' => :'type',
    
    # 
    :'expiration_month' => :'expirationMonth',
    
    # 
    :'expiration_year' => :'expirationYear',
    
    # 
    :'card_verification_code' => :'cardVerificationCode',
    
    # 
    :'card_holder_name' => :'cardHolderName',
    
    # 
    :'last_four' => :'lastFour',
    
    # 
    :'customer' => :'customer',
    
    # 
    :'address_line1' => :'addressLine1',
    
    # 
    :'address_line2' => :'addressLine2',
    
    # 
    :'address_city' => :'addressCity',
    
    # 
    :'address_state' => :'addressState',
    
    # 
    :'address_postal_code' => :'addressPostalCode',
    
    # 
    :'validation_charge' => :'validationCharge',
    
    # 
    :'address_country' => :'addressCountry'
    
  }
end

.swagger_typesObject

attribute type



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/tpaga/models/credit_card.rb', line 61

def self.swagger_types
  {
    :'id' => :'string',
    :'bin' => :'string',
    :'type' => :'string',
    :'expiration_month' => :'string',
    :'expiration_year' => :'string',
    :'card_verification_code' => :'string',
    :'card_holder_name' => :'string',
    :'last_four' => :'string',
    :'customer' => :'string',
    :'address_line1' => :'string',
    :'address_line2' => :'string',
    :'address_city' => :'string',
    :'address_state' => :'string',
    :'address_postal_code' => :'string',
    :'address_country' => :'string',
    :'validation_charge' => :'ValidationCharge',
    
  }
end