Class: WebPay::CardResponse

Inherits:
Entity
  • Object
show all
Defined in:
lib/webpay/data_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#normalize_hash, #to_h, #to_s

Constructor Details

#initialize(hash = {}) ⇒ CardResponse

Returns a new instance of CardResponse.



257
258
259
260
# File 'lib/webpay/data_types.rb', line 257

def initialize(hash = {})
  hash = normalize_hash(hash)
  @attributes = hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



250
251
252
# File 'lib/webpay/data_types.rb', line 250

def attributes
  @attributes
end

Class Method Details

.fieldsObject



252
253
254
# File 'lib/webpay/data_types.rb', line 252

def self.fields
  ['object', 'exp_month', 'exp_year', 'fingerprint', 'last4', 'type', 'cvc_check', 'name', 'country']
end

Instance Method Details

#countryObject



297
298
299
# File 'lib/webpay/data_types.rb', line 297

def country
  attributes['country']
end

#cvc_checkObject



289
290
291
# File 'lib/webpay/data_types.rb', line 289

def cvc_check
  attributes['cvc_check']
end

#exp_monthObject



269
270
271
# File 'lib/webpay/data_types.rb', line 269

def exp_month
  attributes['exp_month']
end

#exp_yearObject



273
274
275
# File 'lib/webpay/data_types.rb', line 273

def exp_year
  attributes['exp_year']
end

#fingerprintObject



277
278
279
# File 'lib/webpay/data_types.rb', line 277

def fingerprint
  attributes['fingerprint']
end

#last4Object



281
282
283
# File 'lib/webpay/data_types.rb', line 281

def last4
  attributes['last4']
end

#nameObject



293
294
295
# File 'lib/webpay/data_types.rb', line 293

def name
  attributes['name']
end

#objectObject

attributes accessors



265
266
267
# File 'lib/webpay/data_types.rb', line 265

def object
  attributes['object']
end

#typeObject



285
286
287
# File 'lib/webpay/data_types.rb', line 285

def type
  attributes['type']
end