Class: PayPal::SDK::Core::Credential::ThirdParty::Token
- Inherits:
-
Object
- Object
- PayPal::SDK::Core::Credential::ThirdParty::Token
- Defined in:
- lib/paypal-sdk/core/credential/third_party/token.rb
Constant Summary collapse
- RemoveProperties =
[ :username, :password, :signature ]
Instance Attribute Summary collapse
-
#credential ⇒ Object
Returns the value of attribute credential.
-
#token ⇒ Object
Returns the value of attribute token.
-
#token_secret ⇒ Object
Returns the value of attribute token_secret.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(credential, config, url) ⇒ Token
constructor
Initialize Token credentials === Arguments *
credential
– Credential Object *config
– Configuration object *url
– Request url. -
#properties ⇒ Object
Return credential properties for authentication.
Constructor Details
#initialize(credential, config, url) ⇒ Token
Initialize Token credentials
Arguments
-
credential
– Credential Object -
config
– Configuration object -
url
– Request url
13 14 15 16 17 18 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 13 def initialize(credential, config, url) @credential = credential @token = config.token @token_secret = config.token_secret @url = url end |
Instance Attribute Details
#credential ⇒ Object
Returns the value of attribute credential.
6 7 8 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 6 def credential @credential end |
#token ⇒ Object
Returns the value of attribute token.
6 7 8 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 6 def token @token end |
#token_secret ⇒ Object
Returns the value of attribute token_secret.
6 7 8 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 6 def token_secret @token_secret end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 6 def url @url end |
Instance Method Details
#properties ⇒ Object
Return credential properties for authentication.
23 24 25 26 27 |
# File 'lib/paypal-sdk/core/credential/third_party/token.rb', line 23 def properties credential_properties = credential.properties credential_properties.delete_if{|k,v| RemoveProperties.include? k } credential_properties.merge( :authorization => oauth_authentication ) end |