- create_crm_lead - Create a lead
- get_crm_lead - Retrieve a lead
- list_crm_leads - List all leads
- patch_crm_lead - Update a lead
- remove_crm_lead - Remove a lead
- update_crm_lead - Update a lead
Create a lead
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.lead.create_crm_lead(connection_id="<value>", crm_lead=::UnifiedRubySDK::Shared::CrmLead.new(), fields_=[
"<value>",
])
if ! res.crm_lead.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
crm_lead |
::UnifiedRubySDK::Shared::CrmLead | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::CreateCrmLeadResponse)
Retrieve a lead
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.lead.get_crm_lead(connection_id="<value>", id="<value>", fields_=[
"<value>",
])
if ! res.crm_lead.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Lead |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::GetCrmLeadResponse)
List all leads
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
req = ::UnifiedRubySDK::Operations::ListCrmLeadsRequest.new(
connection_id: "<value>",
)
res = s.lead.list_crm_leads(req)
if ! res.crm_leads.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
request |
::UnifiedRubySDK::Operations::ListCrmLeadsRequest | ✔️ | The request object to use for the request. |
T.nilable(::UnifiedRubySDK::Operations::ListCrmLeadsResponse)
Update a lead
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.lead.patch_crm_lead(connection_id="<value>", id="<value>", crm_lead=::UnifiedRubySDK::Shared::CrmLead.new(), fields_=[
"<value>",
])
if ! res.crm_lead.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Lead |
crm_lead |
::UnifiedRubySDK::Shared::CrmLead | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::PatchCrmLeadResponse)
Remove a lead
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.lead.remove_crm_lead(connection_id="<value>", id="<value>")
if res.status_code == 200
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Lead |
T.nilable(::UnifiedRubySDK::Operations::RemoveCrmLeadResponse)
Update a lead
require 'unified_ruby_sdk'
s = ::UnifiedRubySDK::UnifiedTo.new
s.config_security(
::UnifiedRubySDK::Shared::Security.new(
jwt: "<YOUR_API_KEY_HERE>",
)
)
res = s.lead.update_crm_lead(connection_id="<value>", id="<value>", crm_lead=::UnifiedRubySDK::Shared::CrmLead.new(), fields_=[
"<value>",
])
if ! res.crm_lead.nil?
# handle response
end
Parameter | Type | Required | Description |
---|---|---|---|
connection_id |
::String | ✔️ | ID of the connection |
id |
::String | ✔️ | ID of the Lead |
crm_lead |
::UnifiedRubySDK::Shared::CrmLead | ➖ | N/A |
fields_ |
T::Array<::String> | ➖ | Comma-delimited fields to return |
T.nilable(::UnifiedRubySDK::Operations::UpdateCrmLeadResponse)