Documentation
¶
Index ¶
- Constants
- func ParseError(r io.Reader) error
- type Admin
- type AdminCreateParams
- type AdminUpdateParams
- type Container
- type ContainerQueryKey
- type ContainerTaskInsertParams
- type ContainerType
- type CustomField
- type CustomFieldContext
- type CustomFieldParams
- type CustomFieldValidDataType
- type CustomFieldVisibilityOption
- type DeliveryManifest
- type Destination
- type DestinationAddress
- type DestinationCreateParams
- type DestinationLocation
- type DestinationOptionsParam
- type Driver
- type Hub
- type HubCreateParams
- type HubUpdateParams
- type ManifestGenerateParams
- type Metadata
- type MetadataVisibilityOption
- type Organization
- type OrganizationDelegate
- type PositionEnum
- type Recipient
- type RecipientCreateParams
- type RecipientQueryKey
- type RecipientUpdateParams
- type RequestError
- type RequestErrorMessage
- type RoutePlan
- type RoutePlanAddTasksParams
- type RoutePlanListQueryParams
- type RoutePlanParams
- type RoutePlansPaginated
- type Task
- type TaskAdditionalQuantities
- type TaskAppearance
- type TaskAppearanceParam
- type TaskAutoAssignMode
- type TaskAutoAssignMultiOptionsParam
- type TaskAutoAssignMultiParams
- type TaskAutoAssignMultiResponse
- type TaskAutoAssignParam
- type TaskBarcode
- type TaskBarcodeContainer
- type TaskBatchCreateError
- type TaskBatchCreateErrorAsync
- type TaskBatchCreateParams
- type TaskBatchCreateResponse
- type TaskBatchCreateResponseAsync
- type TaskBatchStatusResponseAsync
- type TaskCapturedBarcode
- type TaskCloneOverridesParam
- type TaskCloneParams
- type TaskCompletionDetails
- type TaskCompletionEvent
- type TaskCompletionRequirementsParam
- type TaskContainer
- type TaskForceCompletionDetailsParam
- type TaskForceCompletionParams
- type TaskIdentity
- type TaskListQueryParams
- type TaskOverrides
- type TaskParams
- type TaskState
- type TasksPaginated
- type Team
- type TeamAutoDispatch
- type TeamAutoDispatchParams
- type TeamCreateParams
- type TeamTasks
- type TeamTasksListQueryParams
- type TeamUpdateParams
- type TeamWorkerEta
- type TeamWorkerEtaQueryParams
- type TeamWorkerEtaStep
- type TooManyRequestsError
- type TurnByTurn
- type Webhook
- type WebhookCreateParams
- type Worker
- type WorkerAccountStatus
- type WorkerAdditionalCapacities
- type WorkerAddressRoutingParam
- type WorkerAddresses
- type WorkerAddressesRouting
- type WorkerAnalytics
- type WorkerAnalyticsDistances
- type WorkerAnalyticsEvent
- type WorkerAnalyticsTaskCounts
- type WorkerAnalyticsTimes
- type WorkerCreateParams
- type WorkerGetQueryParams
- type WorkerListQueryParams
- type WorkerSchedule
- type WorkerScheduleEntries
- type WorkerTasks
- type WorkerTasksListQueryParams
- type WorkerUpdateParams
- type WorkerUserData
- type WorkerVehicle
- type WorkerVehicleParam
- type WorkerVehicleType
- type WorkersByLocation
- type WorkersByLocationListQueryParams
Constants ¶
View Source
const ( CustomFieldVisibilityOptionAdmin = "admin" CustomFieldVisibilityOptionAPI = "api" CustomFieldVisibilityOptionWorker = "worker" CustomFieldValidDataTypeSingleLineText = "single_line_text_field" CustomFieldValidDataTypeMultiLineText = "multi_line_text_field" CustomFieldValidDataTypeBoolean = "boolean" CustomFieldValidDataTypeInteger = "integer" CustomFieldValidDataTypeDecimal = "decimal" CustomFieldValidDataTypeDate = "date" CustomFieldValidDataTypeURL = "Url" )
Variables ¶
This section is empty.
Functions ¶
func ParseError ¶
Types ¶
type Admin ¶
type Admin struct { Email string `json:"email"` ID string `json:"id"` IsAccountOwner bool `json:"isAccountOwner"` IsActive bool `json:"isActive"` IsReadOnly bool `json:"isReadOnly"` Metadata []Metadata `json:"metadata"` Name string `json:"name"` Organization string `json:"organization"` Phone string `json:"phone"` Teams []string `json:"teams"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Type string `json:"type"` }
type AdminCreateParams ¶
type AdminUpdateParams ¶
type Container ¶
type Container struct { ActiveTask *string `json:"activeTask"` ID string `json:"id"` Organization string `json:"organization"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Type ContainerType `json:"type"` Tasks []string `json:"tasks"` Worker string `json:"worker,omitempty"` Team string `json:"team,omitempty"` }
type ContainerQueryKey ¶
type ContainerQueryKey string
const ( ContainerQueryKeyOrganizations ContainerQueryKey = "organizations" ContainerQueryKeyTeams ContainerQueryKey = "teams" ContainerQueryKeyWorkers ContainerQueryKey = "workers" )
type ContainerType ¶
type ContainerType string
const ( ContainerTypeOrganization ContainerType = "ORGANIZATION" ContainerTypeTeam ContainerType = "TEAM" ContainerTypeWorker ContainerType = "WORKER" )
type CustomField ¶ added in v0.5.2
type CustomField struct { Description string `json:"description"` AsArray bool `json:"asArray"` Visibility []CustomFieldVisibilityOption `json:"visibility"` Editability []CustomFieldVisibilityOption `json:"editability"` Key string `json:"key"` Name string `json:"name"` Type CustomFieldValidDataType `json:"type"` Contexts []CustomFieldContext `json:"context"` Value any `json:"value"` }
type CustomFieldContext ¶ added in v0.5.2
type CustomFieldParams ¶ added in v0.5.2
type CustomFieldValidDataType ¶ added in v0.5.2
type CustomFieldValidDataType string
type CustomFieldVisibilityOption ¶ added in v0.5.2
type CustomFieldVisibilityOption string
type DeliveryManifest ¶ added in v0.5.1
type DeliveryManifest struct { DepartureTime int64 `json:"departureTime"` Driver Driver `json:"driver"` HubAddress string `json:"hubAddress"` ManifestDate int64 `json:"manifestDate"` Tasks []Task `json:"tasks"` TotalDistance string `json:"totalDistance"` TurnByTurn []TurnByTurn `json:"turnByTurn"` Vehicle WorkerVehicleParam `json:"vehicle"` }
type Destination ¶
type Destination struct { Address DestinationAddress `json:"address"` GooglePlaceId string `json:"googlePlaceId"` ID string `json:"id"` Location DestinationLocation `json:"location"` Metadata []Metadata `json:"metadata"` Notes string `json:"notes"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Warnings []any `json:"warnings"` }
type DestinationAddress ¶
type DestinationAddress struct { Apartment string `json:"apartment"` City string `json:"city"` Country string `json:"country"` Name string `json:"name,omitempty"` Number string `json:"number"` PostalCode string `json:"postalCode"` State string `json:"state"` Street string `json:"street"` Unparsed string `json:"unparsed,omitempty"` }
type DestinationCreateParams ¶
type DestinationCreateParams struct { Address DestinationAddress `json:"address"` Location DestinationLocation `json:"location,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` Notes string `json:"notes,omitempty"` Options *DestinationOptionsParam `json:"options,omitempty"` }
type DestinationLocation ¶
type DestinationLocation []float64
type DestinationOptionsParam ¶
type DestinationOptionsParam struct {
Language string `json:"language,omitempty"`
}
type Hub ¶
type Hub struct { Address DestinationAddress `json:"address"` ID string `json:"id"` Location DestinationLocation `json:"location"` Name string `json:"name"` Teams []string `json:"teams"` }
type HubCreateParams ¶
type HubCreateParams struct { Address DestinationAddress `json:"address"` Name string `json:"name"` Teams []string `json:"teams,omitempty"` }
type HubUpdateParams ¶
type HubUpdateParams struct { Address DestinationAddress `json:"address"` Name string `json:"name"` Teams []string `json:"teams,omitempty"` }
type ManifestGenerateParams ¶ added in v0.5.1
type Metadata ¶
type Metadata struct { Name string `json:"name"` Subtype string `json:"subtype,omitempty"` Type string `json:"type"` Value any `json:"value"` Visibility []MetadataVisibilityOption `json:"visibility,omitempty"` }
Onfleet Metadata. Reference https://docs.onfleet.com/reference/metadata
type MetadataVisibilityOption ¶
type MetadataVisibilityOption string
const ( MetadataVisibilityOptionApi MetadataVisibilityOption = "api" MetadataVisibilityOptionDashboard MetadataVisibilityOption = "dashboard" MetadataVisibilityOptionWorker MetadataVisibilityOption = "worker" )
type Organization ¶
type Organization struct { Country string `json:"country"` Delegatees []string `json:"delegatees"` DriverSupportEmail string `json:"driverSupportEmail"` Email string `json:"email"` ID string `json:"id"` Image string `json:"image,omitempty"` Name string `json:"name"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Timezone string `json:"timezone"` }
type OrganizationDelegate ¶
type PositionEnum ¶ added in v0.5.4
type PositionEnum string
const ( PositionEnumHub PositionEnum = "HUB" PositionEnumWorkerLocation PositionEnum = "WORKER_LOCATION" PositionEnumWorkerAddress PositionEnum = "WORKER_ADDRESS" )
type Recipient ¶
type Recipient struct { ID string `json:"id"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Metadata []Metadata `json:"metadata"` Name string `json:"name"` Notes string `json:"notes"` Organization string `json:"organization"` Phone string `json:"phone"` SkipSmsNotifications bool `json:"skipSMSNotifications"` }
type RecipientCreateParams ¶
type RecipientCreateParams struct { Metadata []Metadata `json:"metadata,omitempty"` Name string `json:"name,omitempty"` Notes string `json:"notes,omitempty"` Phone string `json:"phone,omitempty"` SkipPhoneNumberValidation bool `json:"skipPhoneNumberValidation,omitempty"` SkipSmsNotifications bool `json:"skipSMSNotifications,omitempty"` UseLongCodeForText bool `json:"useLongCodeForText,omitempty"` }
type RecipientQueryKey ¶
type RecipientQueryKey string
const ( RecipientQueryKeyName RecipientQueryKey = "name" RecipientQueryKeyPhone RecipientQueryKey = "phone" )
type RecipientUpdateParams ¶
type RequestError ¶
type RequestError struct { // Code is error type e.g. "InvalidArgument" Code string `json:"code,omitempty"` // Message contains futher details about the error. Message RequestErrorMessage `json:"message"` }
func (RequestError) Error ¶
func (err RequestError) Error() string
type RequestErrorMessage ¶
type RequestErrorMessage struct { Cause any `json:"cause,omitempty"` // Error is an internal error code. // It is different than the request status code. Error int `json:"error,omitempty"` // Message is the error messages / description Message string `json:"message,omitempty"` // RemoteAddress is remote ip RemoteAddress string `json:"remoteAddress,omitempty"` // Request is uuid associated with the request Request string `json:"request,omitempty"` // StatusCode only present on errors returned for batch task creation StatusCode int `json:"statusCode,omitempty"` }
type RoutePlan ¶ added in v0.5.4
type RoutePlan struct { Id string `json:"id"` Name string `json:"name"` State string `json:"state"` Color string `json:"color"` Tasks []string `json:"tasks"` Organization string `json:"organization"` Team *string `json:"team"` Worker string `json:"worker"` VehicleType string `json:"vehicleType"` StartTime int64 `json:"startTime"` EndTime *int64 `json:"endTime"` ActualStartTime *int64 `json:"actualStartTime"` ActualEndTime *int64 `json:"actualEndTime"` StartingHubId *string `json:"startingHubId"` EndingHubId *string `json:"endingHubId"` ShortId string `json:"shortId"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` }
type RoutePlanAddTasksParams ¶ added in v0.5.4
type RoutePlanAddTasksParams struct {
Tasks []string `json:"tasks"`
}
type RoutePlanListQueryParams ¶ added in v0.5.4
type RoutePlanListQueryParams struct { WorkerId string `json:"workerId,omitempty"` StartTimeTo int64 `json:"startTimeTo,omitempty"` StartTimeFrom int64 `json:"startTimeFrom,omitempty"` CreatedTimeTo int64 `json:"createdTimeTo,omitempty"` CreatedTimeFrom int64 `json:"createdTimeFrom,omitempty"` HasTasks bool `json:"hasTasks,omitempty"` Limit int64 `json:"limit,omitempty"` }
type RoutePlanParams ¶ added in v0.5.4
type RoutePlanParams struct { Name string `json:"name"` StartTime int64 `json:"startTime"` TaskIds []string `json:"tasks,omitempty"` Color string `json:"color,omitempty"` VehicleType string `json:"vehicleType,omitempty"` Worker string `json:"worker,omitempty"` Team string `json:"team,omitempty"` StartAt PositionEnum `json:"start,omitempty"` EndAt PositionEnum `json:"end,omitempty"` StartingHubId string `json:"startingHubId,omitempty"` EndingHubId string `json:"endingHubId,omitempty"` EndTime int64 `json:"endTime,omitempty"` Timezone string `json:"timezone,omitempty"` }
type RoutePlansPaginated ¶ added in v0.5.4
type Task ¶
type Task struct { AdditionalQuantities TaskAdditionalQuantities `json:"additionalQuantities"` Appearance TaskAppearance `json:"appearance"` Barcodes *TaskBarcodeContainer `json:"barcodes,omitempty"` CompleteAfter *int64 `json:"completeAfter"` CompleteBefore *int64 `json:"completeBefore"` CompletionDetails TaskCompletionDetails `json:"completionDetails"` Container *TaskContainer `json:"container"` Creator string `json:"creator"` CustomFields []CustomField `json:"customFields"` DelayTime *float64 `json:"delayTime"` Dependencies []string `json:"dependencies"` Destination Destination `json:"destination"` EstimatedArrivalTime *int64 `json:"estimatedArrivalTime"` EstimatedCompletionTime *int64 `json:"estimatedCompletionTime"` ETA *int64 `json:"eta"` Executor string `json:"executor"` Feedback []any `json:"feedback"` ID string `json:"id"` Identity TaskIdentity `json:"identity"` Merchant string `json:"merchant"` Metadata []Metadata `json:"metadata"` Notes string `json:"notes"` Organization string `json:"organization"` Overrides TaskOverrides `json:"overrides"` PickupTask bool `json:"pickupTask"` Quantity float64 `json:"quantity"` Recipients []Recipient `json:"recipients"` ScanOnlyRequiredBarcodes bool `json:"scanOnlyRequiredBarcodes"` ServiceTime float64 `json:"serviceTime"` ShortId string `json:"shortId"` // SourceTaskId only set on cloned tasks SourceTaskId string `json:"sourceTaskId,omitempty"` State TaskState `json:"state"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` TrackingUrl string `json:"trackingURL"` TrackingViewed bool `json:"trackingViewed"` Worker *string `json:"worker"` RoutePlan *string `json:"routePlan"` }
type TaskAppearance ¶
type TaskAppearance struct {
TriangleColor *int `json:"triangleColor"`
}
type TaskAppearanceParam ¶
type TaskAppearanceParam struct {
TriangleColor int `json:"triangleColor"`
}
type TaskAutoAssignMode ¶
type TaskAutoAssignMode string
const ( TaskAutoAssignModeDistance TaskAutoAssignMode = "distance" TaskAutoAssignModeLoad TaskAutoAssignMode = "load" )
type TaskAutoAssignMultiOptionsParam ¶
type TaskAutoAssignMultiOptionsParam struct { ConsiderDependencies bool `json:"considerDependencies,omitempty"` ExcludedWorkerIds []string `json:"excludedWorkerIds,omitempty"` MaxAssignedTaskCount int `json:"maxAssignedTaskCount,omitempty"` Mode TaskAutoAssignMode `json:"mode"` RestrictAutoAssignmentToTeam bool `json:"restrictAutoAssignmentToTeam"` Teams []string `json:"teams,omitempty"` }
type TaskAutoAssignMultiParams ¶
type TaskAutoAssignMultiParams struct { Tasks []string `json:"tasks"` Options TaskAutoAssignMultiOptionsParam `json:"options"` }
type TaskAutoAssignParam ¶
type TaskAutoAssignParam struct { ConsiderDependencies bool `json:"considerDependencies,omitempty"` ExcludedWorkerIds []string `json:"excludedWorkerIds,omitempty"` MaxAssignedTaskCount int `json:"maxAssignedTaskCount,omitempty"` Mode TaskAutoAssignMode `json:"mode"` Team string `json:"team,omitempty"` }
type TaskBarcode ¶
type TaskBarcodeContainer ¶
type TaskBarcodeContainer struct { Captured []TaskCapturedBarcode `json:"captured"` Required []TaskBarcode `json:"required"` }
type TaskBatchCreateError ¶
type TaskBatchCreateError struct { Error RequestErrorMessage `json:"error"` Task TaskParams `json:"task"` }
type TaskBatchCreateErrorAsync ¶ added in v0.5.0
type TaskBatchCreateErrorAsync struct { StatusCode int `json:"statusCode"` ErrorCode int `json:"errorCode"` Message string `json:"message"` Cause string `json:"cause"` TaskData TaskParams `json:"taskData"` }
type TaskBatchCreateParams ¶
type TaskBatchCreateParams struct {
Tasks []TaskParams `json:"tasks"`
}
type TaskBatchCreateResponse ¶
type TaskBatchCreateResponse struct { Tasks []Task `json:"tasks"` Errors []TaskBatchCreateError `json:"errors"` }
type TaskBatchCreateResponseAsync ¶ added in v0.5.0
type TaskBatchStatusResponseAsync ¶ added in v0.5.0
type TaskBatchStatusResponseAsync struct { Status string `json:"status"` Submitted string `json:"submitted"` TasksReceived int `json:"tasksReceived"` TasksCreated int `json:"tasksCreated"` TasksErrored int `json:"tasksErrored"` NewTasks []Task `json:"newTasks"` NewTasksWithWarnings []Task `json:"newTasksWithWarnings"` FailedTasks []TaskParams `json:"failedTasks"` Errors []TaskBatchCreateErrorAsync `json:"errors"` }
type TaskCapturedBarcode ¶
type TaskCloneOverridesParam ¶
type TaskCloneOverridesParam struct { CompleteAfter int64 `json:"completeAfter,omitempty"` CompleteBefore int64 `json:"completeBefore,omitempty"` // Destination can string destination id or destination object onfleet.DestinationCreateParams Destination any `json:"destination,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` Notes string `json:"notes,omitempty"` PickupTask bool `json:"pickupTask"` // Recipients can be slice of string recipient ids or recipient objects []onfleet.RecipientCreateParams Recipients any `json:"recipients,omitempty"` ServiceTime float64 `json:"serviceTime,omitempty"` }
type TaskCloneParams ¶
type TaskCloneParams struct { IncludeBarcodes bool `json:"includeBarcodes"` IncludeDependencies bool `json:"includeDependencies"` IncludeMetadata bool `json:"includeMetadata"` Overrides *TaskCloneOverridesParam `json:"overrides,omitempty"` }
type TaskCompletionDetails ¶
type TaskCompletionDetails struct { Actions []any `json:"actions"` Distance float64 `json:"distance"` Events []TaskCompletionEvent `json:"events"` FailureNotes string `json:"failureNotes"` FailureReason string `json:"failureReason"` FirstLocation DestinationLocation `json:"firstLocation"` LastLocation DestinationLocation `json:"lastLocation"` Notes string `json:"notes"` PhotoUploadId *string `json:"photoUploadId"` PhotoUploadIds *[]string `json:"photoUploadIds"` SignatureUploadId *string `json:"signatureUploadId"` Success bool `json:"success"` Time *int64 `json:"time"` }
type TaskCompletionEvent ¶
type TaskCompletionEvent struct { Location DestinationLocation `json:"location"` Name string `json:"name"` Time int64 `json:"time"` }
type TaskContainer ¶
type TaskContainer struct { Organization string `json:"organization,omitempty"` Team string `json:"team,omitempty"` Type ContainerType `json:"type"` Worker string `json:"worker,omitempty"` }
type TaskForceCompletionParams ¶
type TaskForceCompletionParams struct {
CompletionDetails TaskForceCompletionDetailsParam `json:"completionDetails"`
}
type TaskIdentity ¶
type TaskListQueryParams ¶ added in v0.3.0
type TaskListQueryParams struct { // From is required From int64 `json:"from,omitempty,string"` To int64 `json:"to,omitempty,string"` // Used for pagination LastId string `json:"lastId,omitempty"` Worker string `json:"worker,omitempty"` CompleteBeforeBefore int64 `json:"completeBeforeBefore,omitempty,string"` CompleteAfterAfter int64 `json:"completeAfterAfter,omitempty,string"` Dependencies []string `json:"dependencies,omitempty"` }
type TaskOverrides ¶
type TaskParams ¶
type TaskParams struct { Appearance *TaskAppearanceParam `json:"appearance,omitempty"` AutoAssign *TaskAutoAssignParam `json:"autoAssign,omitempty"` Barcodes []TaskBarcode `json:"barcodes,omitempty"` CompleteAfter int64 `json:"completeAfter,omitempty"` CompleteBefore int64 `json:"completeBefore,omitempty"` Container *TaskContainer `json:"container,omitempty"` CustomFields []CustomFieldParams `json:"customFields,omitempty"` Dependencies []string `json:"dependencies,omitempty"` // Destination can string destination id or destination object onfleet.DestinationCreateParams Destination any `json:"destination,omitempty"` Executor string `json:"executor,omitempty"` Merchant string `json:"merchant,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` Notes string `json:"notes,omitempty"` PickupTask bool `json:"pickupTask"` Quantity float64 `json:"quantity,omitempty"` RecipientName string `json:"recipientName,omitempty"` RecipientNotes string `json:"recipientNotes,omitempty"` // Recipients can be slice of string recipient ids or recipient objects []onfleet.RecipientCreateParams Recipients any `json:"recipients,omitempty"` RecipientSkipSmsNotifications bool `json:"recipientSkipSMSNotifications,omitempty"` Requirements *TaskCompletionRequirementsParam `json:"requirements,omitempty"` ScanOnlyRequiredBarcodes bool `json:"scanOnlyRequiredBarcodes,omitempty"` ServiceTime float64 `json:"serviceTime,omitempty"` UseMerchantForProxy bool `json:"useMerchantForProxy,omitempty"` }
type TasksPaginated ¶ added in v0.3.0
type Team ¶
type Team struct { EnableSelfAssignment bool `json:"enableSelfAssignment"` Hub *string `json:"hub"` ID string `json:"id"` Managers []string `json:"managers"` Name string `json:"name"` Tasks []string `json:"tasks"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` Workers []string `json:"workers"` }
type TeamAutoDispatch ¶
type TeamAutoDispatch struct {
DispatchId string `json:"dispatchId"`
}
type TeamAutoDispatchParams ¶
type TeamAutoDispatchParams struct { MaxAllowedDelay int `json:"maxAllowedDelay,omitempty"` MaxTasksPerRoute int `json:"maxTasksPerRoute,omitempty"` RouteEnd string `json:"routeEnd,omitempty"` ScheduleTimeWindow []int64 `json:"scheduleTimeWindow,omitempty"` ServiceTime int `json:"serviceTime,omitempty"` TaskTimeWindow []int64 `json:"taskTimeWindow,omitempty"` }
type TeamCreateParams ¶
type TeamTasksListQueryParams ¶
type TeamTasksListQueryParams struct { From int64 `json:"from,omitempty,string"` // IsPickupTask is a boolean represented as a string. // // E.g. "true" or "false". // // Set to empty string "" if both dropoff and pickup tasks should be returned. IsPickupTask string `json:"isPickupTask,omitempty"` LastId string `json:"lastId,omitempty"` To int64 `json:"to,omitempty,string"` }
type TeamUpdateParams ¶
type TeamWorkerEta ¶
type TeamWorkerEta struct { Steps []TeamWorkerEtaStep `json:"steps"` Vehicle WorkerVehicleType `json:"vehicle"` WorkerId string `json:"workerId"` }
type TeamWorkerEtaQueryParams ¶
type TeamWorkerEtaQueryParams struct { DropoffLocation string `json:"dropoffLocation,omitempty"` PickupLocation string `json:"pickupLocation,omitempty"` PickupTime int64 `json:"pickupTime,omitempty,string"` RestrictedVehiclesTypes WorkerVehicleType `json:"restrictedVehiclesTypes,omitempty"` ServiceTime float64 `json:"serviceTime,omitempty,string"` }
type TeamWorkerEtaStep ¶
type TeamWorkerEtaStep struct { CompletionTime int64 `json:"completionTime"` Distance float64 `json:"distance"` Location DestinationLocation `json:"location"` ServiceTime float64 `json:"serviceTime"` TravelTime float64 `json:"travelTime"` }
type TooManyRequestsError ¶ added in v0.5.3
type TooManyRequestsError struct { }
func (TooManyRequestsError) Error ¶ added in v0.5.3
func (err TooManyRequestsError) Error() string
type TurnByTurn ¶ added in v0.5.1
type WebhookCreateParams ¶
type Worker ¶
type Worker struct { AccountStatus WorkerAccountStatus `json:"accountStatus"` ActiveTask *string `json:"activeTask"` AdditionalCapacities WorkerAdditionalCapacities `json:"additionalCapacities"` Addresses *WorkerAddresses `json:"addresses,omitempty"` Analytics *WorkerAnalytics `json:"analytics,omitempty"` Capacity float64 `json:"capacity"` DelayTime *float64 `json:"delayTime"` DisplayName *string `json:"displayName"` HasRecentlyUsedSpoofedLocations bool `json:"hasRecentlyUsedSpoofedLocations"` ID string `json:"id"` ImageUrl *string `json:"imageUrl"` Location DestinationLocation `json:"location"` Metadata []Metadata `json:"metadata"` Name string `json:"name"` OnDuty bool `json:"onDuty"` Organization string `json:"organization"` Phone string `json:"phone"` Tasks []string `json:"tasks"` Teams []string `json:"teams"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` TimeLastSeen int64 `json:"timeLastSeen"` UserData WorkerUserData `json:"userData"` Timezone *string `json:"timezone"` Vehicle *WorkerVehicle `json:"vehicle"` }
type WorkerAccountStatus ¶
type WorkerAccountStatus string
const ( WorkerAccountStatusAccepted WorkerAccountStatus = "ACCEPTED" WorkerAccountStatusInvited WorkerAccountStatus = "INVITED" )
type WorkerAddressRoutingParam ¶
type WorkerAddressRoutingParam struct {
Routing string `json:"routing"`
}
type WorkerAddresses ¶
type WorkerAddresses struct {
Routing *WorkerAddressesRouting `json:"routing"`
}
type WorkerAddressesRouting ¶
type WorkerAddressesRouting struct { Address DestinationAddress `json:"address"` CreatedByLocation bool `json:"createdByLocation"` GooglePlaceId string `json:"googlePlaceId"` ID string `json:"id"` Location DestinationLocation `json:"location"` Notes string `json:"notes"` Organization string `json:"organization"` TimeCreated int64 `json:"timeCreated"` TimeLastModified int64 `json:"timeLastModified"` WasGeocoded bool `json:"wasGeocoded"` }
type WorkerAnalytics ¶
type WorkerAnalytics struct { Distances WorkerAnalyticsDistances `json:"distances"` Events []WorkerAnalyticsEvent `json:"events"` TaskCounts WorkerAnalyticsTaskCounts `json:"taskCounts"` Times WorkerAnalyticsTimes `json:"times"` }
type WorkerAnalyticsEvent ¶
type WorkerAnalyticsTimes ¶
type WorkerCreateParams ¶
type WorkerCreateParams struct { Addresses *WorkerAddressRoutingParam `json:"addresses,omitempty"` Capacity float64 `json:"capacity,omitempty"` DisplayName string `json:"displayName,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` Name string `json:"name"` Phone string `json:"phone"` Teams []string `json:"teams"` Vehicle *WorkerVehicleParam `json:"vehicle,omitempty"` }
type WorkerGetQueryParams ¶
type WorkerListQueryParams ¶
type WorkerSchedule ¶
type WorkerScheduleEntries ¶
type WorkerScheduleEntries struct {
Entries []WorkerSchedule `json:"entries"`
}
type WorkerTasks ¶
type WorkerTasksListQueryParams ¶
type WorkerTasksListQueryParams struct { From int64 `json:"from,omitempty,string"` // IsPickupTask is a boolean represented as a string. // // E.g. "true" or "false". // // Set to empty string "" if both dropoff and pickup tasks should be returned. IsPickupTask string `json:"isPickupTask,omitempty"` LastId string `json:"lastId,omitempty"` To int64 `json:"to,omitempty,string"` }
type WorkerUpdateParams ¶
type WorkerUpdateParams struct { Addresses *WorkerAddressRoutingParam `json:"addresses,omitempty"` Capacity float64 `json:"capacity,omitempty"` DisplayName string `json:"displayName,omitempty"` Metadata []Metadata `json:"metadata,omitempty"` Name string `json:"name,omitempty"` Teams []string `json:"teams,omitempty"` Vehicle *WorkerVehicleParam `json:"vehicle,omitempty"` }
type WorkerUserData ¶
type WorkerVehicle ¶
type WorkerVehicleParam ¶
type WorkerVehicleParam struct { Color string `json:"color,omitempty"` Description string `json:"description,omitempty"` LicensePlate string `json:"licensePlate,omitempty"` Type WorkerVehicleType `json:"type,omitempty"` }
type WorkerVehicleType ¶
type WorkerVehicleType string
const ( WorkerVehicleTypeCar WorkerVehicleType = "CAR" WorkerVehicleTypeBicycle WorkerVehicleType = "BICYCLE" WorkerVehicleTypeMotorcycle WorkerVehicleType = "MOTORCYCLE" WorkerVehicleTypeTruck WorkerVehicleType = "TRUCK" )
type WorkersByLocation ¶
type WorkersByLocation struct {
Workers []Worker `json:"workers"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.