Class: ShellDataReportingApIs::BearerTokenCredentials
- Inherits:
-
Object
- Object
- ShellDataReportingApIs::BearerTokenCredentials
- Defined in:
- lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb
Overview
Data class for BearerTokenCredentials.
Instance Attribute Summary collapse
-
#o_auth_client_id ⇒ Object
readonly
Returns the value of attribute o_auth_client_id.
-
#o_auth_client_secret ⇒ Object
readonly
Returns the value of attribute o_auth_client_secret.
-
#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_client_secret: nil, o_auth_token: nil) ⇒ Object
-
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) ⇒ BearerTokenCredentials
constructor
A new instance of BearerTokenCredentials.
Constructor Details
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) ⇒ BearerTokenCredentials
Returns a new instance of BearerTokenCredentials.
69 70 71 72 73 74 75 76 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 69 def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil) raise ArgumentError, 'o_auth_client_id cannot be nil' if o_auth_client_id.nil? raise ArgumentError, 'o_auth_client_secret cannot be nil' if o_auth_client_secret.nil? @o_auth_client_id = o_auth_client_id @o_auth_client_secret = o_auth_client_secret @o_auth_token = o_auth_token end |
Instance Attribute Details
#o_auth_client_id ⇒ Object (readonly)
Returns the value of attribute o_auth_client_id.
67 68 69 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 67 def o_auth_client_id @o_auth_client_id end |
#o_auth_client_secret ⇒ Object (readonly)
Returns the value of attribute o_auth_client_secret.
67 68 69 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 67 def o_auth_client_secret @o_auth_client_secret end |
#o_auth_token ⇒ Object (readonly)
Returns the value of attribute o_auth_token.
67 68 69 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 67 def o_auth_token @o_auth_token end |
Instance Method Details
#clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil) ⇒ Object
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/shell_data_reporting_ap_is/http/auth/bearer_token.rb', line 78 def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil) o_auth_client_id ||= self.o_auth_client_id o_auth_client_secret ||= self.o_auth_client_secret o_auth_token ||= self.o_auth_token BearerTokenCredentials.new(o_auth_client_id: o_auth_client_id, o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token) end |