Class: Jbr::Mock::OAuth

Inherits:
OAuth
  • Object
show all
Defined in:
lib/jbr/mock/oauth.rb

Constant Summary

Constants inherited from OAuth

OAuth::DISCONNECT_MUTATION

Instance Attribute Summary

Attributes inherited from OAuth

#access_token, #account_id, #expires_at, #invalid_at, #refresh_token

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OAuth

client_id, client_secret, #clients, create, #initialize, #query

Constructor Details

This class inherits a constructor from Jbr::OAuth

Class Method Details

.post(_) ⇒ Object

Raises:



13
14
15
16
17
# File 'lib/jbr/mock/oauth.rb', line 13

def self.post(_)
  raise Error, error: Jbr.mock.oauth_error if Jbr.mock.oauth_error

  { access_token: 'mock-token', refresh_token: 'mock-token', expires_at: (Time.current + 3600) }
end

Instance Method Details

#accountObject



7
# File 'lib/jbr/mock/oauth.rb', line 7

def  = Mock::Account.new oauth: self

#deleteObject



9
# File 'lib/jbr/mock/oauth.rb', line 9

def delete; end

#invoicesObject



3
# File 'lib/jbr/mock/oauth.rb', line 3

def invoices = Mock::Invoice.new(oauth: self)

#jobsObject



4
# File 'lib/jbr/mock/oauth.rb', line 4

def jobs = Mock::Job.new(oauth: self)

#quotesObject



5
# File 'lib/jbr/mock/oauth.rb', line 5

def quotes = Mock::Quote.new(oauth: self)

#requestsObject



6
# File 'lib/jbr/mock/oauth.rb', line 6

def requests = Mock::Request.new(oauth: self)