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.



348
349
350
351
# File 'lib/webpay/data_types.rb', line 348

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



341
342
343
# File 'lib/webpay/data_types.rb', line 341

def attributes
  @attributes
end

Class Method Details

.fieldsObject



343
344
345
# File 'lib/webpay/data_types.rb', line 343

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

Instance Method Details

#countryObject



388
389
390
# File 'lib/webpay/data_types.rb', line 388

def country
  attributes['country']
end

#cvc_checkObject



380
381
382
# File 'lib/webpay/data_types.rb', line 380

def cvc_check
  attributes['cvc_check']
end

#exp_monthObject



360
361
362
# File 'lib/webpay/data_types.rb', line 360

def exp_month
  attributes['exp_month']
end

#exp_yearObject



364
365
366
# File 'lib/webpay/data_types.rb', line 364

def exp_year
  attributes['exp_year']
end

#fingerprintObject



368
369
370
# File 'lib/webpay/data_types.rb', line 368

def fingerprint
  attributes['fingerprint']
end

#last4Object



372
373
374
# File 'lib/webpay/data_types.rb', line 372

def last4
  attributes['last4']
end

#nameObject



384
385
386
# File 'lib/webpay/data_types.rb', line 384

def name
  attributes['name']
end

#objectObject

attributes accessors



356
357
358
# File 'lib/webpay/data_types.rb', line 356

def object
  attributes['object']
end

#typeObject



376
377
378
# File 'lib/webpay/data_types.rb', line 376

def type
  attributes['type']
end