Class: AuthorizeNet::ARB::Paging

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/authorize_net/arb/paging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

#to_a

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



18
19
20
21
# File 'lib/authorize_net/arb/paging.rb', line 18

def initialize(offset,limit)
  @offset = offset
  @limit = limit
end

Instance Attribute Details

#limitObject

Returns the value of attribute limit.



8
9
10
# File 'lib/authorize_net/arb/paging.rb', line 8

def limit
  @limit
end

#offsetObject

Returns the value of attribute offset.



8
9
10
# File 'lib/authorize_net/arb/paging.rb', line 8

def offset
  @offset
end

Instance Method Details

#to_hashObject



23
24
25
26
27
28
29
# File 'lib/authorize_net/arb/paging.rb', line 23

def to_hash
  hash = {
    :offset => @offset,
    :limit => @limit
  }
  hash.delete_if {|k, v| v.nil?}
end