Class: ISO8583::MKB::ISO8583Request
- Inherits:
-
Object
- Object
- ISO8583::MKB::ISO8583Request
- Defined in:
- lib/iso8583-mkb/iso8583_request.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Instance Method Summary collapse
- #complete(result) ⇒ Object
-
#initialize(transaction, request) ⇒ ISO8583Request
constructor
A new instance of ISO8583Request.
- #start(timeout = nil, &completion) ⇒ Object
Constructor Details
#initialize(transaction, request) ⇒ ISO8583Request
Returns a new instance of ISO8583Request.
5 6 7 8 9 10 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 5 def initialize(transaction, request) @transaction = transaction @request = request @timeout = nil @completion = nil end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
3 4 5 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 3 def request @request end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 3 def timeout @timeout end |
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
3 4 5 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 3 def transaction @transaction end |
Instance Method Details
#complete(result) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 19 def complete(result) block = @completion @completion = nil block.call result end |
#start(timeout = nil, &completion) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/iso8583-mkb/iso8583_request.rb', line 12 def start(timeout = nil, &completion) @completion = completion @timeout = timeout @transaction.gateway.post_request self end |