Class: Worldline::Acquiring::SDK::V1::Domain::ApiBalanceInquiryResponse

Inherits:
Domain::DataObject
  • Object
show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#authorization_codeString

Returns the current value of authorization_code.

Returns:

  • (String)

    the current value of authorization_code



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def authorization_code
  @authorization_code
end

#available_amountWorldline::Acquiring::SDK::V1::Domain::AmountData

Returns the current value of available_amount.

Returns:



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def available_amount
  @available_amount
end

#operation_idString

Returns the current value of operation_id.

Returns:

  • (String)

    the current value of operation_id



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def operation_id
  @operation_id
end

#referencesWorldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses

Returns the current value of references.

Returns:



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def references
  @references
end

#responderString

Returns the current value of responder.

Returns:

  • (String)

    the current value of responder



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def responder
  @responder
end

#response_codeString

Returns the current value of response_code.

Returns:

  • (String)

    the current value of response_code



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def response_code
  @response_code
end

#response_code_categoryString

Returns the current value of response_code_category.

Returns:

  • (String)

    the current value of response_code_category



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def response_code_category
  @response_code_category
end

#response_code_descriptionString

Returns the current value of response_code_description.

Returns:

  • (String)

    the current value of response_code_description



21
22
23
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 21

def response_code_description
  @response_code_description
end

Instance Method Details

#from_hash(hash) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 53

def from_hash(hash)
  super
  if hash.has_key? 'authorizationCode'
    @authorization_code = hash['authorizationCode']
  end
  if hash.has_key? 'availableAmount'
    raise TypeError, "value '%s' is not a Hash" % [hash['availableAmount']] unless hash['availableAmount'].is_a? Hash
    @available_amount = Worldline::Acquiring::SDK::V1::Domain::AmountData.new_from_hash(hash['availableAmount'])
  end
  if hash.has_key? 'operationId'
    @operation_id = hash['operationId']
  end
  if hash.has_key? 'references'
    raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
    @references = Worldline::Acquiring::SDK::V1::Domain::ApiReferencesForResponses.new_from_hash(hash['references'])
  end
  if hash.has_key? 'responder'
    @responder = hash['responder']
  end
  if hash.has_key? 'responseCode'
    @response_code = hash['responseCode']
  end
  if hash.has_key? 'responseCodeCategory'
    @response_code_category = hash['responseCodeCategory']
  end
  if hash.has_key? 'responseCodeDescription'
    @response_code_description = hash['responseCodeDescription']
  end
end

#to_hHash

Returns:

  • (Hash)


40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/worldline/acquiring/sdk/v1/domain/api_balance_inquiry_response.rb', line 40

def to_h
  hash = super
  hash['authorizationCode'] = @authorization_code unless @authorization_code.nil?
  hash['availableAmount'] = @available_amount.to_h unless @available_amount.nil?
  hash['operationId'] = @operation_id unless @operation_id.nil?
  hash['references'] = @references.to_h unless @references.nil?
  hash['responder'] = @responder unless @responder.nil?
  hash['responseCode'] = @response_code unless @response_code.nil?
  hash['responseCodeCategory'] = @response_code_category unless @response_code_category.nil?
  hash['responseCodeDescription'] = @response_code_description unless @response_code_description.nil?
  hash
end