Class: OnlinePayments::SDK::Domain::CapturePaymentBatchRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::CapturePaymentBatchRequest
- Defined in:
- lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb
Instance Attribute Summary collapse
-
#capture ⇒ OnlinePayments::SDK::Domain::CapturePaymentRequest
The current value of capture.
-
#payment_id ⇒ String
The current value of payment_id.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#capture ⇒ OnlinePayments::SDK::Domain::CapturePaymentRequest
Returns the current value of capture.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb', line 12 def capture @capture end |
#payment_id ⇒ String
Returns the current value of payment_id.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb', line 12 def payment_id @payment_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
26 27 28 29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb', line 26 def from_hash(hash) super if hash.has_key? 'capture' raise TypeError, "value '%s' is not a Hash" % [hash['capture']] unless hash['capture'].is_a? Hash @capture = OnlinePayments::SDK::Domain::CapturePaymentRequest.new_from_hash(hash['capture']) end if hash.has_key? 'paymentId' @payment_id = hash['paymentId'] end end |
#to_h ⇒ Hash
19 20 21 22 23 24 |
# File 'lib/onlinepayments/sdk/domain/capture_payment_batch_request.rb', line 19 def to_h hash = super hash['capture'] = @capture.to_h unless @capture.nil? hash['paymentId'] = @payment_id unless @payment_id.nil? hash end |