Class: LockstepSdk::LeadModel
- Inherits:
-
Object
- Object
- LockstepSdk::LeadModel
- Defined in:
- lib/lockstep_sdk/models/lead_model.rb
Overview
Represents leads for creating new ERP connectors
Instance Attribute Summary collapse
-
#company ⇒ String
Name of company of lead.
-
#email ⇒ String
Email of lead.
-
#erp_system ⇒ String
Requested ERP of lead.
-
#lead_id ⇒ Uuid
The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
-
#name ⇒ String
Name of lead.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ LeadModel
constructor
Initialize the LeadModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ LeadModel
Initialize the LeadModel using the provided prototype
26 27 28 29 30 31 32 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 26 def initialize(params = {}) @lead_id = params.dig(:lead_id) @name = params.dig(:name) @company = params.dig(:company) @email = params.dig(:email) @erp_system = params.dig(:erp_system) end |
Instance Attribute Details
#company ⇒ String
Returns Name of company of lead.
39 40 41 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 39 def company @company end |
#email ⇒ String
Returns Email of lead.
41 42 43 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 41 def email @email end |
#erp_system ⇒ String
Returns Requested ERP of lead.
43 44 45 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 43 def erp_system @erp_system end |
#lead_id ⇒ Uuid
Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.
35 36 37 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 35 def lead_id @lead_id end |
#name ⇒ String
Returns Name of lead.
37 38 39 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 37 def name @name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
46 47 48 49 50 51 52 53 54 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 46 def as_json(={}) { 'leadId' => @lead_id, 'name' => @name, 'company' => @company, 'email' => @email, 'erpSystem' => @erp_system, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
57 58 59 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 57 def to_json(*) "[#{as_json(*).to_json(*)}]" end |