Class: SwaggerPetstoreOpenApi30::CustomHeaderAuthenticationCredentials
- Inherits:
-
Object
- Object
- SwaggerPetstoreOpenApi30::CustomHeaderAuthenticationCredentials
- Defined in:
- lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb
Overview
Data class for CustomHeaderAuthenticationCredentials. Data class for CustomHeaderAuthenticationCredentials.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
- #clone_with(api_key: nil) ⇒ Object
-
#initialize(api_key:) ⇒ CustomHeaderAuthenticationCredentials
constructor
A new instance of CustomHeaderAuthenticationCredentials.
Constructor Details
#initialize(api_key:) ⇒ CustomHeaderAuthenticationCredentials
Returns a new instance of CustomHeaderAuthenticationCredentials.
30 31 32 33 34 |
# File 'lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb', line 30 def initialize(api_key:) raise ArgumentError, 'api_key cannot be nil' if api_key.nil? @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
28 29 30 |
# File 'lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb', line 28 def api_key @api_key end |
Instance Method Details
#clone_with(api_key: nil) ⇒ Object
36 37 38 39 40 |
# File 'lib/swagger_petstore_open_api30/http/auth/custom_header_authentication.rb', line 36 def clone_with(api_key: nil) api_key ||= self.api_key CustomHeaderAuthenticationCredentials.new(api_key: api_key) end |