Class: EwayRapid::Enums::TransactionFilter
- Inherits:
-
Object
- Object
- EwayRapid::Enums::TransactionFilter
- Defined in:
- lib/eway_rapid/models/enums.rb
Constant Summary collapse
- TRANSACTION_ID_INDEX =
1
- ACCESS_CODE_INDEX =
2
- INVOICE_NUMBER_INDEX =
3
- INVOICE_REFERENCE_INDEX =
4
Instance Attribute Summary collapse
-
#access_code ⇒ Object
Returns the value of attribute access_code.
-
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
-
#invoice_reference ⇒ Object
Returns the value of attribute invoice_reference.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
Instance Attribute Details
#access_code ⇒ Object
Returns the value of attribute access_code.
75 76 77 |
# File 'lib/eway_rapid/models/enums.rb', line 75 def access_code @access_code end |
#invoice_number ⇒ Object
Returns the value of attribute invoice_number.
75 76 77 |
# File 'lib/eway_rapid/models/enums.rb', line 75 def invoice_number @invoice_number end |
#invoice_reference ⇒ Object
Returns the value of attribute invoice_reference.
75 76 77 |
# File 'lib/eway_rapid/models/enums.rb', line 75 def invoice_reference @invoice_reference end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
75 76 77 |
# File 'lib/eway_rapid/models/enums.rb', line 75 def transaction_id @transaction_id end |
Instance Method Details
#calculate_index_of_value ⇒ Integer
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/eway_rapid/models/enums.rb', line 81 def calculate_index_of_value index = 0 count = 0 unless transaction_id.nil? index = TRANSACTION_ID_INDEX count += 1 end unless access_code.nil? index = ACCESS_CODE_INDEX count += 1 end unless invoice_number.nil? index = INVOICE_NUMBER_INDEX count += 1 end unless invoice_reference.nil? index = INVOICE_REFERENCE_INDEX count += 1 end if count == 1 index else nil end end |