Method: WebPay::TokenIdRequest.create
- Defined in:
- lib/webpay/data_types.rb
.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 |