Class: SwaggerPetstore::PetstoreAuthCredentials
- Inherits:
-
Object
- Object
- SwaggerPetstore::PetstoreAuthCredentials
- Defined in:
- lib/swagger_petstore/http/auth/petstore_auth.rb
Overview
Data class for PetstoreAuthCredentials.
Instance Attribute Summary collapse
-
#o_auth_client_id ⇒ Object
readonly
Returns the value of attribute o_auth_client_id.
-
#o_auth_redirect_uri ⇒ Object
readonly
Returns the value of attribute o_auth_redirect_uri.
-
#o_auth_scopes ⇒ Object
readonly
Returns the value of attribute o_auth_scopes.
-
#o_auth_token ⇒ Object
readonly
Returns the value of attribute o_auth_token.
Instance Method Summary collapse
- #clone_with(o_auth_client_id: nil, o_auth_redirect_uri: nil, o_auth_token: nil, o_auth_scopes: nil) ⇒ Object
-
#initialize(o_auth_client_id:, o_auth_redirect_uri:, o_auth_token: nil, o_auth_scopes: nil) ⇒ PetstoreAuthCredentials
constructor
A new instance of PetstoreAuthCredentials.
Constructor Details
#initialize(o_auth_client_id:, o_auth_redirect_uri:, o_auth_token: nil, o_auth_scopes: nil) ⇒ PetstoreAuthCredentials
Returns a new instance of PetstoreAuthCredentials.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 67 def initialize(o_auth_client_id:, o_auth_redirect_uri:, o_auth_token: nil, o_auth_scopes: nil) raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? raise ArgumentError, 'o_auth_redirect_uri cannot be nil' if o_auth_redirect_uri.nil? @o_auth_client_id = o_auth_client_id @o_auth_redirect_uri = o_auth_redirect_uri @o_auth_token = o_auth_token @o_auth_scopes = o_auth_scopes end |
Instance Attribute Details
#o_auth_client_id ⇒ Object (readonly)
Returns the value of attribute o_auth_client_id.
64 65 66 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 64 def o_auth_client_id @o_auth_client_id end |
#o_auth_redirect_uri ⇒ Object (readonly)
Returns the value of attribute o_auth_redirect_uri.
64 65 66 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 64 def o_auth_redirect_uri @o_auth_redirect_uri end |
#o_auth_scopes ⇒ Object (readonly)
Returns the value of attribute o_auth_scopes.
64 65 66 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 64 def o_auth_scopes @o_auth_scopes end |
#o_auth_token ⇒ Object (readonly)
Returns the value of attribute o_auth_token.
64 65 66 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 64 def o_auth_token @o_auth_token end |
Instance Method Details
#clone_with(o_auth_client_id: nil, o_auth_redirect_uri: nil, o_auth_token: nil, o_auth_scopes: nil) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/swagger_petstore/http/auth/petstore_auth.rb', line 78 def clone_with(o_auth_client_id: nil, o_auth_redirect_uri: nil, o_auth_token: nil, o_auth_scopes: nil) o_auth_client_id ||= self.o_auth_client_id o_auth_redirect_uri ||= self.o_auth_redirect_uri o_auth_token ||= self.o_auth_token o_auth_scopes ||= self.o_auth_scopes PetstoreAuthCredentials.new(o_auth_client_id: o_auth_client_id, o_auth_redirect_uri: o_auth_redirect_uri, o_auth_token: o_auth_token, o_auth_scopes: o_auth_scopes) end |