class SixSaferpay::SixTransaction::MultipartCapture
Attributes
amount[RW]
marketplace[RW]
order_part_id[RW]
request_header[RW]
transaction_reference[RW]
type[RW]
Public Class Methods
new(request_header: nil, transaction_reference:, amount: nil, type:, order_part_id:, marketplace: nil )
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb, line 14 def initialize(request_header: nil, transaction_reference:, amount: nil, type:, order_part_id:, marketplace: nil ) @request_header = request_header || SixSaferpay::RequestHeader.new() @transaction_reference = SixSaferpay::TransactionReference.new(transaction_reference.to_h) if transaction_reference @amount = SixSaferpay::Amount.new(amount.to_h) if amount @type = type @order_part_id = order_part_id @marketplace = SixSaferpay::Marketplace.new(marketplace.to_h) if marketplace end
Public Instance Methods
response_class()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb, line 49 def response_class SixSaferpay::SixTransaction::MultipartCaptureResponse end
to_hash()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb, line 29 def to_hash hash = Hash.new hash.merge!(request_header: @request_header.to_h) if @request_header hash.merge!(transaction_reference: @transaction_reference.to_h) if @transaction_reference hash.merge!(amount: @amount.to_h) if @amount hash.merge!(type: @type) if @type hash.merge!(order_part_id: @order_part_id) if @order_part_id hash.merge!(marketplace: @marketplace.to_h) if @marketplace hash end
Also aliased as: to_h
to_json()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb, line 41 def to_json to_hash.to_json end
url()
click to toggle source
# File lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb, line 45 def url '/Payment/v1/Transaction/MultipartCapture' end