Class: Legion::Extensions::ServiceNow::Client
- Inherits:
-
Object
- Object
- Legion::Extensions::ServiceNow::Client
- Includes:
- Account::Runners::Account, Legion::Extensions::ServiceNow::Change::Runners::Change, Legion::Extensions::ServiceNow::Cmdb::Instance::Runners::Instance, Legion::Extensions::ServiceNow::Cmdb::Meta::Runners::Meta, Helpers::Client, Knowledge::Runners::Knowledge, ServiceCatalog::Runners::ServiceCatalog
- Defined in:
- lib/legion/extensions/service_now/client.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
- #connection(**override) ⇒ Object
-
#initialize(url: nil, client_id: nil, client_secret: nil, token: nil, username: nil, password: nil, **extra) ⇒ Client
constructor
A new instance of Client.
Methods included from Account::Runners::Account
#create_account, #get_account, #list_accounts, #update_account
Methods included from Helpers::Client
Methods included from ServiceCatalog::Runners::ServiceCatalog
#add_to_cart, #checkout_cart, #delete_cart, #get_cart, #get_catalog, #get_category, #get_item, #get_item_variables, #list_catalogs, #list_items, #order_now
Methods included from Knowledge::Runners::Knowledge
#create_article, #delete_article, #get_article, #list_articles, #update_article
Methods included from Legion::Extensions::ServiceNow::Cmdb::Meta::Runners::Meta
#get_class_meta, #get_hierarchy
Methods included from Legion::Extensions::ServiceNow::Cmdb::Instance::Runners::Instance
#create_ci, #create_relationship, #delete_ci, #get_ci, #get_relationships, #list_cis, #update_ci
Methods included from Legion::Extensions::ServiceNow::Change::Runners::Change
#calculate_conflicts, #create_emergency, #create_normal, #create_standard, #create_task, #delete_change, #delete_task, #get_approvals, #get_change, #get_conflicts, #list_changes, #list_tasks, #update_change, #update_task
Constructor Details
#initialize(url: nil, client_id: nil, client_secret: nil, token: nil, username: nil, password: nil, **extra) ⇒ Client
Returns a new instance of Client.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/legion/extensions/service_now/client.rb', line 17 def initialize(url: nil, client_id: nil, client_secret: nil, token: nil, username: nil, password: nil, **extra) @opts = { url: url, client_id: client_id, client_secret: client_secret, token: token, username: username, password: password, **extra }.compact end |
Instance Attribute Details
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
15 16 17 |
# File 'lib/legion/extensions/service_now/client.rb', line 15 def opts @opts end |
Instance Method Details
#connection(**override) ⇒ Object
30 31 32 |
# File 'lib/legion/extensions/service_now/client.rb', line 30 def connection(**override) super(**@opts, **override) end |