Class: AuthorizeNet::ARB::Paging
- Inherits:
-
Object
- Object
- AuthorizeNet::ARB::Paging
- Includes:
- Model
- Defined in:
- lib/authorize_net/arb/paging.rb
Instance Attribute Summary collapse
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#offset ⇒ Object
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize(offset, limit) ⇒ Paging
constructor
Initializes Paging object.
- #to_hash ⇒ Object
Methods included from Model
Constructor Details
#initialize(offset, limit) ⇒ Paging
Initializes Paging object.
Typical usage:
paging = AuthorizeNet::ARB::Paging.new(1,1000)
Valid values for offset: 1 to 100000 Valid values for limit: 1 to 1000
16 17 18 19 |
# File 'lib/authorize_net/arb/paging.rb', line 16 def initialize(offset, limit) @offset = offset @limit = limit end |
Instance Attribute Details
#limit ⇒ Object
Returns the value of attribute limit.
6 7 8 |
# File 'lib/authorize_net/arb/paging.rb', line 6 def limit @limit end |
#offset ⇒ Object
Returns the value of attribute offset.
6 7 8 |
# File 'lib/authorize_net/arb/paging.rb', line 6 def offset @offset end |
Instance Method Details
#to_hash ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/authorize_net/arb/paging.rb', line 21 def to_hash hash = { offset: @offset, limit: @limit } hash.delete_if { |_k, v| v.nil? } end |