Class: AuthorizeNet::ARB::Sorting
- Inherits:
-
Object
- Object
- AuthorizeNet::ARB::Sorting
- Includes:
- Model
- Defined in:
- lib/authorize_net/arb/sorting.rb
Instance Attribute Summary collapse
-
#order_by ⇒ Object
Returns the value of attribute order_by.
-
#order_descending ⇒ Object
Returns the value of attribute order_descending.
Instance Method Summary collapse
-
#initialize(order_by, order_descending) ⇒ Sorting
constructor
Initializes Sorting object.
- #to_hash ⇒ Object
Methods included from Model
Constructor Details
#initialize(order_by, order_descending) ⇒ Sorting
Initializes Sorting object.
Typical usage:
sorting = AuthorizeNet::ARB::Sorting.new('name',true)
Valid values for order_by values of the AuthorizeNet::ARB::Sorting:
id
name
status
createTimeStampUTC
lastName
firstName
accountNumber
amount
pastOccurrences
Valid values for order_descending: true, false, 1, 0
28 29 30 31 |
# File 'lib/authorize_net/arb/sorting.rb', line 28 def initialize(order_by, order_descending) @order_by = order_by @order_descending = order_descending end |
Instance Attribute Details
#order_by ⇒ Object
Returns the value of attribute order_by.
8 9 10 |
# File 'lib/authorize_net/arb/sorting.rb', line 8 def order_by @order_by end |
#order_descending ⇒ Object
Returns the value of attribute order_descending.
8 9 10 |
# File 'lib/authorize_net/arb/sorting.rb', line 8 def order_descending @order_descending end |
Instance Method Details
#to_hash ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/authorize_net/arb/sorting.rb', line 33 def to_hash hash = { :order_by => @order_by, :order_descending => @order_descending } hash.delete_if {|k, v| v.nil?} end |