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.



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

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2106
2107
2108
# File 'lib/webpay/data_types.rb', line 2106

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
# File 'lib/webpay/data_types.rb', line 2113

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



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

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

Instance Method Details

#idObject

attributes accessors



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

def id
  attributes['id']
end

#id=(value) ⇒ Object



2148
2149
2150
# File 'lib/webpay/data_types.rb', line 2148

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

#query_paramsObject



2137
2138
2139
2140
# File 'lib/webpay/data_types.rb', line 2137

def query_params
  result = {}
  return result
end

#request_bodyObject



2131
2132
2133
2134
2135
# File 'lib/webpay/data_types.rb', line 2131

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

#retryObject



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

def retry
  attributes['retry']
end

#retry=(value) ⇒ Object



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

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