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.
2161 2162 2163 2164 2165 |
# File 'lib/webpay/data_types.rb', line 2161 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.
2144 2145 2146 |
# File 'lib/webpay/data_types.rb', line 2144 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
2151 2152 2153 2154 2155 2156 2157 2158 2159 |
# File 'lib/webpay/data_types.rb', line 2151 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
2146 2147 2148 |
# File 'lib/webpay/data_types.rb', line 2146 def self.fields ['count', 'offset', 'created', 'customer', 'shop', 'suspended'] end |
Instance Method Details
#count ⇒ Object
attributes accessors
2192 2193 2194 |
# File 'lib/webpay/data_types.rb', line 2192 def count attributes['count'] end |
#count=(value) ⇒ Object
2197 2198 2199 |
# File 'lib/webpay/data_types.rb', line 2197 def count=(value) attributes['count'] = value end |
#created ⇒ Object
2210 2211 2212 |
# File 'lib/webpay/data_types.rb', line 2210 def created attributes['created'] end |
#created=(value) ⇒ Object
2215 2216 2217 2218 |
# File 'lib/webpay/data_types.rb', line 2215 def created=(value) value = value.is_a?(Hash) ? WebPay::CreatedRange.new(value) : value attributes['created'] = value end |
#customer ⇒ Object
2220 2221 2222 |
# File 'lib/webpay/data_types.rb', line 2220 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
2225 2226 2227 |
# File 'lib/webpay/data_types.rb', line 2225 def customer=(value) attributes['customer'] = value end |
#offset ⇒ Object
2201 2202 2203 |
# File 'lib/webpay/data_types.rb', line 2201 def offset attributes['offset'] end |
#offset=(value) ⇒ Object
2206 2207 2208 |
# File 'lib/webpay/data_types.rb', line 2206 def offset=(value) attributes['offset'] = value end |
#query_params ⇒ Object
2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 |
# File 'lib/webpay/data_types.rb', line 2173 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
2168 2169 2170 2171 |
# File 'lib/webpay/data_types.rb', line 2168 def request_body result = {} result end |
#shop ⇒ Object
2229 2230 2231 |
# File 'lib/webpay/data_types.rb', line 2229 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
2234 2235 2236 |
# File 'lib/webpay/data_types.rb', line 2234 def shop=(value) attributes['shop'] = value end |
#suspended ⇒ Object
2238 2239 2240 |
# File 'lib/webpay/data_types.rb', line 2238 def suspended attributes['suspended'] end |
#suspended=(value) ⇒ Object
2243 2244 2245 |
# File 'lib/webpay/data_types.rb', line 2243 def suspended=(value) attributes['suspended'] = value end |