Class: SixSaferpay::SixBatch::Close
- Inherits:
-
Object
- Object
- SixSaferpay::SixBatch::Close
- Defined in:
- lib/six_saferpay/api/six_batch/requests/close.rb
Instance Attribute Summary collapse
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#terminal_id ⇒ Object
Returns the value of attribute terminal_id.
Instance Method Summary collapse
-
#initialize(request_header: nil, terminal_id:) ⇒ Close
constructor
A new instance of Close.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, terminal_id:) ⇒ Close
Returns a new instance of Close.
9 10 11 12 13 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 9 def initialize(request_header: nil, terminal_id: ) @request_header = request_header || SixSaferpay::RequestHeader.new() @terminal_id = terminal_id end |
Instance Attribute Details
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 5 def request_header @request_header end |
#terminal_id ⇒ Object
Returns the value of attribute terminal_id.
5 6 7 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 5 def terminal_id @terminal_id end |
Instance Method Details
#response_class ⇒ Object
31 32 33 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 31 def response_class SixSaferpay::SixBatch::CloseResponse end |
#to_hash ⇒ Object Also known as: to_h
15 16 17 18 19 20 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 15 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(terminal_id: @terminal_id) if @terminal_id hash end |
#to_json ⇒ Object
23 24 25 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 23 def to_json to_hash.to_json end |
#url ⇒ Object
27 28 29 |
# File 'lib/six_saferpay/api/six_batch/requests/close.rb', line 27 def url '/Payment/v1/Batch/Close' end |