Class: PayPal::SDK::Core::Credential::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/paypal-sdk/core/credential/base.rb

Overview

Base credential Class for authentication

Direct Known Subclasses

Certificate, Signature

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Base

Initialize authentication configurations

Arguments

* <tt>config</tt> -- Configuration object


11
12
13
14
15
16
17
# File 'lib/paypal-sdk/core/credential/base.rb', line 11

def initialize(config)
  self.username = config.username
  self.password = config.password
  self.app_id   = config.app_id
  self.device_ipaddress = config.device_ipaddress
  self.sandbox_email_address = config.sandbox_email_address
end

Instance Attribute Details

#app_idObject

Returns the value of attribute app_id.



6
7
8
# File 'lib/paypal-sdk/core/credential/base.rb', line 6

def app_id
  @app_id
end

#device_ipaddressObject

Returns the value of attribute device_ipaddress.



6
7
8
# File 'lib/paypal-sdk/core/credential/base.rb', line 6

def device_ipaddress
  @device_ipaddress
end

#passwordObject

Returns the value of attribute password.



6
7
8
# File 'lib/paypal-sdk/core/credential/base.rb', line 6

def password
  @password
end

#sandbox_email_addressObject

Returns the value of attribute sandbox_email_address.



6
7
8
# File 'lib/paypal-sdk/core/credential/base.rb', line 6

def sandbox_email_address
  @sandbox_email_address
end

#usernameObject

Returns the value of attribute username.



6
7
8
# File 'lib/paypal-sdk/core/credential/base.rb', line 6

def username
  @username
end

Instance Method Details

#propertiesObject

Return credential properties



20
21
22
23
# File 'lib/paypal-sdk/core/credential/base.rb', line 20

def properties
  { :username => username, :password => password, :app_id => app_id,
    :device_ipaddress => device_ipaddress, :sandbox_email_address => sandbox_email_address }
end