Class: WebPay::RecursionListRequest
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#count ⇒ Object
attributes accessors.
- #count=(value) ⇒ Object
- #created ⇒ Object
- #created=(value) ⇒ Object
- #customer ⇒ Object
- #customer=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ RecursionListRequest
constructor
A new instance of RecursionListRequest.
- #offset ⇒ Object
- #offset=(value) ⇒ Object
- #query_params ⇒ Object
- #request_body ⇒ Object
- #shop ⇒ Object
- #shop=(value) ⇒ Object
- #suspended ⇒ Object
- #suspended=(value) ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ RecursionListRequest
Returns a new instance of RecursionListRequest.
2198 2199 2200 2201 2202 |
# File 'lib/webpay/data_types.rb', line 2198 def initialize(hash = {}) hash = normalize_hash(hash) hash['created'] = hash['created'].is_a?(Hash) ? WebPay::CreatedRange.new(hash['created']) : hash['created'] @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
2181 2182 2183 |
# File 'lib/webpay/data_types.rb', line 2181 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
2188 2189 2190 2191 2192 2193 2194 2195 2196 |
# File 'lib/webpay/data_types.rb', line 2188 def self.create(params) return params if params.is_a?(self) hash = case params when Hash; params else raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params) end self.new(hash) end |
.fields ⇒ Object
2183 2184 2185 |
# File 'lib/webpay/data_types.rb', line 2183 def self.fields ['count', 'offset', 'created', 'customer', 'shop', 'suspended'] end |
Instance Method Details
#count ⇒ Object
attributes accessors
2223 2224 2225 |
# File 'lib/webpay/data_types.rb', line 2223 def count attributes['count'] end |
#count=(value) ⇒ Object
2227 2228 2229 |
# File 'lib/webpay/data_types.rb', line 2227 def count=(value) attributes['count'] = value end |
#created ⇒ Object
2239 2240 2241 |
# File 'lib/webpay/data_types.rb', line 2239 def created attributes['created'] end |
#created=(value) ⇒ Object
2243 2244 2245 2246 |
# File 'lib/webpay/data_types.rb', line 2243 def created=(value) value = value.is_a?(Hash) ? WebPay::CreatedRange.new(value) : value attributes['created'] = value end |
#customer ⇒ Object
2248 2249 2250 |
# File 'lib/webpay/data_types.rb', line 2248 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
2252 2253 2254 |
# File 'lib/webpay/data_types.rb', line 2252 def customer=(value) attributes['customer'] = value end |
#offset ⇒ Object
2231 2232 2233 |
# File 'lib/webpay/data_types.rb', line 2231 def offset attributes['offset'] end |
#offset=(value) ⇒ Object
2235 2236 2237 |
# File 'lib/webpay/data_types.rb', line 2235 def offset=(value) attributes['offset'] = value end |
#query_params ⇒ Object
2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 |
# File 'lib/webpay/data_types.rb', line 2210 def query_params result = {} copy_if_exists(@attributes, result, 'count', 'query_params'); copy_if_exists(@attributes, result, 'offset', 'query_params'); copy_if_exists(@attributes, result, 'created', 'query_params'); copy_if_exists(@attributes, result, 'customer', 'query_params'); copy_if_exists(@attributes, result, 'shop', 'query_params'); copy_if_exists(@attributes, result, 'suspended', 'query_params'); return result end |
#request_body ⇒ Object
2205 2206 2207 2208 |
# File 'lib/webpay/data_types.rb', line 2205 def request_body result = {} result end |
#shop ⇒ Object
2256 2257 2258 |
# File 'lib/webpay/data_types.rb', line 2256 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
2260 2261 2262 |
# File 'lib/webpay/data_types.rb', line 2260 def shop=(value) attributes['shop'] = value end |
#suspended ⇒ Object
2264 2265 2266 |
# File 'lib/webpay/data_types.rb', line 2264 def suspended attributes['suspended'] end |
#suspended=(value) ⇒ Object
2268 2269 2270 |
# File 'lib/webpay/data_types.rb', line 2268 def suspended=(value) attributes['suspended'] = value end |