accounting

package
v0.0.0-...-2284865 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package accounting provides primitives to interact with the openapi HTTP API.

Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.

Package accounting provides primitives to interact with the openapi HTTP API.

Code generated by github.com/faetools/devtool version (devel) DO NOT EDIT.

Index

Constants

View Source
const (
	HapikeyScopes       = "hapikey.Scopes"
	Oauth2_legacyScopes = "oauth2_legacy.Scopes"
)
View Source
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 AccountingAppSettings

type AccountingAppSettings struct {
	// The ID of the accounting app. This is the identifier of the application created in your HubSpot developer portal.
	AppId int32 `json:"appId"`

	// Outlines the features that are supported by the external accounting system.
	Features *AccountingFeatures `json:"features,omitempty"`

	// The URL endpoints that HubSpot will send requests to an external accounting system for certain actions.
	Urls AccountingAppUrls `json:"urls"`
}

The URL Settings, which defines the URL endpoints that HubSpot will send requests to an external accounting application for certain actions.

type AccountingAppUrls

type AccountingAppUrls struct {
	// A URL that specifies the endpoint where a new customer can be created.
	CreateCustomerUrl *string `json:"createCustomerUrl,omitempty"`

	// A URL that specifies the endpoint where an invoices can be created.
	CreateInvoiceUrl *string `json:"createInvoiceUrl,omitempty"`

	// A template URL that indicates the endpoint where a customer can be fetched by ID. Note that ${CUSTOMER_ID} in this URL will be replaced by the actual customer ID. For example: https://myapp.com/api/customers/${CUSTOMER_ID}
	CustomerUrlTemplate string `json:"customerUrlTemplate"`

	// A URL that specifies the endpoint where exchange rates can be queried.
	ExchangeRateUrl *string `json:"exchangeRateUrl,omitempty"`

	// A URL that specifies the endpoint where an invoice PDF can be retrieved.
	GetInvoicePdfUrl string `json:"getInvoicePdfUrl"`

	// A URL that specifies the endpoint where invoices can be retrieved.
	GetInvoiceUrl string `json:"getInvoiceUrl"`

	// A URL that specifies the endpoint where payment terms can be retrieved.
	GetTermsUrl *string `json:"getTermsUrl,omitempty"`

	// A template URL that indicates the endpoint where an invoice can be fetched by ID. Note that ${INVOICE_ID} in this URL will be replaced by the actual invoice ID. For example: https://myapp.com/api/invoices/${INVOICE_ID}
	InvoiceUrlTemplate string `json:"invoiceUrlTemplate"`

	// A template URL that indicates the endpoint where a product can be fetched by ID. Note that ${PRODUCT_ID} in this URL will be replaced by the actual product ID. For example: https://myapp.com/api/products/${PRODUCT_ID}
	ProductUrlTemplate string  `json:"productUrlTemplate"`
	SearchCountUrl     *string `json:"searchCountUrl,omitempty"`

	// A URL that specifies the endpoint where a customer search can be performed.
	SearchCustomerUrl string `json:"searchCustomerUrl"`

	// A URL that specifies the endpoint where an invoice search can be performed.
	SearchInvoiceUrl *string `json:"searchInvoiceUrl,omitempty"`

	// A URL that specifies the endpoint where a product search can be performed.
	SearchProductUrl *string `json:"searchProductUrl,omitempty"`

	// A URL that specifies the endpoint where a tax search can be performed.
	SearchTaxUrl *string `json:"searchTaxUrl,omitempty"`
	SearchUrl    *string `json:"searchUrl,omitempty"`
}

The URL endpoints that HubSpot will send requests to an external accounting system for certain actions.

type AccountingExtensionCustomer

type AccountingExtensionCustomer struct {
	// Represents an address of a customer
	BillingAddress *Address `json:"billingAddress,omitempty"`

	// The ISO 4217 currency code that represents the currency the customer should be billed in.
	CurrencyCode *string `json:"currencyCode,omitempty"`

	// The customer's email address
	EmailAddress *string `json:"emailAddress,omitempty"`

	// The ID of the customer in the external accounting system.
	Id string `json:"id"`

	// The customer's full name
	Name string `json:"name"`
}

Representation of a customer in the external accounting system.

type AccountingExtensionInvoice

type AccountingExtensionInvoice struct {
	// The total amount due.
	AmountDue float32 `json:"amountDue"`

	// The remaining outstanding balance due.
	Balance *float32 `json:"balance,omitempty"`

	// The ISO 4217 currency code that represents the currency of this invoice.
	Currency string `json:"currency"`

	// The ID of the customer that this invoice is for.
	CustomerId *string `json:"customerId,omitempty"`

	// The name of the customer that this invoice is for.
	CustomerName string `json:"customerName"`

	// The due date for payment of the invoice, in ISO-8601 date format (yyyy-MM-dd)
	DueDate openapi_types.Date `json:"dueDate"`

	// A link to the invoice in the external accounting system.
	InvoiceLink string `json:"invoiceLink"`

	// The invoice number
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`

	// The currency status of the invoice.
	Status AccountingExtensionInvoiceStatus `json:"status"`
}

Representation of an invoice in the external accounting system.

type AccountingExtensionInvoiceStatus

type AccountingExtensionInvoiceStatus string

The currency status of the invoice.

const (
	AccountingExtensionInvoiceStatusCLOSED AccountingExtensionInvoiceStatus = "CLOSED"

	AccountingExtensionInvoiceStatusCREATED AccountingExtensionInvoiceStatus = "CREATED"

	AccountingExtensionInvoiceStatusOVERDUE AccountingExtensionInvoiceStatus = "OVERDUE"

	AccountingExtensionInvoiceStatusPAID AccountingExtensionInvoiceStatus = "PAID"

	AccountingExtensionInvoiceStatusSENT AccountingExtensionInvoiceStatus = "SENT"

	AccountingExtensionInvoiceStatusVOIDED AccountingExtensionInvoiceStatus = "VOIDED"
)

Defines values for AccountingExtensionInvoiceStatus.

type AccountingExtensionTerm

type AccountingExtensionTerm struct {
	// The due date for payment of the invoice, in ISO-8601 date format (yyyy-MM-dd)
	DueDate *openapi_types.Date `json:"dueDate,omitempty"`

	// The number of days that these payment terms represent.
	DueDays *int32 `json:"dueDays,omitempty"`

	// The ID of the payment terms in the external accounting system.
	Id string `json:"id"`

	// The display name of the payment terms.
	Name string `json:"name"`
}

Representation of payment terms that are defined in the external accounting system. One of 'dueDays' or 'dueDate' is required.

type AccountingFeatures

type AccountingFeatures struct {
	// Indicates what elements of creating invoices in HubSpot is supported for the integration.
	CreateInvoice CreateInvoiceFeature `json:"createInvoice"`

	// Indicates if importing invoices from the external account system into HubSpot is supported for the integration.
	ImportInvoice ImportInvoiceFeature `json:"importInvoice"`

	// Indicates if syncing objects from the external account system into HubSpot is supported for the integration.
	// This is a map, where the key is one of `CONTACT` or `PRODUCT`, to indicate which type of object you do or don't support syncing.
	// For example:
	// “`
	//   "sync": {
	//     "CONTACT": {
	//       "toHubSpot": true
	//     },
	//     "PRODUCT": {
	//       "toHubSpot": true
	//     }
	//   }
	// “`
	Sync AccountingFeatures_Sync `json:"sync"`
}

Outlines the features that are supported by the external accounting system.

type AccountingFeatures_Sync

type AccountingFeatures_Sync struct {
	AdditionalProperties map[string]ObjectSyncFeature `json:"-"`
}

Indicates if syncing objects from the external account system into HubSpot is supported for the integration. This is a map, where the key is one of `CONTACT` or `PRODUCT`, to indicate which type of object you do or don't support syncing. For example: ```

"sync": {
  "CONTACT": {
    "toHubSpot": true
  },
  "PRODUCT": {
    "toHubSpot": true
  }
}

```

func (AccountingFeatures_Sync) Get

func (a AccountingFeatures_Sync) Get(fieldName string) (value ObjectSyncFeature, found bool)

Getter for additional properties for AccountingFeatures_Sync. Returns the specified element and whether it was found

func (AccountingFeatures_Sync) MarshalJSON

func (a AccountingFeatures_Sync) MarshalJSON() ([]byte, error)

Override default JSON handling for AccountingFeatures_Sync to handle AdditionalProperties

func (*AccountingFeatures_Sync) Set

func (a *AccountingFeatures_Sync) Set(fieldName string, value ObjectSyncFeature)

Setter for additional properties for AccountingFeatures_Sync

func (*AccountingFeatures_Sync) UnmarshalJSON

func (a *AccountingFeatures_Sync) UnmarshalJSON(b []byte) error

Override default JSON handling for AccountingFeatures_Sync to handle AdditionalProperties

type ActionResponse

type ActionResponse struct {
	CompletedAt time.Time             `json:"completedAt"`
	Links       *ActionResponse_Links `json:"links,omitempty"`
	RequestedAt *time.Time            `json:"requestedAt,omitempty"`
	StartedAt   time.Time             `json:"startedAt"`
	Status      ActionResponseStatus  `json:"status"`
}

ActionResponse defines model for ActionResponse.

type ActionResponseStatus

type ActionResponseStatus string

ActionResponseStatus defines model for ActionResponse.Status.

const (
	ActionResponseStatusCANCELED ActionResponseStatus = "CANCELED"

	ActionResponseStatusCOMPLETE ActionResponseStatus = "COMPLETE"

	ActionResponseStatusPENDING ActionResponseStatus = "PENDING"

	ActionResponseStatusPROCESSING ActionResponseStatus = "PROCESSING"
)

Defines values for ActionResponseStatus.

type ActionResponse_Links struct {
	AdditionalProperties map[string]string `json:"-"`
}

ActionResponse_Links defines model for ActionResponse.Links.

func (ActionResponse_Links) Get

func (a ActionResponse_Links) Get(fieldName string) (value string, found bool)

Getter for additional properties for ActionResponse_Links. Returns the specified element and whether it was found

func (ActionResponse_Links) MarshalJSON

func (a ActionResponse_Links) MarshalJSON() ([]byte, error)

Override default JSON handling for ActionResponse_Links to handle AdditionalProperties

func (*ActionResponse_Links) Set

func (a *ActionResponse_Links) Set(fieldName string, value string)

Setter for additional properties for ActionResponse_Links

func (*ActionResponse_Links) UnmarshalJSON

func (a *ActionResponse_Links) UnmarshalJSON(b []byte) error

Override default JSON handling for ActionResponse_Links to handle AdditionalProperties

type Address

type Address struct {
	// The city of the address.
	City *string `json:"city,omitempty"`

	// The country of the address.
	Country *string `json:"country,omitempty"`

	// A region of the county of the address.  May represent county, state etc.
	CountrySubDivisionCode *string `json:"countrySubDivisionCode,omitempty"`

	// The first line of the address.
	LineOne *string `json:"lineOne,omitempty"`

	// The postcode/zipcode of the address.
	PostalCode *string `json:"postalCode,omitempty"`
}

Represents an address of a customer

type ArchiveAccountResponse

type ArchiveAccountResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (ArchiveAccountResponse) Status

func (r ArchiveAccountResponse) Status() string

Status returns HTTPResponse.Status

func (ArchiveAccountResponse) StatusCode

func (r ArchiveAccountResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Client

type Client client.Client

Client conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(opts ...client.Option) (*Client, error)

NewClient creates a new Client with reasonable defaults.

func (*Client) ArchiveAccount

func (c *Client) ArchiveAccount(ctx context.Context, accountId string, reqEditors ...client.RequestEditorFn) (*ArchiveAccountResponse, error)

ArchiveAccount request returning *ArchiveAccountResponse

func (*Client) CreateContactContacts

func (c *Client) CreateContactContacts(ctx context.Context, appId int32, body CreateContactContactsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateContactContactsResponse, error)

func (*Client) CreateContactContactsWithBody

func (c *Client) CreateContactContactsWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateContactContactsResponse, error)

CreateContactContactsWithBody request with arbitrary body returning *CreateContactContactsResponse

func (*Client) CreateCustomerRequest

func (c *Client) CreateCustomerRequest(ctx context.Context, requestId string, body CreateCustomerRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateCustomerRequestResponse, error)

func (*Client) CreateCustomerRequestWithBody

func (c *Client) CreateCustomerRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateCustomerRequestResponse, error)

CreateCustomerRequestWithBody request with arbitrary body returning *CreateCustomerRequestResponse

func (*Client) CreateExchangeRateRequest

func (c *Client) CreateExchangeRateRequest(ctx context.Context, requestId string, body CreateExchangeRateRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateExchangeRateRequestResponse, error)

func (*Client) CreateExchangeRateRequestWithBody

func (c *Client) CreateExchangeRateRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateExchangeRateRequestResponse, error)

CreateExchangeRateRequestWithBody request with arbitrary body returning *CreateExchangeRateRequestResponse

func (*Client) CreateInvoiceRequest

func (c *Client) CreateInvoiceRequest(ctx context.Context, requestId string, body CreateInvoiceRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateInvoiceRequestResponse, error)

func (*Client) CreateInvoiceRequestWithBody

func (c *Client) CreateInvoiceRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateInvoiceRequestResponse, error)

CreateInvoiceRequestWithBody request with arbitrary body returning *CreateInvoiceRequestResponse

func (*Client) CreatePayment

func (c *Client) CreatePayment(ctx context.Context, invoiceId string, params *CreatePaymentParams, body CreatePaymentJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreatePaymentResponse, error)

func (*Client) CreatePaymentWithBody

func (c *Client) CreatePaymentWithBody(ctx context.Context, invoiceId string, params *CreatePaymentParams, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreatePaymentResponse, error)

CreatePaymentWithBody request with arbitrary body returning *CreatePaymentResponse

func (*Client) CreateProductProducts

func (c *Client) CreateProductProducts(ctx context.Context, appId int32, body CreateProductProductsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateProductProductsResponse, error)

func (*Client) CreateProductProductsWithBody

func (c *Client) CreateProductProductsWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateProductProductsResponse, error)

CreateProductProductsWithBody request with arbitrary body returning *CreateProductProductsResponse

func (*Client) CreateTermRequest

func (c *Client) CreateTermRequest(ctx context.Context, requestId string, body CreateTermRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateTermRequestResponse, error)

func (*Client) CreateTermRequestWithBody

func (c *Client) CreateTermRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateTermRequestResponse, error)

CreateTermRequestWithBody request with arbitrary body returning *CreateTermRequestResponse

func (*Client) DoCustomerSearchRequest

func (c *Client) DoCustomerSearchRequest(ctx context.Context, requestId string, body DoCustomerSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoCustomerSearchRequestResponse, error)

func (*Client) DoCustomerSearchRequestWithBody

func (c *Client) DoCustomerSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoCustomerSearchRequestResponse, error)

DoCustomerSearchRequestWithBody request with arbitrary body returning *DoCustomerSearchRequestResponse

func (*Client) DoInvoiceSearchRequest

func (c *Client) DoInvoiceSearchRequest(ctx context.Context, requestId string, body DoInvoiceSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoInvoiceSearchRequestResponse, error)

func (*Client) DoInvoiceSearchRequestWithBody

func (c *Client) DoInvoiceSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoInvoiceSearchRequestResponse, error)

DoInvoiceSearchRequestWithBody request with arbitrary body returning *DoInvoiceSearchRequestResponse

func (*Client) DoProductSearchRequest

func (c *Client) DoProductSearchRequest(ctx context.Context, requestId string, body DoProductSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoProductSearchRequestResponse, error)

func (*Client) DoProductSearchRequestWithBody

func (c *Client) DoProductSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoProductSearchRequestResponse, error)

DoProductSearchRequestWithBody request with arbitrary body returning *DoProductSearchRequestResponse

func (*Client) DoTaxSearchRequest

func (c *Client) DoTaxSearchRequest(ctx context.Context, requestId string, body DoTaxSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoTaxSearchRequestResponse, error)

func (*Client) DoTaxSearchRequestWithBody

func (c *Client) DoTaxSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoTaxSearchRequestResponse, error)

DoTaxSearchRequestWithBody request with arbitrary body returning *DoTaxSearchRequestResponse

func (*Client) GetApp

func (c *Client) GetApp(ctx context.Context, appId int32, reqEditors ...client.RequestEditorFn) (*GetAppResponse, error)

GetApp request returning *GetAppResponse

func (*Client) GetInvoice

func (c *Client) GetInvoice(ctx context.Context, invoiceId string, params *GetInvoiceParams, reqEditors ...client.RequestEditorFn) (*GetInvoiceResponse, error)

GetInvoice request returning *GetInvoiceResponse

func (*Client) GetRequest

func (c *Client) GetRequest(ctx context.Context, requestId string, body GetRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*GetRequestResponse, error)

func (*Client) GetRequestWithBody

func (c *Client) GetRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*GetRequestResponse, error)

GetRequestWithBody request with arbitrary body returning *GetRequestResponse

func (*Client) InvoicePdfRequest

func (c *Client) InvoicePdfRequest(ctx context.Context, requestId string, body InvoicePdfRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*InvoicePdfRequestResponse, error)

func (*Client) InvoicePdfRequestWithBody

func (c *Client) InvoicePdfRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*InvoicePdfRequestResponse, error)

InvoicePdfRequestWithBody request with arbitrary body returning *InvoicePdfRequestResponse

func (*Client) ReplaceApp

func (c *Client) ReplaceApp(ctx context.Context, appId int32, body ReplaceAppJSONRequestBody, reqEditors ...client.RequestEditorFn) (*ReplaceAppResponse, error)

func (*Client) ReplaceAppWithBody

func (c *Client) ReplaceAppWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*ReplaceAppResponse, error)

ReplaceAppWithBody request with arbitrary body returning *ReplaceAppResponse

func (*Client) ReplaceUserAccounts

func (*Client) ReplaceUserAccountsWithBody

func (c *Client) ReplaceUserAccountsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*ReplaceUserAccountsResponse, error)

ReplaceUserAccountsWithBody request with arbitrary body returning *ReplaceUserAccountsResponse

func (*Client) UpdateInvoice

func (c *Client) UpdateInvoice(ctx context.Context, invoiceId string, params *UpdateInvoiceParams, body UpdateInvoiceJSONRequestBody, reqEditors ...client.RequestEditorFn) (*UpdateInvoiceResponse, error)

func (*Client) UpdateInvoiceWithBody

func (c *Client) UpdateInvoiceWithBody(ctx context.Context, invoiceId string, params *UpdateInvoiceParams, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*UpdateInvoiceResponse, error)

UpdateInvoiceWithBody request with arbitrary body returning *UpdateInvoiceResponse

type ClientInterface

type ClientInterface interface {
	// CreateCustomerRequest request with any body
	CreateCustomerRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateCustomerRequestResponse, error)
	CreateCustomerRequest(ctx context.Context, requestId string, body CreateCustomerRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateCustomerRequestResponse, error)

	// DoCustomerSearchRequest request with any body
	DoCustomerSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoCustomerSearchRequestResponse, error)
	DoCustomerSearchRequest(ctx context.Context, requestId string, body DoCustomerSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoCustomerSearchRequestResponse, error)

	// CreateExchangeRateRequest request with any body
	CreateExchangeRateRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateExchangeRateRequestResponse, error)
	CreateExchangeRateRequest(ctx context.Context, requestId string, body CreateExchangeRateRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateExchangeRateRequestResponse, error)

	// CreateInvoiceRequest request with any body
	CreateInvoiceRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateInvoiceRequestResponse, error)
	CreateInvoiceRequest(ctx context.Context, requestId string, body CreateInvoiceRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateInvoiceRequestResponse, error)

	// InvoicePdfRequest request with any body
	InvoicePdfRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*InvoicePdfRequestResponse, error)
	InvoicePdfRequest(ctx context.Context, requestId string, body InvoicePdfRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*InvoicePdfRequestResponse, error)

	// DoInvoiceSearchRequest request with any body
	DoInvoiceSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoInvoiceSearchRequestResponse, error)
	DoInvoiceSearchRequest(ctx context.Context, requestId string, body DoInvoiceSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoInvoiceSearchRequestResponse, error)

	// GetRequest request with any body
	GetRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*GetRequestResponse, error)
	GetRequest(ctx context.Context, requestId string, body GetRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*GetRequestResponse, error)

	// DoProductSearchRequest request with any body
	DoProductSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoProductSearchRequestResponse, error)
	DoProductSearchRequest(ctx context.Context, requestId string, body DoProductSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoProductSearchRequestResponse, error)

	// DoTaxSearchRequest request with any body
	DoTaxSearchRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*DoTaxSearchRequestResponse, error)
	DoTaxSearchRequest(ctx context.Context, requestId string, body DoTaxSearchRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*DoTaxSearchRequestResponse, error)

	// CreateTermRequest request with any body
	CreateTermRequestWithBody(ctx context.Context, requestId string, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateTermRequestResponse, error)
	CreateTermRequest(ctx context.Context, requestId string, body CreateTermRequestJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateTermRequestResponse, error)

	// GetInvoice request
	GetInvoice(ctx context.Context, invoiceId string, params *GetInvoiceParams, reqEditors ...client.RequestEditorFn) (*GetInvoiceResponse, error)

	// UpdateInvoice request with any body
	UpdateInvoiceWithBody(ctx context.Context, invoiceId string, params *UpdateInvoiceParams, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*UpdateInvoiceResponse, error)
	UpdateInvoice(ctx context.Context, invoiceId string, params *UpdateInvoiceParams, body UpdateInvoiceJSONRequestBody, reqEditors ...client.RequestEditorFn) (*UpdateInvoiceResponse, error)

	// CreatePayment request with any body
	CreatePaymentWithBody(ctx context.Context, invoiceId string, params *CreatePaymentParams, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreatePaymentResponse, error)
	CreatePayment(ctx context.Context, invoiceId string, params *CreatePaymentParams, body CreatePaymentJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreatePaymentResponse, error)

	// GetApp request
	GetApp(ctx context.Context, appId int32, reqEditors ...client.RequestEditorFn) (*GetAppResponse, error)

	// ReplaceApp request with any body
	ReplaceAppWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*ReplaceAppResponse, error)
	ReplaceApp(ctx context.Context, appId int32, body ReplaceAppJSONRequestBody, reqEditors ...client.RequestEditorFn) (*ReplaceAppResponse, error)

	// CreateContactContacts request with any body
	CreateContactContactsWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateContactContactsResponse, error)
	CreateContactContacts(ctx context.Context, appId int32, body CreateContactContactsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateContactContactsResponse, error)

	// CreateProductProducts request with any body
	CreateProductProductsWithBody(ctx context.Context, appId int32, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*CreateProductProductsResponse, error)
	CreateProductProducts(ctx context.Context, appId int32, body CreateProductProductsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*CreateProductProductsResponse, error)

	// ReplaceUserAccounts request with any body
	ReplaceUserAccountsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...client.RequestEditorFn) (*ReplaceUserAccountsResponse, error)
	ReplaceUserAccounts(ctx context.Context, body ReplaceUserAccountsJSONRequestBody, reqEditors ...client.RequestEditorFn) (*ReplaceUserAccountsResponse, error)

	// ArchiveAccount request
	ArchiveAccount(ctx context.Context, accountId string, reqEditors ...client.RequestEditorFn) (*ArchiveAccountResponse, error)
}

ClientInterface interface specification for the client.

type CreateContactContactsJSONBody

type CreateContactContactsJSONBody SyncContactsRequest

CreateContactContactsJSONBody defines parameters for CreateContactContacts.

type CreateContactContactsJSONRequestBody

type CreateContactContactsJSONRequestBody CreateContactContactsJSONBody

CreateContactContactsJSONRequestBody defines body for CreateContactContacts for application/json ContentType.

type CreateContactContactsResponse

type CreateContactContactsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ActionResponse
}

func (CreateContactContactsResponse) Status

Status returns HTTPResponse.Status

func (CreateContactContactsResponse) StatusCode

func (r CreateContactContactsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateCustomerRequestJSONBody

type CreateCustomerRequestJSONBody ResultIdAccountingResponse

CreateCustomerRequestJSONBody defines parameters for CreateCustomerRequest.

type CreateCustomerRequestJSONRequestBody

type CreateCustomerRequestJSONRequestBody CreateCustomerRequestJSONBody

CreateCustomerRequestJSONRequestBody defines body for CreateCustomerRequest for application/json ContentType.

type CreateCustomerRequestResponse

type CreateCustomerRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (CreateCustomerRequestResponse) Status

Status returns HTTPResponse.Status

func (CreateCustomerRequestResponse) StatusCode

func (r CreateCustomerRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateExchangeRateRequestJSONBody

type CreateExchangeRateRequestJSONBody ExchangeRateResponse

CreateExchangeRateRequestJSONBody defines parameters for CreateExchangeRateRequest.

type CreateExchangeRateRequestJSONRequestBody

type CreateExchangeRateRequestJSONRequestBody CreateExchangeRateRequestJSONBody

CreateExchangeRateRequestJSONRequestBody defines body for CreateExchangeRateRequest for application/json ContentType.

type CreateExchangeRateRequestResponse

type CreateExchangeRateRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (CreateExchangeRateRequestResponse) Status

Status returns HTTPResponse.Status

func (CreateExchangeRateRequestResponse) StatusCode

func (r CreateExchangeRateRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateInvoiceFeature

type CreateInvoiceFeature struct {
	// Indicates if creating invoices in HubSpot is supported for the integration.
	Enabled bool `json:"enabled"`

	// Lists the individual aspects of creating invoices that are enabled for the integration, as part of the create invoice flow in HubSpot.
	SubFeatures CreateInvoiceSubFeatures `json:"subFeatures"`
}

Indicates what elements of creating invoices in HubSpot is supported for the integration.

type CreateInvoiceRequestJSONBody

type CreateInvoiceRequestJSONBody ResultIdAccountingResponse

CreateInvoiceRequestJSONBody defines parameters for CreateInvoiceRequest.

type CreateInvoiceRequestJSONRequestBody

type CreateInvoiceRequestJSONRequestBody CreateInvoiceRequestJSONBody

CreateInvoiceRequestJSONRequestBody defines body for CreateInvoiceRequest for application/json ContentType.

type CreateInvoiceRequestResponse

type CreateInvoiceRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (CreateInvoiceRequestResponse) Status

Status returns HTTPResponse.Status

func (CreateInvoiceRequestResponse) StatusCode

func (r CreateInvoiceRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateInvoiceSubFeatures

type CreateInvoiceSubFeatures struct {
	// Indicates if a new customer can be created in the external accounting system.
	CreateCustomer bool `json:"createCustomer"`

	// Indicates if the external accounting system supports fetching exchange rates when create an invoice in HubSpot for a customer billed in a different currency.
	ExchangeRates bool `json:"exchangeRates"`

	// Indicates if a visible comment can be added to invoices.
	InvoiceComments bool `json:"invoiceComments"`

	// Indicates if invoice-level discounts can be added to invoices.
	InvoiceDiscounts bool `json:"invoiceDiscounts"`

	// Indicates if taxes can be specified by the HubSpot user for line items.
	Taxes bool `json:"taxes"`

	// Indicates if the external accounting system supports fetching payment terms.
	Terms bool `json:"terms"`
}

Lists the individual aspects of creating invoices that are enabled for the integration, as part of the create invoice flow in HubSpot.

type CreatePaymentJSONBody

type CreatePaymentJSONBody InvoiceCreatePaymentRequest

CreatePaymentJSONBody defines parameters for CreatePayment.

type CreatePaymentJSONRequestBody

type CreatePaymentJSONRequestBody CreatePaymentJSONBody

CreatePaymentJSONRequestBody defines body for CreatePayment for application/json ContentType.

type CreatePaymentParams

type CreatePaymentParams struct {
	// The ID of the account that the invoice belongs to. This is the account ID from the external accounting system.
	AccountId *string `json:"accountId,omitempty"`
}

CreatePaymentParams defines parameters for CreatePayment.

type CreatePaymentResponse

type CreatePaymentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InvoiceUpdateResponse
}

func (CreatePaymentResponse) Status

func (r CreatePaymentResponse) Status() string

Status returns HTTPResponse.Status

func (CreatePaymentResponse) StatusCode

func (r CreatePaymentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateProductProductsJSONBody

type CreateProductProductsJSONBody SyncProductsRequest

CreateProductProductsJSONBody defines parameters for CreateProductProducts.

type CreateProductProductsJSONRequestBody

type CreateProductProductsJSONRequestBody CreateProductProductsJSONBody

CreateProductProductsJSONRequestBody defines body for CreateProductProducts for application/json ContentType.

type CreateProductProductsResponse

type CreateProductProductsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ActionResponse
}

func (CreateProductProductsResponse) Status

Status returns HTTPResponse.Status

func (CreateProductProductsResponse) StatusCode

func (r CreateProductProductsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateTermRequestJSONBody

type CreateTermRequestJSONBody TermsResponse

CreateTermRequestJSONBody defines parameters for CreateTermRequest.

type CreateTermRequestJSONRequestBody

type CreateTermRequestJSONRequestBody CreateTermRequestJSONBody

CreateTermRequestJSONRequestBody defines body for CreateTermRequest for application/json ContentType.

type CreateTermRequestResponse

type CreateTermRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (CreateTermRequestResponse) Status

func (r CreateTermRequestResponse) Status() string

Status returns HTTPResponse.Status

func (CreateTermRequestResponse) StatusCode

func (r CreateTermRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type CreateUserAccountRequestExternal

type CreateUserAccountRequestExternal struct {
	// The id of the account in your system.
	AccountId string `json:"accountId"`

	// The name of the account in your system. This is normally the name visible to your users.
	AccountName string `json:"accountName"`

	// The default currency that this account uses.
	CurrencyCode string `json:"currencyCode"`
}

Information about the account in your external account system.

type CustomerSearchResponseExternal

type CustomerSearchResponseExternal struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result CustomerSearchResponseExternalResult `json:"@result"`

	// The list of customers that matched the search criteria.
	Customers []AccountingExtensionCustomer `json:"customers"`
}

A response to a search for customers.

type CustomerSearchResponseExternalResult

type CustomerSearchResponseExternalResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	CustomerSearchResponseExternalResultERR CustomerSearchResponseExternalResult = "ERR"

	CustomerSearchResponseExternalResultOK CustomerSearchResponseExternalResult = "OK"
)

Defines values for CustomerSearchResponseExternalResult.

type DoCustomerSearchRequestJSONBody

type DoCustomerSearchRequestJSONBody CustomerSearchResponseExternal

DoCustomerSearchRequestJSONBody defines parameters for DoCustomerSearchRequest.

type DoCustomerSearchRequestJSONRequestBody

type DoCustomerSearchRequestJSONRequestBody DoCustomerSearchRequestJSONBody

DoCustomerSearchRequestJSONRequestBody defines body for DoCustomerSearchRequest for application/json ContentType.

type DoCustomerSearchRequestResponse

type DoCustomerSearchRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (DoCustomerSearchRequestResponse) Status

Status returns HTTPResponse.Status

func (DoCustomerSearchRequestResponse) StatusCode

func (r DoCustomerSearchRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DoInvoiceSearchRequestJSONBody

type DoInvoiceSearchRequestJSONBody InvoiceSearchResponse

DoInvoiceSearchRequestJSONBody defines parameters for DoInvoiceSearchRequest.

type DoInvoiceSearchRequestJSONRequestBody

type DoInvoiceSearchRequestJSONRequestBody DoInvoiceSearchRequestJSONBody

DoInvoiceSearchRequestJSONRequestBody defines body for DoInvoiceSearchRequest for application/json ContentType.

type DoInvoiceSearchRequestResponse

type DoInvoiceSearchRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (DoInvoiceSearchRequestResponse) Status

Status returns HTTPResponse.Status

func (DoInvoiceSearchRequestResponse) StatusCode

func (r DoInvoiceSearchRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DoProductSearchRequestJSONBody

type DoProductSearchRequestJSONBody ProductSearchResponse

DoProductSearchRequestJSONBody defines parameters for DoProductSearchRequest.

type DoProductSearchRequestJSONRequestBody

type DoProductSearchRequestJSONRequestBody DoProductSearchRequestJSONBody

DoProductSearchRequestJSONRequestBody defines body for DoProductSearchRequest for application/json ContentType.

type DoProductSearchRequestResponse

type DoProductSearchRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (DoProductSearchRequestResponse) Status

Status returns HTTPResponse.Status

func (DoProductSearchRequestResponse) StatusCode

func (r DoProductSearchRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DoTaxSearchRequestJSONBody

type DoTaxSearchRequestJSONBody TaxSearchResponse

DoTaxSearchRequestJSONBody defines parameters for DoTaxSearchRequest.

type DoTaxSearchRequestJSONRequestBody

type DoTaxSearchRequestJSONRequestBody DoTaxSearchRequestJSONBody

DoTaxSearchRequestJSONRequestBody defines body for DoTaxSearchRequest for application/json ContentType.

type DoTaxSearchRequestResponse

type DoTaxSearchRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (DoTaxSearchRequestResponse) Status

Status returns HTTPResponse.Status

func (DoTaxSearchRequestResponse) StatusCode

func (r DoTaxSearchRequestResponse) 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

type ErrorDetail_Context struct {
	AdditionalProperties map[string][]string `json:"-"`
}

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

type Error_Context struct {
	AdditionalProperties map[string][]string `json:"-"`
}

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 struct {
	AdditionalProperties map[string]string `json:"-"`
}

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 ExchangeRateResponse

type ExchangeRateResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result ExchangeRateResponseResult `json:"@result"`

	// The exchange rate between the 2 currencies
	ExchangeRate float32 `json:"exchangeRate"`

	// The ISO 4217 currency code that represents the source currency of the exchange rate.
	SourceCurrencyCode string `json:"sourceCurrencyCode"`

	// The ISO 4217 currency code that represents the target currency of the exchange rate.
	TargetCurrencyCode string `json:"targetCurrencyCode"`
}

A response to the request for an exchange rate value. It represents the exchange rate from the source currency to the target currency.

type ExchangeRateResponseResult

type ExchangeRateResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	ExchangeRateResponseResultERR ExchangeRateResponseResult = "ERR"

	ExchangeRateResponseResultOK ExchangeRateResponseResult = "OK"
)

Defines values for ExchangeRateResponseResult.

type GetAppResponse

type GetAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AccountingAppSettings
}

func (GetAppResponse) Status

func (r GetAppResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppResponse) StatusCode

func (r GetAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetInvoiceParams

type GetInvoiceParams struct {
	// The ID of the account that the invoice belongs to. This is the account ID from the external accounting system.
	AccountId string `json:"accountId"`
}

GetInvoiceParams defines parameters for GetInvoice.

type GetInvoiceResponse

type GetInvoiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InvoiceReadResponse
}

func (GetInvoiceResponse) Status

func (r GetInvoiceResponse) Status() string

Status returns HTTPResponse.Status

func (GetInvoiceResponse) StatusCode

func (r GetInvoiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetRequestJSONBody

type GetRequestJSONBody InvoicesResponseExternal

GetRequestJSONBody defines parameters for GetRequest.

type GetRequestJSONRequestBody

type GetRequestJSONRequestBody GetRequestJSONBody

GetRequestJSONRequestBody defines body for GetRequest for application/json ContentType.

type GetRequestResponse

type GetRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (GetRequestResponse) Status

func (r GetRequestResponse) Status() string

Status returns HTTPResponse.Status

func (GetRequestResponse) StatusCode

func (r GetRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ImportInvoiceFeature

type ImportInvoiceFeature struct {
	// Indicates if importing invoices from the external account system into HubSpot.
	Enabled bool `json:"enabled"`
}

Indicates if importing invoices from the external account system into HubSpot is supported for the integration.

type InvoiceCreatePaymentRequest

type InvoiceCreatePaymentRequest struct {
	// The amount that this payment is for.
	AmountPaid float32 `json:"amountPaid"`

	// The ISO 4217 currency code that represents the currency of the payment.
	CurrencyCode string `json:"currencyCode"`

	// The id of this payment in the external accounting system.
	ExternalPaymentId string `json:"externalPaymentId"`

	// The datetime that this payment was received.
	PaymentDateTime time.Time `json:"paymentDateTime"`
}

InvoiceCreatePaymentRequest defines model for InvoiceCreatePaymentRequest.

type InvoicePdfRequestJSONBody

type InvoicePdfRequestJSONBody InvoicePdfResponse

InvoicePdfRequestJSONBody defines parameters for InvoicePdfRequest.

type InvoicePdfRequestJSONRequestBody

type InvoicePdfRequestJSONRequestBody InvoicePdfRequestJSONBody

InvoicePdfRequestJSONRequestBody defines body for InvoicePdfRequest for application/json ContentType.

type InvoicePdfRequestResponse

type InvoicePdfRequestResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (InvoicePdfRequestResponse) Status

func (r InvoicePdfRequestResponse) Status() string

Status returns HTTPResponse.Status

func (InvoicePdfRequestResponse) StatusCode

func (r InvoicePdfRequestResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type InvoicePdfResponse

type InvoicePdfResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *InvoicePdfResponseResult `json:"@result,omitempty"`

	// The bytes of the invoice PDF.
	Invoice []byte `json:"invoice"`
}

A response that contains the PDF of an invoice

type InvoicePdfResponseResult

type InvoicePdfResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	InvoicePdfResponseResultERR InvoicePdfResponseResult = "ERR"

	InvoicePdfResponseResultOK InvoicePdfResponseResult = "OK"
)

Defines values for InvoicePdfResponseResult.

type InvoiceReadResponse

type InvoiceReadResponse struct {
	Archived   bool       `json:"archived"`
	ArchivedAt *time.Time `json:"archivedAt,omitempty"`

	// The remaining balance due for the invoice.
	BalanceDue float32 `json:"balanceDue"`

	// The datetime that the invoice was created in HubSpot.
	CreatedAt time.Time `json:"createdAt"`

	// The ISO 4217 currency code that represents the currency of the invoice.
	CurrencyCode string `json:"currencyCode"`

	// The due date of the invoice
	DueDate openapi_types.Date `json:"dueDate"`

	// The id of the account in the external accounting system that this invoice is related to.
	ExternalAccountId string `json:"externalAccountId"`

	// The datetime that the invoice was created in the external accounting system.
	ExternalCreateDateTime *int64 `json:"externalCreateDateTime,omitempty"`

	// The invoice number. Note that this is _not_ the ID of the invoice, but the number that the billed customer will see.
	ExternalInvoiceNumber *string `json:"externalInvoiceNumber,omitempty"`

	// The id of the customer in the external accounting system that the invoice was sent to.
	ExternalRecipientId string `json:"externalRecipientId"`

	// The id of this invoice in the external accounting system.
	Id string `json:"id"`

	// The status of the invoice
	InvoiceStatus InvoiceReadResponseInvoiceStatus `json:"invoiceStatus"`

	// Indicated is the invoice has been voided or not.
	IsVoided bool `json:"isVoided"`

	// The datetime that that invoice was sent to the customer.
	ReceivedByRecipientDate *int64 `json:"receivedByRecipientDate,omitempty"`

	// The total amount that this invoice is for.
	TotalAmountBilled float32 `json:"totalAmountBilled"`

	// The datetime that the invoice was last updated in HubSpot.
	UpdatedAt time.Time `json:"updatedAt"`
}

The invoice data stored in HubSpot

type InvoiceReadResponseInvoiceStatus

type InvoiceReadResponseInvoiceStatus string

The status of the invoice

const (
	InvoiceReadResponseInvoiceStatusCLOSED InvoiceReadResponseInvoiceStatus = "CLOSED"

	InvoiceReadResponseInvoiceStatusCREATED InvoiceReadResponseInvoiceStatus = "CREATED"

	InvoiceReadResponseInvoiceStatusNONE InvoiceReadResponseInvoiceStatus = "NONE"

	InvoiceReadResponseInvoiceStatusOVERDUE InvoiceReadResponseInvoiceStatus = "OVERDUE"

	InvoiceReadResponseInvoiceStatusPAID InvoiceReadResponseInvoiceStatus = "PAID"

	InvoiceReadResponseInvoiceStatusSENT InvoiceReadResponseInvoiceStatus = "SENT"

	InvoiceReadResponseInvoiceStatusUNPAID InvoiceReadResponseInvoiceStatus = "UNPAID"

	InvoiceReadResponseInvoiceStatusVOIDED InvoiceReadResponseInvoiceStatus = "VOIDED"
)

Defines values for InvoiceReadResponseInvoiceStatus.

type InvoiceSearchResponse

type InvoiceSearchResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *InvoiceSearchResponseResult `json:"@result,omitempty"`

	// The list of invoices that matched the search criteria.
	Invoices []AccountingExtensionInvoice `json:"invoices"`
}

A response to a search for invoices.

type InvoiceSearchResponseResult

type InvoiceSearchResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	InvoiceSearchResponseResultERR InvoiceSearchResponseResult = "ERR"

	InvoiceSearchResponseResultOK InvoiceSearchResponseResult = "OK"
)

Defines values for InvoiceSearchResponseResult.

type InvoiceUpdateRequest

type InvoiceUpdateRequest struct {
	// The ISO 4217 currency code that represents the currency used in the invoice to bill the recipient
	CurrencyCode *string `json:"currencyCode,omitempty"`

	// The ISO-8601 due date of the invoice.
	DueDate               *openapi_types.Date `json:"dueDate,omitempty"`
	ExternalInvoiceNumber *string             `json:"externalInvoiceNumber,omitempty"`

	// The ID of the invoice recipient. This is the recipient ID from the external accounting system.
	ExternalRecipientId *string `json:"externalRecipientId,omitempty"`

	// The number / name of the invoice.
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`

	// States if the invoice is voided or not.
	IsVoided *bool `json:"isVoided,omitempty"`

	// The ISO-8601 datetime of when the customer received the invoice.
	ReceivedByCustomerDate  *string `json:"receivedByCustomerDate,omitempty"`
	ReceivedByRecipientDate *int64  `json:"receivedByRecipientDate,omitempty"`
}

The invoice data to update in HubSpot

type InvoiceUpdateResponse

type InvoiceUpdateResponse struct {
	Archived                bool                               `json:"archived"`
	ArchivedAt              *time.Time                         `json:"archivedAt,omitempty"`
	BalanceDue              float32                            `json:"balanceDue"`
	CreatedAt               time.Time                          `json:"createdAt"`
	CurrencyCode            string                             `json:"currencyCode"`
	DueDate                 openapi_types.Date                 `json:"dueDate"`
	ExternalAccountId       string                             `json:"externalAccountId"`
	ExternalCreateDateTime  *int64                             `json:"externalCreateDateTime,omitempty"`
	ExternalInvoiceNumber   *string                            `json:"externalInvoiceNumber,omitempty"`
	ExternalRecipientId     string                             `json:"externalRecipientId"`
	Id                      string                             `json:"id"`
	InvoiceStatus           InvoiceUpdateResponseInvoiceStatus `json:"invoiceStatus"`
	IsVoided                bool                               `json:"isVoided"`
	ReceivedByRecipientDate *int64                             `json:"receivedByRecipientDate,omitempty"`
	TotalAmountBilled       float32                            `json:"totalAmountBilled"`
	UpdatedAt               time.Time                          `json:"updatedAt"`
}

InvoiceUpdateResponse defines model for InvoiceUpdateResponse.

type InvoiceUpdateResponseInvoiceStatus

type InvoiceUpdateResponseInvoiceStatus string

InvoiceUpdateResponseInvoiceStatus defines model for InvoiceUpdateResponse.InvoiceStatus.

const (
	InvoiceUpdateResponseInvoiceStatusCLOSED InvoiceUpdateResponseInvoiceStatus = "CLOSED"

	InvoiceUpdateResponseInvoiceStatusCREATED InvoiceUpdateResponseInvoiceStatus = "CREATED"

	InvoiceUpdateResponseInvoiceStatusNONE InvoiceUpdateResponseInvoiceStatus = "NONE"

	InvoiceUpdateResponseInvoiceStatusOVERDUE InvoiceUpdateResponseInvoiceStatus = "OVERDUE"

	InvoiceUpdateResponseInvoiceStatusPAID InvoiceUpdateResponseInvoiceStatus = "PAID"

	InvoiceUpdateResponseInvoiceStatusSENT InvoiceUpdateResponseInvoiceStatus = "SENT"

	InvoiceUpdateResponseInvoiceStatusUNPAID InvoiceUpdateResponseInvoiceStatus = "UNPAID"

	InvoiceUpdateResponseInvoiceStatusVOIDED InvoiceUpdateResponseInvoiceStatus = "VOIDED"
)

Defines values for InvoiceUpdateResponseInvoiceStatus.

type InvoicesResponseExternal

type InvoicesResponseExternal struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *InvoicesResponseExternalResult `json:"@result,omitempty"`

	// The list of invoices that were found for the request.
	Invoices []AccountingExtensionInvoice `json:"invoices"`
}

A response to a request for invoices.

type InvoicesResponseExternalResult

type InvoicesResponseExternalResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	InvoicesResponseExternalResultERR InvoicesResponseExternalResult = "ERR"

	InvoicesResponseExternalResultOK InvoicesResponseExternalResult = "OK"
)

Defines values for InvoicesResponseExternalResult.

type ObjectSyncFeature

type ObjectSyncFeature struct {
	// Indicates if syncing the object type from the external accounting system into HubSpot is supported.
	ToHubSpot bool `json:"toHubSpot"`
}

ObjectSyncFeature defines model for ObjectSyncFeature.

type Product

type Product struct {
	// The description of the product.
	Description *string `json:"description,omitempty"`

	// The ID of the product in the external accounting system.
	Id string `json:"id"`

	// The display name of the product.
	Name string `json:"name"`

	// Represents a tax in the external accounting system.
	SalesTaxType *TaxType `json:"salesTaxType,omitempty"`

	// Identifies if the product is tax exempt or not.
	TaxExempt bool `json:"taxExempt"`

	// Represents a unit price
	UnitPrice UnitPrice `json:"unitPrice"`
}

Representation of a product in the external accounting system.

type ProductSearchResponse

type ProductSearchResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *ProductSearchResponseResult `json:"@result,omitempty"`

	// The list of products that matched the search criteria.
	Products []Product `json:"products"`
}

A response to a search for products.

type ProductSearchResponseResult

type ProductSearchResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	ProductSearchResponseResultERR ProductSearchResponseResult = "ERR"

	ProductSearchResponseResultOK ProductSearchResponseResult = "OK"
)

Defines values for ProductSearchResponseResult.

type ReplaceAppJSONBody

type ReplaceAppJSONBody AccountingAppSettings

ReplaceAppJSONBody defines parameters for ReplaceApp.

type ReplaceAppJSONRequestBody

type ReplaceAppJSONRequestBody ReplaceAppJSONBody

ReplaceAppJSONRequestBody defines body for ReplaceApp for application/json ContentType.

type ReplaceAppResponse

type ReplaceAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (ReplaceAppResponse) Status

func (r ReplaceAppResponse) Status() string

Status returns HTTPResponse.Status

func (ReplaceAppResponse) StatusCode

func (r ReplaceAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ReplaceUserAccountsJSONBody

type ReplaceUserAccountsJSONBody CreateUserAccountRequestExternal

ReplaceUserAccountsJSONBody defines parameters for ReplaceUserAccounts.

type ReplaceUserAccountsJSONRequestBody

type ReplaceUserAccountsJSONRequestBody ReplaceUserAccountsJSONBody

ReplaceUserAccountsJSONRequestBody defines body for ReplaceUserAccounts for application/json ContentType.

type ReplaceUserAccountsResponse

type ReplaceUserAccountsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func (ReplaceUserAccountsResponse) Status

Status returns HTTPResponse.Status

func (ReplaceUserAccountsResponse) StatusCode

func (r ReplaceUserAccountsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ResultIdAccountingResponse

type ResultIdAccountingResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result ResultIdAccountingResponseResult `json:"@result"`

	// The ID of created entity.
	Id string `json:"id"`
}

A response to the creation of an entity (eg. invoice, customer).

type ResultIdAccountingResponseResult

type ResultIdAccountingResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	ResultIdAccountingResponseResultERR ResultIdAccountingResponseResult = "ERR"

	ResultIdAccountingResponseResultOK ResultIdAccountingResponseResult = "OK"
)

Defines values for ResultIdAccountingResponseResult.

type SyncContactsRequest

type SyncContactsRequest struct {
	// The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system.
	AccountId string `json:"accountId"`

	// A list of contacts to be imported.
	Contacts []UpdatedContact `json:"contacts"`
}

A request to import external accounting contact properties in HubSpot

type SyncProductsRequest

type SyncProductsRequest struct {
	// The ID of the account in the external accounting system. This is the value that will be passed as `accountId` for all outbound calls for the user from HubSpot to the external accounting system.
	AccountId string `json:"accountId"`

	// A list of products to be imported.
	Products []UpdatedProduct `json:"products"`
}

A request to import external accounting product properties in HubSpot

type Tax

type Tax struct {
	// The code/ID of the tax in the external accounting system.
	Code string `json:"code"`

	// The display name of the tax.
	Name string `json:"name"`

	// The tax percentage.  For example, 8.05 represents a 8.05% tax rate.
	Percentage float32 `json:"percentage"`
}

Representation of a tax defined in the external accounting system.

type TaxSearchResponse

type TaxSearchResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *TaxSearchResponseResult `json:"@result,omitempty"`

	// The list of taxes that matched the search criteria
	Taxes []Tax `json:"taxes"`
}

A response to a search for taxes.

type TaxSearchResponseResult

type TaxSearchResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	TaxSearchResponseResultERR TaxSearchResponseResult = "ERR"

	TaxSearchResponseResultOK TaxSearchResponseResult = "OK"
)

Defines values for TaxSearchResponseResult.

type TaxType

type TaxType struct {
	// The code/ID of the tax in the external accounting system.
	Code string `json:"code"`

	// The display name of the tax.
	Name *string `json:"name,omitempty"`
}

Represents a tax in the external accounting system.

type TermsResponse

type TermsResponse struct {
	// Designates if the response is a success ('OK') or failure ('ERR').
	Result *TermsResponseResult `json:"@result,omitempty"`

	// The list of payment terms that matched the search criteria.
	Terms []AccountingExtensionTerm `json:"terms"`
}

A response to a search for payment terms.

type TermsResponseResult

type TermsResponseResult string

Designates if the response is a success ('OK') or failure ('ERR').

const (
	TermsResponseResultERR TermsResponseResult = "ERR"

	TermsResponseResultOK TermsResponseResult = "OK"
)

Defines values for TermsResponseResult.

type UnitPrice

type UnitPrice struct {
	// The actual unit price amount.
	Amount *float32 `json:"amount,omitempty"`

	// Indicates if the unit price amount already includes taxes.
	TaxIncluded bool `json:"taxIncluded"`
}

Represents a unit price

type UpdateInvoiceJSONBody

type UpdateInvoiceJSONBody InvoiceUpdateRequest

UpdateInvoiceJSONBody defines parameters for UpdateInvoice.

type UpdateInvoiceJSONRequestBody

type UpdateInvoiceJSONRequestBody UpdateInvoiceJSONBody

UpdateInvoiceJSONRequestBody defines body for UpdateInvoice for application/json ContentType.

type UpdateInvoiceParams

type UpdateInvoiceParams struct {
	// The ID of the account that the invoice belongs to. This is the account ID from the external accounting system.
	AccountId string `json:"accountId"`
}

UpdateInvoiceParams defines parameters for UpdateInvoice.

type UpdateInvoiceResponse

type UpdateInvoiceResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InvoiceUpdateResponse
}

func (UpdateInvoiceResponse) Status

func (r UpdateInvoiceResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateInvoiceResponse) StatusCode

func (r UpdateInvoiceResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdatedContact

type UpdatedContact struct {
	// Designates the type of the customer object.
	CustomerType *UpdatedContactCustomerType `json:"customerType,omitempty"`

	// The customer's email address
	EmailAddress string `json:"emailAddress"`

	// The ID of the customer in the external accounting system.
	Id string `json:"id"`

	// The operation to be performed.
	SyncAction UpdatedContactSyncAction `json:"syncAction"`

	// The timestamp (ISO8601 format) when the customer was updated in the external accounting system.
	UpdatedAt time.Time `json:"updatedAt"`
}

A request to import external accounting contact properties in HubSpot

type UpdatedContactCustomerType

type UpdatedContactCustomerType string

Designates the type of the customer object.

const (
	UpdatedContactCustomerTypeCOMPANY UpdatedContactCustomerType = "COMPANY"

	UpdatedContactCustomerTypeCONTACT UpdatedContactCustomerType = "CONTACT"
)

Defines values for UpdatedContactCustomerType.

type UpdatedContactSyncAction

type UpdatedContactSyncAction string

The operation to be performed.

const (
	UpdatedContactSyncActionCREATE UpdatedContactSyncAction = "CREATE"

	UpdatedContactSyncActionDELETE UpdatedContactSyncAction = "DELETE"

	UpdatedContactSyncActionUPDATE UpdatedContactSyncAction = "UPDATE"
)

Defines values for UpdatedContactSyncAction.

type UpdatedProduct

type UpdatedProduct struct {
	// The ISO 4217 currency code that represents the currency of the product price.
	CurrencyCode *string `json:"currencyCode,omitempty"`

	// The ID of the product in the external accounting system.
	Id string `json:"id"`

	// The price of the product.
	Price float32 `json:"price"`

	// A map of key-value product properties to be imported.
	Properties UpdatedProduct_Properties `json:"properties"`

	// The operation to be performed.
	SyncAction UpdatedProductSyncAction `json:"syncAction"`

	// The timestamp (ISO8601 format) when the product was updated in the external accounting system.
	UpdatedAt time.Time `json:"updatedAt"`
}

A request to import external accounting product properties in HubSpot

type UpdatedProductSyncAction

type UpdatedProductSyncAction string

The operation to be performed.

const (
	UpdatedProductSyncActionCREATE UpdatedProductSyncAction = "CREATE"

	UpdatedProductSyncActionDELETE UpdatedProductSyncAction = "DELETE"

	UpdatedProductSyncActionUPDATE UpdatedProductSyncAction = "UPDATE"
)

Defines values for UpdatedProductSyncAction.

type UpdatedProduct_Properties

type UpdatedProduct_Properties struct {
	AdditionalProperties map[string]string `json:"-"`
}

A map of key-value product properties to be imported.

func (UpdatedProduct_Properties) Get

func (a UpdatedProduct_Properties) Get(fieldName string) (value string, found bool)

Getter for additional properties for UpdatedProduct_Properties. Returns the specified element and whether it was found

func (UpdatedProduct_Properties) MarshalJSON

func (a UpdatedProduct_Properties) MarshalJSON() ([]byte, error)

Override default JSON handling for UpdatedProduct_Properties to handle AdditionalProperties

func (*UpdatedProduct_Properties) Set

func (a *UpdatedProduct_Properties) Set(fieldName string, value string)

Setter for additional properties for UpdatedProduct_Properties

func (*UpdatedProduct_Properties) UnmarshalJSON

func (a *UpdatedProduct_Properties) UnmarshalJSON(b []byte) error

Override default JSON handling for UpdatedProduct_Properties to handle AdditionalProperties

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL