Class: SixSaferpay::SixTransaction::MultipartCaptureResponse
- Inherits:
-
Object
- Object
- SixSaferpay::SixTransaction::MultipartCaptureResponse
- Defined in:
- lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb
Instance Attribute Summary collapse
-
#capture_id ⇒ Object
Returns the value of attribute capture_id.
-
#date ⇒ Object
Returns the value of attribute date.
-
#response_header ⇒ Object
Returns the value of attribute response_header.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response_header:, capture_id: nil, status:, date:) ⇒ MultipartCaptureResponse
constructor
A new instance of MultipartCaptureResponse.
- #to_hash ⇒ Object (also: #to_h)
Constructor Details
#initialize(response_header:, capture_id: nil, status:, date:) ⇒ MultipartCaptureResponse
Returns a new instance of MultipartCaptureResponse.
11 12 13 14 15 16 17 18 19 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 11 def initialize(response_header: , capture_id: nil, status: , date: ) @response_header = SixSaferpay::ResponseHeader.new(**response_header.to_h) if response_header @capture_id = capture_id @status = status @date = date end |
Instance Attribute Details
#capture_id ⇒ Object
Returns the value of attribute capture_id.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 5 def capture_id @capture_id end |
#date ⇒ Object
Returns the value of attribute date.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 5 def date @date end |
#response_header ⇒ Object
Returns the value of attribute response_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 5 def response_header @response_header end |
#status ⇒ Object
Returns the value of attribute status.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 5 def status @status end |
Instance Method Details
#to_hash ⇒ Object Also known as: to_h
21 22 23 24 25 26 27 28 |
# File 'lib/six_saferpay/api/six_transaction/responses/multipart_capture_response.rb', line 21 def to_hash hash = Hash.new hash.merge!(response_header: @response_header.to_h) if @response_header hash.merge!(capture_id: @capture_id) if @capture_id hash.merge!(status: @status) if @status hash.merge!(date: @date) if @date hash end |