Class: Leash::Integration::HubspotClient

Inherits:
Object
  • Object
show all
Defined in:
lib/leash/integration/hubspot.rb

Instance Method Summary collapse

Constructor Details

#initialize(leash) ⇒ HubspotClient

Create a new HubSpot integration client.

Parameters:

  • leash (Leash::Client)

    the Leash SDK client



11
12
13
# File 'lib/leash/integration/hubspot.rb', line 11

def initialize(leash)
  @leash = leash
end

Instance Method Details

#hubspot_batch_create_associations(fromobjecttype, toobjecttype, types, inputs) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Establishes relationships between…

Parameters:

  • fromobjecttype (String)

    The type of HubSpot object to create association from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • toobjecttype (String)

    The type of HubSpot object to create association to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • types (Array)

    The types of associations to create

  • inputs (Array)

    List of association inputs defining the relationships to create. (max 100 associations per batch)

Returns:

  • (Object)


74
75
76
77
78
79
80
81
82
# File 'lib/leash/integration/hubspot.rb', line 74

def hubspot_batch_create_associations(fromobjecttype, toobjecttype, types, inputs)
  params = {
    'fromObjectType' => fromobjecttype,
    'toObjectType' => toobjecttype,
    'types' => types,
    'inputs' => inputs
  }.compact
  @leash.call('hubspot', 'hubspot-batch-create-associations', params)
end

#hubspot_batch_create_objects(objecttype, inputs) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates multiple HubSpot objects o…

Parameters:

  • objecttype (String)

    The type of HubSpot object to create. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • inputs (Array)

    Array of objects to create (maximum 100 per batch)

Returns:

  • (Object)


119
120
121
122
123
124
125
# File 'lib/leash/integration/hubspot.rb', line 119

def hubspot_batch_create_objects(objecttype, inputs)
  params = {
    'objectType' => objecttype,
    'inputs' => inputs
  }.compact
  @leash.call('hubspot', 'hubspot-batch-create-objects', params)
end

#hubspot_batch_read_objects(objecttype, inputs, properties: nil, propertieswithhistory: nil) ⇒ Object

🎯 Purpose: 1. Retrieves multiple HubSpot objects of the same object type by their IDs in a single batch operation. 🧭 Usage Guidance: 1. Use this tool to retrieve objects when the object IDs are k…

Parameters:

  • objecttype (String)

    The type of HubSpot object to read. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • inputs (Array)

    Array of object IDs to read (maximum 100 per batch)

  • properties (Array, nil) (defaults to: nil)

    Optional list of property names to include in the results

  • propertieswithhistory (Array, nil) (defaults to: nil)

    Optional list of property names to include with history

Returns:

  • (Object)


147
148
149
150
151
152
153
154
155
# File 'lib/leash/integration/hubspot.rb', line 147

def hubspot_batch_read_objects(objecttype, inputs, properties: nil, propertieswithhistory: nil)
  params = {
    'objectType' => objecttype,
    'inputs' => inputs,
    'properties' => properties,
    'propertiesWithHistory' => propertieswithhistory
  }.compact
  @leash.call('hubspot', 'hubspot-batch-read-objects', params)
end

#hubspot_batch_update_objects(objecttype, inputs) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates multiple existing HubSpot…

Parameters:

  • objecttype (String)

    The type of HubSpot object to update. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • inputs (Array)

    Array of objects to update (maximum 100 per batch)

Returns:

  • (Object)


132
133
134
135
136
137
138
# File 'lib/leash/integration/hubspot.rb', line 132

def hubspot_batch_update_objects(objecttype, inputs)
  params = {
    'objectType' => objecttype,
    'inputs' => inputs
  }.compact
  @leash.call('hubspot', 'hubspot-batch-update-objects', params)
end

#hubspot_create_engagement(type, ownerid, associations, metadata, timestamp: nil) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates a HubSpot engagement (Note…

Parameters:

  • type (String)

    The type of engagement to create (NOTE or TASK)

  • ownerid (Integer)

    The ID of the owner of this engagement

  • timestamp (Integer, nil) (defaults to: nil)

    Timestamp for the engagement (milliseconds since epoch). Defaults to current time if not provided.

  • associations (Hash)

    Associated records for this engagement

  • metadata (Hash)

    Metadata specific to the engagement type

Returns:

  • (Object)


263
264
265
266
267
268
269
270
271
272
# File 'lib/leash/integration/hubspot.rb', line 263

def hubspot_create_engagement(type, ownerid, associations, , timestamp: nil)
  params = {
    'type' => type,
    'ownerId' => ownerid,
    'timestamp' => timestamp,
    'associations' => associations,
    'metadata' => 
  }.compact
  @leash.call('hubspot', 'hubspot-create-engagement', params)
end

#hubspot_create_property(objecttype, name, label, groupname, description: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, hasuniquevalue: nil, calculationformula: nil, externaloptions: nil) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Creates new custom properties for…

Parameters:

  • objecttype (String)

    The type of HubSpot object to create the property for. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • name (String)

    The internal property name, which must be used when referencing the property via the API

  • label (String)

    A human-readable property label that will be shown in HubSpot

  • description (String, nil) (defaults to: nil)

    A description of the property that will be shown as help text

  • groupname (String)

    The name of the property group the property belongs to

  • type (String, nil) (defaults to: nil)

    The data type of the property

  • fieldtype (String, nil) (defaults to: nil)

    Controls how the property appears in HubSpot

  • options (Array, nil) (defaults to: nil)

    A list of valid options for enumeration properties

  • formfield (Boolean, nil) (defaults to: nil)

    Whether the property can be used in forms

  • hidden (Boolean, nil) (defaults to: nil)

    Whether the property should be hidden in HubSpot

  • displayorder (Integer, nil) (defaults to: nil)

    The order for displaying the property (lower numbers displayed first)

  • hasuniquevalue (Boolean, nil) (defaults to: nil)

    Whether the property’s value must be unique

  • calculationformula (String, nil) (defaults to: nil)

    A formula that is used to compute a calculated property

  • externaloptions (Boolean, nil) (defaults to: nil)

    Only for enumeration type properties. Should be set to true in conjunction with a referencedObjectType

Returns:

  • (Object)


202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/leash/integration/hubspot.rb', line 202

def hubspot_create_property(objecttype, name, label, groupname, description: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, hasuniquevalue: nil, calculationformula: nil, externaloptions: nil)
  params = {
    'objectType' => objecttype,
    'name' => name,
    'label' => label,
    'description' => description,
    'groupName' => groupname,
    'type' => type,
    'fieldType' => fieldtype,
    'options' => options,
    'formField' => formfield,
    'hidden' => hidden,
    'displayOrder' => displayorder,
    'hasUniqueValue' => hasuniquevalue,
    'calculationFormula' => calculationformula,
    'externalOptions' => externaloptions
  }.compact
  @leash.call('hubspot', 'hubspot-create-property', params)
end

🎯 Purpose: 1. Use this tool when the user wants to submit feedback about HubSpot MCP tool. 2. Use this tool proactively when the other HubSpot MCP tools are unable to solve the user’s tasks effect…

Returns:

  • (Object)


307
308
309
310
# File 'lib/leash/integration/hubspot.rb', line 307

def hubspot_generate_feedback_link
  params = {}
  @leash.call('hubspot', 'hubspot-generate-feedback-link', params)
end

#hubspot_get_association_definitions(fromobjecttype, toobjecttype) ⇒ Object

🎯 Purpose: 1. Retrieves valid association types between specific HubSpot object types. 📦 Returns: 1. Array of valid association definitions with type IDs, labels, and categories. 🧭 Usage Guidanc…

Parameters:

  • fromobjecttype (String)

    The type of HubSpot object to get association from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • toobjecttype (String)

    The type of HubSpot object to get association to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

Returns:

  • (Object)


89
90
91
92
93
94
95
# File 'lib/leash/integration/hubspot.rb', line 89

def hubspot_get_association_definitions(fromobjecttype, toobjecttype)
  params = {
    'fromObjectType' => fromobjecttype,
    'toObjectType' => toobjecttype
  }.compact
  @leash.call('hubspot', 'hubspot-get-association-definitions', params)
end

#hubspot_get_engagement(engagementid) ⇒ Object

🎯 Purpose: 1. Retrieves a HubSpot engagement by ID.

Parameters:

  • engagementid (Integer)

    The ID of the engagement to retrieve

Returns:

  • (Object)


278
279
280
281
282
283
# File 'lib/leash/integration/hubspot.rb', line 278

def hubspot_get_engagement(engagementid)
  params = {
    'engagementId' => engagementid
  }.compact
  @leash.call('hubspot', 'hubspot-get-engagement', params)
end

🎯 Purpose: 1. Generates HubSpot UI links for different pages based on object types and IDs. 2. Supports both index pages (lists of objects) and record pages (specific object details). 📋 Prerequis…

Parameters:

  • portalid (String)

    The HubSpot portal/account ID

  • uidomain (String)

    The HubSpot UI domain(e.g., ‘app.hubspot.com’)

  • pagerequests (Array)

    Array of page link requests to generate

Returns:

  • (Object)


326
327
328
329
330
331
332
333
# File 'lib/leash/integration/hubspot.rb', line 326

def hubspot_get_link(portalid, uidomain, pagerequests)
  params = {
    'portalId' => portalid,
    'uiDomain' => uidomain,
    'pageRequests' => pagerequests
  }.compact
  @leash.call('hubspot', 'hubspot-get-link', params)
end

#hubspot_get_property(objecttype, propertyname) ⇒ Object

🎯 Purpose: 1. This tool retrieves detailed information about a specific property for a HubSpot object type. 2. You can use this to get all metadata related to a property, including its type, optio…

Parameters:

  • objecttype (String)

    The type of HubSpot object the property belongs to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • propertyname (String)

    The name of the property to retrieve

Returns:

  • (Object)


177
178
179
180
181
182
183
# File 'lib/leash/integration/hubspot.rb', line 177

def hubspot_get_property(objecttype, propertyname)
  params = {
    'objectType' => objecttype,
    'propertyName' => propertyname
  }.compact
  @leash.call('hubspot', 'hubspot-get-property', params)
end

#hubspot_get_schemasObject

🎯 Purpose: 1. Retrieves all custom object schemas defined in the HubSpot account. 🧭 Usage Guidance: 1. Before working with custom objects to understand available object types, their properties, a…

Returns:

  • (Object)


315
316
317
318
# File 'lib/leash/integration/hubspot.rb', line 315

def hubspot_get_schemas
  params = {}
  @leash.call('hubspot', 'hubspot-get-schemas', params)
end

#hubspot_get_user_detailsObject

🎯 Purpose 1. Authenticates and analyzes the current HubSpot access token, providing context about the user’s permissions and account details. 🧭 Usage Guidance: 1. This tool must be used before pe…

Returns:

  • (Object)


18
19
20
21
# File 'lib/leash/integration/hubspot.rb', line 18

def hubspot_get_user_details
  params = {}
  @leash.call('hubspot', 'hubspot-get-user-details', params)
end

#hubspot_get_workflow(flowid) ⇒ Object

🎯 Purpose: 1. This tool retrieves detailed information about a specific workflow from the HubSpot account. 🧭 Usage Guidance: 1. Use the “flowId” parameter to specify which workflow to retrieve. 2…

Parameters:

  • flowid (String)

    The ID of the workflow to retrieve

Returns:

  • (Object)


352
353
354
355
356
357
# File 'lib/leash/integration/hubspot.rb', line 352

def hubspot_get_workflow(flowid)
  params = {
    'flowId' => flowid
  }.compact
  @leash.call('hubspot', 'hubspot-get-workflow', params)
end

#hubspot_list_associations(objecttype, objectid, toobjecttype, after: nil) ⇒ Object

🎯 Purpose: 1. Retrieves existing relationships between a specific object and other objects of a particular type. 2. For example, you can find all companies that a contact is associated with, all d…

Parameters:

  • objecttype (String)

    The type of HubSpot object to get associations from. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • objectid (String)

    The ID of the HubSpot object to get associations from

  • toobjecttype (String)

    The type of HubSpot object to get associations to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • after (String, nil) (defaults to: nil)

    Paging cursor token for retrieving the next page of results

Returns:

  • (Object)


104
105
106
107
108
109
110
111
112
# File 'lib/leash/integration/hubspot.rb', line 104

def hubspot_list_associations(objecttype, objectid, toobjecttype, after: nil)
  params = {
    'objectType' => objecttype,
    'objectId' => objectid,
    'toObjectType' => toobjecttype,
    'after' => after
  }.compact
  @leash.call('hubspot', 'hubspot-list-associations', params)
end

#hubspot_list_objects(objecttype, limit: nil, after: nil, properties: nil, associations: nil, archived: nil) ⇒ Object

🎯 Purpose: 1. Retrieves a paginated list of objects of a specified type from HubSpot. 📦 Returns: 1. Collection of objects with their properties and metadata, plus pagination information. 🧭 Usage…

Parameters:

  • objecttype (String)

    The type of HubSpot object to list. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • limit (Integer, nil) (defaults to: nil)

    The maximum number of results to display per page (max: 500).

  • after (String, nil) (defaults to: nil)

    The paging cursor token of the last successfully read resource.

  • properties (Array, nil) (defaults to: nil)

    A list of the properties to be returned in the response.

  • associations (Array, nil) (defaults to: nil)

    A list of object types to retrieve associated IDs for (e.g., appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users).

  • archived (Boolean, nil) (defaults to: nil)

    Whether to return only results that have been archived.

Returns:

  • (Object)


32
33
34
35
36
37
38
39
40
41
42
# File 'lib/leash/integration/hubspot.rb', line 32

def hubspot_list_objects(objecttype, limit: nil, after: nil, properties: nil, associations: nil, archived: nil)
  params = {
    'objectType' => objecttype,
    'limit' => limit,
    'after' => after,
    'properties' => properties,
    'associations' => associations,
    'archived' => archived
  }.compact
  @leash.call('hubspot', 'hubspot-list-objects', params)
end

#hubspot_list_properties(objecttype, archived: nil, includehidden: nil) ⇒ Object

🎯 Purpose: 1. This tool retrieves a complete catalog of properties for any HubSpot object type. 🧭 Usage Guidance: 1. This API has a large response that can consume a lot of tokens. Use the hubspo…

Parameters:

  • objecttype (String)

    The type of HubSpot object to get properties for. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • archived (Boolean, nil) (defaults to: nil)

    Whether to return only properties that have been archived.

  • includehidden (Boolean, nil) (defaults to: nil)

    Whether to include hidden properties in the response.

Returns:

  • (Object)


163
164
165
166
167
168
169
170
# File 'lib/leash/integration/hubspot.rb', line 163

def hubspot_list_properties(objecttype, archived: nil, includehidden: nil)
  params = {
    'objectType' => objecttype,
    'archived' => archived,
    'includeHidden' => includehidden
  }.compact
  @leash.call('hubspot', 'hubspot-list-properties', params)
end

#hubspot_list_workflows(limit: nil, after: nil) ⇒ Object

🎯 Purpose: 1. This tool retrieves a paginated list of workflows from the HubSpot account. 🧭 Usage Guidance: 1. Use the “limit” parameter to control the number of results returned per page. 2. For…

Parameters:

  • limit (Float, nil) (defaults to: nil)

    The maximum number of workflows to return per page (1-100).

  • after (String, nil) (defaults to: nil)

    Cursor token to fetch the next page of results. Use the paging.next.after value from the previous response.

Returns:

  • (Object)


340
341
342
343
344
345
346
# File 'lib/leash/integration/hubspot.rb', line 340

def hubspot_list_workflows(limit: nil, after: nil)
  params = {
    'limit' => limit,
    'after' => after
  }.compact
  @leash.call('hubspot', 'hubspot-list-workflows', params)
end

#hubspot_search_objects(objecttype, query: nil, limit: nil, after: nil, properties: nil, sorts: nil, filtergroups: nil) ⇒ Object

🎯 Purpose: 1. Performs advanced filtered searches across HubSpot object types using complex criteria. 📋 Prerequisites: 1. Use the hubspot-list-objects tool to sample existing objects for the obje…

Parameters:

  • objecttype (String)

    The type of HubSpot object to search. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • query (String, nil) (defaults to: nil)

    Text to search across default searchable properties of the specified object type. Each object type has different searchable properties. For example: contacts (firstname, lastname, email, phone, company), companies (name, website, domain, phone), deals (dealname, pipeline, dealstage, description, dealtype), etc

  • limit (Integer, nil) (defaults to: nil)

    The maximum number of results to display per page (max: 100).

  • after (String, nil) (defaults to: nil)

    The paging cursor token of the last successfully read resource.

  • properties (Array, nil) (defaults to: nil)

    A list of the properties to be returned in the response.

  • sorts (Array, nil) (defaults to: nil)

    A list of sort criteria to apply to the results.

  • filtergroups (Array, nil) (defaults to: nil)

    Groups of filters to apply (combined with OR).

Returns:

  • (Object)


54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/leash/integration/hubspot.rb', line 54

def hubspot_search_objects(objecttype, query: nil, limit: nil, after: nil, properties: nil, sorts: nil, filtergroups: nil)
  params = {
    'objectType' => objecttype,
    'query' => query,
    'limit' => limit,
    'after' => after,
    'properties' => properties,
    'sorts' => sorts,
    'filterGroups' => filtergroups
  }.compact
  @leash.call('hubspot', 'hubspot-search-objects', params)
end

#hubspot_update_engagement(engagementid, metadata, associations, ownerid: nil, timestamp: nil) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates an existing HubSpot engage…

Parameters:

  • engagementid (Integer)

    The ID of the engagement to update

  • ownerid (Integer, nil) (defaults to: nil)

    The ID of the owner of this engagement

  • timestamp (Integer, nil) (defaults to: nil)

    Timestamp for the engagement (milliseconds since epoch).

  • metadata (Hash)

    Metadata specific to the engagement type (Note or Task)

  • associations (Hash)

    Associated records for this engagement

Returns:

  • (Object)


293
294
295
296
297
298
299
300
301
302
# File 'lib/leash/integration/hubspot.rb', line 293

def hubspot_update_engagement(engagementid, , associations, ownerid: nil, timestamp: nil)
  params = {
    'engagementId' => engagementid,
    'ownerId' => ownerid,
    'timestamp' => timestamp,
    'metadata' => ,
    'associations' => associations
  }.compact
  @leash.call('hubspot', 'hubspot-update-engagement', params)
end

#hubspot_update_property(objecttype, propertyname, label: nil, description: nil, groupname: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, calculationformula: nil) ⇒ Object

🛡️ Guardrails: 1. Data Modification Warning: This tool modifies HubSpot data. Only use when the user has explicitly requested to update their CRM. 🎯 Purpose: 1. Updates existing custom properties…

Parameters:

  • objecttype (String)

    The type of HubSpot object the property belongs to. Valid values include: appointments, companies, contacts, courses, deals, leads, line_items, listings, marketing_events, meetings, orders, postal_mail, products, quotes, services, subscriptions, tickets, users. For custom objects, use the hubspot-get-schemas tool to get the objectType.

  • propertyname (String)

    The name of the property to update

  • label (String, nil) (defaults to: nil)

    A human-readable property label that will be shown in HubSpot

  • description (String, nil) (defaults to: nil)

    A description of the property that will be shown as help text

  • groupname (String, nil) (defaults to: nil)

    The name of the property group the property belongs to

  • type (String, nil) (defaults to: nil)

    The data type of the property

  • fieldtype (String, nil) (defaults to: nil)

    Controls how the property appears in HubSpot

  • options (Array, nil) (defaults to: nil)

    A list of valid options for enumeration properties

  • formfield (Boolean, nil) (defaults to: nil)

    Whether the property can be used in forms

  • hidden (Boolean, nil) (defaults to: nil)

    Whether the property should be hidden in HubSpot

  • displayorder (Integer, nil) (defaults to: nil)

    The order for displaying the property (lower numbers displayed first)

  • calculationformula (String, nil) (defaults to: nil)

    A formula that is used to compute a calculated property

Returns:

  • (Object)


237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/leash/integration/hubspot.rb', line 237

def hubspot_update_property(objecttype, propertyname, label: nil, description: nil, groupname: nil, type: nil, fieldtype: nil, options: nil, formfield: nil, hidden: nil, displayorder: nil, calculationformula: nil)
  params = {
    'objectType' => objecttype,
    'propertyName' => propertyname,
    'label' => label,
    'description' => description,
    'groupName' => groupname,
    'type' => type,
    'fieldType' => fieldtype,
    'options' => options,
    'formField' => formfield,
    'hidden' => hidden,
    'displayOrder' => displayorder,
    'calculationFormula' => calculationformula
  }.compact
  @leash.call('hubspot', 'hubspot-update-property', params)
end