Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type DatabaseCheckHealthResponse
- type DatabaseCheckHealthResponseStats
- type DatabaseCheckHealthResponseStatus
- type DatabaseService
- type EmployeeDeleteResponse
- type EmployeeGetResponse
- type EmployeeGetResponseEmployee
- type EmployeeGetResponseEmployeeAddress
- type EmployeeGetResponseEmployeeExtendedField
- type EmployeeGetResponseEmployeePhone
- type EmployeeLinkUserParams
- type EmployeeLinkUserResponse
- type EmployeeListParams
- type EmployeeListResponse
- type EmployeeListResponseEmployee
- type EmployeeListResponseEmployeeAddress
- type EmployeeListResponseEmployeeExtendedField
- type EmployeeListResponseEmployeePhone
- type EmployeeNewParams
- type EmployeeNewParamsActiveAccount
- type EmployeeNewParamsAddress
- type EmployeeNewParamsExtendedField
- type EmployeeNewParamsPhone
- type EmployeeNewResponse
- type EmployeeService
- func (r *EmployeeService) Delete(ctx context.Context, employeeID string, opts ...option.RequestOption) (res *EmployeeDeleteResponse, err error)
- func (r *EmployeeService) Get(ctx context.Context, employeeID string, opts ...option.RequestOption) (res *EmployeeGetResponse, err error)
- func (r *EmployeeService) LinkUser(ctx context.Context, body EmployeeLinkUserParams, opts ...option.RequestOption) (res *EmployeeLinkUserResponse, err error)
- func (r *EmployeeService) List(ctx context.Context, query EmployeeListParams, opts ...option.RequestOption) (res *EmployeeListResponse, err error)
- func (r *EmployeeService) New(ctx context.Context, body EmployeeNewParams, opts ...option.RequestOption) (res *EmployeeNewResponse, err error)
- func (r *EmployeeService) UnlinkUser(ctx context.Context, body EmployeeUnlinkUserParams, ...) (res *EmployeeUnlinkUserResponse, err error)
- func (r *EmployeeService) Update(ctx context.Context, body EmployeeUpdateParams, opts ...option.RequestOption) (res *EmployeeUpdateResponse, err error)
- type EmployeeUnlinkUserParams
- type EmployeeUnlinkUserResponse
- type EmployeeUpdateParams
- type EmployeeUpdateParamsActiveAccount
- type EmployeeUpdateParamsAddress
- type EmployeeUpdateParamsExtendedField
- type EmployeeUpdateParamsPhone
- type EmployeeUpdateResponse
- type EmployerGetResponse
- type EmployerListParams
- type EmployerListResponse
- type EmployerNewParams
- type EmployerNewParamsAddress
- type EmployerNewParamsCheckr
- type EmployerNewParamsPhone
- type EmployerNewResponse
- type EmployerService
- func (r *EmployerService) Get(ctx context.Context, employerID string, opts ...option.RequestOption) (res *EmployerGetResponse, err error)
- func (r *EmployerService) List(ctx context.Context, query EmployerListParams, opts ...option.RequestOption) (res *[]EmployerListResponse, err error)
- func (r *EmployerService) New(ctx context.Context, body EmployerNewParams, opts ...option.RequestOption) (res *EmployerNewResponse, err error)
- type EmployerServiceBundleDeleteParams
- type EmployerServiceBundleGetParams
- type EmployerServiceBundleGetResponse
- type EmployerServiceBundleListResponse
- type EmployerServiceBundleNewParams
- type EmployerServiceBundleNewResponse
- type EmployerServiceBundleService
- func (r *EmployerServiceBundleService) Delete(ctx context.Context, id string, body EmployerServiceBundleDeleteParams, ...) (err error)
- func (r *EmployerServiceBundleService) Get(ctx context.Context, id string, query EmployerServiceBundleGetParams, ...) (res *EmployerServiceBundleGetResponse, err error)
- func (r *EmployerServiceBundleService) List(ctx context.Context, employerID string, opts ...option.RequestOption) (res *[]EmployerServiceBundleListResponse, err error)
- func (r *EmployerServiceBundleService) New(ctx context.Context, employerID string, body EmployerServiceBundleNewParams, ...) (res *EmployerServiceBundleNewResponse, err error)
- func (r *EmployerServiceBundleService) Update(ctx context.Context, id string, params EmployerServiceBundleUpdateParams, ...) (res *EmployerServiceBundleUpdateResponse, err error)
- type EmployerServiceBundleUpdateParams
- type EmployerServiceBundleUpdateResponse
- type Error
- type FaxGetStatusResponse
- type FaxGetStatusResponseStatus
- type FaxListProvidersResponse
- type FaxListProvidersResponseProvider
- type FaxSendParams
- type FaxSendParamsDocument
- type FaxSendResponse
- type FaxSendResponseStatus
- type FaxService
- func (r *FaxService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (res *FaxGetStatusResponse, err error)
- func (r *FaxService) ListProviders(ctx context.Context, opts ...option.RequestOption) (res *FaxListProvidersResponse, err error)
- func (r *FaxService) Send(ctx context.Context, body FaxSendParams, opts ...option.RequestOption) (res *FaxSendResponse, err error)
- type HealthCheckResponse
- type HealthCheckResponseStatus
- type HealthService
- type Hl7ProcessParams
- type Hl7SendResultsParams
- type Hl7SendResultsParamsFile
- type Hl7Service
- type IntegrationCheckActiveParams
- type IntegrationCheckActiveResponse
- type IntegrationListParams
- type IntegrationListResponse
- type IntegrationListResponseIntegration
- type IntegrationService
- func (r *IntegrationService) CheckActive(ctx context.Context, name string, query IntegrationCheckActiveParams, ...) (res *IntegrationCheckActiveResponse, err error)
- func (r *IntegrationService) List(ctx context.Context, query IntegrationListParams, opts ...option.RequestOption) (res *IntegrationListResponse, err error)
- type OrderGetResponse
- type OrderGetResultsParams
- type OrderGetResultsResponse
- type OrderGetResultsResponseMeta
- type OrderGetResultsResponseService
- type OrderNewParams
- type OrderNewParamsBodyObject
- type OrderNewParamsBodyObjectPerson
- type OrderNewParamsBodyObjectProvidersID
- type OrderNewParamsBodyObjectService
- type OrderNewResponseObject
- type OrderNewResponseUnion
- type OrderScheduleAppointmentParams
- type OrderScheduleAppointmentParamsAppointmentObject
- type OrderScheduleAppointmentParamsAppointmentUnion
- func (u OrderScheduleAppointmentParamsAppointmentUnion) GetDate() *string
- func (u OrderScheduleAppointmentParamsAppointmentUnion) GetDateTime() *time.Time
- func (u OrderScheduleAppointmentParamsAppointmentUnion) GetNotes() *string
- func (u OrderScheduleAppointmentParamsAppointmentUnion) GetTime() *string
- func (u OrderScheduleAppointmentParamsAppointmentUnion) GetType() *string
- func (u OrderScheduleAppointmentParamsAppointmentUnion) MarshalJSON() ([]byte, error)
- func (u *OrderScheduleAppointmentParamsAppointmentUnion) UnmarshalJSON(data []byte) error
- type OrderScheduleAppointmentResponse
- type OrderSendForEmployeeParams
- type OrderSendForEmployeeParamsProvidersID
- type OrderSendForEmployeeResponseObject
- type OrderSendForEmployeeResponseUnion
- func (u OrderSendForEmployeeResponseUnion) AsOrderSendForEmployeeResponseObject() (v OrderSendForEmployeeResponseObject)
- func (u OrderSendForEmployeeResponseUnion) AsVariant2() (v OrderSendForEmployeeResponseObject)
- func (u OrderSendForEmployeeResponseUnion) RawJSON() string
- func (r *OrderSendForEmployeeResponseUnion) UnmarshalJSON(data []byte) error
- type OrderService
- func (r *OrderService) Get(ctx context.Context, orderID string, opts ...option.RequestOption) (res *OrderGetResponse, err error)
- func (r *OrderService) GetResults(ctx context.Context, orderID string, query OrderGetResultsParams, ...) (res *OrderGetResultsResponse, err error)
- func (r *OrderService) New(ctx context.Context, body OrderNewParams, opts ...option.RequestOption) (res *OrderNewResponseUnion, err error)
- func (r *OrderService) ScheduleAppointment(ctx context.Context, orderID string, body OrderScheduleAppointmentParams, ...) (res *OrderScheduleAppointmentResponse, err error)
- func (r *OrderService) SendForEmployee(ctx context.Context, params OrderSendForEmployeeParams, ...) (res *OrderSendForEmployeeResponseUnion, err error)
- func (r *OrderService) Update(ctx context.Context, orderID string, body OrderUpdateParams, ...) (res *OrderUpdateResponse, err error)
- func (r *OrderService) UpdateStatus(ctx context.Context, orderID string, body OrderUpdateStatusParams, ...) (res *OrderUpdateStatusResponse, err error)
- func (r *OrderService) UploadResults(ctx context.Context, orderID string, body OrderUploadResultsParams, ...) (res *OrderUploadResultsResponse, err error)
- type OrderUpdateParams
- type OrderUpdateParamsService
- type OrderUpdateParamsStatus
- type OrderUpdateResponse
- type OrderUpdateStatusParams
- type OrderUpdateStatusParamsStatus
- type OrderUpdateStatusResponse
- type OrderUploadResultsParams
- type OrderUploadResultsParamsFile
- type OrderUploadResultsResponse
- type ProviderLookupParams
- type ProviderLookupResponse
- type ProviderLookupResponseProvider
- type ProviderService
- type VersionGetResponse
- type VersionService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (BLUEHIVE_API_KEY, BLUE_HIVE_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type Client ¶
type Client struct {
Options []option.RequestOption
Health HealthService
Version VersionService
Providers ProviderService
Database DatabaseService
Fax FaxService
Employers EmployerService
Hl7 Hl7Service
Orders OrderService
Employees EmployeeService
Integrations IntegrationService
}
Client creates a struct with services and top level methods that help with interacting with the bluehive API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (BLUEHIVE_API_KEY, BLUE_HIVE_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type DatabaseCheckHealthResponse ¶
type DatabaseCheckHealthResponse struct {
// Database health status
//
// Any of "ok", "error".
Status DatabaseCheckHealthResponseStatus `json:"status,required"`
// Health check timestamp
Timestamp string `json:"timestamp,required"`
// Database name (hidden in production)
Database string `json:"database"`
// Error message if status is error
Error string `json:"error"`
// Database statistics (not available in production)
Stats DatabaseCheckHealthResponseStats `json:"stats"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
Timestamp respjson.Field
Database respjson.Field
Error respjson.Field
Stats respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DatabaseCheckHealthResponse) RawJSON ¶
func (r DatabaseCheckHealthResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatabaseCheckHealthResponse) UnmarshalJSON ¶
func (r *DatabaseCheckHealthResponse) UnmarshalJSON(data []byte) error
type DatabaseCheckHealthResponseStats ¶
type DatabaseCheckHealthResponseStats struct {
// Number of collections
Collections float64 `json:"collections"`
// Total data size in bytes
DataSize float64 `json:"dataSize"`
// Total number of documents
Documents float64 `json:"documents"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Collections respjson.Field
DataSize respjson.Field
Documents respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Database statistics (not available in production)
func (DatabaseCheckHealthResponseStats) RawJSON ¶
func (r DatabaseCheckHealthResponseStats) RawJSON() string
Returns the unmodified JSON received from the API
func (*DatabaseCheckHealthResponseStats) UnmarshalJSON ¶
func (r *DatabaseCheckHealthResponseStats) UnmarshalJSON(data []byte) error
type DatabaseCheckHealthResponseStatus ¶
type DatabaseCheckHealthResponseStatus string
Database health status
const ( DatabaseCheckHealthResponseStatusOk DatabaseCheckHealthResponseStatus = "ok" DatabaseCheckHealthResponseStatusError DatabaseCheckHealthResponseStatus = "error" )
type DatabaseService ¶
type DatabaseService struct {
Options []option.RequestOption
}
DatabaseService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDatabaseService method instead.
func NewDatabaseService ¶
func NewDatabaseService(opts ...option.RequestOption) (r DatabaseService)
NewDatabaseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DatabaseService) CheckHealth ¶
func (r *DatabaseService) CheckHealth(ctx context.Context, opts ...option.RequestOption) (res *DatabaseCheckHealthResponse, err error)
Check MongoDB database connectivity and retrieve health statistics.
type EmployeeDeleteResponse ¶
type EmployeeDeleteResponse struct {
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee deleted successfully
func (EmployeeDeleteResponse) RawJSON ¶
func (r EmployeeDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeDeleteResponse) UnmarshalJSON ¶
func (r *EmployeeDeleteResponse) UnmarshalJSON(data []byte) error
type EmployeeGetResponse ¶
type EmployeeGetResponse struct {
// Employee details
Employee EmployeeGetResponseEmployee `json:"employee,required"`
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Employee respjson.Field
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee found successfully
func (EmployeeGetResponse) RawJSON ¶
func (r EmployeeGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeGetResponse) UnmarshalJSON ¶
func (r *EmployeeGetResponse) UnmarshalJSON(data []byte) error
type EmployeeGetResponseEmployee ¶
type EmployeeGetResponseEmployee struct {
// Unique identifier
ID string `json:"_id,required"`
// Email address
Email string `json:"email,required"`
// ID of associated employer
EmployerID string `json:"employer_id,required"`
// First name
FirstName string `json:"firstName,required"`
// Last name
LastName string `json:"lastName,required"`
// Account status
//
// Any of "Active", "Inactive".
ActiveAccount string `json:"activeAccount"`
// Employee address
Address EmployeeGetResponseEmployeeAddress `json:"address"`
// Brief description or bio
Blurb string `json:"blurb"`
// Creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// ID of user who created the employee
CreatedBy string `json:"createdBy"`
// List of department names
Departments []string `json:"departments"`
// Date of birth
Dob string `json:"dob"`
// Additional custom fields
ExtendedFields []EmployeeGetResponseEmployeeExtendedField `json:"extendedFields"`
// Contact phone numbers
Phone []EmployeeGetResponseEmployeePhone `json:"phone"`
// Job title
Title string `json:"title"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// ID of user who last updated the employee
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Email respjson.Field
EmployerID respjson.Field
FirstName respjson.Field
LastName respjson.Field
ActiveAccount respjson.Field
Address respjson.Field
Blurb respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Departments respjson.Field
Dob respjson.Field
ExtendedFields respjson.Field
Phone respjson.Field
Title respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee details
func (EmployeeGetResponseEmployee) RawJSON ¶
func (r EmployeeGetResponseEmployee) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeGetResponseEmployee) UnmarshalJSON ¶
func (r *EmployeeGetResponseEmployee) UnmarshalJSON(data []byte) error
type EmployeeGetResponseEmployeeAddress ¶
type EmployeeGetResponseEmployeeAddress struct {
// City
City string `json:"city,required"`
// Postal code
PostalCode string `json:"postalCode,required"`
// State
State string `json:"state,required"`
// Street address line 1
Street1 string `json:"street1,required"`
// Country
Country string `json:"country"`
// County
County string `json:"county"`
// Street address line 2
Street2 string `json:"street2"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
PostalCode respjson.Field
State respjson.Field
Street1 respjson.Field
Country respjson.Field
County respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee address
func (EmployeeGetResponseEmployeeAddress) RawJSON ¶
func (r EmployeeGetResponseEmployeeAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeGetResponseEmployeeAddress) UnmarshalJSON ¶
func (r *EmployeeGetResponseEmployeeAddress) UnmarshalJSON(data []byte) error
type EmployeeGetResponseEmployeeExtendedField ¶
type EmployeeGetResponseEmployeeExtendedField struct {
// Field name
Name string `json:"name,required"`
// Field value
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployeeGetResponseEmployeeExtendedField) RawJSON ¶
func (r EmployeeGetResponseEmployeeExtendedField) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeGetResponseEmployeeExtendedField) UnmarshalJSON ¶
func (r *EmployeeGetResponseEmployeeExtendedField) UnmarshalJSON(data []byte) error
type EmployeeGetResponseEmployeePhone ¶
type EmployeeGetResponseEmployeePhone struct {
// Phone number
Number string `json:"number,required"`
// Type of phone number
//
// Any of "Cell", "Home", "Work", "Other".
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Number respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployeeGetResponseEmployeePhone) RawJSON ¶
func (r EmployeeGetResponseEmployeePhone) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeGetResponseEmployeePhone) UnmarshalJSON ¶
func (r *EmployeeGetResponseEmployeePhone) UnmarshalJSON(data []byte) error
type EmployeeLinkUserParams ¶
type EmployeeLinkUserParams struct {
EmployeeID string `json:"employeeId,required"`
UserID string `json:"userId,required"`
Role []string `json:"role,omitzero"`
// contains filtered or unexported fields
}
func (EmployeeLinkUserParams) MarshalJSON ¶
func (r EmployeeLinkUserParams) MarshalJSON() (data []byte, err error)
func (*EmployeeLinkUserParams) UnmarshalJSON ¶
func (r *EmployeeLinkUserParams) UnmarshalJSON(data []byte) error
type EmployeeLinkUserResponse ¶
type EmployeeLinkUserResponse struct {
// ID of the created link
LinkID string `json:"linkId,required"`
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LinkID respjson.Field
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee linked successfully
func (EmployeeLinkUserResponse) RawJSON ¶
func (r EmployeeLinkUserResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeLinkUserResponse) UnmarshalJSON ¶
func (r *EmployeeLinkUserResponse) UnmarshalJSON(data []byte) error
type EmployeeListParams ¶
type EmployeeListParams struct {
// ID of the employer to list employees for
EmployerID string `query:"employerId,required" json:"-"`
// Maximum number of employees to return (default: 50)
Limit param.Opt[string] `query:"limit,omitzero" json:"-"`
// Number of employees to skip (default: 0)
Offset param.Opt[string] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (EmployeeListParams) URLQuery ¶
func (r EmployeeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes EmployeeListParams's query parameters as `url.Values`.
type EmployeeListResponse ¶
type EmployeeListResponse struct {
// List of employees
Employees []EmployeeListResponseEmployee `json:"employees,required"`
Message string `json:"message,required"`
Success bool `json:"success,required"`
// Total number of employees returned
Total float64 `json:"total,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Employees respjson.Field
Message respjson.Field
Success respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employees retrieved successfully
func (EmployeeListResponse) RawJSON ¶
func (r EmployeeListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeListResponse) UnmarshalJSON ¶
func (r *EmployeeListResponse) UnmarshalJSON(data []byte) error
type EmployeeListResponseEmployee ¶
type EmployeeListResponseEmployee struct {
// Unique identifier
ID string `json:"_id,required"`
// Email address
Email string `json:"email,required"`
// ID of associated employer
EmployerID string `json:"employer_id,required"`
// First name
FirstName string `json:"firstName,required"`
// Last name
LastName string `json:"lastName,required"`
// Account status
//
// Any of "Active", "Inactive".
ActiveAccount string `json:"activeAccount"`
// Employee address
Address EmployeeListResponseEmployeeAddress `json:"address"`
// Brief description or bio
Blurb string `json:"blurb"`
// Creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// ID of user who created the employee
CreatedBy string `json:"createdBy"`
// List of department names
Departments []string `json:"departments"`
// Date of birth
Dob string `json:"dob"`
// Additional custom fields
ExtendedFields []EmployeeListResponseEmployeeExtendedField `json:"extendedFields"`
// Contact phone numbers
Phone []EmployeeListResponseEmployeePhone `json:"phone"`
// Job title
Title string `json:"title"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// ID of user who last updated the employee
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Email respjson.Field
EmployerID respjson.Field
FirstName respjson.Field
LastName respjson.Field
ActiveAccount respjson.Field
Address respjson.Field
Blurb respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Departments respjson.Field
Dob respjson.Field
ExtendedFields respjson.Field
Phone respjson.Field
Title respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee details
func (EmployeeListResponseEmployee) RawJSON ¶
func (r EmployeeListResponseEmployee) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeListResponseEmployee) UnmarshalJSON ¶
func (r *EmployeeListResponseEmployee) UnmarshalJSON(data []byte) error
type EmployeeListResponseEmployeeAddress ¶
type EmployeeListResponseEmployeeAddress struct {
// City
City string `json:"city,required"`
// Postal code
PostalCode string `json:"postalCode,required"`
// State
State string `json:"state,required"`
// Street address line 1
Street1 string `json:"street1,required"`
// Country
Country string `json:"country"`
// County
County string `json:"county"`
// Street address line 2
Street2 string `json:"street2"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
City respjson.Field
PostalCode respjson.Field
State respjson.Field
Street1 respjson.Field
Country respjson.Field
County respjson.Field
Street2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee address
func (EmployeeListResponseEmployeeAddress) RawJSON ¶
func (r EmployeeListResponseEmployeeAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeListResponseEmployeeAddress) UnmarshalJSON ¶
func (r *EmployeeListResponseEmployeeAddress) UnmarshalJSON(data []byte) error
type EmployeeListResponseEmployeeExtendedField ¶
type EmployeeListResponseEmployeeExtendedField struct {
// Field name
Name string `json:"name,required"`
// Field value
Value string `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployeeListResponseEmployeeExtendedField) RawJSON ¶
func (r EmployeeListResponseEmployeeExtendedField) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeListResponseEmployeeExtendedField) UnmarshalJSON ¶
func (r *EmployeeListResponseEmployeeExtendedField) UnmarshalJSON(data []byte) error
type EmployeeListResponseEmployeePhone ¶
type EmployeeListResponseEmployeePhone struct {
// Phone number
Number string `json:"number,required"`
// Type of phone number
//
// Any of "Cell", "Home", "Work", "Other".
Type string `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Number respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployeeListResponseEmployeePhone) RawJSON ¶
func (r EmployeeListResponseEmployeePhone) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeListResponseEmployeePhone) UnmarshalJSON ¶
func (r *EmployeeListResponseEmployeePhone) UnmarshalJSON(data []byte) error
type EmployeeNewParams ¶
type EmployeeNewParams struct {
Email string `json:"email,required" format:"email"`
FirstName string `json:"firstName,required"`
LastName string `json:"lastName,required"`
Blurb param.Opt[string] `json:"blurb,omitzero"`
Dob param.Opt[string] `json:"dob,omitzero"`
EmployerID param.Opt[string] `json:"employer_id,omitzero"`
Title param.Opt[string] `json:"title,omitzero"`
// Any of "Active", "Inactive".
ActiveAccount EmployeeNewParamsActiveAccount `json:"activeAccount,omitzero"`
Address EmployeeNewParamsAddress `json:"address,omitzero"`
Departments []string `json:"departments,omitzero"`
ExtendedFields []EmployeeNewParamsExtendedField `json:"extendedFields,omitzero"`
Phone []EmployeeNewParamsPhone `json:"phone,omitzero"`
// contains filtered or unexported fields
}
func (EmployeeNewParams) MarshalJSON ¶
func (r EmployeeNewParams) MarshalJSON() (data []byte, err error)
func (*EmployeeNewParams) UnmarshalJSON ¶
func (r *EmployeeNewParams) UnmarshalJSON(data []byte) error
type EmployeeNewParamsActiveAccount ¶
type EmployeeNewParamsActiveAccount string
const ( EmployeeNewParamsActiveAccountActive EmployeeNewParamsActiveAccount = "Active" EmployeeNewParamsActiveAccountInactive EmployeeNewParamsActiveAccount = "Inactive" )
type EmployeeNewParamsAddress ¶
type EmployeeNewParamsAddress struct {
City string `json:"city,required"`
PostalCode string `json:"postalCode,required"`
State string `json:"state,required"`
Street1 string `json:"street1,required"`
Country param.Opt[string] `json:"country,omitzero"`
County param.Opt[string] `json:"county,omitzero"`
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
The properties City, PostalCode, State, Street1 are required.
func (EmployeeNewParamsAddress) MarshalJSON ¶
func (r EmployeeNewParamsAddress) MarshalJSON() (data []byte, err error)
func (*EmployeeNewParamsAddress) UnmarshalJSON ¶
func (r *EmployeeNewParamsAddress) UnmarshalJSON(data []byte) error
type EmployeeNewParamsExtendedField ¶
type EmployeeNewParamsExtendedField struct {
Name string `json:"name,required"`
Value string `json:"value,required"`
// contains filtered or unexported fields
}
The properties Name, Value are required.
func (EmployeeNewParamsExtendedField) MarshalJSON ¶
func (r EmployeeNewParamsExtendedField) MarshalJSON() (data []byte, err error)
func (*EmployeeNewParamsExtendedField) UnmarshalJSON ¶
func (r *EmployeeNewParamsExtendedField) UnmarshalJSON(data []byte) error
type EmployeeNewParamsPhone ¶
type EmployeeNewParamsPhone struct {
Number string `json:"number,required"`
// Any of "Cell", "Home", "Work", "Other".
Type string `json:"type,omitzero,required"`
// contains filtered or unexported fields
}
The properties Number, Type are required.
func (EmployeeNewParamsPhone) MarshalJSON ¶
func (r EmployeeNewParamsPhone) MarshalJSON() (data []byte, err error)
func (*EmployeeNewParamsPhone) UnmarshalJSON ¶
func (r *EmployeeNewParamsPhone) UnmarshalJSON(data []byte) error
type EmployeeNewResponse ¶
type EmployeeNewResponse struct {
// ID of the created employee
EmployeeID string `json:"employeeId,required"`
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EmployeeID respjson.Field
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee created successfully
func (EmployeeNewResponse) RawJSON ¶
func (r EmployeeNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeNewResponse) UnmarshalJSON ¶
func (r *EmployeeNewResponse) UnmarshalJSON(data []byte) error
type EmployeeService ¶
type EmployeeService struct {
Options []option.RequestOption
}
EmployeeService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEmployeeService method instead.
func NewEmployeeService ¶
func NewEmployeeService(opts ...option.RequestOption) (r EmployeeService)
NewEmployeeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EmployeeService) Delete ¶
func (r *EmployeeService) Delete(ctx context.Context, employeeID string, opts ...option.RequestOption) (res *EmployeeDeleteResponse, err error)
Delete an employee from the system. Cannot delete employees with existing orders.
func (*EmployeeService) Get ¶
func (r *EmployeeService) Get(ctx context.Context, employeeID string, opts ...option.RequestOption) (res *EmployeeGetResponse, err error)
Retrieve an employee by their unique ID.
func (*EmployeeService) LinkUser ¶
func (r *EmployeeService) LinkUser(ctx context.Context, body EmployeeLinkUserParams, opts ...option.RequestOption) (res *EmployeeLinkUserResponse, err error)
Link an employee to a user account with specified roles
func (*EmployeeService) List ¶
func (r *EmployeeService) List(ctx context.Context, query EmployeeListParams, opts ...option.RequestOption) (res *EmployeeListResponse, err error)
List all employees for a given employer with pagination.
func (*EmployeeService) New ¶
func (r *EmployeeService) New(ctx context.Context, body EmployeeNewParams, opts ...option.RequestOption) (res *EmployeeNewResponse, err error)
Create a new employee in the system.
func (*EmployeeService) UnlinkUser ¶
func (r *EmployeeService) UnlinkUser(ctx context.Context, body EmployeeUnlinkUserParams, opts ...option.RequestOption) (res *EmployeeUnlinkUserResponse, err error)
Remove the link between an employee and a user account
func (*EmployeeService) Update ¶
func (r *EmployeeService) Update(ctx context.Context, body EmployeeUpdateParams, opts ...option.RequestOption) (res *EmployeeUpdateResponse, err error)
Update an existing employee in the system.
type EmployeeUnlinkUserParams ¶
type EmployeeUnlinkUserParams struct {
// ID of the employee to unlink
EmployeeID string `json:"employeeId,required"`
// ID of the user to unlink from
UserID string `json:"userId,required"`
// contains filtered or unexported fields
}
func (EmployeeUnlinkUserParams) MarshalJSON ¶
func (r EmployeeUnlinkUserParams) MarshalJSON() (data []byte, err error)
func (*EmployeeUnlinkUserParams) UnmarshalJSON ¶
func (r *EmployeeUnlinkUserParams) UnmarshalJSON(data []byte) error
type EmployeeUnlinkUserResponse ¶
type EmployeeUnlinkUserResponse struct {
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee unlinked successfully
func (EmployeeUnlinkUserResponse) RawJSON ¶
func (r EmployeeUnlinkUserResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeUnlinkUserResponse) UnmarshalJSON ¶
func (r *EmployeeUnlinkUserResponse) UnmarshalJSON(data []byte) error
type EmployeeUpdateParams ¶
type EmployeeUpdateParams struct {
ID string `json:"_id,required"`
Blurb param.Opt[string] `json:"blurb,omitzero"`
Dob param.Opt[string] `json:"dob,omitzero"`
Email param.Opt[string] `json:"email,omitzero" format:"email"`
EmployerID param.Opt[string] `json:"employer_id,omitzero"`
FirstName param.Opt[string] `json:"firstName,omitzero"`
LastName param.Opt[string] `json:"lastName,omitzero"`
Title param.Opt[string] `json:"title,omitzero"`
// Any of "Active", "Inactive".
ActiveAccount EmployeeUpdateParamsActiveAccount `json:"activeAccount,omitzero"`
Address EmployeeUpdateParamsAddress `json:"address,omitzero"`
Departments []string `json:"departments,omitzero"`
ExtendedFields []EmployeeUpdateParamsExtendedField `json:"extendedFields,omitzero"`
Phone []EmployeeUpdateParamsPhone `json:"phone,omitzero"`
// contains filtered or unexported fields
}
func (EmployeeUpdateParams) MarshalJSON ¶
func (r EmployeeUpdateParams) MarshalJSON() (data []byte, err error)
func (*EmployeeUpdateParams) UnmarshalJSON ¶
func (r *EmployeeUpdateParams) UnmarshalJSON(data []byte) error
type EmployeeUpdateParamsActiveAccount ¶
type EmployeeUpdateParamsActiveAccount string
const ( EmployeeUpdateParamsActiveAccountActive EmployeeUpdateParamsActiveAccount = "Active" EmployeeUpdateParamsActiveAccountInactive EmployeeUpdateParamsActiveAccount = "Inactive" )
type EmployeeUpdateParamsAddress ¶
type EmployeeUpdateParamsAddress struct {
City string `json:"city,required"`
PostalCode string `json:"postalCode,required"`
State string `json:"state,required"`
Street1 string `json:"street1,required"`
Country param.Opt[string] `json:"country,omitzero"`
County param.Opt[string] `json:"county,omitzero"`
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
The properties City, PostalCode, State, Street1 are required.
func (EmployeeUpdateParamsAddress) MarshalJSON ¶
func (r EmployeeUpdateParamsAddress) MarshalJSON() (data []byte, err error)
func (*EmployeeUpdateParamsAddress) UnmarshalJSON ¶
func (r *EmployeeUpdateParamsAddress) UnmarshalJSON(data []byte) error
type EmployeeUpdateParamsExtendedField ¶
type EmployeeUpdateParamsExtendedField struct {
Name string `json:"name,required"`
Value string `json:"value,required"`
// contains filtered or unexported fields
}
The properties Name, Value are required.
func (EmployeeUpdateParamsExtendedField) MarshalJSON ¶
func (r EmployeeUpdateParamsExtendedField) MarshalJSON() (data []byte, err error)
func (*EmployeeUpdateParamsExtendedField) UnmarshalJSON ¶
func (r *EmployeeUpdateParamsExtendedField) UnmarshalJSON(data []byte) error
type EmployeeUpdateParamsPhone ¶
type EmployeeUpdateParamsPhone struct {
Number string `json:"number,required"`
// Any of "Cell", "Home", "Work", "Other".
Type string `json:"type,omitzero,required"`
// contains filtered or unexported fields
}
The properties Number, Type are required.
func (EmployeeUpdateParamsPhone) MarshalJSON ¶
func (r EmployeeUpdateParamsPhone) MarshalJSON() (data []byte, err error)
func (*EmployeeUpdateParamsPhone) UnmarshalJSON ¶
func (r *EmployeeUpdateParamsPhone) UnmarshalJSON(data []byte) error
type EmployeeUpdateResponse ¶
type EmployeeUpdateResponse struct {
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Employee updated successfully
func (EmployeeUpdateResponse) RawJSON ¶
func (r EmployeeUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployeeUpdateResponse) UnmarshalJSON ¶
func (r *EmployeeUpdateResponse) UnmarshalJSON(data []byte) error
type EmployerGetResponse ¶
type EmployerListParams ¶
type EmployerListResponse ¶
type EmployerNewParams ¶
type EmployerNewParams struct {
Address EmployerNewParamsAddress `json:"address,omitzero,required"`
Email string `json:"email,required" format:"email"`
Name string `json:"name,required"`
Phones []EmployerNewParamsPhone `json:"phones,omitzero,required"`
Demo param.Opt[bool] `json:"demo,omitzero"`
EmployeeConsent param.Opt[bool] `json:"employeeConsent,omitzero"`
OnsiteClinic param.Opt[bool] `json:"onsiteClinic,omitzero"`
Website param.Opt[string] `json:"website,omitzero"`
BillingAddress map[string]any `json:"billingAddress,omitzero"`
Checkr EmployerNewParamsCheckr `json:"checkr,omitzero"`
Metadata map[string]any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
func (EmployerNewParams) MarshalJSON ¶
func (r EmployerNewParams) MarshalJSON() (data []byte, err error)
func (*EmployerNewParams) UnmarshalJSON ¶
func (r *EmployerNewParams) UnmarshalJSON(data []byte) error
type EmployerNewParamsAddress ¶
type EmployerNewParamsAddress struct {
City string `json:"city,required"`
State string `json:"state,required"`
Street1 string `json:"street1,required"`
ZipCode string `json:"zipCode,required"`
Country param.Opt[string] `json:"country,omitzero"`
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
The properties City, State, Street1, ZipCode are required.
func (EmployerNewParamsAddress) MarshalJSON ¶
func (r EmployerNewParamsAddress) MarshalJSON() (data []byte, err error)
func (*EmployerNewParamsAddress) UnmarshalJSON ¶
func (r *EmployerNewParamsAddress) UnmarshalJSON(data []byte) error
type EmployerNewParamsCheckr ¶
type EmployerNewParamsCheckr struct {
ID string `json:"id,required"`
Status param.Opt[string] `json:"status,omitzero"`
// contains filtered or unexported fields
}
The property ID is required.
func (EmployerNewParamsCheckr) MarshalJSON ¶
func (r EmployerNewParamsCheckr) MarshalJSON() (data []byte, err error)
func (*EmployerNewParamsCheckr) UnmarshalJSON ¶
func (r *EmployerNewParamsCheckr) UnmarshalJSON(data []byte) error
type EmployerNewParamsPhone ¶
type EmployerNewParamsPhone struct {
Number string `json:"number,required"`
Primary param.Opt[bool] `json:"primary,omitzero"`
Type param.Opt[string] `json:"type,omitzero"`
// contains filtered or unexported fields
}
The property Number is required.
func (EmployerNewParamsPhone) MarshalJSON ¶
func (r EmployerNewParamsPhone) MarshalJSON() (data []byte, err error)
func (*EmployerNewParamsPhone) UnmarshalJSON ¶
func (r *EmployerNewParamsPhone) UnmarshalJSON(data []byte) error
type EmployerNewResponse ¶
type EmployerNewResponse struct {
ID string `json:"_id,required"`
Address map[string]any `json:"address,required"`
Email string `json:"email,required"`
Name string `json:"name,required"`
Phones []map[string]any `json:"phones,required"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Demo bool `json:"demo"`
EmployeeConsent bool `json:"employeeConsent"`
OnsiteClinic bool `json:"onsiteClinic"`
Website string `json:"website"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
Email respjson.Field
Name respjson.Field
Phones respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Demo respjson.Field
EmployeeConsent respjson.Field
OnsiteClinic respjson.Field
Website respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployerNewResponse) RawJSON ¶
func (r EmployerNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployerNewResponse) UnmarshalJSON ¶
func (r *EmployerNewResponse) UnmarshalJSON(data []byte) error
type EmployerService ¶
type EmployerService struct {
Options []option.RequestOption
ServiceBundles EmployerServiceBundleService
}
EmployerService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEmployerService method instead.
func NewEmployerService ¶
func NewEmployerService(opts ...option.RequestOption) (r EmployerService)
NewEmployerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EmployerService) Get ¶
func (r *EmployerService) Get(ctx context.Context, employerID string, opts ...option.RequestOption) (res *EmployerGetResponse, err error)
Get Employer
func (*EmployerService) List ¶
func (r *EmployerService) List(ctx context.Context, query EmployerListParams, opts ...option.RequestOption) (res *[]EmployerListResponse, err error)
Get Employers for Current User
func (*EmployerService) New ¶
func (r *EmployerService) New(ctx context.Context, body EmployerNewParams, opts ...option.RequestOption) (res *EmployerNewResponse, err error)
Create Employer
type EmployerServiceBundleDeleteParams ¶
type EmployerServiceBundleDeleteParams struct {
EmployerID string `path:"employerId,required" json:"-"`
// contains filtered or unexported fields
}
type EmployerServiceBundleGetParams ¶
type EmployerServiceBundleGetParams struct {
EmployerID string `path:"employerId,required" json:"-"`
// contains filtered or unexported fields
}
type EmployerServiceBundleGetResponse ¶
type EmployerServiceBundleGetResponse struct {
ID string `json:"_id,required"`
BundleName string `json:"bundleName,required"`
EmployerID string `json:"employerId,required"`
ServiceIDs []string `json:"serviceIds,required"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Roles []string `json:"roles,nullable"`
UpdatedAt string `json:"updatedAt"`
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BundleName respjson.Field
EmployerID respjson.Field
ServiceIDs respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Roles respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployerServiceBundleGetResponse) RawJSON ¶
func (r EmployerServiceBundleGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployerServiceBundleGetResponse) UnmarshalJSON ¶
func (r *EmployerServiceBundleGetResponse) UnmarshalJSON(data []byte) error
type EmployerServiceBundleListResponse ¶
type EmployerServiceBundleListResponse struct {
ID string `json:"_id,required"`
BundleName string `json:"bundleName,required"`
EmployerID string `json:"employerId,required"`
ServiceIDs []string `json:"serviceIds,required"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Roles []string `json:"roles,nullable"`
UpdatedAt string `json:"updatedAt"`
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BundleName respjson.Field
EmployerID respjson.Field
ServiceIDs respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Roles respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployerServiceBundleListResponse) RawJSON ¶
func (r EmployerServiceBundleListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployerServiceBundleListResponse) UnmarshalJSON ¶
func (r *EmployerServiceBundleListResponse) UnmarshalJSON(data []byte) error
type EmployerServiceBundleNewParams ¶
type EmployerServiceBundleNewParams struct {
BundleName string `json:"bundleName,required"`
ServiceIDs []string `json:"serviceIds,omitzero,required"`
ID param.Opt[string] `json:"_id,omitzero"`
Roles []string `json:"roles,omitzero"`
// contains filtered or unexported fields
}
func (EmployerServiceBundleNewParams) MarshalJSON ¶
func (r EmployerServiceBundleNewParams) MarshalJSON() (data []byte, err error)
func (*EmployerServiceBundleNewParams) UnmarshalJSON ¶
func (r *EmployerServiceBundleNewParams) UnmarshalJSON(data []byte) error
type EmployerServiceBundleNewResponse ¶
type EmployerServiceBundleNewResponse struct {
ID string `json:"_id,required"`
BundleName string `json:"bundleName,required"`
EmployerID string `json:"employerId,required"`
ServiceIDs []string `json:"serviceIds,required"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Roles []string `json:"roles,nullable"`
UpdatedAt string `json:"updatedAt"`
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BundleName respjson.Field
EmployerID respjson.Field
ServiceIDs respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Roles respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployerServiceBundleNewResponse) RawJSON ¶
func (r EmployerServiceBundleNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployerServiceBundleNewResponse) UnmarshalJSON ¶
func (r *EmployerServiceBundleNewResponse) UnmarshalJSON(data []byte) error
type EmployerServiceBundleService ¶
type EmployerServiceBundleService struct {
Options []option.RequestOption
}
EmployerServiceBundleService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEmployerServiceBundleService method instead.
func NewEmployerServiceBundleService ¶
func NewEmployerServiceBundleService(opts ...option.RequestOption) (r EmployerServiceBundleService)
NewEmployerServiceBundleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*EmployerServiceBundleService) Delete ¶
func (r *EmployerServiceBundleService) Delete(ctx context.Context, id string, body EmployerServiceBundleDeleteParams, opts ...option.RequestOption) (err error)
Delete Service Bundle
func (*EmployerServiceBundleService) Get ¶
func (r *EmployerServiceBundleService) Get(ctx context.Context, id string, query EmployerServiceBundleGetParams, opts ...option.RequestOption) (res *EmployerServiceBundleGetResponse, err error)
Get Service Bundle
func (*EmployerServiceBundleService) List ¶
func (r *EmployerServiceBundleService) List(ctx context.Context, employerID string, opts ...option.RequestOption) (res *[]EmployerServiceBundleListResponse, err error)
List Service Bundles
func (*EmployerServiceBundleService) New ¶
func (r *EmployerServiceBundleService) New(ctx context.Context, employerID string, body EmployerServiceBundleNewParams, opts ...option.RequestOption) (res *EmployerServiceBundleNewResponse, err error)
Create Service Bundle
func (*EmployerServiceBundleService) Update ¶
func (r *EmployerServiceBundleService) Update(ctx context.Context, id string, params EmployerServiceBundleUpdateParams, opts ...option.RequestOption) (res *EmployerServiceBundleUpdateResponse, err error)
Update Service Bundle
type EmployerServiceBundleUpdateParams ¶
type EmployerServiceBundleUpdateParams struct {
EmployerID string `path:"employerId,required" json:"-"`
BundleName string `json:"bundleName,required"`
ServiceIDs []string `json:"serviceIds,omitzero,required"`
ID param.Opt[string] `json:"_id,omitzero"`
Roles []string `json:"roles,omitzero"`
// contains filtered or unexported fields
}
func (EmployerServiceBundleUpdateParams) MarshalJSON ¶
func (r EmployerServiceBundleUpdateParams) MarshalJSON() (data []byte, err error)
func (*EmployerServiceBundleUpdateParams) UnmarshalJSON ¶
func (r *EmployerServiceBundleUpdateParams) UnmarshalJSON(data []byte) error
type EmployerServiceBundleUpdateResponse ¶
type EmployerServiceBundleUpdateResponse struct {
ID string `json:"_id,required"`
BundleName string `json:"bundleName,required"`
EmployerID string `json:"employerId,required"`
ServiceIDs []string `json:"serviceIds,required"`
CreatedAt string `json:"createdAt"`
CreatedBy string `json:"createdBy"`
Roles []string `json:"roles,nullable"`
UpdatedAt string `json:"updatedAt"`
UpdatedBy string `json:"updatedBy"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BundleName respjson.Field
EmployerID respjson.Field
ServiceIDs respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Roles respjson.Field
UpdatedAt respjson.Field
UpdatedBy respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (EmployerServiceBundleUpdateResponse) RawJSON ¶
func (r EmployerServiceBundleUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmployerServiceBundleUpdateResponse) UnmarshalJSON ¶
func (r *EmployerServiceBundleUpdateResponse) UnmarshalJSON(data []byte) error
type FaxGetStatusResponse ¶
type FaxGetStatusResponse struct {
// Fax identifier
ID string `json:"id,required"`
// ISO timestamp when fax was created
CreatedAt string `json:"createdAt,required"`
// Sender fax number
From string `json:"from,required"`
// Provider used to send the fax
Provider string `json:"provider,required"`
// Current fax status
//
// Any of "queued", "dialing", "sending", "delivered", "failed", "cancelled",
// "retrying".
Status FaxGetStatusResponseStatus `json:"status,required"`
// Recipient fax number
To string `json:"to,required"`
// ISO timestamp when status was last updated
UpdatedAt string `json:"updatedAt,required"`
// Cost of the fax
Cost float64 `json:"cost"`
// ISO timestamp when fax was delivered
DeliveredAt string `json:"deliveredAt"`
// Call duration in seconds
Duration float64 `json:"duration"`
// Error message if fax failed
ErrorMessage string `json:"errorMessage"`
// Number of pages in the fax
PageCount float64 `json:"pageCount"`
// Provider-specific additional data
ProviderData map[string]any `json:"providerData"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
From respjson.Field
Provider respjson.Field
Status respjson.Field
To respjson.Field
UpdatedAt respjson.Field
Cost respjson.Field
DeliveredAt respjson.Field
Duration respjson.Field
ErrorMessage respjson.Field
PageCount respjson.Field
ProviderData respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FaxGetStatusResponse) RawJSON ¶
func (r FaxGetStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FaxGetStatusResponse) UnmarshalJSON ¶
func (r *FaxGetStatusResponse) UnmarshalJSON(data []byte) error
type FaxGetStatusResponseStatus ¶
type FaxGetStatusResponseStatus string
Current fax status
const ( FaxGetStatusResponseStatusQueued FaxGetStatusResponseStatus = "queued" FaxGetStatusResponseStatusDialing FaxGetStatusResponseStatus = "dialing" FaxGetStatusResponseStatusSending FaxGetStatusResponseStatus = "sending" FaxGetStatusResponseStatusDelivered FaxGetStatusResponseStatus = "delivered" FaxGetStatusResponseStatusFailed FaxGetStatusResponseStatus = "failed" FaxGetStatusResponseStatusCancelled FaxGetStatusResponseStatus = "cancelled" FaxGetStatusResponseStatusRetrying FaxGetStatusResponseStatus = "retrying" )
type FaxListProvidersResponse ¶
type FaxListProvidersResponse struct {
Providers []FaxListProvidersResponseProvider `json:"providers,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Providers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FaxListProvidersResponse) RawJSON ¶
func (r FaxListProvidersResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FaxListProvidersResponse) UnmarshalJSON ¶
func (r *FaxListProvidersResponse) UnmarshalJSON(data []byte) error
type FaxListProvidersResponseProvider ¶
type FaxListProvidersResponseProvider struct {
// Whether the provider is properly configured
Configured bool `json:"configured,required"`
// Whether this is the default provider
IsDefault bool `json:"isDefault,required"`
// Provider name
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Configured respjson.Field
IsDefault respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FaxListProvidersResponseProvider) RawJSON ¶
func (r FaxListProvidersResponseProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*FaxListProvidersResponseProvider) UnmarshalJSON ¶
func (r *FaxListProvidersResponseProvider) UnmarshalJSON(data []byte) error
type FaxSendParams ¶
type FaxSendParams struct {
Document FaxSendParamsDocument `json:"document,omitzero,required"`
// Recipient fax number (E.164 format preferred)
To string `json:"to,required"`
// Sender fax number (optional, uses default if not provided)
From param.Opt[string] `json:"from,omitzero"`
// Optional provider override (uses default if not specified)
Provider param.Opt[string] `json:"provider,omitzero"`
// Subject line for the fax
Subject param.Opt[string] `json:"subject,omitzero"`
// contains filtered or unexported fields
}
func (FaxSendParams) MarshalJSON ¶
func (r FaxSendParams) MarshalJSON() (data []byte, err error)
func (*FaxSendParams) UnmarshalJSON ¶
func (r *FaxSendParams) UnmarshalJSON(data []byte) error
type FaxSendParamsDocument ¶
type FaxSendParamsDocument struct {
// Base64 encoded document content
Content string `json:"content,required"`
// MIME type of the document
//
// Any of "application/pdf", "image/tiff", "image/tif", "image/jpeg", "image/jpg",
// "image/png", "text/plain".
ContentType string `json:"contentType,omitzero,required"`
// Optional filename for the document
Filename param.Opt[string] `json:"filename,omitzero"`
// contains filtered or unexported fields
}
The properties Content, ContentType are required.
func (FaxSendParamsDocument) MarshalJSON ¶
func (r FaxSendParamsDocument) MarshalJSON() (data []byte, err error)
func (*FaxSendParamsDocument) UnmarshalJSON ¶
func (r *FaxSendParamsDocument) UnmarshalJSON(data []byte) error
type FaxSendResponse ¶
type FaxSendResponse struct {
// Unique fax identifier
ID string `json:"id,required"`
// ISO timestamp when fax was created
CreatedAt string `json:"createdAt,required"`
// Sender fax number
From string `json:"from,required"`
// Provider used to send the fax
Provider string `json:"provider,required"`
// Current fax status
//
// Any of "queued", "dialing", "sending", "delivered", "failed", "cancelled",
// "retrying".
Status FaxSendResponseStatus `json:"status,required"`
// Recipient fax number
To string `json:"to,required"`
// Estimated delivery time (ISO timestamp)
EstimatedDelivery string `json:"estimatedDelivery"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
From respjson.Field
Provider respjson.Field
Status respjson.Field
To respjson.Field
EstimatedDelivery respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FaxSendResponse) RawJSON ¶
func (r FaxSendResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FaxSendResponse) UnmarshalJSON ¶
func (r *FaxSendResponse) UnmarshalJSON(data []byte) error
type FaxSendResponseStatus ¶
type FaxSendResponseStatus string
Current fax status
const ( FaxSendResponseStatusQueued FaxSendResponseStatus = "queued" FaxSendResponseStatusDialing FaxSendResponseStatus = "dialing" FaxSendResponseStatusSending FaxSendResponseStatus = "sending" FaxSendResponseStatusDelivered FaxSendResponseStatus = "delivered" FaxSendResponseStatusFailed FaxSendResponseStatus = "failed" FaxSendResponseStatusCancelled FaxSendResponseStatus = "cancelled" FaxSendResponseStatusRetrying FaxSendResponseStatus = "retrying" )
type FaxService ¶
type FaxService struct {
Options []option.RequestOption
}
FaxService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFaxService method instead.
func NewFaxService ¶
func NewFaxService(opts ...option.RequestOption) (r FaxService)
NewFaxService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FaxService) GetStatus ¶
func (r *FaxService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (res *FaxGetStatusResponse, err error)
Retrieve the current status and details of a fax by its ID.
func (*FaxService) ListProviders ¶
func (r *FaxService) ListProviders(ctx context.Context, opts ...option.RequestOption) (res *FaxListProvidersResponse, err error)
Get a list of available fax providers and their configuration status.
func (*FaxService) Send ¶
func (r *FaxService) Send(ctx context.Context, body FaxSendParams, opts ...option.RequestOption) (res *FaxSendResponse, err error)
Send a fax document to a specified number using the configured fax provider.
type HealthCheckResponse ¶
type HealthCheckResponse struct {
// Any of "ok".
Status HealthCheckResponseStatus `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (HealthCheckResponse) RawJSON ¶
func (r HealthCheckResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*HealthCheckResponse) UnmarshalJSON ¶
func (r *HealthCheckResponse) UnmarshalJSON(data []byte) error
type HealthCheckResponseStatus ¶
type HealthCheckResponseStatus string
const (
HealthCheckResponseStatusOk HealthCheckResponseStatus = "ok"
)
type HealthService ¶
type HealthService struct {
Options []option.RequestOption
}
HealthService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewHealthService method instead.
func NewHealthService ¶
func NewHealthService(opts ...option.RequestOption) (r HealthService)
NewHealthService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*HealthService) Check ¶
func (r *HealthService) Check(ctx context.Context, opts ...option.RequestOption) (res *HealthCheckResponse, err error)
Check the service health and ensure the API is running properly.
type Hl7ProcessParams ¶
type Hl7ProcessParams struct {
// Form field (legacy support)
F param.Opt[string] `json:"f,omitzero"`
// Interface identifier (legacy support)
Interface param.Opt[string] `json:"interface,omitzero"`
// Login password (legacy support)
LoginPasswd param.Opt[string] `json:"login_passwd,omitzero"`
// Login user (legacy support)
LoginUser param.Opt[string] `json:"login_user,omitzero"`
// HL7 message content - the primary way to send HL7 data
Message param.Opt[string] `json:"message,omitzero"`
// Base64 encoded HL7 message (legacy support)
MessageB64 param.Opt[string] `json:"message_b64,omitzero"`
// contains filtered or unexported fields
}
func (Hl7ProcessParams) MarshalJSON ¶
func (r Hl7ProcessParams) MarshalJSON() (data []byte, err error)
func (*Hl7ProcessParams) UnmarshalJSON ¶
func (r *Hl7ProcessParams) UnmarshalJSON(data []byte) error
type Hl7SendResultsParams ¶
type Hl7SendResultsParams struct {
// Employee ID to send results for
EmployeeID string `json:"employeeId,required"`
// File containing the results
File Hl7SendResultsParamsFile `json:"file,omitzero,required"`
// contains filtered or unexported fields
}
func (Hl7SendResultsParams) MarshalJSON ¶
func (r Hl7SendResultsParams) MarshalJSON() (data []byte, err error)
func (*Hl7SendResultsParams) UnmarshalJSON ¶
func (r *Hl7SendResultsParams) UnmarshalJSON(data []byte) error
type Hl7SendResultsParamsFile ¶
type Hl7SendResultsParamsFile struct {
// Base64 encoded file content
Base64 string `json:"base64,required"`
// File name
Name string `json:"name,required"`
// MIME type of the file
Type string `json:"type,required"`
// contains filtered or unexported fields
}
File containing the results
The properties Base64, Name, Type are required.
func (Hl7SendResultsParamsFile) MarshalJSON ¶
func (r Hl7SendResultsParamsFile) MarshalJSON() (data []byte, err error)
func (*Hl7SendResultsParamsFile) UnmarshalJSON ¶
func (r *Hl7SendResultsParamsFile) UnmarshalJSON(data []byte) error
type Hl7Service ¶
type Hl7Service struct {
Options []option.RequestOption
}
Hl7Service contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewHl7Service method instead.
func NewHl7Service ¶
func NewHl7Service(opts ...option.RequestOption) (r Hl7Service)
NewHl7Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*Hl7Service) Process ¶
func (r *Hl7Service) Process(ctx context.Context, body Hl7ProcessParams, opts ...option.RequestOption) (res *string, err error)
Process incoming HL7 messages from EHR systems. Accepts JSON with "message" field, raw text/plain HL7 content, or form-encoded data.
func (*Hl7Service) SendResults ¶
func (r *Hl7Service) SendResults(ctx context.Context, body Hl7SendResultsParams, opts ...option.RequestOption) (res *string, err error)
Send lab results or documents via HL7
type IntegrationCheckActiveParams ¶
type IntegrationCheckActiveParams struct {
XBrandID string `header:"x-brand-id,required" json:"-"`
// contains filtered or unexported fields
}
type IntegrationCheckActiveResponse ¶
type IntegrationCheckActiveResponse struct {
Active bool `json:"active,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Active respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IntegrationCheckActiveResponse) RawJSON ¶
func (r IntegrationCheckActiveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntegrationCheckActiveResponse) UnmarshalJSON ¶
func (r *IntegrationCheckActiveResponse) UnmarshalJSON(data []byte) error
type IntegrationListParams ¶
type IntegrationListParams struct {
XBrandID string `header:"x-brand-id,required" json:"-"`
// contains filtered or unexported fields
}
type IntegrationListResponse ¶
type IntegrationListResponse struct {
Integrations map[string]IntegrationListResponseIntegration `json:"integrations,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Integrations respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IntegrationListResponse) RawJSON ¶
func (r IntegrationListResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntegrationListResponse) UnmarshalJSON ¶
func (r *IntegrationListResponse) UnmarshalJSON(data []byte) error
type IntegrationListResponseIntegration ¶
type IntegrationListResponseIntegration struct {
Active bool `json:"active,required"`
DisplayName string `json:"displayName,required"`
Config map[string]any `json:"config"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Active respjson.Field
DisplayName respjson.Field
Config respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IntegrationListResponseIntegration) RawJSON ¶
func (r IntegrationListResponseIntegration) RawJSON() string
Returns the unmodified JSON received from the API
func (*IntegrationListResponseIntegration) UnmarshalJSON ¶
func (r *IntegrationListResponseIntegration) UnmarshalJSON(data []byte) error
type IntegrationService ¶
type IntegrationService struct {
Options []option.RequestOption
}
IntegrationService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIntegrationService method instead.
func NewIntegrationService ¶
func NewIntegrationService(opts ...option.RequestOption) (r IntegrationService)
NewIntegrationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IntegrationService) CheckActive ¶
func (r *IntegrationService) CheckActive(ctx context.Context, name string, query IntegrationCheckActiveParams, opts ...option.RequestOption) (res *IntegrationCheckActiveResponse, err error)
Returns true if the named integration is active for the given brand (brand resolved via x-brand-id header).
func (*IntegrationService) List ¶
func (r *IntegrationService) List(ctx context.Context, query IntegrationListParams, opts ...option.RequestOption) (res *IntegrationListResponse, err error)
Returns the current brand integrations object keyed by integration name (empty object if none). Brand resolved via x-brand-id header.
type OrderGetResponse ¶
type OrderGetResponse struct {
OrderID string `json:"orderId"`
OrderNumber string `json:"orderNumber"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OrderID respjson.Field
OrderNumber respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderGetResponse) RawJSON ¶
func (r OrderGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderGetResponse) UnmarshalJSON ¶
func (r *OrderGetResponse) UnmarshalJSON(data []byte) error
type OrderGetResultsParams ¶
type OrderGetResultsParams struct {
Page param.Opt[int64] `query:"page,omitzero" json:"-"`
PageSize param.Opt[int64] `query:"pageSize,omitzero" json:"-"`
ServiceID param.Opt[string] `query:"serviceId,omitzero" json:"-"`
Since param.Opt[time.Time] `query:"since,omitzero" format:"date-time" json:"-"`
Status param.Opt[string] `query:"status,omitzero" json:"-"`
Until param.Opt[time.Time] `query:"until,omitzero" format:"date-time" json:"-"`
// contains filtered or unexported fields
}
func (OrderGetResultsParams) URLQuery ¶
func (r OrderGetResultsParams) URLQuery() (v url.Values, err error)
URLQuery serializes OrderGetResultsParams's query parameters as `url.Values`.
type OrderGetResultsResponse ¶
type OrderGetResultsResponse struct {
Meta OrderGetResultsResponseMeta `json:"meta,required"`
Services []OrderGetResultsResponseService `json:"services,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Meta respjson.Field
Services respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderGetResultsResponse) RawJSON ¶
func (r OrderGetResultsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderGetResultsResponse) UnmarshalJSON ¶
func (r *OrderGetResultsResponse) UnmarshalJSON(data []byte) error
type OrderGetResultsResponseMeta ¶
type OrderGetResultsResponseMeta struct {
OrderID string `json:"orderId,required"`
Page float64 `json:"page,required"`
PageSize float64 `json:"pageSize,required"`
Returned float64 `json:"returned,required"`
TotalServices float64 `json:"totalServices,required"`
EmployeeID string `json:"employeeId"`
OrderNumber string `json:"orderNumber"`
ProviderID string `json:"providerId"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OrderID respjson.Field
Page respjson.Field
PageSize respjson.Field
Returned respjson.Field
TotalServices respjson.Field
EmployeeID respjson.Field
OrderNumber respjson.Field
ProviderID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderGetResultsResponseMeta) RawJSON ¶
func (r OrderGetResultsResponseMeta) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderGetResultsResponseMeta) UnmarshalJSON ¶
func (r *OrderGetResultsResponseMeta) UnmarshalJSON(data []byte) error
type OrderGetResultsResponseService ¶
type OrderGetResultsResponseService struct {
ServiceID string `json:"serviceId,required"`
Status string `json:"status,required"`
AltTxt string `json:"altTxt"`
CompletedDatetime time.Time `json:"completed_datetime" format:"date-time"`
Contacts []string `json:"contacts"`
DrawnDatetime time.Time `json:"drawn_datetime" format:"date-time"`
FileIDs []string `json:"fileIds"`
Message string `json:"message"`
Result string `json:"result"`
ResultsPosted time.Time `json:"resultsPosted" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ServiceID respjson.Field
Status respjson.Field
AltTxt respjson.Field
CompletedDatetime respjson.Field
Contacts respjson.Field
DrawnDatetime respjson.Field
FileIDs respjson.Field
Message respjson.Field
Result respjson.Field
ResultsPosted respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderGetResultsResponseService) RawJSON ¶
func (r OrderGetResultsResponseService) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderGetResultsResponseService) UnmarshalJSON ¶
func (r *OrderGetResultsResponseService) UnmarshalJSON(data []byte) error
type OrderNewParams ¶
type OrderNewParams struct {
// This field is a request body variant, only one variant field can be set.
OfObject *OrderNewParamsBodyObject `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfOrderNewsBodyObject *OrderNewParamsBodyObject `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfVariant2 *OrderNewParamsBodyObject `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfVariant3 *OrderNewParamsBodyObject `json:",inline"`
// contains filtered or unexported fields
}
func (OrderNewParams) MarshalJSON ¶
func (u OrderNewParams) MarshalJSON() ([]byte, error)
func (*OrderNewParams) UnmarshalJSON ¶
func (r *OrderNewParams) UnmarshalJSON(data []byte) error
type OrderNewParamsBodyObject ¶
type OrderNewParamsBodyObject struct {
// Any of "self-pay", "employer-sponsored".
PaymentMethod string `json:"paymentMethod,omitzero,required"`
Person OrderNewParamsBodyObjectPerson `json:"person,omitzero,required"`
ProviderID string `json:"providerId,required"`
Services []OrderNewParamsBodyObjectService `json:"services,omitzero,required"`
ID param.Opt[string] `json:"_id,omitzero"`
BrandID param.Opt[string] `json:"brandId,omitzero"`
DueDate param.Opt[time.Time] `json:"dueDate,omitzero" format:"date-time"`
EmployeeID param.Opt[string] `json:"employeeId,omitzero"`
EmployerID param.Opt[string] `json:"employerId,omitzero"`
ProviderCreated param.Opt[bool] `json:"providerCreated,omitzero"`
ReCaptchaToken param.Opt[string] `json:"reCaptchaToken,omitzero"`
TokenID param.Opt[string] `json:"tokenId,omitzero"`
DueDates []time.Time `json:"dueDates,omitzero" format:"date-time"`
EmployeeIDs []string `json:"employeeIds,omitzero"`
// Optional arbitrary metadata (<=10KB when JSON stringified)
Metadata map[string]any `json:"metadata,omitzero"`
ProvidersIDs []OrderNewParamsBodyObjectProvidersID `json:"providersIds,omitzero"`
Quantities map[string]int64 `json:"quantities,omitzero"`
ServicesIDs []string `json:"servicesIds,omitzero"`
// contains filtered or unexported fields
}
The properties PaymentMethod, Person, ProviderID, Services are required.
func (OrderNewParamsBodyObject) MarshalJSON ¶
func (r OrderNewParamsBodyObject) MarshalJSON() (data []byte, err error)
func (*OrderNewParamsBodyObject) UnmarshalJSON ¶
func (r *OrderNewParamsBodyObject) UnmarshalJSON(data []byte) error
type OrderNewParamsBodyObjectPerson ¶
type OrderNewParamsBodyObjectPerson struct {
City string `json:"city,required"`
// Date of birth in YYYY-MM-DD format
Dob string `json:"dob,required"`
Email string `json:"email,required"`
FirstName string `json:"firstName,required"`
LastName string `json:"lastName,required"`
Phone string `json:"phone,required"`
State string `json:"state,required"`
Street string `json:"street,required"`
// US ZIP code in 12345 or 12345-6789 format
Zipcode string `json:"zipcode,required"`
Country param.Opt[string] `json:"country,omitzero"`
County param.Opt[string] `json:"county,omitzero"`
Street2 param.Opt[string] `json:"street2,omitzero"`
// contains filtered or unexported fields
}
The properties City, Dob, Email, FirstName, LastName, Phone, State, Street, Zipcode are required.
func (OrderNewParamsBodyObjectPerson) MarshalJSON ¶
func (r OrderNewParamsBodyObjectPerson) MarshalJSON() (data []byte, err error)
func (*OrderNewParamsBodyObjectPerson) UnmarshalJSON ¶
func (r *OrderNewParamsBodyObjectPerson) UnmarshalJSON(data []byte) error
type OrderNewParamsBodyObjectProvidersID ¶
type OrderNewParamsBodyObjectProvidersID struct {
ProviderID string `json:"providerId,required"`
ServiceID param.Opt[string] `json:"serviceId,omitzero"`
// contains filtered or unexported fields
}
The property ProviderID is required.
func (OrderNewParamsBodyObjectProvidersID) MarshalJSON ¶
func (r OrderNewParamsBodyObjectProvidersID) MarshalJSON() (data []byte, err error)
func (*OrderNewParamsBodyObjectProvidersID) UnmarshalJSON ¶
func (r *OrderNewParamsBodyObjectProvidersID) UnmarshalJSON(data []byte) error
type OrderNewParamsBodyObjectService ¶
type OrderNewParamsBodyObjectService struct {
ID string `json:"_id,required"`
Quantity int64 `json:"quantity,required"`
AutoAccept param.Opt[bool] `json:"autoAccept,omitzero"`
// contains filtered or unexported fields
}
The properties ID, Quantity are required.
func (OrderNewParamsBodyObjectService) MarshalJSON ¶
func (r OrderNewParamsBodyObjectService) MarshalJSON() (data []byte, err error)
func (*OrderNewParamsBodyObjectService) UnmarshalJSON ¶
func (r *OrderNewParamsBodyObjectService) UnmarshalJSON(data []byte) error
type OrderNewResponseObject ¶
type OrderNewResponseObject struct {
OrderID string `json:"orderId,required"`
OrderNumber string `json:"orderNumber,required"`
// Any of true.
Success bool `json:"success,required"`
HostedInvoiceURL string `json:"hostedInvoiceUrl" format:"uri"`
Message string `json:"message"`
SelfPay bool `json:"selfPay"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OrderID respjson.Field
OrderNumber respjson.Field
Success respjson.Field
HostedInvoiceURL respjson.Field
Message respjson.Field
SelfPay respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderNewResponseObject) RawJSON ¶
func (r OrderNewResponseObject) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderNewResponseObject) UnmarshalJSON ¶
func (r *OrderNewResponseObject) UnmarshalJSON(data []byte) error
type OrderNewResponseUnion ¶
type OrderNewResponseUnion struct {
// This field is from variant [OrderNewResponseObject].
OrderID string `json:"orderId"`
// This field is from variant [OrderNewResponseObject].
OrderNumber string `json:"orderNumber"`
// This field is from variant [OrderNewResponseObject].
Success bool `json:"success"`
// This field is from variant [OrderNewResponseObject].
HostedInvoiceURL string `json:"hostedInvoiceUrl"`
// This field is from variant [OrderNewResponseObject].
Message string `json:"message"`
// This field is from variant [OrderNewResponseObject].
SelfPay bool `json:"selfPay"`
// This field is from variant [OrderNewResponseObject].
OrderResults []OrderNewResponseObjectOrderResult `json:"orderResults"`
// This field is from variant [OrderNewResponseObject].
Status string `json:"status"`
JSON struct {
OrderID respjson.Field
OrderNumber respjson.Field
Success respjson.Field
HostedInvoiceURL respjson.Field
Message respjson.Field
SelfPay respjson.Field
OrderResults respjson.Field
Status respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OrderNewResponseUnion contains all possible properties and values from OrderNewResponseObject, OrderNewResponseObject.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (OrderNewResponseUnion) AsOrderNewResponseObject ¶
func (u OrderNewResponseUnion) AsOrderNewResponseObject() (v OrderNewResponseObject)
func (OrderNewResponseUnion) AsVariant2 ¶
func (u OrderNewResponseUnion) AsVariant2() (v OrderNewResponseObject)
func (OrderNewResponseUnion) RawJSON ¶
func (u OrderNewResponseUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderNewResponseUnion) UnmarshalJSON ¶
func (r *OrderNewResponseUnion) UnmarshalJSON(data []byte) error
type OrderScheduleAppointmentParams ¶
type OrderScheduleAppointmentParams struct {
Appointment OrderScheduleAppointmentParamsAppointmentUnion `json:"appointment,omitzero,required"`
// Order access code for authorization
OrderAccessCode param.Opt[string] `json:"orderAccessCode,omitzero"`
// Provider ID for authorization
ProviderID param.Opt[string] `json:"providerId,omitzero"`
// contains filtered or unexported fields
}
func (OrderScheduleAppointmentParams) MarshalJSON ¶
func (r OrderScheduleAppointmentParams) MarshalJSON() (data []byte, err error)
func (*OrderScheduleAppointmentParams) UnmarshalJSON ¶
func (r *OrderScheduleAppointmentParams) UnmarshalJSON(data []byte) error
type OrderScheduleAppointmentParamsAppointmentObject ¶
type OrderScheduleAppointmentParamsAppointmentObject struct {
// Required for appointment type
Date string `json:"date,required"`
// Required for appointment type
DateTime time.Time `json:"dateTime,required" format:"date-time"`
// Required for appointment type
Time string `json:"time,required"`
// Optional for walkin type
Notes param.Opt[string] `json:"notes,omitzero"`
// Any of "appointment".
Type string `json:"type,omitzero"`
// contains filtered or unexported fields
}
The properties Date, DateTime, Time are required.
func (OrderScheduleAppointmentParamsAppointmentObject) MarshalJSON ¶
func (r OrderScheduleAppointmentParamsAppointmentObject) MarshalJSON() (data []byte, err error)
func (*OrderScheduleAppointmentParamsAppointmentObject) UnmarshalJSON ¶
func (r *OrderScheduleAppointmentParamsAppointmentObject) UnmarshalJSON(data []byte) error
type OrderScheduleAppointmentParamsAppointmentUnion ¶
type OrderScheduleAppointmentParamsAppointmentUnion struct {
OfOrderScheduleAppointmentsAppointmentObject *OrderScheduleAppointmentParamsAppointmentObject `json:",omitzero,inline"`
OfVariant2 *OrderScheduleAppointmentParamsAppointmentObject `json:",omitzero,inline"`
// contains filtered or unexported fields
}
Only one field can be non-zero.
Use param.IsOmitted to confirm if a field is set.
func (OrderScheduleAppointmentParamsAppointmentUnion) GetDate ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) GetDate() *string
Returns a pointer to the underlying variant's property, if present.
func (OrderScheduleAppointmentParamsAppointmentUnion) GetDateTime ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) GetDateTime() *time.Time
Returns a pointer to the underlying variant's DateTime property, if present.
func (OrderScheduleAppointmentParamsAppointmentUnion) GetNotes ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) GetNotes() *string
Returns a pointer to the underlying variant's property, if present.
func (OrderScheduleAppointmentParamsAppointmentUnion) GetTime ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) GetTime() *string
Returns a pointer to the underlying variant's property, if present.
func (OrderScheduleAppointmentParamsAppointmentUnion) GetType ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) GetType() *string
Returns a pointer to the underlying variant's property, if present.
func (OrderScheduleAppointmentParamsAppointmentUnion) MarshalJSON ¶
func (u OrderScheduleAppointmentParamsAppointmentUnion) MarshalJSON() ([]byte, error)
func (*OrderScheduleAppointmentParamsAppointmentUnion) UnmarshalJSON ¶
func (u *OrderScheduleAppointmentParamsAppointmentUnion) UnmarshalJSON(data []byte) error
type OrderScheduleAppointmentResponse ¶
type OrderScheduleAppointmentResponse struct {
Message string `json:"message,required"`
Success bool `json:"success,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderScheduleAppointmentResponse) RawJSON ¶
func (r OrderScheduleAppointmentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderScheduleAppointmentResponse) UnmarshalJSON ¶
func (r *OrderScheduleAppointmentResponse) UnmarshalJSON(data []byte) error
type OrderSendForEmployeeParams ¶
type OrderSendForEmployeeParams struct {
// Employee ID to send order to
EmployeeID string `json:"employeeId,required"`
// Employer ID sending the order
EmployerID string `json:"employerId,required"`
// Array mapping each service (by index) to a provider; serviceId optional
ProvidersIDs []OrderSendForEmployeeParamsProvidersID `json:"providersIds,omitzero,required"`
// Array of service IDs to include in the order
ServicesIDs []string `json:"servicesIds,omitzero,required"`
LoginToken string `header:"login-token,required" json:"-"`
UserID string `header:"user-id,required" json:"-"`
// Brand ID for branded orders
BrandID param.Opt[string] `json:"brandId,omitzero"`
// Due date for the order (date or date-time ISO string)
DueDate param.Opt[string] `json:"dueDate,omitzero"`
// Whether this order is being created by a provider (affects permission checking)
ProviderCreated param.Opt[bool] `json:"providerCreated,omitzero"`
// Single provider ID (shortcut when all services map to one provider)
ProviderID param.Opt[string] `json:"providerId,omitzero"`
// Array of due dates per service
DueDates []string `json:"dueDates,omitzero"`
// Optional arbitrary metadata to store on the order (non-indexed passthrough,
// <=10KB when JSON stringified)
Metadata map[string]any `json:"metadata,omitzero"`
// Service ID to quantity mapping
Quantities map[string]int64 `json:"quantities,omitzero"`
// contains filtered or unexported fields
}
func (OrderSendForEmployeeParams) MarshalJSON ¶
func (r OrderSendForEmployeeParams) MarshalJSON() (data []byte, err error)
func (*OrderSendForEmployeeParams) UnmarshalJSON ¶
func (r *OrderSendForEmployeeParams) UnmarshalJSON(data []byte) error
type OrderSendForEmployeeParamsProvidersID ¶
type OrderSendForEmployeeParamsProvidersID struct {
ProviderID string `json:"providerId,required"`
ServiceID param.Opt[string] `json:"serviceId,omitzero"`
// contains filtered or unexported fields
}
The property ProviderID is required.
func (OrderSendForEmployeeParamsProvidersID) MarshalJSON ¶
func (r OrderSendForEmployeeParamsProvidersID) MarshalJSON() (data []byte, err error)
func (*OrderSendForEmployeeParamsProvidersID) UnmarshalJSON ¶
func (r *OrderSendForEmployeeParamsProvidersID) UnmarshalJSON(data []byte) error
type OrderSendForEmployeeResponseObject ¶
type OrderSendForEmployeeResponseObject struct {
OrderID string `json:"orderId,required"`
OrderNumber string `json:"orderNumber,required"`
// Any of true.
Success bool `json:"success,required"`
Message string `json:"message"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
OrderID respjson.Field
OrderNumber respjson.Field
Success respjson.Field
Message respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderSendForEmployeeResponseObject) RawJSON ¶
func (r OrderSendForEmployeeResponseObject) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderSendForEmployeeResponseObject) UnmarshalJSON ¶
func (r *OrderSendForEmployeeResponseObject) UnmarshalJSON(data []byte) error
type OrderSendForEmployeeResponseUnion ¶
type OrderSendForEmployeeResponseUnion struct {
// This field is from variant [OrderSendForEmployeeResponseObject].
OrderID string `json:"orderId"`
// This field is from variant [OrderSendForEmployeeResponseObject].
OrderNumber string `json:"orderNumber"`
// This field is from variant [OrderSendForEmployeeResponseObject].
Success bool `json:"success"`
// This field is from variant [OrderSendForEmployeeResponseObject].
Message string `json:"message"`
// This field is from variant [OrderSendForEmployeeResponseObject].
OrderResults []OrderSendForEmployeeResponseObjectOrderResult `json:"orderResults"`
// This field is from variant [OrderSendForEmployeeResponseObject].
Status string `json:"status"`
JSON struct {
OrderID respjson.Field
OrderNumber respjson.Field
Success respjson.Field
Message respjson.Field
OrderResults respjson.Field
Status respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OrderSendForEmployeeResponseUnion contains all possible properties and values from OrderSendForEmployeeResponseObject, OrderSendForEmployeeResponseObject.
Use the methods beginning with 'As' to cast the union to one of its variants.
func (OrderSendForEmployeeResponseUnion) AsOrderSendForEmployeeResponseObject ¶
func (u OrderSendForEmployeeResponseUnion) AsOrderSendForEmployeeResponseObject() (v OrderSendForEmployeeResponseObject)
func (OrderSendForEmployeeResponseUnion) AsVariant2 ¶
func (u OrderSendForEmployeeResponseUnion) AsVariant2() (v OrderSendForEmployeeResponseObject)
func (OrderSendForEmployeeResponseUnion) RawJSON ¶
func (u OrderSendForEmployeeResponseUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderSendForEmployeeResponseUnion) UnmarshalJSON ¶
func (r *OrderSendForEmployeeResponseUnion) UnmarshalJSON(data []byte) error
type OrderService ¶
type OrderService struct {
Options []option.RequestOption
}
OrderService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrderService method instead.
func NewOrderService ¶
func NewOrderService(opts ...option.RequestOption) (r OrderService)
NewOrderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrderService) Get ¶
func (r *OrderService) Get(ctx context.Context, orderID string, opts ...option.RequestOption) (res *OrderGetResponse, err error)
Retrieve details for a specific order
func (*OrderService) GetResults ¶
func (r *OrderService) GetResults(ctx context.Context, orderID string, query OrderGetResultsParams, opts ...option.RequestOption) (res *OrderGetResultsResponse, err error)
Retrieve results for an order. Supports filtering by serviceId, status, date window, and pagination.
func (*OrderService) New ¶
func (r *OrderService) New(ctx context.Context, body OrderNewParams, opts ...option.RequestOption) (res *OrderNewResponseUnion, err error)
Create orders for consumers (self-pay or employer-sponsored), employers, or bulk orders. Consolidates functionality from legacy Order.createOrder and Order.SendOrder methods.
func (*OrderService) ScheduleAppointment ¶
func (r *OrderService) ScheduleAppointment(ctx context.Context, orderID string, body OrderScheduleAppointmentParams, opts ...option.RequestOption) (res *OrderScheduleAppointmentResponse, err error)
Schedule an appointment or walk-in for an existing order. Sends HL7 SIU^S12 message for appointment booking.
func (*OrderService) SendForEmployee ¶
func (r *OrderService) SendForEmployee(ctx context.Context, params OrderSendForEmployeeParams, opts ...option.RequestOption) (res *OrderSendForEmployeeResponseUnion, err error)
Send an order for a specific employee. Requires API key, login token, and user ID. This endpoint specifically handles employer-to-employee order sending.
func (*OrderService) Update ¶
func (r *OrderService) Update(ctx context.Context, orderID string, body OrderUpdateParams, opts ...option.RequestOption) (res *OrderUpdateResponse, err error)
Update order details and associated order items. Allows updating order status, metadata, and modifying order item services.
func (*OrderService) UpdateStatus ¶
func (r *OrderService) UpdateStatus(ctx context.Context, orderID string, body OrderUpdateStatusParams, opts ...option.RequestOption) (res *OrderUpdateStatusResponse, err error)
Update the status of an existing order
func (*OrderService) UploadResults ¶
func (r *OrderService) UploadResults(ctx context.Context, orderID string, body OrderUploadResultsParams, opts ...option.RequestOption) (res *OrderUploadResultsResponse, err error)
Upload test results for a specific order item. Supports both existing fileIds and base64 encoded files. Requires order access code and employee verification.
type OrderUpdateParams ¶
type OrderUpdateParams struct {
// Arbitrary metadata to update on the order (non-indexed passthrough, <=10KB when
// JSON stringified)
Metadata map[string]any `json:"metadata,omitzero"`
Services []OrderUpdateParamsService `json:"services,omitzero"`
// Any of "order_sent", "order_accepted", "order_refused", "employee_confirmed",
// "order_fulfilled", "order_complete".
Status OrderUpdateParamsStatus `json:"status,omitzero"`
// contains filtered or unexported fields
}
func (OrderUpdateParams) MarshalJSON ¶
func (r OrderUpdateParams) MarshalJSON() (data []byte, err error)
func (*OrderUpdateParams) UnmarshalJSON ¶
func (r *OrderUpdateParams) UnmarshalJSON(data []byte) error
type OrderUpdateParamsService ¶
type OrderUpdateParamsService struct {
ServiceID string `json:"serviceId,required"`
DueDate param.Opt[time.Time] `json:"dueDate,omitzero" format:"date-time"`
Results map[string]any `json:"results,omitzero"`
// Any of "pending", "in_progress", "completed", "cancelled", "rejected".
Status string `json:"status,omitzero"`
// contains filtered or unexported fields
}
The property ServiceID is required.
func (OrderUpdateParamsService) MarshalJSON ¶
func (r OrderUpdateParamsService) MarshalJSON() (data []byte, err error)
func (*OrderUpdateParamsService) UnmarshalJSON ¶
func (r *OrderUpdateParamsService) UnmarshalJSON(data []byte) error
type OrderUpdateParamsStatus ¶
type OrderUpdateParamsStatus string
const ( OrderUpdateParamsStatusOrderSent OrderUpdateParamsStatus = "order_sent" OrderUpdateParamsStatusOrderAccepted OrderUpdateParamsStatus = "order_accepted" OrderUpdateParamsStatusOrderRefused OrderUpdateParamsStatus = "order_refused" OrderUpdateParamsStatusEmployeeConfirmed OrderUpdateParamsStatus = "employee_confirmed" OrderUpdateParamsStatusOrderFulfilled OrderUpdateParamsStatus = "order_fulfilled" OrderUpdateParamsStatusOrderComplete OrderUpdateParamsStatus = "order_complete" )
type OrderUpdateResponse ¶
type OrderUpdateResponse struct {
Message string `json:"message,required"`
OrderID string `json:"orderId,required"`
OrderNumber string `json:"orderNumber,required"`
// Any of true.
Success bool `json:"success,required"`
UpdatedFields []string `json:"updatedFields"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
OrderID respjson.Field
OrderNumber respjson.Field
Success respjson.Field
UpdatedFields respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderUpdateResponse) RawJSON ¶
func (r OrderUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderUpdateResponse) UnmarshalJSON ¶
func (r *OrderUpdateResponse) UnmarshalJSON(data []byte) error
type OrderUpdateStatusParams ¶
type OrderUpdateStatusParams struct {
// Any of "order_sent", "order_accepted", "order_refused", "employee_confirmed",
// "order_fulfilled", "order_complete".
Status OrderUpdateStatusParamsStatus `json:"status,omitzero,required"`
Message param.Opt[string] `json:"message,omitzero"`
// contains filtered or unexported fields
}
func (OrderUpdateStatusParams) MarshalJSON ¶
func (r OrderUpdateStatusParams) MarshalJSON() (data []byte, err error)
func (*OrderUpdateStatusParams) UnmarshalJSON ¶
func (r *OrderUpdateStatusParams) UnmarshalJSON(data []byte) error
type OrderUpdateStatusParamsStatus ¶
type OrderUpdateStatusParamsStatus string
const ( OrderUpdateStatusParamsStatusOrderSent OrderUpdateStatusParamsStatus = "order_sent" OrderUpdateStatusParamsStatusOrderAccepted OrderUpdateStatusParamsStatus = "order_accepted" OrderUpdateStatusParamsStatusOrderRefused OrderUpdateStatusParamsStatus = "order_refused" OrderUpdateStatusParamsStatusEmployeeConfirmed OrderUpdateStatusParamsStatus = "employee_confirmed" OrderUpdateStatusParamsStatusOrderFulfilled OrderUpdateStatusParamsStatus = "order_fulfilled" OrderUpdateStatusParamsStatusOrderComplete OrderUpdateStatusParamsStatus = "order_complete" )
type OrderUpdateStatusResponse ¶
type OrderUpdateStatusResponse struct {
Message string `json:"message"`
Success bool `json:"success"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderUpdateStatusResponse) RawJSON ¶
func (r OrderUpdateStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderUpdateStatusResponse) UnmarshalJSON ¶
func (r *OrderUpdateStatusResponse) UnmarshalJSON(data []byte) error
type OrderUploadResultsParams ¶
type OrderUploadResultsParams struct {
CaptchaToken string `json:"captchaToken,required"`
OrderAccessCode string `json:"orderAccessCode,required"`
ServiceID string `json:"serviceId,required"`
// Date of birth in YYYY-MM-DD format
Dob param.Opt[string] `json:"dob,omitzero"`
LastName param.Opt[string] `json:"lastName,omitzero"`
FileIDs []string `json:"fileIds,omitzero"`
Files []OrderUploadResultsParamsFile `json:"files,omitzero"`
// contains filtered or unexported fields
}
func (OrderUploadResultsParams) MarshalJSON ¶
func (r OrderUploadResultsParams) MarshalJSON() (data []byte, err error)
func (*OrderUploadResultsParams) UnmarshalJSON ¶
func (r *OrderUploadResultsParams) UnmarshalJSON(data []byte) error
type OrderUploadResultsParamsFile ¶
type OrderUploadResultsParamsFile struct {
Base64 string `json:"base64,required"`
Name string `json:"name,required"`
Type string `json:"type,required"`
// contains filtered or unexported fields
}
The properties Base64, Name, Type are required.
func (OrderUploadResultsParamsFile) MarshalJSON ¶
func (r OrderUploadResultsParamsFile) MarshalJSON() (data []byte, err error)
func (*OrderUploadResultsParamsFile) UnmarshalJSON ¶
func (r *OrderUploadResultsParamsFile) UnmarshalJSON(data []byte) error
type OrderUploadResultsResponse ¶
type OrderUploadResultsResponse struct {
Message string `json:"message"`
Success bool `json:"success"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Message respjson.Field
Success respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OrderUploadResultsResponse) RawJSON ¶
func (r OrderUploadResultsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderUploadResultsResponse) UnmarshalJSON ¶
func (r *OrderUploadResultsResponse) UnmarshalJSON(data []byte) error
type ProviderLookupParams ¶
type ProviderLookupParams struct {
// Provider first name
Firstname param.Opt[string] `query:"firstname,omitzero" json:"-"`
// Provider last name
Lastname param.Opt[string] `query:"lastname,omitzero" json:"-"`
// Provider NPI number
Npi param.Opt[string] `query:"npi,omitzero" json:"-"`
// ZIP code to filter results by proximity
Zipcode param.Opt[string] `query:"zipcode,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (ProviderLookupParams) URLQuery ¶
func (r ProviderLookupParams) URLQuery() (v url.Values, err error)
URLQuery serializes ProviderLookupParams's query parameters as `url.Values`.
type ProviderLookupResponse ¶
type ProviderLookupResponse struct {
// Number of providers found
Count float64 `json:"count,required"`
// List of matching providers
Providers []ProviderLookupResponseProvider `json:"providers,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Providers respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProviderLookupResponse) RawJSON ¶
func (r ProviderLookupResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProviderLookupResponse) UnmarshalJSON ¶
func (r *ProviderLookupResponse) UnmarshalJSON(data []byte) error
type ProviderLookupResponseProvider ¶
type ProviderLookupResponseProvider struct {
// Primary address line
Address1 string `json:"address_1,required"`
// Secondary address line (suite, unit, etc.)
Address2 string `json:"address_2,required"`
// City
City string `json:"city,required"`
// Country code
Country string `json:"country,required"`
// Distance in miles from the provided ZIP code
Distance float64 `json:"distance,required"`
// Fax number
FaxNumber string `json:"fax_number,required"`
// Provider first name
Firstname string `json:"firstname,required"`
// Provider last name or organization name
Lastname string `json:"lastname,required"`
// National Provider Identifier (NPI) number
Npi string `json:"npi,required"`
// Postal/ZIP code
PostalCode string `json:"postal_code,required"`
// State or province code
StateProvince string `json:"state_province,required"`
// Work phone number
WorkPhone string `json:"work_phone,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address1 respjson.Field
Address2 respjson.Field
City respjson.Field
Country respjson.Field
Distance respjson.Field
FaxNumber respjson.Field
Firstname respjson.Field
Lastname respjson.Field
Npi respjson.Field
PostalCode respjson.Field
StateProvince respjson.Field
WorkPhone respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ProviderLookupResponseProvider) RawJSON ¶
func (r ProviderLookupResponseProvider) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProviderLookupResponseProvider) UnmarshalJSON ¶
func (r *ProviderLookupResponseProvider) UnmarshalJSON(data []byte) error
type ProviderService ¶
type ProviderService struct {
Options []option.RequestOption
}
ProviderService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewProviderService method instead.
func NewProviderService ¶
func NewProviderService(opts ...option.RequestOption) (r ProviderService)
NewProviderService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ProviderService) Lookup ¶
func (r *ProviderService) Lookup(ctx context.Context, query ProviderLookupParams, opts ...option.RequestOption) (res *ProviderLookupResponse, err error)
Search for healthcare providers by NPI number, name, or location proximity.
type VersionGetResponse ¶
type VersionGetResponse struct {
Version string `json:"version,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VersionGetResponse) RawJSON ¶
func (r VersionGetResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VersionGetResponse) UnmarshalJSON ¶
func (r *VersionGetResponse) UnmarshalJSON(data []byte) error
type VersionService ¶
type VersionService struct {
Options []option.RequestOption
}
VersionService contains methods and other services that help with interacting with the bluehive API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVersionService method instead.
func NewVersionService ¶
func NewVersionService(opts ...option.RequestOption) (r VersionService)
NewVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VersionService) Get ¶
func (r *VersionService) Get(ctx context.Context, opts ...option.RequestOption) (res *VersionGetResponse, err error)
Retrieve the current version of the BlueHive API.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|