Skip to content

Latest commit

 

History

History
268 lines (163 loc) · 10.6 KB

README.md

File metadata and controls

268 lines (163 loc) · 10.6 KB

Lead

Overview

Available Operations

create_crm_lead

Create a lead

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::CreateCrmLeadResponse)

get_crm_lead

Retrieve a lead

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::GetCrmLeadResponse)

list_crm_leads

List all leads

Example Usage

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

Parameters

Parameter Type Required Description
request ::UnifiedRubySDK::Operations::ListCrmLeadsRequest ✔️ The request object to use for the request.

Response

T.nilable(::UnifiedRubySDK::Operations::ListCrmLeadsResponse)

patch_crm_lead

Update a lead

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::PatchCrmLeadResponse)

remove_crm_lead

Remove a lead

Example Usage

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

Parameters

Parameter Type Required Description
connection_id ::String ✔️ ID of the connection
id ::String ✔️ ID of the Lead

Response

T.nilable(::UnifiedRubySDK::Operations::RemoveCrmLeadResponse)

update_crm_lead

Update a lead

Example Usage

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

Parameters

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

Response

T.nilable(::UnifiedRubySDK::Operations::UpdateCrmLeadResponse)