Class: InvestTinkoff::V2::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/invest_tinkoff/v2/response.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(response) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/invest_tinkoff/v2/response.rb', line 9

def self.create response
  attributes = response.parsed_response || {}
  new(
    attributes,
    response.code
  )
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/invest_tinkoff/v2/response.rb', line 17

def success?
  http_code == 200
end