class SixSaferpay::SixTransaction::CaptureResponse
Attributes
capture_id[RW]
date[RW]
invoice[RW]
response_header[RW]
status[RW]
Public Class Methods
new(response_header: , capture_id: nil, status: , date: , invoice: nil)
click to toggle source
# File lib/six_saferpay/api/six_transaction/responses/capture_response.rb, line 12 def initialize(response_header: , capture_id: nil, status: , date: , invoice: nil) @response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header @capture_id = capture_id @status = status @date = date @invoice = SixSaferpay::Invoice.new(invoice.to_h) if invoice end
Public Instance Methods
to_hash()
click to toggle source
# File lib/six_saferpay/api/six_transaction/responses/capture_response.rb, line 24 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.merge!(invoice: @invoice.to_h) if @invoice hash end
Also aliased as: to_h