Class: Xtb::Http::Command::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/xtb/http/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Response

Returns a new instance of Response.



33
34
35
36
37
# File 'lib/xtb/http/command.rb', line 33

def initialize(**args)
  super

  @response = parse
end

Instance Attribute Details

#commandObject

Returns the value of attribute command

Returns:

  • (Object)

    the current value of command



32
33
34
# File 'lib/xtb/http/command.rb', line 32

def command
  @command
end

#raw_responseObject

Returns the value of attribute raw_response

Returns:

  • (Object)

    the current value of raw_response



32
33
34
# File 'lib/xtb/http/command.rb', line 32

def raw_response
  @raw_response
end

Instance Method Details

#error_codeObject



53
54
55
# File 'lib/xtb/http/command.rb', line 53

def error_code
  response[:error_code]
end

#error_descriptionObject



57
58
59
# File 'lib/xtb/http/command.rb', line 57

def error_description
  response[:error_descr]
end

#return_dataObject



45
46
47
# File 'lib/xtb/http/command.rb', line 45

def return_data
  response[:return_data]
end

#statusObject Also known as: success?



39
40
41
# File 'lib/xtb/http/command.rb', line 39

def status
  response[:status]
end

#stream_session_idObject



49
50
51
# File 'lib/xtb/http/command.rb', line 49

def stream_session_id
  response[:stream_session_id]
end