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.



2325
2326
2327
2328
# File 'lib/webpay/data_types.rb', line 2325

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2315
2316
2317
2318
2319
2320
2321
2322
2323
# File 'lib/webpay/data_types.rb', line 2315

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



2310
2311
2312
# File 'lib/webpay/data_types.rb', line 2310

def self.fields
  []
end

Instance Method Details

#query_paramsObject



2336
2337
2338
2339
# File 'lib/webpay/data_types.rb', line 2336

def query_params
  result = {}
  return result
end

#request_bodyObject



2331
2332
2333
2334
# File 'lib/webpay/data_types.rb', line 2331

def request_body
  result = {}
  result
end