Class: TinyGate::Types::SwitchOrgResponse
- Inherits:
-
Object
- Object
- TinyGate::Types::SwitchOrgResponse
- Defined in:
- lib/tiny_gate/types/switch_org_response.rb
Instance Method Summary collapse
-
#initialize(response) ⇒ SwitchOrgResponse
constructor
A new instance of SwitchOrgResponse.
- #new_token_url ⇒ Object
- #success? ⇒ Boolean
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_url ⇒ Object
16 17 18 |
# File 'lib/tiny_gate/types/switch_org_response.rb', line 16 def new_token_url @body['url'] end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/tiny_gate/types/switch_org_response.rb', line 12 def success? response.status == 200 end |