class SixSaferpay::SixTransaction::RefundDirect

Attributes

payment_means[RW]
refund[RW]
request_header[RW]
terminal_id[RW]

Public Class Methods

new(request_header: nil, terminal_id:, refund:, payment_means: ) click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund_direct.rb, line 12
def initialize(request_header: nil,
               terminal_id:,
               refund:,
               payment_means:
              )
  @request_header = request_header || SixSaferpay::RequestHeader.new()
  @terminal_id = terminal_id
  @refund = SixSaferpay::Refund.new(refund.to_h) if refund
  @payment_means = SixSaferpay::RequestPaymentMeans.new(payment_means.to_h) if payment_means
end

Public Instance Methods

response_class() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund_direct.rb, line 41
def response_class
  SixSaferpay::SixTransaction::RefundDirectResponse
end
to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund_direct.rb, line 23
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.merge!(refund: @refund.to_h) if @refund
  hash.merge!(payment_means: @payment_means.to_h) if @payment_means
  hash
end
Also aliased as: to_h
to_json() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund_direct.rb, line 33
def to_json
  to_hash.to_json
end
url() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/refund_direct.rb, line 37
def url
  '/Payment/v1/Transaction/RefundDirect'
end