class SixSaferpay::SixTransaction::AuthorizeReferenced

Attributes

authentication[RW]
payment[RW]
request_header[RW]
suppress_dcc[RW]
terminal_id[RW]
transaction_reference[RW]

Public Class Methods

new(request_header: nil, terminal_id: nil, payment:, transaction_reference:, authentication: nil, suppress_dcc: ) click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb, line 14
def initialize(request_header: nil,
               terminal_id: nil,
               payment:,
               transaction_reference:,
               authentication: nil,
               suppress_dcc:
              )
  @request_header = request_header || SixSaferpay::RequestHeader.new()
  @terminal_id = terminal_id || SixSaferpay.config.terminal_id
  @payment = SixSaferpay::Payment.new(payment.to_h) if payment
  @transaction_reference = SixSaferpay::TransactionReference.new(transaction_reference.to_h) if transaction_reference
  @authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
  @suppress_dcc = suppress_dcc
end

Public Instance Methods

response_class() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb, line 49
def response_class
  SixSaferpay::SixTransaction::AuthorizeReferencedResponse
end
to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb, line 29
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!(payment: @payment.to_h) if @payment
  hash.merge!(transaction_reference: @transaction_reference.to_h) if @transaction_reference
  hash.merge!(authentication: @authentication.to_h) if @authentication
  hash.merge!(suppress_dcc: @suppress_dcc) if !@suppress_dcc.nil?
  hash
end
Also aliased as: to_h
to_json() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb, line 41
def to_json
  to_hash.to_json
end
url() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize_referenced.rb, line 45
def url
  '/Payment/v1/Transaction/AuthorizeReferenced'
end