Class: LockstepSdk::ConnectorInfoModel
- Inherits:
-
Object
- Object
- LockstepSdk::ConnectorInfoModel
- Defined in:
- lib/lockstep_sdk/models/connector_info_model.rb
Overview
Represents all possible data required to set up an app enrollment for a connector. Only send required fields for the given connector.
Instance Attribute Summary collapse
-
#auth_code ⇒ String
The authorization code returned from the first step of the OAuth2 flow oauth.net/2/grant-types/authorization-code/.
-
#email ⇒ String
The email an email connection is being created for.
-
#password ⇒ String
The password for the web services account with access permissions.
-
#realm_id ⇒ String
The realm id of the account being granted permissions to access.
-
#redirect_uri ⇒ String
The redirect uri used for step one of the OAuth2.0 flow.
-
#server_name ⇒ String
The server name a connection is being created for.
-
#server_port ⇒ Int32
The port number of the server a connection is being created for.
-
#subsidiary_id ⇒ String
The subsidiary id that corresponds to a legal entity.
-
#token_id ⇒ String
The access token id for the connector enrollment.
-
#token_secret ⇒ String
The access token secret for the connector enrollment.
-
#username ⇒ String
The username of the web services account with access permissions.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ConnectorInfoModel
constructor
Initialize the ConnectorInfoModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ConnectorInfoModel
Initialize the ConnectorInfoModel using the provided prototype
26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 26 def initialize(params = {}) @auth_code = params.dig(:auth_code) @token_id = params.dig(:token_id) @token_secret = params.dig(:token_secret) @realm_id = params.dig(:realm_id) @subsidiary_id = params.dig(:subsidiary_id) @redirect_uri = params.dig(:redirect_uri) @email = params.dig(:email) @username = params.dig(:username) @password = params.dig(:password) @server_name = params.dig(:server_name) @server_port = params.dig(:server_port) end |
Instance Attribute Details
#auth_code ⇒ String
Returns The authorization code returned from the first step of the OAuth2 flow oauth.net/2/grant-types/authorization-code/.
42 43 44 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 42 def auth_code @auth_code end |
#email ⇒ String
Returns The email an email connection is being created for.
66 67 68 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 66 def email @email end |
#password ⇒ String
Returns The password for the web services account with access permissions.
74 75 76 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 74 def password @password end |
#realm_id ⇒ String
Returns The realm id of the account being granted permissions to access.
54 55 56 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 54 def realm_id @realm_id end |
#redirect_uri ⇒ String
Returns The redirect uri used for step one of the OAuth2.0 flow.
62 63 64 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 62 def redirect_uri @redirect_uri end |
#server_name ⇒ String
Returns The server name a connection is being created for.
78 79 80 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 78 def server_name @server_name end |
#server_port ⇒ Int32
Returns The port number of the server a connection is being created for.
82 83 84 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 82 def server_port @server_port end |
#subsidiary_id ⇒ String
Returns The subsidiary id that corresponds to a legal entity.
58 59 60 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 58 def subsidiary_id @subsidiary_id end |
#token_id ⇒ String
Returns The access token id for the connector enrollment.
46 47 48 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 46 def token_id @token_id end |
#token_secret ⇒ String
Returns The access token secret for the connector enrollment.
50 51 52 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 50 def token_secret @token_secret end |
#username ⇒ String
Returns The username of the web services account with access permissions.
70 71 72 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 70 def username @username end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 86 def as_json(={}) { 'authCode' => @auth_code, 'tokenId' => @token_id, 'tokenSecret' => @token_secret, 'realmId' => @realm_id, 'subsidiaryId' => @subsidiary_id, 'redirectUri' => @redirect_uri, 'email' => @email, 'username' => @username, 'password' => @password, 'serverName' => @server_name, 'serverPort' => @server_port, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
104 105 106 |
# File 'lib/lockstep_sdk/models/connector_info_model.rb', line 104 def to_json(*) "[#{as_json(*).to_json(*)}]" end |