Class: LockstepSdk::ErpInfoDataModel
- Inherits:
-
Object
- Object
- LockstepSdk::ErpInfoDataModel
- Defined in:
- lib/lockstep_sdk/models/erp_info_data_model.rb
Overview
Represents all the possible data sent as a part of the provisioning post. 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/.
-
#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.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ ErpInfoDataModel
constructor
Initialize the ErpInfoDataModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ ErpInfoDataModel
Initialize the ErpInfoDataModel using the provided prototype
27 28 29 30 31 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 27 def initialize(params = {}) @auth_code = params.dig(:auth_code) @realm_id = params.dig(:realm_id) @redirect_uri = params.dig(:redirect_uri) 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/.
34 35 36 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 34 def auth_code @auth_code end |
#realm_id ⇒ String
Returns The realm id of the account being granted permissions to access.
36 37 38 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 36 def realm_id @realm_id end |
#redirect_uri ⇒ String
Returns The redirect uri used for step one of the OAuth2.0 flow.
38 39 40 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 38 def redirect_uri @redirect_uri end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
41 42 43 44 45 46 47 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 41 def as_json(={}) { 'authCode' => @auth_code, 'realmId' => @realm_id, 'redirectUri' => @redirect_uri, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
50 51 52 |
# File 'lib/lockstep_sdk/models/erp_info_data_model.rb', line 50 def to_json(*) "[#{as_json(*).to_json(*)}]" end |