Class: DryOpenApi::OAuthFlows

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Includes:
EquatableAsContent
Defined in:
lib/dry_open_api/o_auth_flows.rb

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from EquatableAsContent

#==

Instance Attribute Details

#authorization_codeObject

Returns the value of attribute authorization_code.



9
10
11
# File 'lib/dry_open_api/o_auth_flows.rb', line 9

def authorization_code
  @authorization_code
end

#client_credentialsObject

Returns the value of attribute client_credentials.



9
10
11
# File 'lib/dry_open_api/o_auth_flows.rb', line 9

def client_credentials
  @client_credentials
end

#implicitObject

Returns the value of attribute implicit.



9
10
11
# File 'lib/dry_open_api/o_auth_flows.rb', line 9

def implicit
  @implicit
end

#passwordObject

Returns the value of attribute password.



9
10
11
# File 'lib/dry_open_api/o_auth_flows.rb', line 9

def password
  @password
end

Class Method Details

.load(hash) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/dry_open_api/o_auth_flows.rb', line 16

def self.load(hash)
  return unless hash

  new(
    implicit: OAuthFlow.load(hash['implicit']),
    password: OAuthFlow.load(hash['password']),
    client_credentials: OAuthFlow.load(hash['clientCredentials']),
    authorization_code: OAuthFlow.load(hash['authorizationCode']),
  )
end