Class: Worldline::Acquiring::SDK::V1::Domain::GetDccRateResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#disclaimer_displayString

Returns the current value of disclaimer_display.

Returns:

  • (String)

    the current value of disclaimer_display



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_response.rb', line 16

def disclaimer_display
  @disclaimer_display
end

#disclaimer_receiptString

Returns the current value of disclaimer_receipt.

Returns:

  • (String)

    the current value of disclaimer_receipt



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_response.rb', line 16

def disclaimer_receipt
  @disclaimer_receipt
end

#proposalWorldline::Acquiring::SDK::V1::Domain::DccProposal

Returns the current value of proposal.

Returns:



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_response.rb', line 16

def proposal
  @proposal
end

#resultString

Returns the current value of result.

Returns:

  • (String)

    the current value of result



16
17
18
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_response.rb', line 16

def result
  @result
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'disclaimerDisplay'
    @disclaimer_display = hash['disclaimerDisplay']
  end
  if hash.has_key? 'disclaimerReceipt'
    @disclaimer_receipt = hash['disclaimerReceipt']
  end
  if hash.has_key? 'proposal'
    raise TypeError, "value '%s' is not a Hash" % [hash['proposal']] unless hash['proposal'].is_a? Hash
    @proposal = Worldline::Acquiring::SDK::V1::Domain::DccProposal.new_from_hash(hash['proposal'])
  end
  if hash.has_key? 'result'
    @result = hash['result']
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
# File 'lib/worldline/acquiring/sdk/v1/domain/get_dcc_rate_response.rb', line 27

def to_h
  hash = super
  hash['disclaimerDisplay'] = @disclaimer_display unless @disclaimer_display.nil?
  hash['disclaimerReceipt'] = @disclaimer_receipt unless @disclaimer_receipt.nil?
  hash['proposal'] = @proposal.to_h unless @proposal.nil?
  hash['result'] = @result unless @result.nil?
  hash
end