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.
1323
1324
1325
1326
1327
|
# File 'lib/webpay/data_types.rb', line 1323
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.
1316
1317
1318
|
# File 'lib/webpay/data_types.rb', line 1316
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
1318
1319
1320
|
# File 'lib/webpay/data_types.rb', line 1318
def self.fields
['id', 'object', 'livemode', 'card', 'created', 'used']
end
|
Instance Method Details
#card ⇒ Object
1344
1345
1346
|
# File 'lib/webpay/data_types.rb', line 1344
def card
attributes['card']
end
|
#created ⇒ Object
1348
1349
1350
|
# File 'lib/webpay/data_types.rb', line 1348
def created
attributes['created']
end
|
#id ⇒ Object
1332
1333
1334
|
# File 'lib/webpay/data_types.rb', line 1332
def id
attributes['id']
end
|
#livemode ⇒ Object
1340
1341
1342
|
# File 'lib/webpay/data_types.rb', line 1340
def livemode
attributes['livemode']
end
|
#object ⇒ Object
1336
1337
1338
|
# File 'lib/webpay/data_types.rb', line 1336
def object
attributes['object']
end
|
#used ⇒ Object
1352
1353
1354
|
# File 'lib/webpay/data_types.rb', line 1352
def used
attributes['used']
end
|