class SixSaferpay::SixTransaction::Authorize

Attributes

condition[RW]
register_alias[RW]
request_header[RW]
token[RW]
verification_code[RW]

Public Class Methods

new(request_header: nil, token:, condition: nil, verification_code: nil, register_alias: nil ) click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize.rb, line 13
def initialize(request_header: nil,
               token:,
               condition: nil,
               verification_code: nil,
               register_alias: nil
              )
  @request_header = request_header || SixSaferpay::RequestHeader.new()
  @token = token
  @condition = condition
  @verification_code = verification_code
  @register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
end

Public Instance Methods

response_class() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize.rb, line 45
def response_class
  SixSaferpay::SixTransaction::AuthorizeResponse
end
to_h()
Alias for: to_hash
to_hash() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize.rb, line 26
def to_hash
  hash = Hash.new
  hash.merge!(request_header: @request_header.to_h) if @request_header
  hash.merge!(token: @token) if @token
  hash.merge!(condition: @condition) if @condition
  hash.merge!(verification_code: @verification_code) if @verification_code
  hash.merge!(register_alias: @register_alias.to_h) if @register_alias
  hash
end
Also aliased as: to_h
to_json() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize.rb, line 37
def to_json
  to_hash.to_json
end
url() click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/authorize.rb, line 41
def url
  '/Payment/v1/Transaction/Authorize'
end