Class: WebPay::RecursionRequestResume

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

Returns a new instance of RecursionRequestResume.



2144
2145
2146
2147
# File 'lib/webpay/data_types.rb', line 2144

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2125
2126
2127
# File 'lib/webpay/data_types.rb', line 2125

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
# File 'lib/webpay/data_types.rb', line 2132

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



2127
2128
2129
# File 'lib/webpay/data_types.rb', line 2127

def self.fields
  ['id', 'retry']
end

Instance Method Details

#idObject

attributes accessors



2163
2164
2165
# File 'lib/webpay/data_types.rb', line 2163

def id
  attributes['id']
end

#id=(value) ⇒ Object



2167
2168
2169
# File 'lib/webpay/data_types.rb', line 2167

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

#query_paramsObject



2156
2157
2158
2159
# File 'lib/webpay/data_types.rb', line 2156

def query_params
  result = {}
  return result
end

#request_bodyObject



2150
2151
2152
2153
2154
# File 'lib/webpay/data_types.rb', line 2150

def request_body
  result = {}
  copy_if_exists(@attributes, result, 'retry', 'request_body');
  result
end

#retryObject



2171
2172
2173
# File 'lib/webpay/data_types.rb', line 2171

def retry
  attributes['retry']
end

#retry=(value) ⇒ Object



2175
2176
2177
# File 'lib/webpay/data_types.rb', line 2175

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