hubspot.crm.property
Module hubspot.crm.property
API
Definitions
ballerinax/hubspot.crm.property Ballerina library
Overview
This is a generated connector from HubSpot OpenAPI specification.
All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a HubSpot developer account
- Obtain tokens
- Use this guide to obtain the credentials which are needed to create the <CLIENT_ID> and <CLIENT_SECRET>
Quickstart
To use the HubSpot CRM Properties connector in your Ballerina application, update the .bal file as follows:
Step 1 - Import connector
First, import the ballerinax/hubspot.crm.property module into the Ballerina project.
import ballerinax/hubspot.crm.property;
Step 2 - Create a new connector instance
You can now make the connection configuration using the access token.
property:ClientConfig clientConfig = { auth : { token: <ACCESS_TOKEN> } }; property:Client baseClient = check new Client(clientConfig);
Step 3 - Invoke connector operation
- Create a property instance
property:Property property = { groupName: "contactinformation", hidden: false, displayOrder: 0, options: [ { label: "Option A", description: "Choice number one", value: "A", displayOrder: 1, hidden: false } ], label: "My Contact Property", description: "", fieldType: "select", name: "name", 'type: "enumeration" }; property:Property|error bEvent = baseClient->create("deals", property); if (bEvent is property:Property) { log:printInfo("Created the property" + bEvent.toString()); } else { test:assertFail(msg = bEvent.toString()); }
- List properties
property:CollectionResponseProperty|error bEvent = baseClient->getAll("deals"); if (bEvent is property:CollectionResponseProperty) { log:printInfo("Property list" + bEvent.toString()); } else { log:printError(msg = bEvent.message()); }
- Use
bal run
command to compile and run the Ballerina program
Clients
hubspot.crm.property: Client
This is a generated connector from HubSpot OpenAPI specification. All HubSpot objects store data in default and custom properties. These endpoints provide access to read and modify object properties in HubSpot.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials.
Create a HubSpot account and obtain OAuth tokens following this guide.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com" - URL of the target service
getAll
function getAll(string objectType, boolean archived) returns CollectionResponseProperty|error
Read all properties
Parameters
- objectType string - CRM object type
- archived boolean (default false) - Whether to return only results that have been archived.
Return Type
- CollectionResponseProperty|error - successful operation
create
function create(string objectType, PropertyCreate payload) returns Property|error
Create a property
batchArchive
function batchArchive(string objectType, BatchInputPropertyName payload) returns Response|error
Archive a batch of properties
batchCreate
function batchCreate(string objectType, BatchInputPropertyCreate payload) returns BatchResponseProperty|error
Create a batch of properties
Return Type
- BatchResponseProperty|error - successful operation
batchRead
function batchRead(string objectType, BatchReadInputPropertyName payload) returns BatchResponseProperty|error
Read a batch of properties
Parameters
- objectType string - CRM object type
- payload BatchReadInputPropertyName - Property name input array
Return Type
- BatchResponseProperty|error - successful operation
groupsGetall
function groupsGetall(string objectType) returns CollectionResponsePropertyGroup|error
Read all property groups
Parameters
- objectType string - CRM object type
Return Type
- CollectionResponsePropertyGroup|error - successful operation
groupsCreate
function groupsCreate(string objectType, PropertyGroupCreate payload) returns PropertyGroup|error
Create a property group
Return Type
- PropertyGroup|error - successful operation
groupsGetbyname
function groupsGetbyname(string objectType, string groupName) returns PropertyGroup|error
Read a property group
Return Type
- PropertyGroup|error - successful operation
groupsArchive
Archive a property group
groupsUpdate
function groupsUpdate(string objectType, string groupName, PropertyGroupUpdate payload) returns PropertyGroup|error
Update a property group
Parameters
- objectType string - CRM object type
- groupName string - Group name
- payload PropertyGroupUpdate - Property group data to update
Return Type
- PropertyGroup|error - successful operation
propertyGetbyname
function propertyGetbyname(string objectType, string propertyName, boolean archived) returns Property|error
Read a property
Parameters
- objectType string - CRM object type
- propertyName string - Property name
- archived boolean (default false) - Whether to return only results that have been archived.
propertyArchive
Archive a property
propertyUpdate
function propertyUpdate(string objectType, string propertyName, PropertyUpdate payload) returns Property|error
Update a property
Parameters
- objectType string - CRM object type
- propertyName string - Property name
- payload PropertyUpdate - Property data to update
Records
hubspot.crm.property: BatchInputPropertyCreate
Fields
- inputs PropertyCreate[] -
hubspot.crm.property: BatchInputPropertyName
Fields
- inputs PropertyName[] -
hubspot.crm.property: BatchReadInputPropertyName
Fields
- inputs PropertyName[] -
- archived boolean - Whether the results that have been archived
hubspot.crm.property: BatchResponseProperty
Fields
- status string -
- results Property[] -
- numErrors int? -
- errors StandardError[]? -
- requestedAt string? -
- startedAt string -
- completedAt string -
- links record {}? -
hubspot.crm.property: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
hubspot.crm.property: CollectionResponseProperty
Fields
- results Property[] -
- paging Paging? -
hubspot.crm.property: CollectionResponsePropertyGroup
Fields
- results PropertyGroup[] -
- paging Paging? -
hubspot.crm.property: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
hubspot.crm.property: Error
Fields
- message string - A human readable message describing the error along with remediation steps where appropriate
- correlationId string - A unique identifier for the request. Include this value with any error reports or support tickets
- category string - The error category
- subCategory string? - A specific category that contains more specific detail about the error
- errors ErrorDetail[]? - further information about the error
- context record {}? - Context about the error condition
- links record {}? - A map of link names to associated URIs containing documentation about the error or recommended remediation steps
hubspot.crm.property: ErrorCategory
Fields
- httpStatus string -
- name string -
hubspot.crm.property: ErrorDetail
Fields
- message string - A human readable message describing the error along with remediation steps where appropriate
- 'in string? - The name of the field or parameter in which the error was found.
- code string? - The status code associated with the error detail
- subCategory string? - A specific category that contains more specific detail about the error
- context record {}? - Context about the error condition
hubspot.crm.property: NextPage
Fields
- after string -
- link string? -
hubspot.crm.property: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://api.hubapi.com/oauth/v1/token") - Refresh URL
hubspot.crm.property: Option
Fields
- label string - A human-readable option label that will be shown in HubSpot.
- value string - The internal value of the option, which must be used when setting the property value through the API.
- description string? - A description of the option.
- displayOrder int? - Options are displayed in order starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.
- hidden boolean - Hidden options will not be displayed in HubSpot.
hubspot.crm.property: OptionInput
Fields
- label string - A human-readable option label that will be shown in HubSpot.
- value string - The internal value of the option, which must be used when setting the property value through the API.
- description string? - A description of the option.
- displayOrder int? - Options are shown in order starting with the lowest positive integer value. Values of -1 will cause the option to be displayed after any positive values.
- hidden boolean - Hidden options won't be shown in HubSpot.
hubspot.crm.property: Paging
Fields
- next NextPage? -
hubspot.crm.property: Property
Fields
- updatedAt string? -
- createdAt string? -
- archivedAt string? - When the property was archived.
- 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.
- 'type string - The property data type.
- fieldType string - Controls how the property appears in HubSpot.
- description string - A description of the property that will be shown as help text in HubSpot.
- groupName string - The name of the property group the property belongs to.
- options Option[] - A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types.
- createdUserId string? - The internal user ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot.
- updatedUserId string? - The internal user ID of the user who updated the property in HubSpot. This field may not exist if the property was updated outside of HubSpot.
- referencedObjectType string? - If this property is related to other object(s), they'll be listed here.
- displayOrder int? - Properties are shown in order, starting with the lowest positive integer value.
- calculated boolean? - For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties.
- externalOptions boolean? - For default properties, true indicates that the options are stored externally to the property settings.
- archived boolean? - Whether or not the property is archived.
- hasUniqueValue boolean? - Whether or not the property's value must be unique. Once set, this can't be changed.
- hidden boolean? - Whether or not the property will be hidden from the HubSpot UI. It's recommended this be set to false for custom properties.
- hubspotDefined boolean? - This will be true for default object properties built into HubSpot.
- showCurrencySymbol boolean? - Whether or not the property will display the currency symbol set in the account settings.
- modificationMetadata PropertyModificationMetadata? -
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: PropertyCreate
Fields
- 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.
- 'type string - The data type of the property.
- fieldType string - Controls how the property appears in HubSpot.
- groupName string - The name of the property group the property belongs to.
- description string? - A description of the property that will be shown as help text in HubSpot.
- options OptionInput[]? - A list of valid options for the property. This field is required for enumerated properties.
- displayOrder int? - Properties are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property to be displayed after any positive values.
- hasUniqueValue boolean? - Whether or not the property's value must be unique. Once set, this can't be changed.
- hidden boolean? - If true, the property won't be visible and can't be used in HubSpot.
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: PropertyGroup
An ID for a group of properties
Fields
- name string - The internal property group name, which must be used when referencing the property group via the API.
- label string - A human-readable label that will be shown in HubSpot.
- displayOrder int - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
- archived boolean - Archive ID
hubspot.crm.property: PropertyGroupCreate
Fields
- name string - The internal property group name, which must be used when referencing the property group via the API.
- label string - A human-readable label that will be shown in HubSpot.
- displayOrder int? - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
hubspot.crm.property: PropertyGroupUpdate
Fields
- label string? - A human-readable label that will be shown in HubSpot.
- displayOrder int? - Property groups are displayed in order starting with the lowest positive integer value. Values of -1 will cause the property group to be displayed after any positive values.
hubspot.crm.property: PropertyModificationMetadata
Fields
- archivable boolean -
- readOnlyDefinition boolean -
- readOnlyOptions boolean? -
- readOnlyValue boolean -
hubspot.crm.property: PropertyName
Fields
- name string - The name of the property to read or modify.
hubspot.crm.property: PropertyUpdate
Fields
- label string? - A human-readable property label that will be shown in HubSpot.
- 'type string? - The data type of the property.
- fieldType string? - Controls how the property appears in HubSpot.
- groupName string? - The name of the property group the property belongs to.
- description string? - A description of the property that will be shown as help text in HubSpot.
- options OptionInput[]? - A list of valid options for the property.
- displayOrder int? - Properties are displayed in order starting with the lowest positive integer value. Values of -1 will cause the Property to be displayed after any positive values.
- hidden boolean? - If true, the property won't be visible and can't be used in HubSpot.
- formField boolean? - Whether or not the property can be used in a HubSpot form.
hubspot.crm.property: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
hubspot.crm.property: StandardError
Fields
- status string -
- id string? -
- category ErrorCategory -
- subCategory record {}? -
- message string -
- errors ErrorDetail[] -
- context record {} -
- links record {} -
Import
import ballerinax/hubspot.crm.property;
Metadata
Released date: over 1 year ago
Version: 2.3.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Sales & CRM/Customer Relationship Management
Cost/Freemium
Contributors
Dependencies