Class: OnlinePayments::SDK::Domain::GetBatchStatusResponse

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/get_batch_status_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#item_countInteger

Returns the current value of item_count.

Returns:

  • (Integer)

    the current value of item_count



13
14
15
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 13

def item_count
  @item_count
end

#merchant_batch_referenceString

Returns the current value of merchant_batch_reference.

Returns:

  • (String)

    the current value of merchant_batch_reference



13
14
15
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 13

def merchant_batch_reference
  @merchant_batch_reference
end

#operation_typeString

Returns the current value of operation_type.

Returns:

  • (String)

    the current value of operation_type



13
14
15
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 13

def operation_type
  @operation_type
end

#statusString

Returns the current value of status.

Returns:

  • (String)

    the current value of status



13
14
15
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 13

def status
  @status
end

Instance Method Details

#from_hash(hash) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 33

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
  if hash.has_key? 'status'
    @status = hash['status']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
31
# File 'lib/onlinepayments/sdk/domain/get_batch_status_response.rb', line 24

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['status'] = @status unless @status.nil?
  hash
end