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.



2060
2061
2062
2063
# File 'lib/webpay/data_types.rb', line 2060

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

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



2041
2042
2043
# File 'lib/webpay/data_types.rb', line 2041

def attributes
  @attributes
end

Class Method Details

.create(params) ⇒ Object



2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
# File 'lib/webpay/data_types.rb', line 2048

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



2043
2044
2045
# File 'lib/webpay/data_types.rb', line 2043

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

Instance Method Details

#idObject

attributes accessors



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

def id
  attributes['id']
end

#id=(value) ⇒ Object



2083
2084
2085
# File 'lib/webpay/data_types.rb', line 2083

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

#query_paramsObject



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

def query_params
  result = {}
  return result
end

#request_bodyObject



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

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

#retryObject



2087
2088
2089
# File 'lib/webpay/data_types.rb', line 2087

def retry
  attributes['retry']
end

#retry=(value) ⇒ Object



2091
2092
2093
# File 'lib/webpay/data_types.rb', line 2091

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