Documentation ¶
Overview ¶
Package schemas provides primitives to interact with the openapi HTTP API.
Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.
Package schemas provides primitives to interact with the openapi HTTP API.
Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.
Index ¶
- Constants
- type ArchiveAssociationAssociationIdentifierResponse
- type ArchiveObjectTypeParams
- type ArchiveObjectTypeResponse
- type AssociationDefinition
- type AssociationDefinitionEgg
- type Client
- func (c *Client) ArchiveAssociationAssociationIdentifier(ctx context.Context, objectType string, associationIdentifier string, ...) (*ArchiveAssociationAssociationIdentifierResponse, error)
- func (c *Client) ArchiveObjectType(ctx context.Context, objectType string, params *ArchiveObjectTypeParams, ...) (*ArchiveObjectTypeResponse, error)
- func (c *Client) CreateAssociationAssociations(ctx context.Context, objectType string, ...) (*CreateAssociationAssociationsResponse, error)
- func (c *Client) CreateAssociationAssociationsWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, ...) (*CreateAssociationAssociationsResponse, error)
- func (c *Client) CreateSchemas(ctx context.Context, body CreateSchemasJSONRequestBody, ...) (*CreateSchemasResponse, error)
- func (c *Client) CreateSchemasWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*CreateSchemasResponse, error)
- func (c *Client) GetAllSchemas(ctx context.Context, params *GetAllSchemasParams, ...) (*GetAllSchemasResponse, error)
- func (c *Client) GetObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*GetObjectTypeResponse, error)
- func (c *Client) PurgeObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*PurgeObjectTypeResponse, error)
- func (c *Client) UpdateObjectType(ctx context.Context, objectType string, body UpdateObjectTypeJSONRequestBody, ...) (*UpdateObjectTypeResponse, error)
- func (c *Client) UpdateObjectTypeWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, ...) (*UpdateObjectTypeResponse, error)
- type ClientInterface
- type CollectionResponseObjectSchemaNoPaging
- type CreateAssociationAssociationsJSONBody
- type CreateAssociationAssociationsJSONRequestBody
- type CreateAssociationAssociationsResponse
- type CreateSchemasJSONBody
- type CreateSchemasJSONRequestBody
- type CreateSchemasResponse
- type Error
- type ErrorDetail
- type ErrorDetail_Context
- type Error_Context
- type Error_Links
- type GetAllSchemasParams
- type GetAllSchemasResponse
- type GetObjectTypeResponse
- type ObjectSchema
- type ObjectSchemaEgg
- type ObjectTypeDefinition
- type ObjectTypeDefinitionLabels
- type ObjectTypeDefinitionPatch
- type ObjectTypePropertyCreate
- type ObjectTypePropertyCreateType
- type Option
- type OptionInput
- type Property
- type PropertyModificationMetadata
- type PurgeObjectTypeResponse
- type UpdateObjectTypeJSONBody
- type UpdateObjectTypeJSONRequestBody
- type UpdateObjectTypeResponse
Constants ¶
const ( HapikeyScopes = "hapikey.Scopes" Oauth2_legacyScopes = "oauth2_legacy.Scopes" )
const DefaultServer = "https://api.hubapi.com/"
DefaultServer is the default server to be used.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveAssociationAssociationIdentifierResponse ¶
type ArchiveAssociationAssociationIdentifierResponse struct { Body []byte HTTPResponse *http.Response }
func (ArchiveAssociationAssociationIdentifierResponse) Status ¶
func (r ArchiveAssociationAssociationIdentifierResponse) Status() string
Status returns HTTPResponse.Status
func (ArchiveAssociationAssociationIdentifierResponse) StatusCode ¶
func (r ArchiveAssociationAssociationIdentifierResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ArchiveObjectTypeParams ¶
type ArchiveObjectTypeParams struct { // Whether to return only results that have been archived. Archived *bool `json:"archived,omitempty"` }
ArchiveObjectTypeParams defines parameters for ArchiveObjectType.
type ArchiveObjectTypeResponse ¶
func (ArchiveObjectTypeResponse) Status ¶
func (r ArchiveObjectTypeResponse) Status() string
Status returns HTTPResponse.Status
func (ArchiveObjectTypeResponse) StatusCode ¶
func (r ArchiveObjectTypeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AssociationDefinition ¶
type AssociationDefinition struct { // When the association was defined. CreatedAt *time.Time `json:"createdAt,omitempty"` // ID of the primary object type to link from. FromObjectTypeId string `json:"fromObjectTypeId"` // A unique ID for this association. Id string `json:"id"` // A unique name for this association. Name *string `json:"name,omitempty"` // ID of the target object type ID to link to. ToObjectTypeId string `json:"toObjectTypeId"` // When the association was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Defines an association between two object types.
type AssociationDefinitionEgg ¶
type AssociationDefinitionEgg struct { // ID of the primary object type to link from. FromObjectTypeId string `json:"fromObjectTypeId"` // A unique name for this association. Name *string `json:"name,omitempty"` // ID of the target object type ID to link to. ToObjectTypeId string `json:"toObjectTypeId"` }
Defines an association between two object types.
type Client ¶
Client conforms to the OpenAPI3 specification for this service.
func (*Client) ArchiveAssociationAssociationIdentifier ¶
func (c *Client) ArchiveAssociationAssociationIdentifier(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...client.RequestEditorFn) (*ArchiveAssociationAssociationIdentifierResponse, error)
ArchiveAssociationAssociationIdentifier request returning *ArchiveAssociationAssociationIdentifierResponse
func (*Client) ArchiveObjectType ¶
func (c *Client) ArchiveObjectType(ctx context.Context, objectType string, params *ArchiveObjectTypeParams, reqEditors ...client.RequestEditorFn) (*ArchiveObjectTypeResponse, error)
ArchiveObjectType request returning *ArchiveObjectTypeResponse
func (*Client) CreateAssociationAssociations ¶
func (c *Client) CreateAssociationAssociations(ctx context.Context, objectType string, body CreateAssociationAssociationsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateAssociationAssociationsResponse, error)
func (*Client) CreateAssociationAssociationsWithBody ¶
func (c *Client) CreateAssociationAssociationsWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateAssociationAssociationsResponse, error)
CreateAssociationAssociationsWithBody request with arbitrary body returning *CreateAssociationAssociationsResponse
func (*Client) CreateSchemas ¶
func (c *Client) CreateSchemas(ctx context.Context, body CreateSchemasJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateSchemasResponse, error)
func (*Client) CreateSchemasWithBody ¶
func (c *Client) CreateSchemasWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateSchemasResponse, error)
CreateSchemasWithBody request with arbitrary body returning *CreateSchemasResponse
func (*Client) GetAllSchemas ¶
func (c *Client) GetAllSchemas(ctx context.Context, params *GetAllSchemasParams, reqEditors ...client.RequestEditorFn) (*GetAllSchemasResponse, error)
GetAllSchemas request returning *GetAllSchemasResponse
func (*Client) GetObjectType ¶
func (c *Client) GetObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*GetObjectTypeResponse, error)
GetObjectType request returning *GetObjectTypeResponse
func (*Client) PurgeObjectType ¶
func (c *Client) PurgeObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*PurgeObjectTypeResponse, error)
PurgeObjectType request returning *PurgeObjectTypeResponse
func (*Client) UpdateObjectType ¶
func (c *Client) UpdateObjectType(ctx context.Context, objectType string, body UpdateObjectTypeJSONRequestBody, reqEditors ...client.RequestEditorFn) (*UpdateObjectTypeResponse, error)
func (*Client) UpdateObjectTypeWithBody ¶
func (c *Client) UpdateObjectTypeWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*UpdateObjectTypeResponse, error)
UpdateObjectTypeWithBody request with arbitrary body returning *UpdateObjectTypeResponse
type ClientInterface ¶
type ClientInterface interface { // GetAllSchemas request GetAllSchemas(ctx context.Context, params *GetAllSchemasParams, reqEditors ...client.RequestEditorFn) (*GetAllSchemasResponse, error) // CreateSchemas request with any body CreateSchemasWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateSchemasResponse, error) CreateSchemas(ctx context.Context, body CreateSchemasJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateSchemasResponse, error) // ArchiveObjectType request ArchiveObjectType(ctx context.Context, objectType string, params *ArchiveObjectTypeParams, reqEditors ...client.RequestEditorFn) (*ArchiveObjectTypeResponse, error) // GetObjectType request GetObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*GetObjectTypeResponse, error) // UpdateObjectType request with any body UpdateObjectTypeWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*UpdateObjectTypeResponse, error) UpdateObjectType(ctx context.Context, objectType string, body UpdateObjectTypeJSONRequestBody, reqEditors ...client.RequestEditorFn) (*UpdateObjectTypeResponse, error) // CreateAssociationAssociations request with any body CreateAssociationAssociationsWithBody(ctx context.Context, objectType string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateAssociationAssociationsResponse, error) CreateAssociationAssociations(ctx context.Context, objectType string, body CreateAssociationAssociationsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateAssociationAssociationsResponse, error) // ArchiveAssociationAssociationIdentifier request ArchiveAssociationAssociationIdentifier(ctx context.Context, objectType string, associationIdentifier string, reqEditors ...client.RequestEditorFn) (*ArchiveAssociationAssociationIdentifierResponse, error) // PurgeObjectType request PurgeObjectType(ctx context.Context, objectType string, reqEditors ...client.RequestEditorFn) (*PurgeObjectTypeResponse, error) }
ClientInterface interface specification for the client.
type CollectionResponseObjectSchemaNoPaging ¶
type CollectionResponseObjectSchemaNoPaging struct {
Results []ObjectSchema `json:"results"`
}
CollectionResponseObjectSchemaNoPaging defines model for CollectionResponseObjectSchemaNoPaging.
type CreateAssociationAssociationsJSONBody ¶
type CreateAssociationAssociationsJSONBody AssociationDefinitionEgg
CreateAssociationAssociationsJSONBody defines parameters for CreateAssociationAssociations.
type CreateAssociationAssociationsJSONRequestBody ¶
type CreateAssociationAssociationsJSONRequestBody CreateAssociationAssociationsJSONBody
CreateAssociationAssociationsJSONRequestBody defines body for CreateAssociationAssociations for application/json ContentType.
type CreateAssociationAssociationsResponse ¶
type CreateAssociationAssociationsResponse struct { Body []byte HTTPResponse *http.Response JSON201 *AssociationDefinition }
func (CreateAssociationAssociationsResponse) Status ¶
func (r CreateAssociationAssociationsResponse) Status() string
Status returns HTTPResponse.Status
func (CreateAssociationAssociationsResponse) StatusCode ¶
func (r CreateAssociationAssociationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateSchemasJSONBody ¶
type CreateSchemasJSONBody ObjectSchemaEgg
CreateSchemasJSONBody defines parameters for CreateSchemas.
type CreateSchemasJSONRequestBody ¶
type CreateSchemasJSONRequestBody CreateSchemasJSONBody
CreateSchemasJSONRequestBody defines body for CreateSchemas for application/json ContentType.
type CreateSchemasResponse ¶
type CreateSchemasResponse struct { Body []byte HTTPResponse *http.Response JSON201 *ObjectSchema }
func (CreateSchemasResponse) Status ¶
func (r CreateSchemasResponse) Status() string
Status returns HTTPResponse.Status
func (CreateSchemasResponse) StatusCode ¶
func (r CreateSchemasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Error ¶
type Error struct { // The error category Category string `json:"category"` // Context about the error condition Context *Error_Context `json:"context,omitempty"` // A unique identifier for the request. Include this value with any error reports or support tickets CorrelationId string `json:"correlationId"` // further information about the error Errors *[]ErrorDetail `json:"errors,omitempty"` // A map of link names to associated URIs containing documentation about the error or recommended remediation steps Links *Error_Links `json:"links,omitempty"` // A human readable message describing the error along with remediation steps where appropriate Message string `json:"message"` // A specific category that contains more specific detail about the error SubCategory *string `json:"subCategory,omitempty"` }
Error defines model for Error.
type ErrorDetail ¶
type ErrorDetail struct { // The status code associated with the error detail Code *string `json:"code,omitempty"` // Context about the error condition Context *ErrorDetail_Context `json:"context,omitempty"` // The name of the field or parameter in which the error was found. In *string `json:"in,omitempty"` // A human readable message describing the error along with remediation steps where appropriate Message string `json:"message"` // A specific category that contains more specific detail about the error SubCategory *string `json:"subCategory,omitempty"` }
ErrorDetail defines model for ErrorDetail.
type ErrorDetail_Context ¶
Context about the error condition
func (ErrorDetail_Context) Get ¶
func (a ErrorDetail_Context) Get(fieldName string) (value []string, found bool)
Getter for additional properties for ErrorDetail_Context. Returns the specified element and whether it was found
func (ErrorDetail_Context) MarshalJSON ¶
func (a ErrorDetail_Context) MarshalJSON() ([]byte, error)
Override default JSON handling for ErrorDetail_Context to handle AdditionalProperties
func (*ErrorDetail_Context) Set ¶
func (a *ErrorDetail_Context) Set(fieldName string, value []string)
Setter for additional properties for ErrorDetail_Context
func (*ErrorDetail_Context) UnmarshalJSON ¶
func (a *ErrorDetail_Context) UnmarshalJSON(b []byte) error
Override default JSON handling for ErrorDetail_Context to handle AdditionalProperties
type Error_Context ¶
Context about the error condition
func (Error_Context) Get ¶
func (a Error_Context) Get(fieldName string) (value []string, found bool)
Getter for additional properties for Error_Context. Returns the specified element and whether it was found
func (Error_Context) MarshalJSON ¶
func (a Error_Context) MarshalJSON() ([]byte, error)
Override default JSON handling for Error_Context to handle AdditionalProperties
func (*Error_Context) Set ¶
func (a *Error_Context) Set(fieldName string, value []string)
Setter for additional properties for Error_Context
func (*Error_Context) UnmarshalJSON ¶
func (a *Error_Context) UnmarshalJSON(b []byte) error
Override default JSON handling for Error_Context to handle AdditionalProperties
type Error_Links ¶
A map of link names to associated URIs containing documentation about the error or recommended remediation steps
func (Error_Links) Get ¶
func (a Error_Links) Get(fieldName string) (value string, found bool)
Getter for additional properties for Error_Links. Returns the specified element and whether it was found
func (Error_Links) MarshalJSON ¶
func (a Error_Links) MarshalJSON() ([]byte, error)
Override default JSON handling for Error_Links to handle AdditionalProperties
func (*Error_Links) Set ¶
func (a *Error_Links) Set(fieldName string, value string)
Setter for additional properties for Error_Links
func (*Error_Links) UnmarshalJSON ¶
func (a *Error_Links) UnmarshalJSON(b []byte) error
Override default JSON handling for Error_Links to handle AdditionalProperties
type GetAllSchemasParams ¶
type GetAllSchemasParams struct { // Whether to return only results that have been archived. Archived *bool `json:"archived,omitempty"` }
GetAllSchemasParams defines parameters for GetAllSchemas.
type GetAllSchemasResponse ¶
type GetAllSchemasResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionResponseObjectSchemaNoPaging }
func (GetAllSchemasResponse) Status ¶
func (r GetAllSchemasResponse) Status() string
Status returns HTTPResponse.Status
func (GetAllSchemasResponse) StatusCode ¶
func (r GetAllSchemasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetObjectTypeResponse ¶
type GetObjectTypeResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ObjectSchema }
func (GetObjectTypeResponse) Status ¶
func (r GetObjectTypeResponse) Status() string
Status returns HTTPResponse.Status
func (GetObjectTypeResponse) StatusCode ¶
func (r GetObjectTypeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ObjectSchema ¶
type ObjectSchema struct { Archived bool `json:"archived"` // Associations defined for a given object type. Associations []AssociationDefinition `json:"associations"` // When the object schema was created. CreatedAt *time.Time `json:"createdAt,omitempty"` // An assigned unique ID for the object, including portal ID and object name. FullyQualifiedName string `json:"fullyQualifiedName"` // A unique ID for this schema's object type. Will be defined as {meta-type}-{unique ID}. Id string `json:"id"` // Singular and plural labels for the object. Used in CRM display. Labels ObjectTypeDefinitionLabels `json:"labels"` // A unique name for the schema's object type. Name string `json:"name"` ObjectTypeId string `json:"objectTypeId"` // The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. PrimaryDisplayProperty *string `json:"primaryDisplayProperty,omitempty"` // Properties defined for this object type. Properties []Property `json:"properties"` // The names of properties that should be **required** when creating an object of this type. RequiredProperties []string `json:"requiredProperties"` // Names of properties that will be indexed for this object type in by HubSpot's product search. SearchableProperties []string `json:"searchableProperties"` // The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. SecondaryDisplayProperties []string `json:"secondaryDisplayProperties"` // When the object schema was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Defines an object schema, including its properties and associations.
type ObjectSchemaEgg ¶
type ObjectSchemaEgg struct { // Associations defined for this object type. AssociatedObjects []string `json:"associatedObjects"` // Singular and plural labels for the object. Used in CRM display. Labels ObjectTypeDefinitionLabels `json:"labels"` // A unique name for this object. For internal use only. Name string `json:"name"` // The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. PrimaryDisplayProperty *string `json:"primaryDisplayProperty,omitempty"` // Properties defined for this object type. Properties []ObjectTypePropertyCreate `json:"properties"` // The names of properties that should be **required** when creating an object of this type. RequiredProperties []string `json:"requiredProperties"` // Names of properties that will be indexed for this object type in by HubSpot's product search. SearchableProperties []string `json:"searchableProperties"` // The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. SecondaryDisplayProperties []string `json:"secondaryDisplayProperties"` }
Defines a new object type, its properties, and associations.
type ObjectTypeDefinition ¶
type ObjectTypeDefinition struct { Archived bool `json:"archived"` // When the object type was created. CreatedAt *time.Time `json:"createdAt,omitempty"` FullyQualifiedName string `json:"fullyQualifiedName"` // A unique ID for this object type. Will be defined as {meta-type}-{unique ID}. Id string `json:"id"` // Singular and plural labels for the object. Used in CRM display. Labels ObjectTypeDefinitionLabels `json:"labels"` // A unique name for this object. For internal use only. Name string `json:"name"` ObjectTypeId string `json:"objectTypeId"` // The ID of the account that this object type is specific to. PortalId *int32 `json:"portalId,omitempty"` // The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. PrimaryDisplayProperty *string `json:"primaryDisplayProperty,omitempty"` // The names of properties that should be **required** when creating an object of this type. RequiredProperties []string `json:"requiredProperties"` // Names of properties that will be indexed for this object type in by HubSpot's product search. SearchableProperties []string `json:"searchableProperties"` // The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. SecondaryDisplayProperties []string `json:"secondaryDisplayProperties"` // When the object type was last updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Defines an object type.
type ObjectTypeDefinitionLabels ¶
type ObjectTypeDefinitionLabels struct { // The word for multiple objects. (There’s no way to change this later.) Plural *string `json:"plural,omitempty"` // The word for one object. (There’s no way to change this later.) Singular *string `json:"singular,omitempty"` }
Singular and plural labels for the object. Used in CRM display.
type ObjectTypeDefinitionPatch ¶
type ObjectTypeDefinitionPatch struct { // Singular and plural labels for the object. Used in CRM display. Labels *ObjectTypeDefinitionLabels `json:"labels,omitempty"` // The name of the primary property for this object. This will be displayed as primary on the HubSpot record page for this object type. PrimaryDisplayProperty *string `json:"primaryDisplayProperty,omitempty"` // The names of properties that should be **required** when creating an object of this type. RequiredProperties *[]string `json:"requiredProperties,omitempty"` Restorable *bool `json:"restorable,omitempty"` // Names of properties that will be indexed for this object type in by HubSpot's product search. SearchableProperties *[]string `json:"searchableProperties,omitempty"` // The names of secondary properties for this object. These will be displayed as secondary on the HubSpot record page for this object type. SecondaryDisplayProperties *[]string `json:"secondaryDisplayProperties,omitempty"` }
Defines attributes to update on an object type.
type ObjectTypePropertyCreate ¶
type ObjectTypePropertyCreate struct { // A description of the property that will be shown as help text in HubSpot. Description *string `json:"description,omitempty"` // The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed **after** any positive values. DisplayOrder *int32 `json:"displayOrder,omitempty"` // Controls how the property appears in HubSpot. FieldType string `json:"fieldType"` // The name of the group this property belongs to. GroupName *string `json:"groupName,omitempty"` // Whether or not the property's value must be unique. Once set, this can't be changed. HasUniqueValue *bool `json:"hasUniqueValue,omitempty"` Hidden *bool `json:"hidden,omitempty"` // A human-readable property label that will be shown in HubSpot. Label string `json:"label"` // The internal property name, which must be used when referencing the property from the API. Name string `json:"name"` // A list of available options for the property. This field is only required for enumerated properties. Options *[]OptionInput `json:"options,omitempty"` // The data type of the property. Type ObjectTypePropertyCreateType `json:"type"` }
Defines a property to create.
type ObjectTypePropertyCreateType ¶
type ObjectTypePropertyCreateType string
The data type of the property.
const ( ObjectTypePropertyCreateTypeBool ObjectTypePropertyCreateType = "bool" ObjectTypePropertyCreateTypeDate ObjectTypePropertyCreateType = "date" ObjectTypePropertyCreateTypeDatetime ObjectTypePropertyCreateType = "datetime" ObjectTypePropertyCreateTypeEnumeration ObjectTypePropertyCreateType = "enumeration" ObjectTypePropertyCreateTypeNumber ObjectTypePropertyCreateType = "number" ObjectTypePropertyCreateTypeString ObjectTypePropertyCreateType = "string" )
Defines values for ObjectTypePropertyCreateType.
type Option ¶
type Option struct { // A description of the option. Description *string `json:"description,omitempty"` // 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. DisplayOrder *int32 `json:"displayOrder,omitempty"` // Hidden options will not be displayed in HubSpot. Hidden bool `json:"hidden"` // A human-readable option label that will be shown in HubSpot. Label string `json:"label"` // The internal value of the option, which must be used when setting the property value through the API. Value string `json:"value"` }
The options available when a property is an enumeration
type OptionInput ¶
type OptionInput struct { // A description of the option. Description *string `json:"description,omitempty"` // 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. DisplayOrder int32 `json:"displayOrder"` // Hidden options won't be shown in HubSpot. Hidden bool `json:"hidden"` // A human-readable option label that will be shown in HubSpot. Label string `json:"label"` // The internal value of the option, which must be used when setting the property value through the API. Value string `json:"value"` }
Defines a enumeration property option
type Property ¶
type Property struct { // Whether or not the property is archived. Archived *bool `json:"archived,omitempty"` // When the property was archived. ArchivedAt *time.Time `json:"archivedAt,omitempty"` // For default properties, true indicates that the property is calculated by a HubSpot process. It has no effect for custom properties. Calculated *bool `json:"calculated,omitempty"` // When the property was created CreatedAt *time.Time `json:"createdAt,omitempty"` // The internal ID of the user who created the property in HubSpot. This field may not exist if the property was created outside of HubSpot. CreatedUserId *string `json:"createdUserId,omitempty"` // A description of the property that will be shown as help text in HubSpot. Description string `json:"description"` // The order that this property should be displayed in the HubSpot UI relative to other properties for this object type. Properties are displayed in order starting with the lowest positive integer value. A value of -1 will cause the property to be displayed **after** any positive values. DisplayOrder *int32 `json:"displayOrder,omitempty"` // For default properties, true indicates that the options are stored externally to the property settings. ExternalOptions *bool `json:"externalOptions,omitempty"` // Controls how the property appears in HubSpot. FieldType string `json:"fieldType"` // Whether or not the property can be used in a HubSpot form. FormField *bool `json:"formField,omitempty"` // The name of the property group the property belongs to. GroupName string `json:"groupName"` // Whether or not the property's value must be unique. Once set, this can't be changed. HasUniqueValue *bool `json:"hasUniqueValue,omitempty"` Hidden *bool `json:"hidden,omitempty"` // This will be true for default object properties built into HubSpot. HubspotDefined *bool `json:"hubspotDefined,omitempty"` // A human-readable property label that will be shown in HubSpot. Label string `json:"label"` ModificationMetadata *PropertyModificationMetadata `json:"modificationMetadata,omitempty"` // The internal property name, which must be used when referencing the property via the API. Name string `json:"name"` // A list of valid options for the property. This field is required for enumerated properties, but will be empty for other property types. Options []Option `json:"options"` // If this property is related to other object(s), they'll be listed here. ReferencedObjectType *string `json:"referencedObjectType,omitempty"` // Whether the property will display the currency symbol set in the account settings. ShowCurrencySymbol *bool `json:"showCurrencySymbol,omitempty"` // The property data type. Type string `json:"type"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` // 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. UpdatedUserId *string `json:"updatedUserId,omitempty"` }
Defines a property
type PropertyModificationMetadata ¶
type PropertyModificationMetadata struct { Archivable bool `json:"archivable"` ReadOnlyDefinition bool `json:"readOnlyDefinition"` ReadOnlyOptions *bool `json:"readOnlyOptions,omitempty"` ReadOnlyValue bool `json:"readOnlyValue"` }
PropertyModificationMetadata defines model for PropertyModificationMetadata.
type PurgeObjectTypeResponse ¶
func (PurgeObjectTypeResponse) Status ¶
func (r PurgeObjectTypeResponse) Status() string
Status returns HTTPResponse.Status
func (PurgeObjectTypeResponse) StatusCode ¶
func (r PurgeObjectTypeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateObjectTypeJSONBody ¶
type UpdateObjectTypeJSONBody ObjectTypeDefinitionPatch
UpdateObjectTypeJSONBody defines parameters for UpdateObjectType.
type UpdateObjectTypeJSONRequestBody ¶
type UpdateObjectTypeJSONRequestBody UpdateObjectTypeJSONBody
UpdateObjectTypeJSONRequestBody defines body for UpdateObjectType for application/json ContentType.
type UpdateObjectTypeResponse ¶
type UpdateObjectTypeResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ObjectTypeDefinition }
func (UpdateObjectTypeResponse) Status ¶
func (r UpdateObjectTypeResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateObjectTypeResponse) StatusCode ¶
func (r UpdateObjectTypeResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode