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.
1240
1241
1242
1243
1244
|
# File 'lib/webpay/data_types.rb', line 1240
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.
1233
1234
1235
|
# File 'lib/webpay/data_types.rb', line 1233
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
1235
1236
1237
|
# File 'lib/webpay/data_types.rb', line 1235
def self.fields
['id', 'object', 'livemode', 'card', 'created', 'used']
end
|
Instance Method Details
#card ⇒ Object
1261
1262
1263
|
# File 'lib/webpay/data_types.rb', line 1261
def card
attributes['card']
end
|
#created ⇒ Object
1265
1266
1267
|
# File 'lib/webpay/data_types.rb', line 1265
def created
attributes['created']
end
|
#id ⇒ Object
1249
1250
1251
|
# File 'lib/webpay/data_types.rb', line 1249
def id
attributes['id']
end
|
#livemode ⇒ Object
1257
1258
1259
|
# File 'lib/webpay/data_types.rb', line 1257
def livemode
attributes['livemode']
end
|
#object ⇒ Object
1253
1254
1255
|
# File 'lib/webpay/data_types.rb', line 1253
def object
attributes['object']
end
|
#used ⇒ Object
1269
1270
1271
|
# File 'lib/webpay/data_types.rb', line 1269
def used
attributes['used']
end
|