Class: OnlinePayments::SDK::Domain::BatchMetadata
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::BatchMetadata
- Defined in:
- lib/onlinepayments/sdk/domain/batch_metadata.rb
Instance Attribute Summary collapse
-
#item_count ⇒ Integer
The current value of item_count.
-
#merchant_batch_reference ⇒ String
The current value of merchant_batch_reference.
-
#operation_type ⇒ String
The current value of operation_type.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#item_count ⇒ Integer
Returns the current value of item_count.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/batch_metadata.rb', line 12 def item_count @item_count end |
#merchant_batch_reference ⇒ String
Returns the current value of merchant_batch_reference.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/batch_metadata.rb', line 12 def merchant_batch_reference @merchant_batch_reference end |
#operation_type ⇒ String
Returns the current value of operation_type.
12 13 14 |
# File 'lib/onlinepayments/sdk/domain/batch_metadata.rb', line 12 def operation_type @operation_type end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/onlinepayments/sdk/domain/batch_metadata.rb', line 29 def from_hash(hash) super if hash.has_key? 'itemCount' @item_count = hash['itemCount'] end if hash.has_key? 'merchantBatchReference' @merchant_batch_reference = hash['merchantBatchReference'] end if hash.has_key? 'operationType' @operation_type = hash['operationType'] end end |
#to_h ⇒ Hash
21 22 23 24 25 26 27 |
# File 'lib/onlinepayments/sdk/domain/batch_metadata.rb', line 21 def to_h hash = super hash['itemCount'] = @item_count unless @item_count.nil? hash['merchantBatchReference'] = @merchant_batch_reference unless @merchant_batch_reference.nil? hash['operationType'] = @operation_type unless @operation_type.nil? hash end |