Class: PaypalServerSdk::ClientCredentialsAuthCredentials
- Inherits:
-
Object
- Object
- PaypalServerSdk::ClientCredentialsAuthCredentials
- Defined in:
- lib/paypal_server_sdk/http/auth/o_auth2.rb
Overview
Data class for ClientCredentialsAuthCredentials.
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_clock_skew ⇒ Object
readonly
Returns the value of attribute o_auth_clock_skew.
-
#o_auth_on_token_update ⇒ Object
readonly
Returns the value of attribute o_auth_on_token_update.
-
#o_auth_token ⇒ Object
readonly
Returns the value of attribute o_auth_token.
-
#o_auth_token_provider ⇒ Object
readonly
Returns the value of attribute o_auth_token_provider.
Instance Method Summary collapse
- #clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ Object
-
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ ClientCredentialsAuthCredentials
constructor
A new instance of ClientCredentialsAuthCredentials.
Constructor Details
#initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ ClientCredentialsAuthCredentials
Returns a new instance of ClientCredentialsAuthCredentials.
103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 103 def initialize(o_auth_client_id:, o_auth_client_secret:, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: 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 @o_auth_token_provider = o_auth_token_provider @o_auth_on_token_update = o_auth_on_token_update @o_auth_clock_skew = o_auth_clock_skew end |
Instance Attribute Details
#o_auth_client_id ⇒ Object (readonly)
Returns the value of attribute o_auth_client_id.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 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.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 def o_auth_client_secret @o_auth_client_secret end |
#o_auth_clock_skew ⇒ Object (readonly)
Returns the value of attribute o_auth_clock_skew.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 def o_auth_clock_skew @o_auth_clock_skew end |
#o_auth_on_token_update ⇒ Object (readonly)
Returns the value of attribute o_auth_on_token_update.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 def o_auth_on_token_update @o_auth_on_token_update end |
#o_auth_token ⇒ Object (readonly)
Returns the value of attribute o_auth_token.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 def o_auth_token @o_auth_token end |
#o_auth_token_provider ⇒ Object (readonly)
Returns the value of attribute o_auth_token_provider.
99 100 101 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 99 def o_auth_token_provider @o_auth_token_provider end |
Instance Method Details
#clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: nil) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/paypal_server_sdk/http/auth/o_auth2.rb', line 117 def clone_with(o_auth_client_id: nil, o_auth_client_secret: nil, o_auth_token: nil, o_auth_token_provider: nil, o_auth_on_token_update: nil, o_auth_clock_skew: 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 o_auth_token_provider ||= self.o_auth_token_provider o_auth_on_token_update ||= self.o_auth_on_token_update o_auth_clock_skew ||= self.o_auth_clock_skew ClientCredentialsAuthCredentials.new( o_auth_client_id: o_auth_client_id, o_auth_client_secret: o_auth_client_secret, o_auth_token: o_auth_token, o_auth_token_provider: o_auth_token_provider, o_auth_on_token_update: o_auth_on_token_update, o_auth_clock_skew: o_auth_clock_skew ) end |