Class: WebPay::TokenResponse
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#normalize_hash, #to_h, #to_s
Constructor Details
Returns a new instance of TokenResponse.
1305
1306
1307
1308
1309
|
# File 'lib/webpay/data_types.rb', line 1305
def initialize(hash = {})
hash = normalize_hash(hash)
hash['card'] = WebPay::CardResponse.new(hash['card']) if hash['card'].is_a?(Hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1298
1299
1300
|
# File 'lib/webpay/data_types.rb', line 1298
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
1300
1301
1302
|
# File 'lib/webpay/data_types.rb', line 1300
def self.fields
['id', 'object', 'livemode', 'card', 'created', 'used']
end
|
Instance Method Details
#card ⇒ Object
1326
1327
1328
|
# File 'lib/webpay/data_types.rb', line 1326
def card
attributes['card']
end
|
#created ⇒ Object
1330
1331
1332
|
# File 'lib/webpay/data_types.rb', line 1330
def created
attributes['created']
end
|
#id ⇒ Object
1314
1315
1316
|
# File 'lib/webpay/data_types.rb', line 1314
def id
attributes['id']
end
|
#livemode ⇒ Object
1322
1323
1324
|
# File 'lib/webpay/data_types.rb', line 1322
def livemode
attributes['livemode']
end
|
#object ⇒ Object
1318
1319
1320
|
# File 'lib/webpay/data_types.rb', line 1318
def object
attributes['object']
end
|
#used ⇒ Object
1334
1335
1336
|
# File 'lib/webpay/data_types.rb', line 1334
def used
attributes['used']
end
|