Module: NetDocuments::UseToken::Controls::Token

Defined in:
lib/net_documents/use_token/controls/token.rb

Defined Under Namespace

Modules: Expired

Constant Summary collapse

User =
NetDocuments::Client::Controls::Token::User

Class Method Summary collapse

Class Method Details

.access_tokenObject



34
35
36
# File 'lib/net_documents/use_token/controls/token.rb', line 34

def self.access_token
  AccessToken.example
end

.example(provider: nil, user_id: nil, access_token: nil, refresh_token: nil, version: nil, expiration_time: nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/net_documents/use_token/controls/token.rb', line 7

def self.example(provider: nil, user_id: nil, access_token: nil, refresh_token: nil, version: nil, expiration_time: nil)
  provider ||= self.provider
  user_id ||= self.user_id
  access_token ||= self.access_token
  refresh_token ||= self.refresh_token
  version ||= self.version
  expiration_time ||= self.expiration_time

  token = UseToken::Token.new
  token.provider = provider
  token.user_id = user_id
  token.access_token = access_token
  token.refresh_token = refresh_token
  token.version = version
  token.expiration_time = expiration_time

  token
end

.expiration_timeObject



46
47
48
# File 'lib/net_documents/use_token/controls/token.rb', line 46

def self.expiration_time
  Time::Expiration.example
end

.providerObject



26
27
28
# File 'lib/net_documents/use_token/controls/token.rb', line 26

def self.provider
  Provider.example
end

.refresh_tokenObject



38
39
40
# File 'lib/net_documents/use_token/controls/token.rb', line 38

def self.refresh_token
  RefreshToken.example
end

.user_idObject



30
31
32
# File 'lib/net_documents/use_token/controls/token.rb', line 30

def self.user_id
  ID.example
end

.versionObject



42
43
44
# File 'lib/net_documents/use_token/controls/token.rb', line 42

def self.version
  TokenVersion.example
end