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.



2097
2098
2099
2100
# File 'lib/webpay/data_types.rb', line 2097

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
# File 'lib/webpay/data_types.rb', line 2085

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



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

def self.fields
  ['id']
end

Instance Method Details

#idObject

attributes accessors



2115
2116
2117
# File 'lib/webpay/data_types.rb', line 2115

def id
  attributes['id']
end

#id=(value) ⇒ Object



2119
2120
2121
# File 'lib/webpay/data_types.rb', line 2119

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

#query_paramsObject



2108
2109
2110
2111
# File 'lib/webpay/data_types.rb', line 2108

def query_params
  result = {}
  return result
end

#request_bodyObject



2103
2104
2105
2106
# File 'lib/webpay/data_types.rb', line 2103

def request_body
  result = {}
  result
end