Class: Docdata::Order::StartResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/docdata/order/response.rb

Overview

Response to a start operation.

Instance Attribute Summary

Attributes inherited from Response

#options, #response

Instance Method Summary collapse

Methods inherited from Response

#body, #error_code, #error_message, #initialize

Constructor Details

This class inherits a constructor from Docdata::Order::Response

Instance Method Details

#dataObject



125
126
127
# File 'lib/docdata/order/response.rb', line 125

def data
  body[:start_response]
end

#error?Boolean

Returns:

  • (Boolean)


133
134
135
# File 'lib/docdata/order/response.rb', line 133

def error?
  data.key?(:start_errors)
end

#errorsObject



137
138
139
# File 'lib/docdata/order/response.rb', line 137

def errors
  data[:start_errors]
end

#payment_idObject



149
150
151
# File 'lib/docdata/order/response.rb', line 149

def payment_id
  payment_success[:id] if payment_success
end

#payment_responseObject



141
142
143
# File 'lib/docdata/order/response.rb', line 141

def payment_response
  data[:start_success][:payment_response]
end

#payment_successObject



145
146
147
# File 'lib/docdata/order/response.rb', line 145

def payment_success
  payment_response[:payment_success] if payment_response
end

#success?Boolean

Returns:

  • (Boolean)


129
130
131
# File 'lib/docdata/order/response.rb', line 129

def success?
  data.key?(:start_success)
end