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 ⇒ Email
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
25 26 27 28 29 30 31 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 25 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.
43 44 45 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 43 def company @company end |
#email ⇒ Email
Returns Email of lead.
47 48 49 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 47 def email @email end |
#erp_system ⇒ String
Returns Requested ERP of lead.
51 52 53 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 51 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.
39 40 41 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 39 def name @name end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
55 56 57 58 59 60 61 62 63 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 55 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.
67 68 69 |
# File 'lib/lockstep_sdk/models/lead_model.rb', line 67 def to_json(*) "[#{as_json(*).to_json(*)}]" end |