class SixSaferpay::SixTransaction::AdjustAmount
Attributes
amount[RW]
request_header[RW]
token[RW]
Public Class Methods
new(request_header: nil, token: , amount: )
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb, line 12 def initialize(request_header: nil, token: , amount: ) @request_header = request_header || SixSaferpay::RequestHeader.new() @token = token @amount = SixSaferpay::Amount.new(amount.to_h) if amount end
Public Instance Methods
response_class()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb, line 37 def response_class SixSaferpay::SixTransaction::AdjustAmountResponse end
to_hash()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb, line 20 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!(amount: @amount.to_h) if @amount hash end
Also aliased as: to_h
to_json()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb, line 29 def to_json to_hash.to_json end
url()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/adjust_amount.rb, line 33 def url '/Payment/v1/Transaction/AdjustAmount' end