Class: TinyGate::Types::SwitchOrgResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/tiny_gate/types/switch_org_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ SwitchOrgResponse

Returns a new instance of SwitchOrgResponse.



7
8
9
10
# File 'lib/tiny_gate/types/switch_org_response.rb', line 7

def initialize(response)
  @response = response
  @body = JSON.parse(response.body)
end

Instance Method Details

#new_token_urlObject



16
17
18
# File 'lib/tiny_gate/types/switch_org_response.rb', line 16

def new_token_url
  @body['url']
end

#success?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/tiny_gate/types/switch_org_response.rb', line 12

def success?
  response.status == 200
end