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.



2306
2307
2308
2309
# File 'lib/webpay/data_types.rb', line 2306

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2289
2290
2291
# File 'lib/webpay/data_types.rb', line 2289

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/webpay/data_types.rb', line 2296

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



2291
2292
2293
# File 'lib/webpay/data_types.rb', line 2291

def self.fields
  []
end

Instance Method Details

#query_paramsObject



2317
2318
2319
2320
# File 'lib/webpay/data_types.rb', line 2317

def query_params
  result = {}
  return result
end

#request_bodyObject



2312
2313
2314
2315
# File 'lib/webpay/data_types.rb', line 2312

def request_body
  result = {}
  result
end