Class: Worldline::Acquiring::SDK::V1::Domain::ApiActionResponseForRefund
- Inherits:
-
Domain::DataObject
- Object
- Domain::DataObject
- Worldline::Acquiring::SDK::V1::Domain::ApiActionResponseForRefund
- Defined in:
- lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb
Instance Attribute Summary collapse
-
#operation_id ⇒ String
The current value of operation_id.
-
#refund ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiRefundSummaryForResponse
The current value of refund.
-
#responder ⇒ String
The current value of responder.
-
#response_code ⇒ String
The current value of response_code.
-
#response_code_category ⇒ String
The current value of response_code_category.
-
#response_code_description ⇒ String
The current value of response_code_description.
Instance Method Summary collapse
Methods inherited from Domain::DataObject
Instance Attribute Details
#operation_id ⇒ String
Returns the current value of operation_id.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def operation_id @operation_id end |
#refund ⇒ Worldline::Acquiring::SDK::V1::Domain::ApiRefundSummaryForResponse
Returns the current value of refund.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def refund @refund end |
#responder ⇒ String
Returns the current value of responder.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def responder @responder end |
#response_code ⇒ String
Returns the current value of response_code.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def response_code @response_code end |
#response_code_category ⇒ String
Returns the current value of response_code_category.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def response_code_category @response_code_category end |
#response_code_description ⇒ String
Returns the current value of response_code_description.
18 19 20 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 18 def response_code_description @response_code_description end |
Instance Method Details
#from_hash(hash) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 44 def from_hash(hash) super if hash.has_key? 'operationId' @operation_id = hash['operationId'] end if hash.has_key? 'refund' raise TypeError, "value '%s' is not a Hash" % [hash['refund']] unless hash['refund'].is_a? Hash @refund = Worldline::Acquiring::SDK::V1::Domain::ApiRefundSummaryForResponse.new_from_hash(hash['refund']) 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_h ⇒ Hash
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/worldline/acquiring/sdk/v1/domain/api_action_response_for_refund.rb', line 33 def to_h hash = super hash['operationId'] = @operation_id unless @operation_id.nil? hash['refund'] = @refund.to_h unless @refund.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 |