Class: NetSuite::Passports::Token
- Inherits:
-
Object
- Object
- NetSuite::Passports::Token
- Defined in:
- lib/netsuite/passports/token.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#consumer_key ⇒ Object
readonly
Returns the value of attribute consumer_key.
-
#consumer_secret ⇒ Object
readonly
Returns the value of attribute consumer_secret.
-
#token_id ⇒ Object
readonly
Returns the value of attribute token_id.
-
#token_secret ⇒ Object
readonly
Returns the value of attribute token_secret.
Instance Method Summary collapse
-
#initialize(account, consumer_key, consumer_secret, token_id, token_secret) ⇒ Token
constructor
A new instance of Token.
- #passport ⇒ Object
Constructor Details
#initialize(account, consumer_key, consumer_secret, token_id, token_secret) ⇒ Token
Returns a new instance of Token.
6 7 8 9 10 11 12 |
# File 'lib/netsuite/passports/token.rb', line 6 def initialize(account, consumer_key, consumer_secret, token_id, token_secret) @account = account.to_s @consumer_key = consumer_key @consumer_secret = consumer_secret @token_id = token_id @token_secret = token_secret end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
4 5 6 |
# File 'lib/netsuite/passports/token.rb', line 4 def account @account end |
#consumer_key ⇒ Object (readonly)
Returns the value of attribute consumer_key.
4 5 6 |
# File 'lib/netsuite/passports/token.rb', line 4 def consumer_key @consumer_key end |
#consumer_secret ⇒ Object (readonly)
Returns the value of attribute consumer_secret.
4 5 6 |
# File 'lib/netsuite/passports/token.rb', line 4 def consumer_secret @consumer_secret end |
#token_id ⇒ Object (readonly)
Returns the value of attribute token_id.
4 5 6 |
# File 'lib/netsuite/passports/token.rb', line 4 def token_id @token_id end |
#token_secret ⇒ Object (readonly)
Returns the value of attribute token_secret.
4 5 6 |
# File 'lib/netsuite/passports/token.rb', line 4 def token_secret @token_secret end |
Instance Method Details
#passport ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/netsuite/passports/token.rb', line 14 def passport { 'platformMsgs:tokenPassport' => { 'platformCore:account' => account, 'platformCore:consumerKey' => consumer_key, 'platformCore:token' => token_id, 'platformCore:nonce' => nonce, 'platformCore:timestamp' => , 'platformCore:signature' => signature, :attributes! => { 'platformCore:signature' => { 'algorithm' => 'HMAC-SHA256' } } } } end |