Class: SixSaferpay::SixTransaction::MultipartCapture
- Inherits:
-
Object
- Object
- SixSaferpay::SixTransaction::MultipartCapture
- Defined in:
- lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#marketplace ⇒ Object
Returns the value of attribute marketplace.
-
#order_part_id ⇒ Object
Returns the value of attribute order_part_id.
-
#request_header ⇒ Object
Returns the value of attribute request_header.
-
#transaction_reference ⇒ Object
Returns the value of attribute transaction_reference.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(request_header: nil, transaction_reference:, amount: nil, type:, order_part_id:, marketplace: nil) ⇒ MultipartCapture
constructor
A new instance of MultipartCapture.
- #response_class ⇒ Object
- #to_hash ⇒ Object (also: #to_h)
- #to_json ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(request_header: nil, transaction_reference:, amount: nil, type:, order_part_id:, marketplace: nil) ⇒ MultipartCapture
Returns a new instance of MultipartCapture.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# 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 |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def amount @amount end |
#marketplace ⇒ Object
Returns the value of attribute marketplace.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def marketplace @marketplace end |
#order_part_id ⇒ Object
Returns the value of attribute order_part_id.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def order_part_id @order_part_id end |
#request_header ⇒ Object
Returns the value of attribute request_header.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def request_header @request_header end |
#transaction_reference ⇒ Object
Returns the value of attribute transaction_reference.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def transaction_reference @transaction_reference end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 5 def type @type end |
Instance Method Details
#response_class ⇒ Object
49 50 51 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 49 def response_class SixSaferpay::SixTransaction::MultipartCaptureResponse end |
#to_hash ⇒ Object Also known as: to_h
29 30 31 32 33 34 35 36 37 38 |
# 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 |
#to_json ⇒ Object
41 42 43 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 41 def to_json to_hash.to_json end |
#url ⇒ Object
45 46 47 |
# File 'lib/six_saferpay/api/six_transaction/requests/multipart_capture.rb', line 45 def url '/Payment/v1/Transaction/MultipartCapture' end |