Class: WebPay::RecursionIdRequest

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 = {}) ⇒ RecursionIdRequest

Returns a new instance of RecursionIdRequest.



2056
2057
2058
2059
# File 'lib/webpay/data_types.rb', line 2056

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2037
2038
2039
# File 'lib/webpay/data_types.rb', line 2037

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
# File 'lib/webpay/data_types.rb', line 2044

def self.create(params)
  return params if params.is_a?(self)
  hash = case params
    when Hash; params
    when WebPay::RecursionResponse; {'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

.fieldsObject



2039
2040
2041
# File 'lib/webpay/data_types.rb', line 2039

def self.fields
  ['id']
end

Instance Method Details

#idObject

attributes accessors



2074
2075
2076
# File 'lib/webpay/data_types.rb', line 2074

def id
  attributes['id']
end

#id=(value) ⇒ Object



2079
2080
2081
# File 'lib/webpay/data_types.rb', line 2079

def id=(value)
  attributes['id'] = value
end

#query_paramsObject



2067
2068
2069
2070
# File 'lib/webpay/data_types.rb', line 2067

def query_params
  result = {}
  return result
end

#request_bodyObject



2062
2063
2064
2065
# File 'lib/webpay/data_types.rb', line 2062

def request_body
  result = {}
  result
end