class SixSaferpay::SixTransaction::Refund
Attributes
capture_reference[RW]
pending_notification[RW]
refund[RW]
request_header[RW]
Public Class Methods
new(request_header: nil, refund: , capture_reference: , pending_notification: nil)
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund.rb, line 12 def initialize(request_header: nil, refund: , capture_reference: , pending_notification: nil) @request_header = request_header || SixSaferpay::RequestHeader.new() @refund = SixSaferpay::Refund.new(refund.to_h) if refund @capture_reference = SixSaferpay::CaptureReference.new(capture_reference.to_h) if capture_reference @pending_notification = SixSaferpay::PendingNotification.new(pending_notification.to_h) if pending_notification end
Public Instance Methods
response_class()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund.rb, line 40 def response_class SixSaferpay::SixTransaction::RefundResponse end
to_hash()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund.rb, line 22 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(refund: @refund.to_h) if @refund hash.merge!(capture_reference: @capture_reference.to_h) if @capture_reference hash.merge!(pending_notification: @pending_notification.to_h) if @pending_notification hash end
Also aliased as: to_h
to_json()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund.rb, line 32 def to_json to_hash.to_json end
url()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund.rb, line 36 def url '/Payment/v1/Transaction/Refund' end