Class: WebPay::EmptyRequest

Inherits:
Entity
  • Object
show all
Defined in:
lib/webpay/data_types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#normalize_hash, #to_h, #to_s

Constructor Details

#initialize(hash = {}) ⇒ EmptyRequest

Returns a new instance of EmptyRequest.



2241
2242
2243
2244
# File 'lib/webpay/data_types.rb', line 2241

def initialize(hash = {})
  hash = normalize_hash(hash)
  @attributes = hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2224
2225
2226
# File 'lib/webpay/data_types.rb', line 2224

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2231
2232
2233
2234
2235
2236
2237
2238
2239
# File 'lib/webpay/data_types.rb', line 2231

def self.create(params)
  return params if params.is_a?(self)
  hash = case params
    when Hash; params
    else
      raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params)
    end
  self.new(hash)
end

.fieldsObject



2226
2227
2228
# File 'lib/webpay/data_types.rb', line 2226

def self.fields
  []
end

Instance Method Details

#query_paramsObject



2252
2253
2254
2255
# File 'lib/webpay/data_types.rb', line 2252

def query_params
  result = {}
  return result
end

#request_bodyObject



2247
2248
2249
2250
# File 'lib/webpay/data_types.rb', line 2247

def request_body
  result = {}
  result
end