Class: WebPay::TokenIdRequest
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 TokenIdRequest.
1377
1378
1379
1380
|
# File 'lib/webpay/data_types.rb', line 1377
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1358
1359
1360
|
# File 'lib/webpay/data_types.rb', line 1358
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
|
# File 'lib/webpay/data_types.rb', line 1365
def self.create(params)
return params if params.is_a?(self)
hash = case params
when Hash; params
when WebPay::TokenResponse; {'id' => params.id}
when String; {'id' => params}
else
raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params)
end
self.new(hash)
end
|
.fields ⇒ Object
1360
1361
1362
|
# File 'lib/webpay/data_types.rb', line 1360
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
1395
1396
1397
|
# File 'lib/webpay/data_types.rb', line 1395
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1399
1400
1401
|
# File 'lib/webpay/data_types.rb', line 1399
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1388
1389
1390
1391
|
# File 'lib/webpay/data_types.rb', line 1388
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1383
1384
1385
1386
|
# File 'lib/webpay/data_types.rb', line 1383
def request_body
result = {}
result
end
|