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
28 29 30 31 32 33 34 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 28 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.
46 47 48 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 46 def company @company end |
#email ⇒ String
Returns Email of lead.
50 51 52 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 50 def email @email end |
#erp_system ⇒ String
Returns Requested ERP of lead.
54 55 56 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 54 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.
38 39 40 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 38 def lead_id @lead_id end |
#name ⇒ String
Returns Name of lead.
42 43 44 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 42 def name @name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
58 59 60 61 62 63 64 65 66 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 58 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.
70 71 72 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 70 def to_json(*) "[#{as_json(*).to_json(*)}]" end |