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.
1294
1295
1296
1297
|
# File 'lib/webpay/data_types.rb', line 1294
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1275
1276
1277
|
# File 'lib/webpay/data_types.rb', line 1275
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
|
# File 'lib/webpay/data_types.rb', line 1282
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
1277
1278
1279
|
# File 'lib/webpay/data_types.rb', line 1277
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
1312
1313
1314
|
# File 'lib/webpay/data_types.rb', line 1312
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1316
1317
1318
|
# File 'lib/webpay/data_types.rb', line 1316
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1305
1306
1307
1308
|
# File 'lib/webpay/data_types.rb', line 1305
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1300
1301
1302
1303
|
# File 'lib/webpay/data_types.rb', line 1300
def request_body
result = {}
result
end
|