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 AIAgentDeleteResponse
- type AIAgentGetParams
- type AIAgentListParams
- type AIAgentNewParams
- type AIAgentService
- func (r *AIAgentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AIAgentDeleteResponse, err error)
- func (r *AIAgentService) Get(ctx context.Context, id string, query AIAgentGetParams, ...) (res *AgentDefinition, err error)
- func (r *AIAgentService) List(ctx context.Context, query AIAgentListParams, opts ...option.RequestOption) (res *ListAgentDefinition, err error)
- func (r *AIAgentService) New(ctx context.Context, params AIAgentNewParams, opts ...option.RequestOption) (res *AgentDefinition, err error)
- func (r *AIAgentService) Update(ctx context.Context, id string, params AIAgentUpdateParams, ...) (res *AgentDefinition, err error)
- func (r *AIAgentService) UpdateStatus(ctx context.Context, id string, params AIAgentUpdateStatusParams, ...) (res *AgentDefinition, err error)
- type AIAgentUpdateParams
- type AIAgentUpdateStatusParams
- type AIGetToolGroupsParams
- type AIGetToolsParams
- type AIMemoryDeleteResponse
- type AIMemoryListParams
- type AIMemoryListParamsCategory
- type AIMemoryNewParams
- type AIMemoryService
- func (r *AIMemoryService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AIMemoryDeleteResponse, err error)
- func (r *AIMemoryService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentMemory, err error)
- func (r *AIMemoryService) List(ctx context.Context, query AIMemoryListParams, opts ...option.RequestOption) (res *ListAgentMemory, err error)
- func (r *AIMemoryService) New(ctx context.Context, body AIMemoryNewParams, opts ...option.RequestOption) (res *AgentMemory, err error)
- func (r *AIMemoryService) Update(ctx context.Context, id string, body AIMemoryUpdateParams, ...) (res *AgentMemory, err error)
- type AIMemoryUpdateParams
- type AIRunActionCancelParams
- type AIRunActionContinueParams
- type AIRunActionRetryParams
- type AIRunActionService
- func (r *AIRunActionService) Cancel(ctx context.Context, id string, body AIRunActionCancelParams, ...) (res *AgentRun, err error)
- func (r *AIRunActionService) Continue(ctx context.Context, id string, params AIRunActionContinueParams, ...) (res *AgentRun, err error)
- func (r *AIRunActionService) Retry(ctx context.Context, id string, body AIRunActionRetryParams, ...) (res *AgentRun, err error)
- type AIRunGetParams
- type AIRunListParams
- type AIRunListParamsStatus
- type AIRunNewParams
- type AIRunService
- func (r *AIRunService) Get(ctx context.Context, id string, query AIRunGetParams, ...) (res *AgentRun, err error)
- func (r *AIRunService) List(ctx context.Context, query AIRunListParams, opts ...option.RequestOption) (res *ListAgentRun, err error)
- func (r *AIRunService) New(ctx context.Context, params AIRunNewParams, opts ...option.RequestOption) (res *AgentRun, err error)
- type AIService
- type APIKey
- type APIKeyObject
- type Account
- type AccountBranding
- type AccountBrandingObject
- type AccountGroup
- type AccountGroupCommissionPolicy
- type AccountGroupFreightPolicy
- type AccountGroupObject
- type AccountGroupType
- type AccountIntegration
- type AccountIntegrationObject
- type AccountIntegrationProvider
- type AccountIntegrationStatus
- type AccountObject
- type AccountPortal
- type AccountPortalObject
- type AccountPrice
- type AccountPriceObject
- type AccountStatus
- type AccountStatusCode
- type AccountStatusObject
- type AccountUser
- type AccountUserObject
- type AccountUserStatus
- type Actor
- type ActorObject
- type ActorType
- type AddConversationLinkRequestParam
- type AddConversationLinkRequestResourceType
- type AddMessagingGroupMemberRequestMemberType
- type AddMessagingGroupMemberRequestParam
- type AddParticipantRequestParam
- type AddParticipantRequestRole
- type Address
- type AddressComponents
- type AddressComponentsObject
- type AddressInputParam
- type AddressInputType
- type AddressObject
- type AddressSuggestion
- type AddressSuggestionObject
- type AddressType
- type AdjustmentType
- type AdjustmentTypeCode
- type AdjustmentTypeObject
- type AgentAction
- type AgentActionObject
- type AgentActionReviewRequirement
- type AgentActionStatus
- type AgentActionTool
- type AgentDefinition
- type AgentDefinitionConfig
- type AgentDefinitionConfigObject
- type AgentDefinitionConfigTier
- type AgentDefinitionDefinitionType
- type AgentDefinitionEditability
- type AgentDefinitionObject
- type AgentDefinitionStatus
- type AgentDefinitionTool
- type AgentDefinitionToolObject
- type AgentDefinitionToolReviewRequirement
- type AgentDefinitionTriggerType
- type AgentMemory
- type AgentMemoryCategory
- type AgentMemoryObject
- type AgentRun
- type AgentRunObject
- type AgentRunStatus
- type AgentRunStep
- type AgentRunStepObject
- type AgentRunTriggerType
- type AnalyzeDeliveryPerformanceRequestGranularity
- type AnalyzeDeliveryPerformanceRequestParam
- type AnalyzeDeliveryPerformanceResponse
- type AnalyzeDeliveryPerformanceResponseObject
- type AnalyzeOeeRequestParam
- type AnalyzeOeeResponse
- type AnalyzeOeeResponseObject
- type AnalyzeOeeTrendRequestParam
- type AnalyzeOeeTrendResponse
- type AnalyzeOeeTrendResponseObject
- type AnalyzeScheduleAttainmentRequestGroupBy
- type AnalyzeScheduleAttainmentRequestParam
- type AnalyzeScheduleAttainmentResponse
- type AnalyzeScheduleAttainmentResponseBaselineStatus
- type AnalyzeScheduleAttainmentResponseGroupBy
- type AnalyzeScheduleAttainmentResponseObject
- type Announcement
- type AnnouncementCategory
- type AnnouncementObject
- type AnnouncementPriority
- type AnnouncementScope
- type AnnouncementStatus
- type ApplyFulfillmentRecommendationsRequestParam
- type ApproveSendDraftRequestParam
- type AssignConversationRequestAssigneeResourceType
- type AssignConversationRequestParam
- type AttachmentUploadTarget
- type AttachmentUploadTargetObject
- type AttainmentBucket
- type Attribute
- type AttributeColor
- type AttributeObject
- type AuditEvent
- type AuditEventAction
- type AuditEventObject
- type AuditEventResourceType
- type AuditFieldChange
- type AuditFieldChangeObject
- type AuthAPIKeyActionRotateParams
- type AuthAPIKeyActionService
- type AuthAPIKeyDeleteResponse
- type AuthAPIKeyGetParams
- type AuthAPIKeyListParams
- type AuthAPIKeyNewParams
- type AuthAPIKeyService
- func (r *AuthAPIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AuthAPIKeyDeleteResponse, err error)
- func (r *AuthAPIKeyService) Get(ctx context.Context, id string, query AuthAPIKeyGetParams, ...) (res *APIKey, err error)
- func (r *AuthAPIKeyService) List(ctx context.Context, query AuthAPIKeyListParams, opts ...option.RequestOption) (res *ListAPIKey, err error)
- func (r *AuthAPIKeyService) New(ctx context.Context, params AuthAPIKeyNewParams, opts ...option.RequestOption) (res *CreatedAPIKey, err error)
- type AuthService
- type AvailableTool
- type AvailableToolCategory
- type AvailableToolObject
- type AvailableToolRequiredRoleType
- type BlockRequestParam
- type BulkDeleteSalesOrdersRequestParam
- type BulkReconcileItemInputParam
- type BulkReconcileItemsRequestParam
- type BulkReconcileItemsRequestReconcileType
- type BulkReconcileItemsResponse
- type BulkReconcileItemsResponseObject
- type BulkUpsertItemCategoriesRequestParam
- type BulkUpsertLocationsRequestParam
- type BulkUpsertMaterialsRequestParam
- type BulkUpsertPartsRequestParam
- type BulkUpsertProductLinesRequestParam
- type BulkUpsertProductsRequestParam
- type BulkUpsertPropertiesRequestParam
- type BulkUpsertUnitGroupsRequestParam
- type BulkUpsertUnitsRequestParam
- type Carrier
- type CarrierCode
- type CarrierCustomerPortalVisibility
- type CarrierObject
- type CatalogItemActionBulkReconcileParams
- type CatalogItemActionService
- type CatalogItemAttributeDeleteParams
- type CatalogItemAttributeService
- type CatalogItemAttributeUpdateParams
- type CatalogItemCategoryActionBulkUpsertParams
- type CatalogItemCategoryActionService
- type CatalogItemCategoryChangeUnitGroupParams
- type CatalogItemCategoryChangeUnitGroupResponse
- type CatalogItemCategoryDeleteResponse
- type CatalogItemCategoryGetParams
- type CatalogItemCategoryListParams
- type CatalogItemCategoryListParamsType
- type CatalogItemCategoryNewParams
- type CatalogItemCategoryPropertyDeleteParams
- type CatalogItemCategoryPropertyDeleteResponse
- type CatalogItemCategoryPropertyService
- func (r *CatalogItemCategoryPropertyService) Delete(ctx context.Context, propertyID string, ...) (res *CatalogItemCategoryPropertyDeleteResponse, err error)
- func (r *CatalogItemCategoryPropertyService) Update(ctx context.Context, propertyID string, ...) (res *CatalogItemCategoryPropertyUpdateResponse, err error)
- type CatalogItemCategoryPropertyUpdateParams
- type CatalogItemCategoryPropertyUpdateResponse
- type CatalogItemCategoryService
- func (r *CatalogItemCategoryService) ChangeUnitGroup(ctx context.Context, unitGroupID string, ...) (res *CatalogItemCategoryChangeUnitGroupResponse, err error)
- func (r *CatalogItemCategoryService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogItemCategoryDeleteResponse, err error)
- func (r *CatalogItemCategoryService) Get(ctx context.Context, id string, query CatalogItemCategoryGetParams, ...) (res *ItemCategory, err error)
- func (r *CatalogItemCategoryService) List(ctx context.Context, query CatalogItemCategoryListParams, ...) (res *ListItemCategory, err error)
- func (r *CatalogItemCategoryService) New(ctx context.Context, params CatalogItemCategoryNewParams, ...) (res *ItemCategory, err error)
- func (r *CatalogItemCategoryService) Update(ctx context.Context, id string, params CatalogItemCategoryUpdateParams, ...) (res *ItemCategory, err error)
- type CatalogItemCategoryUpdateParams
- type CatalogItemChangeCategoryParams
- type CatalogItemGetLotDefaultParams
- type CatalogItemGetParams
- type CatalogItemInventoryListParams
- type CatalogItemInventoryService
- func (r *CatalogItemInventoryService) List(ctx context.Context, id string, query CatalogItemInventoryListParams, ...) (res *ItemInventory, err error)
- func (r *CatalogItemInventoryService) Update(ctx context.Context, id string, body CatalogItemInventoryUpdateParams, ...) (res *CatalogItemInventoryUpdateResponse, err error)
- type CatalogItemInventoryUpdateParams
- type CatalogItemInventoryUpdateResponse
- type CatalogItemListParams
- type CatalogItemListParamsSubassemblyFilter
- type CatalogItemService
- func (r *CatalogItemService) ChangeCategory(ctx context.Context, categoryID string, params CatalogItemChangeCategoryParams, ...) (res *Item, err error)
- func (r *CatalogItemService) Get(ctx context.Context, id string, query CatalogItemGetParams, ...) (res *Item, err error)
- func (r *CatalogItemService) GetLotDefault(ctx context.Context, id string, query CatalogItemGetLotDefaultParams, ...) (res *ItemLotDefault, err error)
- func (r *CatalogItemService) List(ctx context.Context, query CatalogItemListParams, opts ...option.RequestOption) (res *ListItem, err error)
- type CatalogMaterialActionBulkUpsertParams
- type CatalogMaterialActionService
- type CatalogMaterialGetParams
- type CatalogMaterialListParams
- type CatalogMaterialNewParams
- type CatalogMaterialService
- func (r *CatalogMaterialService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Material, err error)
- func (r *CatalogMaterialService) Get(ctx context.Context, id string, query CatalogMaterialGetParams, ...) (res *Material, err error)
- func (r *CatalogMaterialService) List(ctx context.Context, query CatalogMaterialListParams, ...) (res *ListMaterial, err error)
- func (r *CatalogMaterialService) New(ctx context.Context, params CatalogMaterialNewParams, ...) (res *Material, err error)
- func (r *CatalogMaterialService) Update(ctx context.Context, id string, params CatalogMaterialUpdateParams, ...) (res *Material, err error)
- type CatalogMaterialUpdateParams
- type CatalogPartActionBulkUpsertParams
- type CatalogPartActionService
- type CatalogPartGetParams
- type CatalogPartListParams
- type CatalogPartNewParams
- type CatalogPartService
- func (r *CatalogPartService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Part, err error)
- func (r *CatalogPartService) Get(ctx context.Context, id string, query CatalogPartGetParams, ...) (res *Part, err error)
- func (r *CatalogPartService) List(ctx context.Context, query CatalogPartListParams, opts ...option.RequestOption) (res *ListPart, err error)
- func (r *CatalogPartService) New(ctx context.Context, params CatalogPartNewParams, opts ...option.RequestOption) (res *Part, err error)
- func (r *CatalogPartService) Update(ctx context.Context, id string, params CatalogPartUpdateParams, ...) (res *Part, err error)
- type CatalogPartUpdateParams
- type CatalogProductActionBulkUpsertParams
- type CatalogProductActionService
- type CatalogProductChangeProductLineParams
- type CatalogProductDeleteParams
- type CatalogProductGetParams
- type CatalogProductLineActionBulkUpsertParams
- type CatalogProductLineActionService
- type CatalogProductLineDeleteResponse
- type CatalogProductLineGetParams
- type CatalogProductLineListParams
- type CatalogProductLineNewParams
- type CatalogProductLineService
- func (r *CatalogProductLineService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogProductLineDeleteResponse, err error)
- func (r *CatalogProductLineService) Get(ctx context.Context, id string, query CatalogProductLineGetParams, ...) (res *ProductLine, err error)
- func (r *CatalogProductLineService) List(ctx context.Context, query CatalogProductLineListParams, ...) (res *ListProductLine, err error)
- func (r *CatalogProductLineService) New(ctx context.Context, params CatalogProductLineNewParams, ...) (res *ProductLine, err error)
- func (r *CatalogProductLineService) Update(ctx context.Context, id string, params CatalogProductLineUpdateParams, ...) (res *ProductLine, err error)
- type CatalogProductLineUpdateParams
- type CatalogProductListParams
- type CatalogProductListParamsPortalVisibility
- type CatalogProductNewParams
- type CatalogProductService
- func (r *CatalogProductService) ChangeProductLine(ctx context.Context, productLineID string, ...) (res *Product, err error)
- func (r *CatalogProductService) Delete(ctx context.Context, id string, body CatalogProductDeleteParams, ...) (res *Product, err error)
- func (r *CatalogProductService) Get(ctx context.Context, id string, query CatalogProductGetParams, ...) (res *Product, err error)
- func (r *CatalogProductService) List(ctx context.Context, query CatalogProductListParams, ...) (res *ListProduct, err error)
- func (r *CatalogProductService) New(ctx context.Context, params CatalogProductNewParams, ...) (res *Product, err error)
- func (r *CatalogProductService) Update(ctx context.Context, id string, params CatalogProductUpdateParams, ...) (res *Product, err error)
- type CatalogProductUpdateParams
- type CatalogPropertyActionBulkUpsertParams
- type CatalogPropertyActionService
- type CatalogPropertyAttributeDeleteParams
- type CatalogPropertyAttributeDeleteResponse
- type CatalogPropertyAttributeGetParams
- type CatalogPropertyAttributeListParams
- type CatalogPropertyAttributeNewParams
- type CatalogPropertyAttributeService
- func (r *CatalogPropertyAttributeService) Delete(ctx context.Context, id string, body CatalogPropertyAttributeDeleteParams, ...) (res *CatalogPropertyAttributeDeleteResponse, err error)
- func (r *CatalogPropertyAttributeService) Get(ctx context.Context, id string, query CatalogPropertyAttributeGetParams, ...) (res *Attribute, err error)
- func (r *CatalogPropertyAttributeService) List(ctx context.Context, propertyID string, ...) (res *ListAttribute, err error)
- func (r *CatalogPropertyAttributeService) New(ctx context.Context, propertyID string, body CatalogPropertyAttributeNewParams, ...) (res *Attribute, err error)
- func (r *CatalogPropertyAttributeService) Update(ctx context.Context, id string, params CatalogPropertyAttributeUpdateParams, ...) (res *Attribute, err error)
- type CatalogPropertyAttributeUpdateParams
- type CatalogPropertyDeleteResponse
- type CatalogPropertyGetParams
- type CatalogPropertyListParams
- type CatalogPropertyNewParams
- type CatalogPropertyService
- func (r *CatalogPropertyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogPropertyDeleteResponse, err error)
- func (r *CatalogPropertyService) Get(ctx context.Context, id string, query CatalogPropertyGetParams, ...) (res *Property, err error)
- func (r *CatalogPropertyService) List(ctx context.Context, query CatalogPropertyListParams, ...) (res *ListProperty, err error)
- func (r *CatalogPropertyService) New(ctx context.Context, params CatalogPropertyNewParams, ...) (res *Property, err error)
- func (r *CatalogPropertyService) Update(ctx context.Context, id string, params CatalogPropertyUpdateParams, ...) (res *Property, err error)
- type CatalogPropertyUpdateParams
- type CatalogService
- type CatalogUnitActionBulkUpsertParams
- type CatalogUnitActionService
- type CatalogUnitDeleteResponse
- type CatalogUnitGetParams
- type CatalogUnitGroupActionBulkUpsertParams
- type CatalogUnitGroupActionService
- type CatalogUnitGroupDeleteResponse
- type CatalogUnitGroupGetParams
- type CatalogUnitGroupListParams
- type CatalogUnitGroupListParamsType
- type CatalogUnitGroupNewParams
- type CatalogUnitGroupService
- func (r *CatalogUnitGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogUnitGroupDeleteResponse, err error)
- func (r *CatalogUnitGroupService) Get(ctx context.Context, id string, query CatalogUnitGroupGetParams, ...) (res *UnitGroup, err error)
- func (r *CatalogUnitGroupService) List(ctx context.Context, query CatalogUnitGroupListParams, ...) (res *ListUnitGroup, err error)
- func (r *CatalogUnitGroupService) New(ctx context.Context, params CatalogUnitGroupNewParams, ...) (res *UnitGroup, err error)
- func (r *CatalogUnitGroupService) Update(ctx context.Context, id string, params CatalogUnitGroupUpdateParams, ...) (res *UnitGroup, err error)
- type CatalogUnitGroupUnitDeleteParams
- type CatalogUnitGroupUnitDeleteResponse
- type CatalogUnitGroupUnitGetParams
- type CatalogUnitGroupUnitListParams
- type CatalogUnitGroupUnitNewParams
- type CatalogUnitGroupUnitService
- func (r *CatalogUnitGroupUnitService) Delete(ctx context.Context, id string, body CatalogUnitGroupUnitDeleteParams, ...) (res *CatalogUnitGroupUnitDeleteResponse, err error)
- func (r *CatalogUnitGroupUnitService) Get(ctx context.Context, id string, params CatalogUnitGroupUnitGetParams, ...) (res *UnitGroupUnit, err error)
- func (r *CatalogUnitGroupUnitService) List(ctx context.Context, unitGroupID string, query CatalogUnitGroupUnitListParams, ...) (res *ListUnitGroupUnit, err error)
- func (r *CatalogUnitGroupUnitService) New(ctx context.Context, unitGroupID string, params CatalogUnitGroupUnitNewParams, ...) (res *UnitGroupUnit, err error)
- func (r *CatalogUnitGroupUnitService) Update(ctx context.Context, id string, params CatalogUnitGroupUnitUpdateParams, ...) (res *UnitGroupUnit, err error)
- type CatalogUnitGroupUnitUpdateParams
- type CatalogUnitGroupUpdateParams
- type CatalogUnitListParams
- type CatalogUnitListParamsType
- type CatalogUnitNewParams
- type CatalogUnitService
- func (r *CatalogUnitService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogUnitDeleteResponse, err error)
- func (r *CatalogUnitService) Get(ctx context.Context, id string, query CatalogUnitGetParams, ...) (res *Unit, err error)
- func (r *CatalogUnitService) List(ctx context.Context, query CatalogUnitListParams, opts ...option.RequestOption) (res *ListUnit, err error)
- func (r *CatalogUnitService) New(ctx context.Context, params CatalogUnitNewParams, opts ...option.RequestOption) (res *Unit, err error)
- func (r *CatalogUnitService) Update(ctx context.Context, id string, params CatalogUnitUpdateParams, ...) (res *Unit, err error)
- type CatalogUnitUpdateParams
- type CheckoutSalesOrderRequestParam
- type CheckoutSalesOrderResponse
- type CheckoutSalesOrderResponseObject
- 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 Commitment
- type CommitmentLeadTimeSource
- type CommitmentObject
- type CommitmentQuoteStep
- type CommitmentQuoteStepCode
- type CommitmentTransitSource
- type ComputedQuantity
- type ComputedQuantityObject
- type ComputedRate
- type ComputedRateObject
- type ConfigInputParam
- type ConfigInputTier
- type Consumption
- type ConsumptionObject
- type ContactMatch
- type ContactMatchObject
- type ContactMatchRelationship
- type ContinueRunRequestParam
- type Conversation
- type ConversationAudience
- type ConversationLegalHold
- type ConversationLink
- type ConversationLinkObject
- type ConversationObject
- type ConversationParticipant
- type ConversationParticipantAgentTriggerPolicy
- type ConversationParticipantMembership
- type ConversationParticipantNotifications
- type ConversationParticipantObject
- type ConversationParticipantRole
- type ConversationParticipantType
- type ConversationStatus
- type ConversationType
- type ConversationWorkflowStatus
- type CoreActionEmailRecordParams
- type CoreActionEmailRecordResponse
- type CoreActionService
- type CoreAddressActionService
- type CoreAddressActionValidateParams
- type CoreAddressGetSuggestionsParams
- type CoreAddressService
- type CoreAnalyticsService
- func (r *CoreAnalyticsService) UpdateDeliveryPerformance(ctx context.Context, body CoreAnalyticsUpdateDeliveryPerformanceParams, ...) (res *AnalyzeDeliveryPerformanceResponse, err error)
- func (r *CoreAnalyticsService) UpdateOee(ctx context.Context, body CoreAnalyticsUpdateOeeParams, ...) (res *AnalyzeOeeResponse, err error)
- func (r *CoreAnalyticsService) UpdateOeeTrend(ctx context.Context, body CoreAnalyticsUpdateOeeTrendParams, ...) (res *AnalyzeOeeTrendResponse, err error)
- func (r *CoreAnalyticsService) UpdateScheduleAttainment(ctx context.Context, body CoreAnalyticsUpdateScheduleAttainmentParams, ...) (res *AnalyzeScheduleAttainmentResponse, err error)
- type CoreAnalyticsUpdateDeliveryPerformanceParams
- type CoreAnalyticsUpdateOeeParams
- type CoreAnalyticsUpdateOeeTrendParams
- type CoreAnalyticsUpdateScheduleAttainmentParams
- type CoreAuditEventGetParams
- type CoreAuditEventListParams
- type CoreAuditEventListParamsRootResourceType
- type CoreAuditEventService
- func (r *CoreAuditEventService) Get(ctx context.Context, id string, query CoreAuditEventGetParams, ...) (res *AuditEvent, err error)
- func (r *CoreAuditEventService) GetResourceTypes(ctx context.Context, opts ...option.RequestOption) (res *ListObjectType, err error)
- func (r *CoreAuditEventService) List(ctx context.Context, query CoreAuditEventListParams, ...) (res *ListAuditEvent, err error)
- type CoreEmailLogGetParams
- type CoreEmailLogListParams
- type CoreEmailLogService
- type CoreGetSearchParams
- type CoreJobCancelParams
- type CoreJobGetParams
- type CoreJobService
- type CoreRequestLogGetParams
- type CoreRequestLogListParams
- type CoreRequestLogService
- type CoreSandboxDeleteResponse
- type CoreSandboxGetParams
- type CoreSandboxListParams
- type CoreSandboxNewParams
- type CoreSandboxService
- func (r *CoreSandboxService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CoreSandboxDeleteResponse, err error)
- func (r *CoreSandboxService) Get(ctx context.Context, id string, query CoreSandboxGetParams, ...) (res *Sandbox, err error)
- func (r *CoreSandboxService) List(ctx context.Context, query CoreSandboxListParams, opts ...option.RequestOption) (res *ListSandbox, err error)
- func (r *CoreSandboxService) New(ctx context.Context, params CoreSandboxNewParams, opts ...option.RequestOption) (res *Sandbox, err error)
- type CoreService
- type CreateAPIKeyRequestParam
- type CreateAccountGroupRequestCommissionPolicy
- type CreateAccountGroupRequestFreightPolicy
- type CreateAccountGroupRequestParam
- type CreateAccountGroupRequestType
- type CreateAccountIntegrationRequestParam
- type CreateAccountIntegrationRequestProvider
- type CreateAccountPriceRequestParam
- type CreateAccountUserRequestParam
- type CreateAgentRequestParam
- type CreateAgentRequestTriggerType
- type CreateAttachmentUploadURLRequestParam
- type CreateAttributeRequestColor
- type CreateAttributeRequestParam
- type CreateCarrierRequestCode
- type CreateCarrierRequestCustomerPortalVisibility
- type CreateCarrierRequestParam
- type CreateConversationRequestParam
- type CreateConversationRequestTopicResourceType
- type CreateConversationRequestType
- type CreateCustomerRequestCarrierBillingType
- type CreateCustomerRequestCommissionPolicy
- type CreateCustomerRequestDefaultPriority
- type CreateCustomerRequestEdiStatus
- type CreateCustomerRequestFreightPolicy
- type CreateCustomerRequestFulfillmentPolicy
- type CreateCustomerRequestParam
- type CreateCustomerRequestStatus
- type CreateDemandOverrideRequestAdjustment
- type CreateDemandOverrideRequestParam
- type CreateDemandOverrideRequestReason
- type CreateDemandOverrideRequestScopeType
- type CreateDepartmentRequestParam
- type CreateEmailDomainRequestParam
- type CreateEmailInboxRequestAgentTriggerPolicy
- type CreateEmailInboxRequestParam
- type CreateItemCategoryRequestParam
- type CreateItemCategoryRequestType
- type CreateLocationRequestParam
- type CreateMachineDowntimeEventRequestParam
- type CreateMachineDowntimeEventRequestReason
- type CreateMachineDowntimeEventRequestSource
- type CreateMachineRequestParam
- type CreateMaterialRequestParam
- type CreateMemoryRequestCategory
- type CreateMemoryRequestParam
- type CreateMessagingGroupRequestParam
- type CreateOperatingCalendarClosureRequestParam
- type CreateOperatingCalendarRequestKind
- type CreateOperatingCalendarRequestParam
- type CreateOrderDiscountRequestDiscountType
- type CreateOrderDiscountRequestParam
- type CreatePartRequestParam
- type CreatePaymentTermRequestParam
- type CreatePortalDomainRequestParam
- type CreateProductLineRequestCommissionPolicy
- type CreateProductLineRequestFreightPolicy
- type CreateProductLineRequestFulfillmentPolicy
- type CreateProductLineRequestParam
- type CreateProductRequestParam
- type CreateProductRequestPortalVisibility
- type CreateProductRequestType
- type CreateProductionScheduleLineRequestParam
- type CreateProductionScheduleLineRequestReason
- type CreatePropertyRequestParam
- type CreateRoleRequestParam
- type CreateSalesOrderLineInputParam
- type CreateSalesOrderLineRequestParam
- type CreateSalesOrderRequestCarrierBillingType
- type CreateSalesOrderRequestParam
- type CreateSalesOrderRequestPriorityCode
- type CreateSalesTargetRequestParam
- type CreateSandboxRequestMode
- type CreateSandboxRequestParam
- type CreateScanningStationRequestLabelSize
- type CreateScanningStationRequestLabelType
- type CreateScanningStationRequestOperatorRequirement
- type CreateScanningStationRequestParam
- type CreateScanningStationRequestType
- type CreateServiceLevelRequestCustomerPortalVisibility
- type CreateServiceLevelRequestParam
- type CreateShippingTermRequestParam
- type CreateShippingTermRequestType
- type CreateUnitGroupRequestParam
- type CreateUnitGroupRequestType
- type CreateUnitGroupUnitParam
- type CreateUnitGroupUnitParamCustomerPortalVisibility
- type CreateUnitGroupUnitRequestCustomerPortalVisibility
- type CreateUnitGroupUnitRequestParam
- type CreateUnitRequestParam
- type CreateUnitRequestType
- type CreateVolumeDiscountRequestParam
- type CreateVolumeDiscountTierInputParam
- type CreatedAPIKey
- type CreatedAPIKeyObject
- type CreatedBy
- type CreatedByObject
- type CreatedByRelation
- type Customer
- type CustomerCommissionPolicy
- type CustomerContactInfo
- type CustomerContactInfoObject
- type CustomerDefaults
- type CustomerDefaultsFulfillmentPolicy
- type CustomerDefaultsObject
- type CustomerEdiStatus
- type CustomerFreightPreferences
- type CustomerFreightPreferencesBillingType
- type CustomerFreightPreferencesObject
- type CustomerFreightPreferencesStatus
- type CustomerLeadTime
- type CustomerLeadTimeObject
- type CustomerLeadTimeSource
- type CustomerNotificationPreferences
- type CustomerNotificationPreferencesObject
- type CustomerObject
- type CustomerRelationshipType
- type CustomerStatus
- type DNSRecord
- type DNSRecordObject
- type DNSRecordReason
- type DNSRecordType
- type DeliveryBacklogBucket
- type DeliveryBacklogBucketObject
- type DeliveryBreakdown
- type DeliveryBreakdownObject
- type DeliveryLatenessBucket
- type DeliveryLatenessBucketObject
- type DeliveryPerformance
- type DeliveryPerformanceObject
- type DemandOverride
- type DemandOverrideAdjustment
- type DemandOverrideObject
- type DemandOverrideReason
- type DemandOverrideScopeType
- type DemandOverrideStatus
- type DemandOverrideType
- type DemandOverrideTypeCode
- type DemandOverrideTypeObject
- type Department
- type DepartmentObject
- type DepartmentRateInputParam
- type EmailDomain
- type EmailDomainObject
- type EmailDomainStatus
- type EmailInbox
- type EmailInboxAgentTriggerPolicy
- type EmailInboxObject
- type EmailInboxStatus
- type EmailLog
- type EmailLogObject
- type EmailLogSendStatus
- type EmailRecordRequestParam
- type EmailRecordRequestType
- type EmailSender
- type EmailSenderDomainStatus
- type EmailSenderObject
- type Entity
- type EntityObject
- type EntityType
- type Error
- type ExportPriceListRequestParam
- type FileDownload
- type FinanceGetAdjustmentTypesParams
- type FinanceGetTransactionMethodsParams
- type FinanceGetTransactionTypesParams
- type FinancePaymentTermDeleteResponse
- type FinancePaymentTermGetParams
- type FinancePaymentTermListParams
- type FinancePaymentTermNewParams
- type FinancePaymentTermService
- func (r *FinancePaymentTermService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *FinancePaymentTermDeleteResponse, err error)
- func (r *FinancePaymentTermService) Get(ctx context.Context, id string, query FinancePaymentTermGetParams, ...) (res *PaymentTerm, err error)
- func (r *FinancePaymentTermService) List(ctx context.Context, query FinancePaymentTermListParams, ...) (res *ListPaymentTerm, err error)
- func (r *FinancePaymentTermService) New(ctx context.Context, params FinancePaymentTermNewParams, ...) (res *PaymentTerm, err error)
- func (r *FinancePaymentTermService) Update(ctx context.Context, id string, params FinancePaymentTermUpdateParams, ...) (res *PaymentTerm, err error)
- type FinancePaymentTermUpdateParams
- type FinanceService
- func (r *FinanceService) GetAdjustmentTypes(ctx context.Context, query FinanceGetAdjustmentTypesParams, ...) (res *ListAdjustmentType, err error)
- func (r *FinanceService) GetTransactionMethods(ctx context.Context, query FinanceGetTransactionMethodsParams, ...) (res *ListTransactionMethod, err error)
- func (r *FinanceService) GetTransactionTypes(ctx context.Context, query FinanceGetTransactionTypesParams, ...) (res *ListTransactionType, err error)
- type FindContactByEmailRequestParam
- type FindOrderDiscountByCodeRequestParam
- type Freight
- type FreightBillingType
- type FreightObject
- type FreightPolicy
- type FrozenAdherence
- type FulfillmentRecommendation
- type FulfillmentRecommendationCurrentPolicy
- type FulfillmentRecommendationObject
- type FulfillmentRecommendationReason
- type FulfillmentRecommendationRecommendedPolicy
- type GenerateProductionScheduleRequestDemandBasis
- type GenerateProductionScheduleRequestParam
- type Geolocation
- type GeolocationObject
- type IdentityAccountService
- type IdentityAccountUpdateFaviconResponse
- type IdentityAccountUserActionActivateResponse
- type IdentityAccountUserActionDisableResponse
- type IdentityAccountUserActionRemoveResponse
- type IdentityAccountUserActionService
- func (r *IdentityAccountUserActionService) Activate(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionActivateResponse, err error)
- func (r *IdentityAccountUserActionService) Disable(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionDisableResponse, err error)
- func (r *IdentityAccountUserActionService) Remove(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionRemoveResponse, err error)
- type IdentityAccountUserGetParams
- type IdentityAccountUserListParams
- type IdentityAccountUserListParamsRemovedScope
- type IdentityAccountUserListParamsRoleType
- type IdentityAccountUserNewParams
- type IdentityAccountUserService
- func (r *IdentityAccountUserService) Get(ctx context.Context, id string, query IdentityAccountUserGetParams, ...) (res *AccountUser, err error)
- func (r *IdentityAccountUserService) List(ctx context.Context, query IdentityAccountUserListParams, ...) (res *ListAccountUser, err error)
- func (r *IdentityAccountUserService) New(ctx context.Context, params IdentityAccountUserNewParams, ...) (res *AccountUser, err error)
- func (r *IdentityAccountUserService) Update(ctx context.Context, id string, params IdentityAccountUserUpdateParams, ...) (res *AccountUser, err error)
- type IdentityAccountUserUpdateParams
- type IdentityGetPermissionGroupsParams
- type IdentityRoleDeleteResponse
- type IdentityRoleGetParams
- type IdentityRoleListParams
- type IdentityRoleNewParams
- type IdentityRoleService
- func (r *IdentityRoleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityRoleDeleteResponse, err error)
- func (r *IdentityRoleService) Get(ctx context.Context, id string, query IdentityRoleGetParams, ...) (res *Role, err error)
- func (r *IdentityRoleService) List(ctx context.Context, query IdentityRoleListParams, ...) (res *ListRole, err error)
- func (r *IdentityRoleService) New(ctx context.Context, params IdentityRoleNewParams, ...) (res *Role, err error)
- func (r *IdentityRoleService) Update(ctx context.Context, id string, params IdentityRoleUpdateParams, ...) (res *Role, err error)
- type IdentityRoleUpdateParams
- type IdentityService
- type InventoryChangeLog
- type InventoryChangeLogActionType
- type InventoryChangeLogObject
- type IssueSalesOrderRequestParam
- type Item
- type ItemCategory
- type ItemCategoryObject
- type ItemCategoryType
- type ItemInventory
- type ItemInventoryObject
- type ItemLotDefault
- type ItemLotDefaultObject
- type ItemLotDefaultSource
- type ItemObject
- type ItemType
- type Job
- type JobExport
- type JobExportObject
- type JobObject
- type JobResourceType
- type JobResult
- type JobResultObject
- type JobResultStatus
- type JobStatus
- type JobType
- type ListAPIKey
- type ListAPIKeyObject
- type ListAccountGroup
- type ListAccountGroupObject
- type ListAccountIntegration
- type ListAccountIntegrationObject
- type ListAccountPrice
- type ListAccountPriceObject
- type ListAccountStatus
- type ListAccountStatusObject
- type ListAccountUser
- type ListAccountUserObject
- type ListActor
- type ListActorObject
- type ListAddress
- type ListAddressObject
- type ListAddressSuggestion
- type ListAddressSuggestionObject
- type ListAdjustmentType
- type ListAdjustmentTypeObject
- type ListAgentAction
- type ListAgentActionObject
- type ListAgentDefinition
- type ListAgentDefinitionObject
- type ListAgentDefinitionTool
- type ListAgentDefinitionToolObject
- type ListAgentMemory
- type ListAgentMemoryObject
- type ListAgentRun
- type ListAgentRunObject
- type ListAgentRunStep
- type ListAgentRunStepObject
- type ListAnnouncement
- type ListAnnouncementObject
- type ListAttainmentBucket
- type ListAttainmentBucketObject
- type ListAttribute
- type ListAttributeObject
- type ListAuditEvent
- type ListAuditEventObject
- type ListAuditFieldChange
- type ListAuditFieldChangeObject
- type ListAvailableTool
- type ListAvailableToolObject
- type ListCarrier
- type ListCarrierObject
- type ListConsumption
- type ListConsumptionObject
- type ListContactMatch
- type ListContactMatchObject
- type ListConversation
- type ListConversationLink
- type ListConversationLinkObject
- type ListConversationObject
- type ListConversationParticipant
- type ListConversationParticipantObject
- type ListCustomer
- type ListCustomerObject
- type ListDNSRecord
- type ListDNSRecordObject
- type ListDeliveryBacklogBucket
- type ListDeliveryBacklogBucketObject
- type ListDeliveryBreakdown
- type ListDeliveryBreakdownObject
- type ListDeliveryLatenessBucket
- type ListDeliveryLatenessBucketObject
- type ListDeliveryPerformance
- type ListDeliveryPerformanceObject
- type ListDemandOverride
- type ListDemandOverrideObject
- type ListDemandOverrideType
- type ListDemandOverrideTypeObject
- type ListDepartment
- type ListDepartmentObject
- type ListEmailDomain
- type ListEmailDomainObject
- type ListEmailInbox
- type ListEmailInboxObject
- type ListEmailLog
- type ListEmailLogObject
- type ListEntity
- type ListEntityObject
- type ListFrozenAdherence
- type ListFrozenAdherenceObject
- type ListFulfillmentRecommendation
- type ListFulfillmentRecommendationObject
- type ListInventoryChangeLog
- type ListInventoryChangeLogObject
- type ListItem
- type ListItemCategory
- type ListItemCategoryObject
- type ListItemObject
- type ListJobResult
- type ListJobResultObject
- type ListLocation
- type ListLocationObject
- type ListLocationType
- type ListLocationTypeObject
- type ListMachine
- type ListMachineDowntimeEvent
- type ListMachineDowntimeEventObject
- type ListMachineDowntimeReason
- type ListMachineDowntimeReasonObject
- type ListMachineObject
- type ListMachineStatus
- type ListMachineStatusObject
- type ListMaterial
- type ListMaterialObject
- type ListMessage
- type ListMessageAttachment
- type ListMessageAttachmentObject
- type ListMessageObject
- type ListMessagingBlock
- type ListMessagingBlockObject
- type ListMessagingGroup
- type ListMessagingGroupMember
- type ListMessagingGroupMemberObject
- type ListMessagingGroupObject
- type ListNotification
- type ListNotificationObject
- type ListNotificationPreference
- type ListNotificationPreferenceObject
- type ListNotificationUnreadSummaryAccount
- type ListNotificationUnreadSummaryAccountObject
- type ListObjectType
- type ListObjectTypeObject
- type ListOeeDepartment
- type ListOeeDepartmentObject
- type ListOeeDowntimeReason
- type ListOeeDowntimeReasonObject
- type ListOeeTrendPeriod
- type ListOeeTrendPeriodObject
- type ListOperatingCalendar
- type ListOperatingCalendarClosure
- type ListOperatingCalendarClosureObject
- type ListOperatingCalendarObject
- type ListOrderDiscount
- type ListOrderDiscountObject
- type ListPart
- type ListPartObject
- type ListPaymentTerm
- type ListPaymentTermObject
- type ListPermission
- type ListPermissionGroup
- type ListPermissionGroupObject
- type ListPermissionObject
- type ListPick
- type ListPickLine
- type ListPickLineObject
- type ListPickObject
- type ListPortalDomain
- type ListPortalDomainObject
- type ListPriority
- type ListPriorityObject
- type ListProduct
- type ListProductLine
- type ListProductLineObject
- type ListProductObject
- type ListProductionSchedule
- type ListProductionScheduleDerivedLine
- type ListProductionScheduleDerivedLineObject
- type ListProductionScheduleDeviation
- type ListProductionScheduleDeviationObject
- type ListProductionScheduleFinishedPolicy
- type ListProductionScheduleFinishedPolicyObject
- type ListProductionScheduleFinishingLine
- type ListProductionScheduleFinishingLineObject
- type ListProductionScheduleItemPolicy
- type ListProductionScheduleItemPolicyObject
- type ListProductionScheduleItemSetting
- type ListProductionScheduleItemSettingObject
- type ListProductionScheduleLine
- type ListProductionScheduleLineObject
- type ListProductionScheduleObject
- type ListProductionScheduleResourceSetting
- type ListProductionScheduleResourceSettingObject
- type ListProductionStep
- type ListProductionStepObject
- type ListProperty
- type ListPropertyObject
- type ListQuotedSalesOrderLine
- type ListQuotedSalesOrderLineObject
- type ListRateShopOption
- type ListRateShopOptionObject
- type ListReconcileErrorResult
- type ListReconcileErrorResultObject
- type ListReconciledItemResult
- type ListReconciledItemResultObject
- type ListRecord
- type ListRecordObject
- type ListReleaseScheduleBatch
- type ListReleaseScheduleBatchObject
- type ListReleasedScheduleLine
- type ListReleasedScheduleLineObject
- type ListRequestLog
- type ListRequestLogObject
- type ListRole
- type ListRoleObject
- type ListSalesOrder
- type ListSalesOrderLine
- type ListSalesOrderLineObject
- type ListSalesOrderObject
- type ListSalesOrderStatus
- type ListSalesOrderStatusObject
- type ListSalesTarget
- type ListSalesTargetObject
- type ListSandbox
- type ListSandboxObject
- type ListScanningStation
- type ListScanningStationObject
- type ListScheduleAppliedOverride
- type ListScheduleAppliedOverrideObject
- type ListScheduleAtRiskOrder
- type ListScheduleAtRiskOrderObject
- type ListScheduleCampaign
- type ListScheduleCampaignObject
- type ListScheduleDeviationType
- type ListScheduleDeviationTypeObject
- type ListScheduleDiffLine
- type ListScheduleDiffLineObject
- type ListScheduleOrderCoverage
- type ListScheduleOrderCoverageLine
- type ListScheduleOrderCoverageLineObject
- type ListScheduleOrderCoverageObject
- type ListSchedulePolicy
- type ListSchedulePolicyObject
- type ListScheduleProjection
- type ListScheduleProjectionObject
- type ListServiceLevel
- type ListServiceLevelObject
- type ListShippingTerm
- type ListShippingTermObject
- type ListSkippedItemResult
- type ListSkippedItemResultObject
- type ListToolGroup
- type ListToolGroupObject
- type ListTransactionMethod
- type ListTransactionMethodObject
- type ListTransactionType
- type ListTransactionTypeObject
- type ListUnit
- type ListUnitGroup
- type ListUnitGroupObject
- type ListUnitGroupUnit
- type ListUnitGroupUnitObject
- type ListUnitObject
- type ListVolumeDiscount
- type ListVolumeDiscountObject
- type ListVolumeDiscountTier
- type ListVolumeDiscountTierObject
- type Location
- type LocationObject
- type LocationType
- type LocationTypeCode
- type LocationTypeObject
- type Machine
- type MachineCampaign
- type MachineCampaignStatus
- type MachineDowntimeEvent
- type MachineDowntimeEventObject
- type MachineDowntimeEventSource
- type MachineDowntimeReason
- type MachineDowntimeReasonCode
- type MachineDowntimeReasonObject
- type MachineDowntimeReasonOeeBucket
- type MachineDowntimeReasonPlanningStatus
- type MachineDowntimeReasonSummary
- type MachineDowntimeReasonSummaryCode
- type MachineDowntimeReasonSummaryObject
- type MachineDowntimeReasonSummaryOeeBucket
- type MachineDowntimeSummary
- type MachineObject
- type MachineStatus
- type MachineStatusObject
- type MachineStatusStatus
- type MarkConversationReadRequestParam
- type Material
- type MaterialObject
- type MergeCustomersRequestParam
- type Message
- type MessageAgentErrorCode
- type MessageAttachment
- type MessageAttachmentInputKind
- type MessageAttachmentInputParam
- type MessageAttachmentKind
- type MessageAttachmentObject
- type MessageChannel
- type MessageKind
- type MessageObject
- type MessageStatus
- type MessageStreamingState
- type MessageVisibility
- type MessagingAnnouncementActionDismissParams
- type MessagingAnnouncementActionReadParams
- type MessagingAnnouncementActionSeenParams
- type MessagingAnnouncementActionService
- func (r *MessagingAnnouncementActionService) Dismiss(ctx context.Context, id string, body MessagingAnnouncementActionDismissParams, ...) (res *Announcement, err error)
- func (r *MessagingAnnouncementActionService) Read(ctx context.Context, id string, body MessagingAnnouncementActionReadParams, ...) (res *Announcement, err error)
- func (r *MessagingAnnouncementActionService) Seen(ctx context.Context, id string, body MessagingAnnouncementActionSeenParams, ...) (res *Announcement, err error)
- type MessagingAnnouncementGetParams
- type MessagingAnnouncementListParams
- type MessagingAnnouncementService
- type MessagingBlock
- type MessagingBlockDeleteResponse
- type MessagingBlockListParams
- type MessagingBlockNewParams
- type MessagingBlockObject
- type MessagingBlockService
- func (r *MessagingBlockService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingBlockDeleteResponse, err error)
- func (r *MessagingBlockService) List(ctx context.Context, query MessagingBlockListParams, ...) (res *ListMessagingBlock, err error)
- func (r *MessagingBlockService) New(ctx context.Context, params MessagingBlockNewParams, ...) (res *MessagingBlock, err error)
- type MessagingConversationActionArchiveParams
- type MessagingConversationActionAssignParams
- type MessagingConversationActionHideParams
- type MessagingConversationActionLeaveParams
- type MessagingConversationActionMuteParams
- type MessagingConversationActionReadParams
- type MessagingConversationActionRedactParams
- type MessagingConversationActionReportParams
- type MessagingConversationActionService
- func (r *MessagingConversationActionService) Archive(ctx context.Context, id string, body MessagingConversationActionArchiveParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Assign(ctx context.Context, id string, params MessagingConversationActionAssignParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Hide(ctx context.Context, id string, body MessagingConversationActionHideParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Leave(ctx context.Context, id string, body MessagingConversationActionLeaveParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Mute(ctx context.Context, id string, params MessagingConversationActionMuteParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Read(ctx context.Context, id string, params MessagingConversationActionReadParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Redact(ctx context.Context, id string, body MessagingConversationActionRedactParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Report(ctx context.Context, id string, params MessagingConversationActionReportParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) SetLegalHold(ctx context.Context, id string, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) SetStatus(ctx context.Context, id string, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Unarchive(ctx context.Context, id string, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Unhide(ctx context.Context, id string, body MessagingConversationActionUnhideParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationActionService) Unmute(ctx context.Context, id string, body MessagingConversationActionUnmuteParams, ...) (res *Conversation, err error)
- type MessagingConversationActionSetLegalHoldParams
- type MessagingConversationActionSetStatusParams
- type MessagingConversationActionUnarchiveParams
- type MessagingConversationActionUnhideParams
- type MessagingConversationActionUnmuteParams
- type MessagingConversationAttachmentActionService
- type MessagingConversationAttachmentActionUploadURLParams
- type MessagingConversationAttachmentService
- type MessagingConversationGetParams
- type MessagingConversationLinkDeleteParams
- type MessagingConversationLinkDeleteResponse
- type MessagingConversationLinkListParams
- type MessagingConversationLinkNewParams
- type MessagingConversationLinkService
- func (r *MessagingConversationLinkService) Delete(ctx context.Context, linkID string, body MessagingConversationLinkDeleteParams, ...) (res *MessagingConversationLinkDeleteResponse, err error)
- func (r *MessagingConversationLinkService) List(ctx context.Context, id string, query MessagingConversationLinkListParams, ...) (res *ListConversationLink, err error)
- func (r *MessagingConversationLinkService) New(ctx context.Context, id string, params MessagingConversationLinkNewParams, ...) (res *ConversationLink, err error)
- type MessagingConversationListParams
- type MessagingConversationListParamsAudience
- type MessagingConversationListParamsStatus
- type MessagingConversationListParamsTopicResourceType
- type MessagingConversationListParamsType
- type MessagingConversationListParamsWorkflowStatus
- type MessagingConversationMessageListParams
- type MessagingConversationMessageListParamsStatus
- type MessagingConversationMessageNewParams
- type MessagingConversationMessageService
- func (r *MessagingConversationMessageService) List(ctx context.Context, id string, query MessagingConversationMessageListParams, ...) (res *ListMessage, err error)
- func (r *MessagingConversationMessageService) New(ctx context.Context, id string, params MessagingConversationMessageNewParams, ...) (res *Message, err error)
- type MessagingConversationNewParams
- type MessagingConversationParticipantActionService
- type MessagingConversationParticipantActionSetRoleParams
- type MessagingConversationParticipantDeleteParams
- type MessagingConversationParticipantDeleteResponse
- type MessagingConversationParticipantNewParams
- type MessagingConversationParticipantService
- type MessagingConversationService
- func (r *MessagingConversationService) Get(ctx context.Context, id string, query MessagingConversationGetParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationService) List(ctx context.Context, query MessagingConversationListParams, ...) (res *ListConversation, err error)
- func (r *MessagingConversationService) New(ctx context.Context, params MessagingConversationNewParams, ...) (res *Conversation, err error)
- func (r *MessagingConversationService) Update(ctx context.Context, id string, params MessagingConversationUpdateParams, ...) (res *Conversation, err error)
- type MessagingConversationUpdateParams
- type MessagingEmailDomainActionService
- type MessagingEmailDomainDeleteResponse
- type MessagingEmailDomainNewParams
- type MessagingEmailDomainService
- func (r *MessagingEmailDomainService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingEmailDomainDeleteResponse, err error)
- func (r *MessagingEmailDomainService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *EmailDomain, err error)
- func (r *MessagingEmailDomainService) List(ctx context.Context, opts ...option.RequestOption) (res *ListEmailDomain, err error)
- func (r *MessagingEmailDomainService) New(ctx context.Context, body MessagingEmailDomainNewParams, ...) (res *EmailDomain, err error)
- type MessagingEmailInboxDeleteResponse
- type MessagingEmailInboxGetParams
- type MessagingEmailInboxListParams
- type MessagingEmailInboxNewParams
- type MessagingEmailInboxService
- func (r *MessagingEmailInboxService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingEmailInboxDeleteResponse, err error)
- func (r *MessagingEmailInboxService) Get(ctx context.Context, id string, query MessagingEmailInboxGetParams, ...) (res *EmailInbox, err error)
- func (r *MessagingEmailInboxService) List(ctx context.Context, query MessagingEmailInboxListParams, ...) (res *ListEmailInbox, err error)
- func (r *MessagingEmailInboxService) New(ctx context.Context, params MessagingEmailInboxNewParams, ...) (res *EmailInbox, err error)
- func (r *MessagingEmailInboxService) Update(ctx context.Context, id string, params MessagingEmailInboxUpdateParams, ...) (res *EmailInbox, err error)
- type MessagingEmailInboxUpdateParams
- type MessagingEmailSenderDeleteResponse
- type MessagingEmailSenderService
- func (r *MessagingEmailSenderService) Delete(ctx context.Context, opts ...option.RequestOption) (res *MessagingEmailSenderDeleteResponse, err error)
- func (r *MessagingEmailSenderService) List(ctx context.Context, opts ...option.RequestOption) (res *EmailSender, err error)
- func (r *MessagingEmailSenderService) Update(ctx context.Context, body MessagingEmailSenderUpdateParams, ...) (res *EmailSender, err error)
- type MessagingEmailSenderUpdateParams
- type MessagingGetContactsParams
- type MessagingGroup
- type MessagingGroupDeleteResponse
- type MessagingGroupMember
- type MessagingGroupMemberDeleteParams
- type MessagingGroupMemberNewParams
- type MessagingGroupMemberObject
- type MessagingGroupMemberService
- func (r *MessagingGroupMemberService) Delete(ctx context.Context, memberID string, body MessagingGroupMemberDeleteParams, ...) (res *MessagingGroup, err error)
- func (r *MessagingGroupMemberService) New(ctx context.Context, id string, body MessagingGroupMemberNewParams, ...) (res *MessagingGroup, err error)
- type MessagingGroupNewParams
- type MessagingGroupObject
- type MessagingGroupService
- func (r *MessagingGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingGroupDeleteResponse, err error)
- func (r *MessagingGroupService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingGroup, err error)
- func (r *MessagingGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *ListMessagingGroup, err error)
- func (r *MessagingGroupService) New(ctx context.Context, body MessagingGroupNewParams, ...) (res *MessagingGroup, err error)
- func (r *MessagingGroupService) Update(ctx context.Context, id string, body MessagingGroupUpdateParams, ...) (res *MessagingGroup, err error)
- type MessagingGroupUpdateParams
- type MessagingMessageActionApproveSendParams
- type MessagingMessageActionCancelParams
- type MessagingMessageActionRejectParams
- type MessagingMessageActionService
- func (r *MessagingMessageActionService) ApproveSend(ctx context.Context, id string, params MessagingMessageActionApproveSendParams, ...) (res *Message, err error)
- func (r *MessagingMessageActionService) Cancel(ctx context.Context, id string, body MessagingMessageActionCancelParams, ...) (res *Message, err error)
- func (r *MessagingMessageActionService) Reject(ctx context.Context, id string, body MessagingMessageActionRejectParams, ...) (res *Message, err error)
- type MessagingMessageService
- type MessagingMessageUpdateParams
- type MessagingNotificationActionDismissParams
- type MessagingNotificationActionMarkAllSeenResponse
- type MessagingNotificationActionReadParams
- type MessagingNotificationActionSeenParams
- type MessagingNotificationActionService
- func (r *MessagingNotificationActionService) Dismiss(ctx context.Context, id string, body MessagingNotificationActionDismissParams, ...) (res *Notification, err error)
- func (r *MessagingNotificationActionService) MarkAllSeen(ctx context.Context, opts ...option.RequestOption) (res *MessagingNotificationActionMarkAllSeenResponse, err error)
- func (r *MessagingNotificationActionService) Read(ctx context.Context, id string, body MessagingNotificationActionReadParams, ...) (res *Notification, err error)
- func (r *MessagingNotificationActionService) Seen(ctx context.Context, id string, body MessagingNotificationActionSeenParams, ...) (res *Notification, err error)
- type MessagingNotificationGetParams
- type MessagingNotificationListParams
- type MessagingNotificationListParamsCategory
- type MessagingNotificationListParamsStatus
- type MessagingNotificationNewParams
- type MessagingNotificationService
- func (r *MessagingNotificationService) Get(ctx context.Context, id string, query MessagingNotificationGetParams, ...) (res *Notification, err error)
- func (r *MessagingNotificationService) GetUnreadCount(ctx context.Context, opts ...option.RequestOption) (res *NotificationUnreadCount, err error)
- func (r *MessagingNotificationService) GetUnreadSummary(ctx context.Context, opts ...option.RequestOption) (res *NotificationUnreadSummary, err error)
- func (r *MessagingNotificationService) List(ctx context.Context, query MessagingNotificationListParams, ...) (res *ListNotification, err error)
- func (r *MessagingNotificationService) New(ctx context.Context, body MessagingNotificationNewParams, ...) (res *NotificationSendResult, err error)
- type MessagingPreferenceService
- type MessagingPreferenceUpdateParams
- type MessagingService
- type MuteConversationRequestParam
- type Notification
- type NotificationCategory
- type NotificationObject
- type NotificationPreference
- type NotificationPreferenceCategory
- type NotificationPreferenceDigest
- type NotificationPreferenceItemNotificationType
- type NotificationPreferenceItemParam
- type NotificationPreferenceObject
- type NotificationPriority
- type NotificationSendResult
- type NotificationSendResultObject
- type NotificationStatus
- type NotificationTargetInputParam
- type NotificationTargetInputType
- type NotificationUnreadCount
- type NotificationUnreadCountObject
- type NotificationUnreadSummary
- type NotificationUnreadSummaryAccount
- type NotificationUnreadSummaryAccountObject
- type NotificationUnreadSummaryObject
- type ObjectIdentifierParam
- type OeeDepartment
- type OeeDepartmentMeasurementStatus
- type OeeDepartmentPlannedTimeParam
- type OeeDowntimeReason
- type OeeDowntimeReasonOeeBucket
- type OeeDowntimeReasonReason
- type OeeTrendPeriod
- type OeeTrendPeriodMeasurementStatus
- type OperatingCalendar
- type OperatingCalendarClosure
- type OperatingCalendarClosureObject
- type OperatingCalendarKind
- type OperatingCalendarObject
- type OperationCarrierDeleteResponse
- type OperationCarrierGetParams
- type OperationCarrierListParams
- type OperationCarrierNewParams
- type OperationCarrierService
- func (r *OperationCarrierService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationCarrierDeleteResponse, err error)
- func (r *OperationCarrierService) Get(ctx context.Context, id string, query OperationCarrierGetParams, ...) (res *Carrier, err error)
- func (r *OperationCarrierService) List(ctx context.Context, query OperationCarrierListParams, ...) (res *ListCarrier, err error)
- func (r *OperationCarrierService) New(ctx context.Context, params OperationCarrierNewParams, ...) (res *Carrier, err error)
- func (r *OperationCarrierService) Update(ctx context.Context, id string, params OperationCarrierUpdateParams, ...) (res *Carrier, err error)
- type OperationCarrierServiceLevelDeleteParams
- type OperationCarrierServiceLevelDeleteResponse
- type OperationCarrierServiceLevelGetParams
- type OperationCarrierServiceLevelListParams
- type OperationCarrierServiceLevelNewParams
- type OperationCarrierServiceLevelService
- func (r *OperationCarrierServiceLevelService) Delete(ctx context.Context, id string, body OperationCarrierServiceLevelDeleteParams, ...) (res *OperationCarrierServiceLevelDeleteResponse, err error)
- func (r *OperationCarrierServiceLevelService) Get(ctx context.Context, id string, params OperationCarrierServiceLevelGetParams, ...) (res *ServiceLevel, err error)
- func (r *OperationCarrierServiceLevelService) List(ctx context.Context, carrierID string, ...) (res *ListServiceLevel, err error)
- func (r *OperationCarrierServiceLevelService) New(ctx context.Context, carrierID string, ...) (res *ServiceLevel, err error)
- func (r *OperationCarrierServiceLevelService) Update(ctx context.Context, id string, ...) (res *ServiceLevel, err error)
- type OperationCarrierServiceLevelUpdateParams
- type OperationCarrierUpdateParams
- type OperationDemandOverrideDeleteResponse
- type OperationDemandOverrideGetParams
- type OperationDemandOverrideListParams
- type OperationDemandOverrideNewParams
- type OperationDemandOverrideService
- func (r *OperationDemandOverrideService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationDemandOverrideDeleteResponse, err error)
- func (r *OperationDemandOverrideService) Get(ctx context.Context, id string, query OperationDemandOverrideGetParams, ...) (res *DemandOverride, err error)
- func (r *OperationDemandOverrideService) List(ctx context.Context, query OperationDemandOverrideListParams, ...) (res *ListDemandOverride, err error)
- func (r *OperationDemandOverrideService) New(ctx context.Context, params OperationDemandOverrideNewParams, ...) (res *DemandOverride, err error)
- func (r *OperationDemandOverrideService) Update(ctx context.Context, id string, params OperationDemandOverrideUpdateParams, ...) (res *DemandOverride, err error)
- type OperationDemandOverrideUpdateParams
- type OperationDepartmentDeleteResponse
- type OperationDepartmentGetParams
- type OperationDepartmentListParams
- type OperationDepartmentNewParams
- type OperationDepartmentService
- func (r *OperationDepartmentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationDepartmentDeleteResponse, err error)
- func (r *OperationDepartmentService) Get(ctx context.Context, id string, query OperationDepartmentGetParams, ...) (res *Department, err error)
- func (r *OperationDepartmentService) List(ctx context.Context, query OperationDepartmentListParams, ...) (res *ListDepartment, err error)
- func (r *OperationDepartmentService) New(ctx context.Context, params OperationDepartmentNewParams, ...) (res *Department, err error)
- func (r *OperationDepartmentService) Update(ctx context.Context, id string, params OperationDepartmentUpdateParams, ...) (res *Department, err error)
- type OperationDepartmentUpdateParams
- type OperationFulfillmentRecommendationActionApplyParams
- type OperationFulfillmentRecommendationActionService
- type OperationFulfillmentRecommendationService
- type OperationGetMachineStatusParams
- type OperationInventoryChangeLogActionExportParams
- type OperationInventoryChangeLogActionService
- type OperationInventoryChangeLogGetParams
- type OperationInventoryChangeLogListParams
- type OperationInventoryChangeLogService
- func (r *OperationInventoryChangeLogService) Get(ctx context.Context, id string, query OperationInventoryChangeLogGetParams, ...) (res *InventoryChangeLog, err error)
- func (r *OperationInventoryChangeLogService) List(ctx context.Context, query OperationInventoryChangeLogListParams, ...) (res *ListInventoryChangeLog, err error)
- type OperationLocationActionBulkUpsertParams
- type OperationLocationActionService
- type OperationLocationDeleteResponse
- type OperationLocationGetParams
- type OperationLocationListParams
- type OperationLocationNewParams
- type OperationLocationService
- func (r *OperationLocationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationLocationDeleteResponse, err error)
- func (r *OperationLocationService) Get(ctx context.Context, id string, query OperationLocationGetParams, ...) (res *Location, err error)
- func (r *OperationLocationService) List(ctx context.Context, query OperationLocationListParams, ...) (res *ListLocation, err error)
- func (r *OperationLocationService) New(ctx context.Context, params OperationLocationNewParams, ...) (res *Location, err error)
- func (r *OperationLocationService) Update(ctx context.Context, id string, params OperationLocationUpdateParams, ...) (res *Location, err error)
- type OperationLocationTypeListParams
- type OperationLocationTypeService
- type OperationLocationUpdateParams
- type OperationMachineDeleteResponse
- type OperationMachineDowntimeEventDeleteResponse
- type OperationMachineDowntimeEventGetParams
- type OperationMachineDowntimeEventListParams
- type OperationMachineDowntimeEventNewParams
- type OperationMachineDowntimeEventService
- func (r *OperationMachineDowntimeEventService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationMachineDowntimeEventDeleteResponse, err error)
- func (r *OperationMachineDowntimeEventService) Get(ctx context.Context, id string, query OperationMachineDowntimeEventGetParams, ...) (res *MachineDowntimeEvent, err error)
- func (r *OperationMachineDowntimeEventService) List(ctx context.Context, query OperationMachineDowntimeEventListParams, ...) (res *ListMachineDowntimeEvent, err error)
- func (r *OperationMachineDowntimeEventService) New(ctx context.Context, params OperationMachineDowntimeEventNewParams, ...) (res *MachineDowntimeEvent, err error)
- func (r *OperationMachineDowntimeEventService) Update(ctx context.Context, id string, ...) (res *MachineDowntimeEvent, err error)
- type OperationMachineDowntimeEventUpdateParams
- type OperationMachineGetParams
- type OperationMachineListParams
- type OperationMachineNewParams
- type OperationMachineService
- func (r *OperationMachineService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationMachineDeleteResponse, err error)
- func (r *OperationMachineService) Get(ctx context.Context, id string, query OperationMachineGetParams, ...) (res *Machine, err error)
- func (r *OperationMachineService) List(ctx context.Context, query OperationMachineListParams, ...) (res *ListMachine, err error)
- func (r *OperationMachineService) New(ctx context.Context, params OperationMachineNewParams, ...) (res *Machine, err error)
- func (r *OperationMachineService) Update(ctx context.Context, id string, params OperationMachineUpdateParams, ...) (res *Machine, err error)
- type OperationMachineUpdateParams
- type OperationOperatingCalendarClosureDeleteParams
- type OperationOperatingCalendarClosureDeleteResponse
- type OperationOperatingCalendarClosureListParams
- type OperationOperatingCalendarClosureNewParams
- type OperationOperatingCalendarClosureService
- func (r *OperationOperatingCalendarClosureService) Delete(ctx context.Context, closureID string, ...) (res *OperationOperatingCalendarClosureDeleteResponse, err error)
- func (r *OperationOperatingCalendarClosureService) List(ctx context.Context, id string, ...) (res *ListOperatingCalendarClosure, err error)
- func (r *OperationOperatingCalendarClosureService) New(ctx context.Context, id string, ...) (res *OperatingCalendarClosure, err error)
- type OperationOperatingCalendarDeleteResponse
- type OperationOperatingCalendarListParams
- type OperationOperatingCalendarListParamsKind
- type OperationOperatingCalendarNewParams
- type OperationOperatingCalendarService
- func (r *OperationOperatingCalendarService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationOperatingCalendarDeleteResponse, err error)
- func (r *OperationOperatingCalendarService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OperatingCalendar, err error)
- func (r *OperationOperatingCalendarService) List(ctx context.Context, query OperationOperatingCalendarListParams, ...) (res *ListOperatingCalendar, err error)
- func (r *OperationOperatingCalendarService) New(ctx context.Context, body OperationOperatingCalendarNewParams, ...) (res *OperatingCalendar, err error)
- func (r *OperationOperatingCalendarService) Update(ctx context.Context, id string, body OperationOperatingCalendarUpdateParams, ...) (res *OperatingCalendar, err error)
- type OperationOperatingCalendarUpdateParams
- type OperationPickActionPackParams
- type OperationPickActionService
- func (r *OperationPickActionService) Pack(ctx context.Context, id string, params OperationPickActionPackParams, ...) (res *Job, err error)
- func (r *OperationPickActionService) Pick(ctx context.Context, id string, opts ...option.RequestOption) (res *Pick, err error)
- func (r *OperationPickActionService) Void(ctx context.Context, id string, opts ...option.RequestOption) (res *Pick, err error)
- type OperationPickGetParams
- type OperationPickLineActionPickParams
- type OperationPickLineActionService
- type OperationPickLineActionVoidParams
- type OperationPickLineService
- type OperationPickLineUpdateParams
- type OperationPickListParams
- type OperationPickListParamsSort
- type OperationPickListParamsStatus
- type OperationPickService
- type OperationProductionScheduleActionPreviewParams
- type OperationProductionScheduleActionPreviewRegenerateParams
- type OperationProductionScheduleActionRegenerateParams
- type OperationProductionScheduleActionReleaseWeekParams
- type OperationProductionScheduleActionService
- func (r *OperationProductionScheduleActionService) Archive(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
- func (r *OperationProductionScheduleActionService) Preview(ctx context.Context, body OperationProductionScheduleActionPreviewParams, ...) (res *ProductionSchedulePreview, err error)
- func (r *OperationProductionScheduleActionService) PreviewRegenerate(ctx context.Context, id string, ...) (res *ProductionScheduleRegeneratePreview, err error)
- func (r *OperationProductionScheduleActionService) Publish(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
- func (r *OperationProductionScheduleActionService) Regenerate(ctx context.Context, id string, ...) (res *ProductionSchedule, err error)
- func (r *OperationProductionScheduleActionService) ReleaseWeek(ctx context.Context, id string, ...) (res *ReleaseScheduleWeekResult, err error)
- type OperationProductionScheduleDeleteResponse
- type OperationProductionScheduleGetDerivedLinesParams
- type OperationProductionScheduleGetDeviationsParams
- type OperationProductionScheduleGetFinishingLinesParams
- type OperationProductionScheduleGetWeekReleasePreviewParams
- type OperationProductionScheduleLineDeleteParams
- type OperationProductionScheduleLineDeleteParamsReason
- type OperationProductionScheduleLineDeleteResponse
- type OperationProductionScheduleLineListParams
- type OperationProductionScheduleLineNewParams
- type OperationProductionScheduleLineService
- func (r *OperationProductionScheduleLineService) Delete(ctx context.Context, lineID string, ...) (res *OperationProductionScheduleLineDeleteResponse, err error)
- func (r *OperationProductionScheduleLineService) List(ctx context.Context, id string, ...) (res *ListProductionScheduleLine, err error)
- func (r *OperationProductionScheduleLineService) New(ctx context.Context, id string, body OperationProductionScheduleLineNewParams, ...) (res *ProductionScheduleLine, err error)
- func (r *OperationProductionScheduleLineService) Update(ctx context.Context, lineID string, ...) (res *ProductionScheduleLine, err error)
- type OperationProductionScheduleLineUpdateParams
- type OperationProductionScheduleListParams
- type OperationProductionScheduleNewParams
- type OperationProductionScheduleService
- func (r *OperationProductionScheduleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationProductionScheduleDeleteResponse, err error)
- func (r *OperationProductionScheduleService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
- func (r *OperationProductionScheduleService) GetAtRiskOrders(ctx context.Context, id string, opts ...option.RequestOption) (res *ListScheduleOrderCoverage, err error)
- func (r *OperationProductionScheduleService) GetCurrent(ctx context.Context, opts ...option.RequestOption) (res *ProductionSchedule, err error)
- func (r *OperationProductionScheduleService) GetDerivedLines(ctx context.Context, id string, ...) (res *ListProductionScheduleDerivedLine, err error)
- func (r *OperationProductionScheduleService) GetDeviations(ctx context.Context, id string, ...) (res *ListProductionScheduleDeviation, err error)
- func (r *OperationProductionScheduleService) GetFinishedPolicies(ctx context.Context, id string, opts ...option.RequestOption) (res *ListProductionScheduleFinishedPolicy, err error)
- func (r *OperationProductionScheduleService) GetFinishingLines(ctx context.Context, id string, ...) (res *ListProductionScheduleFinishingLine, err error)
- func (r *OperationProductionScheduleService) GetItemPolicies(ctx context.Context, id string, opts ...option.RequestOption) (res *ListProductionScheduleItemPolicy, err error)
- func (r *OperationProductionScheduleService) GetWeekReleasePreview(ctx context.Context, id string, ...) (res *ReleaseScheduleWeekPreview, err error)
- func (r *OperationProductionScheduleService) List(ctx context.Context, query OperationProductionScheduleListParams, ...) (res *ListProductionSchedule, err error)
- func (r *OperationProductionScheduleService) New(ctx context.Context, body OperationProductionScheduleNewParams, ...) (res *ProductionSchedule, err error)
- type OperationProductionScheduleSettingItemDeleteResponse
- type OperationProductionScheduleSettingItemService
- func (r *OperationProductionScheduleSettingItemService) Delete(ctx context.Context, itemID string, opts ...option.RequestOption) (res *OperationProductionScheduleSettingItemDeleteResponse, err error)
- func (r *OperationProductionScheduleSettingItemService) Get(ctx context.Context, itemID string, opts ...option.RequestOption) (res *ProductionScheduleItemSetting, err error)
- func (r *OperationProductionScheduleSettingItemService) List(ctx context.Context, opts ...option.RequestOption) (res *ListProductionScheduleItemSetting, err error)
- func (r *OperationProductionScheduleSettingItemService) Update(ctx context.Context, itemID string, ...) (res *ProductionScheduleItemSetting, err error)
- type OperationProductionScheduleSettingItemUpdateParams
- type OperationProductionScheduleSettingResourceDeleteResponse
- type OperationProductionScheduleSettingResourceService
- func (r *OperationProductionScheduleSettingResourceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationProductionScheduleSettingResourceDeleteResponse, err error)
- func (r *OperationProductionScheduleSettingResourceService) List(ctx context.Context, opts ...option.RequestOption) (res *ListProductionScheduleResourceSetting, err error)
- func (r *OperationProductionScheduleSettingResourceService) Update(ctx context.Context, ...) (res *ProductionScheduleResourceSetting, err error)
- type OperationProductionScheduleSettingResourceUpdateParams
- type OperationProductionScheduleSettingService
- func (r *OperationProductionScheduleSettingService) List(ctx context.Context, opts ...option.RequestOption) (res *ProductionScheduleSettings, err error)
- func (r *OperationProductionScheduleSettingService) Update(ctx context.Context, body OperationProductionScheduleSettingUpdateParams, ...) (res *ProductionScheduleSettings, err error)
- type OperationProductionScheduleSettingUpdateParams
- type OperationScanningStationDeleteResponse
- type OperationScanningStationGetParams
- type OperationScanningStationListParams
- type OperationScanningStationNewParams
- type OperationScanningStationService
- func (r *OperationScanningStationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationScanningStationDeleteResponse, err error)
- func (r *OperationScanningStationService) Get(ctx context.Context, id string, query OperationScanningStationGetParams, ...) (res *ScanningStation, err error)
- func (r *OperationScanningStationService) List(ctx context.Context, query OperationScanningStationListParams, ...) (res *ListScanningStation, err error)
- func (r *OperationScanningStationService) New(ctx context.Context, params OperationScanningStationNewParams, ...) (res *ScanningStation, err error)
- func (r *OperationScanningStationService) Update(ctx context.Context, id string, params OperationScanningStationUpdateParams, ...) (res *ScanningStation, err error)
- type OperationScanningStationUpdateParams
- type OperationService
- func (r *OperationService) GetDemandOverrideTypes(ctx context.Context, opts ...option.RequestOption) (res *ListDemandOverrideType, err error)
- func (r *OperationService) GetMachineDowntimeReasons(ctx context.Context, opts ...option.RequestOption) (res *ListMachineDowntimeReason, err error)
- func (r *OperationService) GetMachineStatus(ctx context.Context, query OperationGetMachineStatusParams, ...) (res *ListMachineStatus, err error)
- func (r *OperationService) GetScheduleDeviationTypes(ctx context.Context, opts ...option.RequestOption) (res *ListScheduleDeviationType, err error)
- type OperationShipmentActionRateShopParams
- type OperationShipmentActionService
- type OperationShipmentService
- type OperationShippingTermDeleteResponse
- type OperationShippingTermGetParams
- type OperationShippingTermListParams
- type OperationShippingTermNewParams
- type OperationShippingTermService
- func (r *OperationShippingTermService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationShippingTermDeleteResponse, err error)
- func (r *OperationShippingTermService) Get(ctx context.Context, id string, query OperationShippingTermGetParams, ...) (res *ShippingTerm, err error)
- func (r *OperationShippingTermService) List(ctx context.Context, query OperationShippingTermListParams, ...) (res *ListShippingTerm, err error)
- func (r *OperationShippingTermService) New(ctx context.Context, params OperationShippingTermNewParams, ...) (res *ShippingTerm, err error)
- func (r *OperationShippingTermService) Update(ctx context.Context, id string, params OperationShippingTermUpdateParams, ...) (res *ShippingTerm, err error)
- type OperationShippingTermUpdateParams
- type OrderContact
- type OrderContactObject
- type OrderDiscount
- type OrderDiscountDiscountType
- type OrderDiscountObject
- type Owner
- type OwnerObject
- type OwnerType
- type PackPickRequestParam
- type PageInfo
- type ParcelInputParam
- type Part
- type PartObject
- type PaymentTerm
- type PaymentTermObject
- type PaymentTermStatus
- type Permission
- type PermissionGroup
- type PermissionGroupObject
- type PermissionObject
- type Pick
- type PickLine
- type PickLineObject
- type PickObject
- type PickPriority
- type PickRelated
- type PickRelatedObject
- type PickStageTotal
- type PickStageTotalObject
- type PickTotals
- type PickTotalsObject
- type PortalDomain
- type PortalDomainObject
- type PortalDomainStatus
- type PreviewProductionScheduleRequestDemandBasis
- type PreviewProductionScheduleRequestParam
- type PreviewRegenerateProductionScheduleRequestDemandBasis
- type PreviewRegenerateProductionScheduleRequestParam
- type Priority
- type PriorityCode
- type PriorityObject
- type Product
- type ProductLine
- type ProductLineCommissionPolicy
- type ProductLineFreightPolicy
- type ProductLineFulfillmentPolicy
- type ProductLineObject
- type ProductObject
- type ProductPortalVisibility
- type ProductType
- type ProductionOutput
- type ProductionOutputObject
- type ProductionRun
- type ProductionRunObject
- type ProductionSchedule
- type ProductionScheduleDemandBasis
- type ProductionScheduleDerivedLine
- type ProductionScheduleDerivedLineObject
- type ProductionScheduleDerivedLineStatus
- type ProductionScheduleDeviation
- type ProductionScheduleDeviationDeviationType
- type ProductionScheduleDeviationFreezeStatus
- type ProductionScheduleDeviationObject
- type ProductionScheduleDeviationReason
- type ProductionScheduleFinishedPolicy
- type ProductionScheduleFinishedPolicyObject
- type ProductionScheduleFinishingLine
- type ProductionScheduleFinishingLineObject
- type ProductionScheduleFinishingLineSource
- type ProductionScheduleFinishingLineStatus
- type ProductionScheduleGenerationSource
- type ProductionScheduleItemPolicy
- type ProductionScheduleItemPolicyAbcClass
- type ProductionScheduleItemPolicyFulfillmentPolicy
- type ProductionScheduleItemPolicyObject
- type ProductionScheduleItemPolicyPolicySource
- type ProductionScheduleItemSetting
- type ProductionScheduleItemSettingFulfillmentPolicy
- type ProductionScheduleItemSettingObject
- type ProductionScheduleItemSettingParticipationStatus
- type ProductionScheduleLine
- type ProductionScheduleLineFreezeStatus
- type ProductionScheduleLineObject
- type ProductionScheduleLineReason
- type ProductionScheduleLineSource
- type ProductionScheduleLineStatus
- type ProductionScheduleObject
- type ProductionSchedulePreview
- type ProductionSchedulePreviewObject
- type ProductionScheduleRegeneratePreview
- type ProductionScheduleRegeneratePreviewObject
- type ProductionScheduleResourceSetting
- type ProductionScheduleResourceSettingObject
- type ProductionScheduleResourceSettingParticipationStatus
- type ProductionScheduleResourceSettingScopeType
- type ProductionScheduleSettings
- type ProductionScheduleSettingsAutoPublishStatus
- type ProductionScheduleSettingsCadenceStatus
- type ProductionScheduleSettingsDefaultFulfillmentPolicy
- type ProductionScheduleSettingsDemandBasis
- type ProductionScheduleSettingsObject
- type ProductionScheduleSettingsSettingsStatus
- type ProductionScheduleStatus
- type ProductionStep
- type ProductionStepObject
- type Property
- type PropertyObject
- type Quantity
- type QuantityInputParam
- type QuantityInputRequestParam
- type QuantityObject
- type QuotaInfo
- type QuoteSalesOrderCommitmentRequestParam
- type QuoteSalesOrderCommitmentResponse
- type QuoteSalesOrderCommitmentResponseObject
- type QuoteSalesOrderFreightResponse
- type QuoteSalesOrderFreightResponseObject
- type QuoteSalesOrderLineInputParam
- type QuoteSalesOrderPricesRequestParam
- type QuoteSalesOrderPricesResponse
- type QuoteSalesOrderPricesResponseObject
- type QuotedSalesOrderLine
- type QuotedSalesOrderLineObject
- type Rate
- type RateInputParam
- type RateObject
- type RateShopOption
- type RateShopOptionObject
- type RateShopRequestParam
- type RateShopResult
- type RateShopResultExemptionType
- type RateShopResultObject
- type ReadCursor
- type ReadCursorObject
- type ReconcileErrorResult
- type ReconcileErrorResultObject
- type ReconciledItemResult
- type ReconciledItemResultObject
- type Record
- type RecordObject
- type RecordType
- type RegenerateProductionScheduleRequestDemandBasis
- type RegenerateProductionScheduleRequestMergeMode
- type RegenerateProductionScheduleRequestParam
- type ReleaseProductionScheduleWeekRequestParam
- type ReleaseScheduleBatch
- type ReleaseScheduleWeekPreview
- type ReleaseScheduleWeekPreviewObject
- type ReleaseScheduleWeekResult
- type ReleaseScheduleWeekResultObject
- type ReleasedScheduleLine
- type ReorderSalesOrderLinesRequestParam
- type ReportConversationRequestParam
- type RequestLog
- type RequestLogErrorCode
- type RequestLogMethod
- type RequestLogObject
- type ResponseError
- type ResponseErrorCode
- type ResponseErrorType
- type Role
- type RoleObject
- type RoleType
- type RotateAPIKeyRequestParam
- type SaleAccountGroupDeleteResponse
- type SaleAccountGroupListParams
- type SaleAccountGroupListParamsType
- type SaleAccountGroupNewParams
- type SaleAccountGroupService
- func (r *SaleAccountGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAccountGroupDeleteResponse, err error)
- func (r *SaleAccountGroupService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGroup, err error)
- func (r *SaleAccountGroupService) List(ctx context.Context, query SaleAccountGroupListParams, ...) (res *ListAccountGroup, err error)
- func (r *SaleAccountGroupService) New(ctx context.Context, body SaleAccountGroupNewParams, ...) (res *AccountGroup, err error)
- func (r *SaleAccountGroupService) Update(ctx context.Context, id string, body SaleAccountGroupUpdateParams, ...) (res *AccountGroup, err error)
- type SaleAccountGroupUpdateParams
- type SaleAccountPriceActionExportPriceListParams
- type SaleAccountPriceActionService
- type SaleAccountPriceDeleteResponse
- type SaleAccountPriceGetParams
- type SaleAccountPriceListParams
- type SaleAccountPriceNewParams
- type SaleAccountPriceService
- func (r *SaleAccountPriceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAccountPriceDeleteResponse, err error)
- func (r *SaleAccountPriceService) Get(ctx context.Context, id string, query SaleAccountPriceGetParams, ...) (res *AccountPrice, err error)
- func (r *SaleAccountPriceService) List(ctx context.Context, query SaleAccountPriceListParams, ...) (res *ListAccountPrice, err error)
- func (r *SaleAccountPriceService) New(ctx context.Context, params SaleAccountPriceNewParams, ...) (res *AccountPrice, err error)
- func (r *SaleAccountPriceService) Update(ctx context.Context, id string, params SaleAccountPriceUpdateParams, ...) (res *AccountPrice, err error)
- type SaleAccountPriceUpdateParams
- type SaleAccountStatusGetParams
- type SaleAccountStatusListParams
- type SaleAccountStatusService
- type SaleAccountUserSalesTargetListParams
- type SaleAccountUserSalesTargetNewParams
- type SaleAccountUserSalesTargetService
- func (r *SaleAccountUserSalesTargetService) List(ctx context.Context, id string, query SaleAccountUserSalesTargetListParams, ...) (res *ListSalesTarget, err error)
- func (r *SaleAccountUserSalesTargetService) New(ctx context.Context, id string, body SaleAccountUserSalesTargetNewParams, ...) (res *SalesTarget, err error)
- func (r *SaleAccountUserSalesTargetService) Update(ctx context.Context, targetID string, ...) (res *SalesTarget, err error)
- type SaleAccountUserSalesTargetUpdateParams
- type SaleAccountUserService
- type SaleAddressDeleteResponse
- type SaleAddressListParams
- type SaleAddressListParamsType
- type SaleAddressNewParams
- type SaleAddressService
- func (r *SaleAddressService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAddressDeleteResponse, err error)
- func (r *SaleAddressService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Address, err error)
- func (r *SaleAddressService) List(ctx context.Context, query SaleAddressListParams, opts ...option.RequestOption) (res *ListAddress, err error)
- func (r *SaleAddressService) New(ctx context.Context, body SaleAddressNewParams, opts ...option.RequestOption) (res *Address, err error)
- func (r *SaleAddressService) Update(ctx context.Context, id string, body SaleAddressUpdateParams, ...) (res *Address, err error)
- type SaleAddressUpdateParams
- type SaleContactActionFindByEmailParams
- type SaleContactActionService
- type SaleContactService
- type SaleCustomerActionMergeParams
- type SaleCustomerActionService
- type SaleCustomerDeleteResponse
- type SaleCustomerGetLeadTimeParams
- type SaleCustomerGetParams
- type SaleCustomerListParams
- type SaleCustomerListParamsParentAccountStatus
- type SaleCustomerNewParams
- type SaleCustomerService
- func (r *SaleCustomerService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleCustomerDeleteResponse, err error)
- func (r *SaleCustomerService) Get(ctx context.Context, id string, query SaleCustomerGetParams, ...) (res *Customer, err error)
- func (r *SaleCustomerService) GetLeadTime(ctx context.Context, id string, query SaleCustomerGetLeadTimeParams, ...) (res *CustomerLeadTime, err error)
- func (r *SaleCustomerService) List(ctx context.Context, query SaleCustomerListParams, ...) (res *ListCustomer, err error)
- func (r *SaleCustomerService) New(ctx context.Context, params SaleCustomerNewParams, ...) (res *Customer, err error)
- func (r *SaleCustomerService) Update(ctx context.Context, id string, params SaleCustomerUpdateParams, ...) (res *Customer, err error)
- type SaleCustomerUpdateParams
- type SaleOrderDiscountActionFindByCodeParams
- type SaleOrderDiscountActionService
- type SaleOrderDiscountListParams
- type SaleOrderDiscountNewParams
- type SaleOrderDiscountService
- func (r *SaleOrderDiscountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderDiscount, err error)
- func (r *SaleOrderDiscountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderDiscount, err error)
- func (r *SaleOrderDiscountService) List(ctx context.Context, query SaleOrderDiscountListParams, ...) (res *ListOrderDiscount, err error)
- func (r *SaleOrderDiscountService) New(ctx context.Context, body SaleOrderDiscountNewParams, ...) (res *OrderDiscount, err error)
- func (r *SaleOrderDiscountService) Update(ctx context.Context, id string, body SaleOrderDiscountUpdateParams, ...) (res *OrderDiscount, err error)
- type SaleOrderDiscountUpdateParams
- type SalePriorityGetParams
- type SalePriorityListParams
- type SalePriorityService
- type SaleSalesOrderActionBulkDeleteParams
- type SaleSalesOrderActionBulkDeleteResponse
- type SaleSalesOrderActionIssueParams
- type SaleSalesOrderActionNewProductionRunParams
- type SaleSalesOrderActionQuoteCommitmentParams
- type SaleSalesOrderActionService
- func (r *SaleSalesOrderActionService) BulkDelete(ctx context.Context, body SaleSalesOrderActionBulkDeleteParams, ...) (res *SaleSalesOrderActionBulkDeleteResponse, err error)
- func (r *SaleSalesOrderActionService) Close(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
- func (r *SaleSalesOrderActionService) Issue(ctx context.Context, id string, body SaleSalesOrderActionIssueParams, ...) (res *SalesOrder, err error)
- func (r *SaleSalesOrderActionService) NewProductionRun(ctx context.Context, id string, ...) (res *ProductionRun, err error)
- func (r *SaleSalesOrderActionService) Open(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
- func (r *SaleSalesOrderActionService) QuoteCommitment(ctx context.Context, body SaleSalesOrderActionQuoteCommitmentParams, ...) (res *QuoteSalesOrderCommitmentResponse, err error)
- func (r *SaleSalesOrderActionService) QuoteFreight(ctx context.Context, id string, opts ...option.RequestOption) (res *QuoteSalesOrderFreightResponse, err error)
- func (r *SaleSalesOrderActionService) Unissue(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
- type SaleSalesOrderCheckoutParams
- type SaleSalesOrderDeleteResponse
- type SaleSalesOrderGetParams
- type SaleSalesOrderGetStatusesParams
- type SaleSalesOrderLineActionReorderParams
- type SaleSalesOrderLineActionReorderResponse
- type SaleSalesOrderLineActionService
- type SaleSalesOrderLineDeleteParams
- type SaleSalesOrderLineDeleteResponse
- type SaleSalesOrderLineNewParams
- type SaleSalesOrderLineService
- func (r *SaleSalesOrderLineService) Delete(ctx context.Context, lineID string, body SaleSalesOrderLineDeleteParams, ...) (res *SaleSalesOrderLineDeleteResponse, err error)
- func (r *SaleSalesOrderLineService) New(ctx context.Context, id string, params SaleSalesOrderLineNewParams, ...) (res *SalesOrderLine, err error)
- func (r *SaleSalesOrderLineService) Update(ctx context.Context, lineID string, params SaleSalesOrderLineUpdateParams, ...) (res *SalesOrderLine, err error)
- type SaleSalesOrderLineUpdateParams
- type SaleSalesOrderListParams
- type SaleSalesOrderNewParams
- type SaleSalesOrderPriceQuoteParams
- type SaleSalesOrderService
- func (r *SaleSalesOrderService) Checkout(ctx context.Context, id string, body SaleSalesOrderCheckoutParams, ...) (res *CheckoutSalesOrderResponse, err error)
- func (r *SaleSalesOrderService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleSalesOrderDeleteResponse, err error)
- func (r *SaleSalesOrderService) Get(ctx context.Context, id string, query SaleSalesOrderGetParams, ...) (res *SalesOrder, err error)
- func (r *SaleSalesOrderService) GetStatuses(ctx context.Context, query SaleSalesOrderGetStatusesParams, ...) (res *ListSalesOrderStatus, err error)
- func (r *SaleSalesOrderService) List(ctx context.Context, query SaleSalesOrderListParams, ...) (res *ListSalesOrder, err error)
- func (r *SaleSalesOrderService) New(ctx context.Context, params SaleSalesOrderNewParams, ...) (res *SalesOrder, err error)
- func (r *SaleSalesOrderService) PriceQuote(ctx context.Context, body SaleSalesOrderPriceQuoteParams, ...) (res *QuoteSalesOrderPricesResponse, err error)
- func (r *SaleSalesOrderService) Update(ctx context.Context, id string, params SaleSalesOrderUpdateParams, ...) (res *SalesOrder, err error)
- type SaleSalesOrderUpdateParams
- type SaleService
- type SaleVolumeDiscountDeleteResponse
- type SaleVolumeDiscountGetParams
- type SaleVolumeDiscountListParams
- type SaleVolumeDiscountNewParams
- type SaleVolumeDiscountService
- func (r *SaleVolumeDiscountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleVolumeDiscountDeleteResponse, err error)
- func (r *SaleVolumeDiscountService) Get(ctx context.Context, id string, query SaleVolumeDiscountGetParams, ...) (res *VolumeDiscount, err error)
- func (r *SaleVolumeDiscountService) List(ctx context.Context, query SaleVolumeDiscountListParams, ...) (res *ListVolumeDiscount, err error)
- func (r *SaleVolumeDiscountService) New(ctx context.Context, params SaleVolumeDiscountNewParams, ...) (res *VolumeDiscount, err error)
- func (r *SaleVolumeDiscountService) Update(ctx context.Context, id string, params SaleVolumeDiscountUpdateParams, ...) (res *VolumeDiscount, err error)
- type SaleVolumeDiscountUpdateParams
- type SalesOrder
- type SalesOrderAcknowledgmentStatus
- type SalesOrderEmailContactInputParam
- type SalesOrderLine
- type SalesOrderLineObject
- type SalesOrderObject
- type SalesOrderPaymentStatus
- type SalesOrderPriority
- type SalesOrderRelated
- type SalesOrderRelatedObject
- type SalesOrderStageTotal
- type SalesOrderStageTotalObject
- type SalesOrderStatus
- type SalesOrderTotals
- type SalesOrderTotalsObject
- type SalesTarget
- type SalesTargetObject
- type Sandbox
- type SandboxObject
- type ScanningStation
- type ScanningStationLabelSize
- type ScanningStationLabelType
- type ScanningStationObject
- type ScanningStationOperatorRequirement
- type ScanningStationType
- type ScheduleAppliedOverride
- type ScheduleAppliedOverrideAdjustment
- type ScheduleAppliedOverrideReason
- type ScheduleAtRiskOrder
- type ScheduleAtRiskOrderObject
- type ScheduleAtRiskOrderReason
- type ScheduleCampaign
- type ScheduleDeviationType
- type ScheduleDeviationTypeCode
- type ScheduleDeviationTypeObject
- type ScheduleDiagnostics
- type ScheduleDiffLine
- type ScheduleDiffLineChange
- type ScheduleFinishingDiagnostics
- type ScheduleOrderCoverage
- type ScheduleOrderCoverageLine
- type ScheduleOrderCoverageLineObject
- type ScheduleOrderCoverageObject
- type ScheduleOrderCoverageReason
- type SchedulePolicy
- type SchedulePolicyAbcClass
- type SchedulePolicyFulfillmentPolicy
- type SchedulePolicyPolicySource
- type ScheduleProjection
- type SendMessageRequestAudience
- type SendMessageRequestChannel
- type SendMessageRequestLinkResourceType
- type SendMessageRequestMode
- type SendMessageRequestParam
- type SendNotificationRequestCategory
- type SendNotificationRequestLinkResourceType
- type SendNotificationRequestParam
- type SendNotificationRequestPriority
- type ServiceLevel
- type ServiceLevelCustomerPortalVisibility
- type ServiceLevelObject
- type SetEmailSenderRequestParam
- type SetLegalHoldRequestLegalHold
- type SetLegalHoldRequestParam
- type SetWorkflowStatusRequestParam
- type SetWorkflowStatusRequestWorkflowStatus
- type SettingIntegrationListParams
- type SettingIntegrationNewParams
- type SettingIntegrationService
- func (r *SettingIntegrationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountIntegration, err error)
- func (r *SettingIntegrationService) List(ctx context.Context, query SettingIntegrationListParams, ...) (res *ListAccountIntegration, err error)
- func (r *SettingIntegrationService) New(ctx context.Context, body SettingIntegrationNewParams, ...) (res *AccountIntegration, err error)
- func (r *SettingIntegrationService) Update(ctx context.Context, id string, body SettingIntegrationUpdateParams, ...) (res *AccountIntegration, err error)
- type SettingIntegrationUpdateParams
- type SettingPortalDomainActionService
- type SettingPortalDomainDeleteResponse
- type SettingPortalDomainNewParams
- type SettingPortalDomainService
- func (r *SettingPortalDomainService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SettingPortalDomainDeleteResponse, err error)
- func (r *SettingPortalDomainService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PortalDomain, err error)
- func (r *SettingPortalDomainService) List(ctx context.Context, opts ...option.RequestOption) (res *ListPortalDomain, err error)
- func (r *SettingPortalDomainService) New(ctx context.Context, body SettingPortalDomainNewParams, ...) (res *PortalDomain, err error)
- type SettingService
- type ShippingTerm
- type ShippingTermObject
- type ShippingTermType
- type SkippedItemResult
- type SkippedItemResultObject
- type ToolGroup
- type ToolGroupObject
- type ToolInputParam
- type ToolInputTool
- type TransactionMethod
- type TransactionMethodCode
- type TransactionMethodObject
- type TransactionType
- type TransactionTypeCode
- type TransactionTypeObject
- type TriggerConfig
- type TriggerConfigInputParam
- type TriggerConfigObject
- type TriggerRunRequestParam
- type Unit
- type UnitGroup
- type UnitGroupObject
- type UnitGroupType
- type UnitGroupUnit
- type UnitGroupUnitCustomerPortalVisibility
- type UnitGroupUnitObject
- type UnitIdentifierParam
- type UnitObject
- type UnitType
- type UpdateAccountGroupRequestCommissionPolicy
- type UpdateAccountGroupRequestFreightPolicy
- type UpdateAccountGroupRequestParam
- type UpdateAccountIntegrationRequestParam
- type UpdateAccountIntegrationRequestStatus
- type UpdateAccountPriceRequestParam
- type UpdateAccountUserRequestParam
- type UpdateAddressRequestParam
- type UpdateAddressRequestType
- type UpdateAgentRequestParam
- type UpdateAgentRequestTriggerType
- type UpdateAgentStatusRequestParam
- type UpdateAgentStatusRequestStatus
- type UpdateAttributeRequestColor
- type UpdateAttributeRequestParam
- type UpdateCarrierRequestCustomerPortalVisibility
- type UpdateCarrierRequestParam
- type UpdateConversationRequestParam
- type UpdateCustomerRequestCarrierBillingType
- type UpdateCustomerRequestCommissionPolicy
- type UpdateCustomerRequestDefaultPriority
- type UpdateCustomerRequestEdiStatus
- type UpdateCustomerRequestFreightPolicy
- type UpdateCustomerRequestFulfillmentPolicy
- type UpdateCustomerRequestParam
- type UpdateCustomerRequestStatus
- type UpdateDemandOverrideRequestAdjustment
- type UpdateDemandOverrideRequestParam
- type UpdateDemandOverrideRequestReason
- type UpdateDepartmentRequestParam
- type UpdateDraftRequestParam
- type UpdateEmailInboxRequestAgentTriggerPolicy
- type UpdateEmailInboxRequestParam
- type UpdateEmailInboxRequestStatus
- type UpdateItemCategoryRequestParam
- type UpdateItemInventoryRequestOperation
- type UpdateItemInventoryRequestParam
- type UpdateLocationRequestParam
- type UpdateMachineDowntimeEventRequestParam
- type UpdateMachineDowntimeEventRequestReason
- type UpdateMachineRequestParam
- type UpdateMaterialRequestParam
- type UpdateMemoryRequestCategory
- type UpdateMemoryRequestParam
- type UpdateMessagingGroupRequestParam
- type UpdateOperatingCalendarRequestParam
- type UpdateOrderDiscountRequestDiscountType
- type UpdateOrderDiscountRequestParam
- type UpdatePartRequestParam
- type UpdateParticipantRoleRequestParam
- type UpdateParticipantRoleRequestRole
- type UpdatePaymentTermRequestParam
- type UpdatePickLineRequestParam
- type UpdateProductLineRequestCommissionPolicy
- type UpdateProductLineRequestFreightPolicy
- type UpdateProductLineRequestFulfillmentPolicy
- type UpdateProductLineRequestParam
- type UpdateProductRequestParam
- type UpdateProductRequestPortalVisibility
- type UpdateProductionScheduleLineRequestParam
- type UpdateProductionScheduleLineRequestReason
- type UpdateProductionScheduleLineRequestStatus
- type UpdateProductionScheduleSettingsRequestAutoPublishStatus
- type UpdateProductionScheduleSettingsRequestCadenceStatus
- type UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy
- type UpdateProductionScheduleSettingsRequestDemandBasis
- type UpdateProductionScheduleSettingsRequestParam
- type UpdatePropertyRequestParam
- type UpdateRoleRequestParam
- type UpdateSalesOrderLineRequestParam
- type UpdateSalesOrderRequestAcknowledgmentStatus
- type UpdateSalesOrderRequestCarrierBillingType
- type UpdateSalesOrderRequestParam
- type UpdateSalesOrderRequestPriorityCode
- type UpdateScanningStationRequestLabelSize
- type UpdateScanningStationRequestLabelType
- type UpdateScanningStationRequestOperatorRequirement
- type UpdateScanningStationRequestParam
- type UpdateServiceLevelRequestCustomerPortalVisibility
- type UpdateServiceLevelRequestParam
- type UpdateShippingTermRequestParam
- type UpdateShippingTermRequestType
- type UpdateUnitGroupRequestParam
- type UpdateUnitGroupUnitRequestCustomerPortalVisibility
- type UpdateUnitGroupUnitRequestParam
- type UpdateUnitRequestParam
- type UpdateVolumeDiscountRequestParam
- type UpdateVolumeDiscountTierInputParam
- type UpsertItemCategoryInputParam
- type UpsertItemCategoryInputType
- type UpsertItemSettingRequestFulfillmentPolicy
- type UpsertItemSettingRequestParam
- type UpsertItemSettingRequestParticipationStatus
- type UpsertLocationInputParam
- type UpsertMaterialInputParam
- type UpsertMaterialPropertyParam
- type UpsertNotificationPreferenceRequestDigest
- type UpsertNotificationPreferenceRequestParam
- type UpsertPartInputParam
- type UpsertPartPropertyParam
- type UpsertProductInputParam
- type UpsertProductInputPortalVisibility
- type UpsertProductInputType
- type UpsertProductLineInputCommissionPolicy
- type UpsertProductLineInputFreightPolicy
- type UpsertProductLineInputParam
- type UpsertProductPropertyParam
- type UpsertPropertyAttributeInputColor
- type UpsertPropertyAttributeInputParam
- type UpsertPropertyInputParam
- type UpsertResourceSettingRequestParam
- type UpsertResourceSettingRequestParticipationStatus
- type UpsertResourceSettingRequestScopeType
- type UpsertSalesTargetRequestParam
- type UpsertUnitGroupConversionInputParam
- type UpsertUnitGroupInputParam
- type UpsertUnitGroupInputType
- type UpsertUnitInputParam
- type UpsertUnitInputType
- type User
- type UserObject
- type ValidateAddressRequestParam
- type ValidatedAddress
- type ValidatedAddressObject
- type ValidatedAddressStatus
- type VolumeDiscount
- type VolumeDiscountObject
- type VolumeDiscountTier
- type VolumeDiscountTierObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (OPENMRP_API_KEY, OPENMRP_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AIAgentDeleteResponse ¶
type AIAgentDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AIAgentDeleteResponse) RawJSON ¶
func (r AIAgentDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AIAgentDeleteResponse) UnmarshalJSON ¶
func (r *AIAgentDeleteResponse) UnmarshalJSON(data []byte) error
type AIAgentGetParams ¶
type AIAgentGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "config", "tools", "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIAgentGetParams) URLQuery ¶
func (r AIAgentGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIAgentGetParams's query parameters as `url.Values`.
type AIAgentListParams ¶
type AIAgentListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Restricts results to agents of one of the given definition types.
//
// Any of "system", "custom".
DefinitionTypes []string `query:"definition_types,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "config", "tools", "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// Restricts results to agents with one of the given account-level statuses.
//
// `inactive` also matches agents that have never been enabled for your account.
//
// Any of "active", "inactive".
Statuses []string `query:"statuses,omitzero" json:"-"`
// Restricts results to agents with one of the given trigger types.
//
// Any of "scheduled", "manual", "event", "chat".
TriggerTypes []string `query:"trigger_types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIAgentListParams) URLQuery ¶
func (r AIAgentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIAgentListParams's query parameters as `url.Values`.
type AIAgentNewParams ¶
type AIAgentNewParams struct {
// Request to create an agent definition.
CreateAgentRequest CreateAgentRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "config", "tools", "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIAgentNewParams) MarshalJSON ¶
func (r AIAgentNewParams) MarshalJSON() (data []byte, err error)
func (AIAgentNewParams) URLQuery ¶
func (r AIAgentNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIAgentNewParams's query parameters as `url.Values`.
func (*AIAgentNewParams) UnmarshalJSON ¶
func (r *AIAgentNewParams) UnmarshalJSON(data []byte) error
type AIAgentService ¶
type AIAgentService struct {
// contains filtered or unexported fields
}
List, create, update, and delete agent definitions.
AIAgentService contains methods and other services that help with interacting with the openmrp 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 NewAIAgentService method instead.
func NewAIAgentService ¶
func NewAIAgentService(opts ...option.RequestOption) (r AIAgentService)
NewAIAgentService 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 (*AIAgentService) Delete ¶
func (r *AIAgentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AIAgentDeleteResponse, err error)
Deletes a custom agent.
The agent is withdrawn from the API: it stops appearing in listings, no longer resolves by ID, and can no longer be run or modified. Runs it already produced are kept. OpenMRP's `system` agents cannot be deleted — disable one for your account with the Update Agent Status endpoint instead.
This endpoint requires the permission: `agents:delete`.
func (*AIAgentService) Get ¶
func (r *AIAgentService) Get(ctx context.Context, id string, query AIAgentGetParams, opts ...option.RequestOption) (res *AgentDefinition, err error)
Retrieves a single agent by ID.
Resolves both the `system` agents OpenMRP provides and the `custom` agents in your account; the `status` reflects whether the agent is enabled for your account specifically.
This endpoint requires the permission: `agents:read`.
func (*AIAgentService) List ¶
func (r *AIAgentService) List(ctx context.Context, query AIAgentListParams, opts ...option.RequestOption) (res *ListAgentDefinition, err error)
Lists the agents available to your account, newest first.
Covers both the `system` agents OpenMRP provides to every account and the `custom` agents created in yours. Deleted agents are never returned. The `q` parameter matches an agent's name, slug, description, or ID.
This endpoint requires the permission: `agents:read`.
func (*AIAgentService) New ¶
func (r *AIAgentService) New(ctx context.Context, params AIAgentNewParams, opts ...option.RequestOption) (res *AgentDefinition, err error)
Creates a custom agent for your account.
The new agent is a `custom` definition and is immediately `active`, so it can start running as soon as it has a role.
This endpoint requires the permission: `agents:create`.
func (*AIAgentService) Update ¶
func (r *AIAgentService) Update(ctx context.Context, id string, params AIAgentUpdateParams, opts ...option.RequestOption) (res *AgentDefinition, err error)
Updates a custom agent.
Only the fields provided in the request are changed. OpenMRP's `system` agents cannot be edited — the only thing you can change about them is whether they are enabled for your account, with the Update Agent Status endpoint.
This endpoint requires the permission: `agents:update`.
func (*AIAgentService) UpdateStatus ¶
func (r *AIAgentService) UpdateStatus(ctx context.Context, id string, params AIAgentUpdateStatusParams, opts ...option.RequestOption) (res *AgentDefinition, err error)
Enables or disables an agent for your account.
Activation is per-account, so this works for the `system` agents OpenMRP shares across accounts as well as your own `custom` agents: disabling one here leaves the underlying agent untouched for everyone else. Triggering an inactive agent returns a validation error.
This endpoint requires the permission: `agents:update`.
type AIAgentUpdateParams ¶
type AIAgentUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "config", "tools", "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update an agent definition.
UpdateAgentRequest UpdateAgentRequestParam
// contains filtered or unexported fields
}
func (AIAgentUpdateParams) MarshalJSON ¶
func (r AIAgentUpdateParams) MarshalJSON() (data []byte, err error)
func (AIAgentUpdateParams) URLQuery ¶
func (r AIAgentUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIAgentUpdateParams's query parameters as `url.Values`.
func (*AIAgentUpdateParams) UnmarshalJSON ¶
func (r *AIAgentUpdateParams) UnmarshalJSON(data []byte) error
type AIAgentUpdateStatusParams ¶
type AIAgentUpdateStatusParams struct {
// Request to update the per-account status of an agent.
UpdateAgentStatusRequest UpdateAgentStatusRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "config", "tools", "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIAgentUpdateStatusParams) MarshalJSON ¶
func (r AIAgentUpdateStatusParams) MarshalJSON() (data []byte, err error)
func (AIAgentUpdateStatusParams) URLQuery ¶
func (r AIAgentUpdateStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIAgentUpdateStatusParams's query parameters as `url.Values`.
func (*AIAgentUpdateStatusParams) UnmarshalJSON ¶
func (r *AIAgentUpdateStatusParams) UnmarshalJSON(data []byte) error
type AIGetToolGroupsParams ¶
type AIGetToolGroupsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "tools".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIGetToolGroupsParams) URLQuery ¶
func (r AIGetToolGroupsParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIGetToolGroupsParams's query parameters as `url.Values`.
type AIGetToolsParams ¶
type AIGetToolsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIGetToolsParams) URLQuery ¶
func (r AIGetToolsParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIGetToolsParams's query parameters as `url.Values`.
type AIMemoryDeleteResponse ¶
type AIMemoryDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AIMemoryDeleteResponse) RawJSON ¶
func (r AIMemoryDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AIMemoryDeleteResponse) UnmarshalJSON ¶
func (r *AIMemoryDeleteResponse) UnmarshalJSON(data []byte) error
type AIMemoryListParams ¶
type AIMemoryListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Filter to memories scoped to this entity type (e.g. `customer`, `product`).
EntityType param.Opt[string] `query:"entity_type,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filter to memories with this exact category (e.g. `preference`, `fact`).
//
// Any of "preference", "fact", "instruction".
Category AIMemoryListParamsCategory `query:"category,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIMemoryListParams) URLQuery ¶
func (r AIMemoryListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIMemoryListParams's query parameters as `url.Values`.
type AIMemoryListParamsCategory ¶
type AIMemoryListParamsCategory string
Filter to memories with this exact category (e.g. `preference`, `fact`).
const ( AIMemoryListParamsCategoryPreference AIMemoryListParamsCategory = "preference" AIMemoryListParamsCategoryFact AIMemoryListParamsCategory = "fact" AIMemoryListParamsCategoryInstruction AIMemoryListParamsCategory = "instruction" )
type AIMemoryNewParams ¶
type AIMemoryNewParams struct {
// Request to create an agent memory.
CreateMemoryRequest CreateMemoryRequestParam
// contains filtered or unexported fields
}
func (AIMemoryNewParams) MarshalJSON ¶
func (r AIMemoryNewParams) MarshalJSON() (data []byte, err error)
func (*AIMemoryNewParams) UnmarshalJSON ¶
func (r *AIMemoryNewParams) UnmarshalJSON(data []byte) error
type AIMemoryService ¶
type AIMemoryService struct {
// contains filtered or unexported fields
}
List, create, update, and delete agent memories.
AIMemoryService contains methods and other services that help with interacting with the openmrp 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 NewAIMemoryService method instead.
func NewAIMemoryService ¶
func NewAIMemoryService(opts ...option.RequestOption) (r AIMemoryService)
NewAIMemoryService 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 (*AIMemoryService) Delete ¶
func (r *AIMemoryService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AIMemoryDeleteResponse, err error)
Permanently deletes an agent memory so it is no longer recalled.
Deleting a memory that has already been deleted succeeds rather than returning an error.
This endpoint requires the permission: `agent_memories:delete`.
func (*AIMemoryService) Get ¶
func (r *AIMemoryService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentMemory, err error)
Returns an agent memory by ID.
An expired memory is still returned here, even though it is excluded from list results and no longer recalled by agents.
This endpoint requires the permission: `agent_memories:read`.
func (*AIMemoryService) List ¶
func (r *AIMemoryService) List(ctx context.Context, query AIMemoryListParams, opts ...option.RequestOption) (res *ListAgentMemory, err error)
Returns a paginated list of agent memories for the current account, newest first.
Memories whose `expires_at` has passed are excluded. The `q` search term matches against a memory's ID, category, content, and the ID of the record it is scoped to.
This endpoint requires the permission: `agent_memories:read`.
func (*AIMemoryService) New ¶
func (r *AIMemoryService) New(ctx context.Context, body AIMemoryNewParams, opts ...option.RequestOption) (res *AgentMemory, err error)
Saves a piece of information for agents to recall on future runs.
This endpoint requires the permission: `agent_memories:create`.
func (*AIMemoryService) Update ¶
func (r *AIMemoryService) Update(ctx context.Context, id string, body AIMemoryUpdateParams, opts ...option.RequestOption) (res *AgentMemory, err error)
Updates an agent memory.
Only the fields included in the request are changed; everything else keeps its current value.
This endpoint requires the permission: `agent_memories:update`.
type AIMemoryUpdateParams ¶
type AIMemoryUpdateParams struct {
// Request to update an agent memory.
UpdateMemoryRequest UpdateMemoryRequestParam
// contains filtered or unexported fields
}
func (AIMemoryUpdateParams) MarshalJSON ¶
func (r AIMemoryUpdateParams) MarshalJSON() (data []byte, err error)
func (*AIMemoryUpdateParams) UnmarshalJSON ¶
func (r *AIMemoryUpdateParams) UnmarshalJSON(data []byte) error
type AIRunActionCancelParams ¶
type AIRunActionCancelParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "actions", "definition", "definition.config", "definition.tools",
// "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunActionCancelParams) URLQuery ¶
func (r AIRunActionCancelParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunActionCancelParams's query parameters as `url.Values`.
type AIRunActionContinueParams ¶
type AIRunActionContinueParams struct {
// Request to resume a paused agent run.
ContinueRunRequest ContinueRunRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "actions", "definition", "definition.config", "definition.tools",
// "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunActionContinueParams) MarshalJSON ¶
func (r AIRunActionContinueParams) MarshalJSON() (data []byte, err error)
func (AIRunActionContinueParams) URLQuery ¶
func (r AIRunActionContinueParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunActionContinueParams's query parameters as `url.Values`.
func (*AIRunActionContinueParams) UnmarshalJSON ¶
func (r *AIRunActionContinueParams) UnmarshalJSON(data []byte) error
type AIRunActionRetryParams ¶
type AIRunActionRetryParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "actions", "definition", "definition.config", "definition.tools",
// "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunActionRetryParams) URLQuery ¶
func (r AIRunActionRetryParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunActionRetryParams's query parameters as `url.Values`.
type AIRunActionService ¶
type AIRunActionService struct {
// contains filtered or unexported fields
}
List, retrieve, trigger, cancel, and continue agent runs.
AIRunActionService contains methods and other services that help with interacting with the openmrp 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 NewAIRunActionService method instead.
func NewAIRunActionService ¶
func NewAIRunActionService(opts ...option.RequestOption) (r AIRunActionService)
NewAIRunActionService 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 (*AIRunActionService) Cancel ¶
func (r *AIRunActionService) Cancel(ctx context.Context, id string, body AIRunActionCancelParams, opts ...option.RequestOption) (res *AgentRun, err error)
Cancels an in-progress agent run.
A run can be cancelled while it is working or paused waiting on the user — `pending`, `running`, `awaiting_input`, or `awaiting_approval`. Cancelling a run in a terminal status (`completed`, `failed`, `cancelled`) returns a validation error.
Cancelling a run that is `awaiting_approval` counts as denying the review: every action still pending review is recorded as rejected, attributed to the caller. Work the agent already completed is not undone.
This endpoint requires the permission: `agent_runs:update`.
func (*AIRunActionService) Continue ¶
func (r *AIRunActionService) Continue(ctx context.Context, id string, params AIRunActionContinueParams, opts ...option.RequestOption) (res *AgentRun, err error)
Resumes a paused agent run with a user message and any tool review decisions.
The run must be `awaiting_input` or `awaiting_approval`; resuming it from any other status returns a validation error. It moves back to `running` and continues asynchronously, so poll Retrieve Agent Run to follow it. Each approval and denial is recorded on the matching action and attributed to the caller.
This endpoint requires the permission: `agent_runs:update`.
func (*AIRunActionService) Retry ¶
func (r *AIRunActionService) Retry(ctx context.Context, id string, body AIRunActionRetryParams, opts ...option.RequestOption) (res *AgentRun, err error)
Retries a failed agent run by resuming its existing transcript.
Only runs in the `failed` status can be retried; retrying a run in any other status returns a validation error. The run is re-attempted from where it left off — its prior reasoning and tool results are replayed, so the agent continues with full knowledge of what it already did rather than starting over, which minimizes the chance of it repeating side effects it has already caused.
A run can be retried at most five times in total, and any automatic retries the platform already performed for transient failures count against that budget.
This endpoint requires the permission: `agent_runs:update`.
type AIRunGetParams ¶
type AIRunGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "triggered_by", "actions", "definition", "steps", "definition.config",
// "definition.tools", "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunGetParams) URLQuery ¶
func (r AIRunGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunGetParams's query parameters as `url.Values`.
type AIRunListParams ¶
type AIRunListParams struct {
// Restricts results to runs of a single agent.
AgentDefinitionID param.Opt[string] `query:"agent_definition_id,omitzero" json:"-"`
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "triggered_by", "definition", "actions", "definition.config",
// "definition.tools", "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// Restricts results to runs in this status.
//
// Any of "pending", "running", "completed", "failed", "cancelled",
// "awaiting_input", "awaiting_approval".
Status AIRunListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunListParams) URLQuery ¶
func (r AIRunListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunListParams's query parameters as `url.Values`.
type AIRunListParamsStatus ¶ added in v0.17.1
type AIRunListParamsStatus string
Restricts results to runs in this status.
const ( AIRunListParamsStatusPending AIRunListParamsStatus = "pending" AIRunListParamsStatusRunning AIRunListParamsStatus = "running" AIRunListParamsStatusCompleted AIRunListParamsStatus = "completed" AIRunListParamsStatusFailed AIRunListParamsStatus = "failed" AIRunListParamsStatusCancelled AIRunListParamsStatus = "cancelled" AIRunListParamsStatusAwaitingInput AIRunListParamsStatus = "awaiting_input" AIRunListParamsStatusAwaitingApproval AIRunListParamsStatus = "awaiting_approval" )
type AIRunNewParams ¶
type AIRunNewParams struct {
// Request to trigger an agent run.
TriggerRunRequest TriggerRunRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "actions", "definition", "definition.config", "definition.tools",
// "definition.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AIRunNewParams) MarshalJSON ¶
func (r AIRunNewParams) MarshalJSON() (data []byte, err error)
func (AIRunNewParams) URLQuery ¶
func (r AIRunNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes AIRunNewParams's query parameters as `url.Values`.
func (*AIRunNewParams) UnmarshalJSON ¶
func (r *AIRunNewParams) UnmarshalJSON(data []byte) error
type AIRunService ¶
type AIRunService struct {
// List, retrieve, trigger, cancel, and continue agent runs.
Actions AIRunActionService
// contains filtered or unexported fields
}
List, retrieve, trigger, cancel, and continue agent runs.
AIRunService contains methods and other services that help with interacting with the openmrp 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 NewAIRunService method instead.
func NewAIRunService ¶
func NewAIRunService(opts ...option.RequestOption) (r AIRunService)
NewAIRunService 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 (*AIRunService) Get ¶
func (r *AIRunService) Get(ctx context.Context, id string, query AIRunGetParams, opts ...option.RequestOption) (res *AgentRun, err error)
Retrieves a single agent run by ID.
A run records one execution of an agent: its current status, the input it started from, the output it produced, the tools it invoked, and the step-by-step timeline of how it got there.
This endpoint requires the permission: `agent_runs:read`.
func (*AIRunService) List ¶
func (r *AIRunService) List(ctx context.Context, query AIRunListParams, opts ...option.RequestOption) (res *ListAgentRun, err error)
Lists agent runs for your account, newest first.
The `q` parameter matches a run's ID, its status, or the ID of the agent that produced it.
This endpoint requires the permission: `agent_runs:read`.
func (*AIRunService) New ¶
func (r *AIRunService) New(ctx context.Context, params AIRunNewParams, opts ...option.RequestOption) (res *AgentRun, err error)
Starts a new run of the specified agent.
The run is created in the `pending` status and executed asynchronously; poll Retrieve Agent Run to follow its progress. Any agent can be started this way regardless of how it is normally triggered, and the resulting run is always recorded with `trigger_type` `manual`.
This endpoint requires the permission: `agent_runs:create`.
type AIService ¶
type AIService struct {
// List, create, update, and delete agent definitions.
Agents AIAgentService
// List, retrieve, trigger, cancel, and continue agent runs.
Runs AIRunService
// List, create, update, and delete agent memories.
Memories AIMemoryService
// contains filtered or unexported fields
}
List available platform tools for agent configuration.
AIService contains methods and other services that help with interacting with the openmrp 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 NewAIService method instead.
func NewAIService ¶
func NewAIService(opts ...option.RequestOption) (r AIService)
NewAIService 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 (*AIService) GetToolGroups ¶
func (r *AIService) GetToolGroups(ctx context.Context, query AIGetToolGroupsParams, opts ...option.RequestOption) (res *ListToolGroup, err error)
Returns a paginated list of the groups the agent tool catalog is organized into.
The catalog is platform-defined and identical for every account. Pagination applies to the groups themselves, so a group requested with `include=tools` always carries its complete tool list regardless of the page limit. The `q` search term matches against group names.
This endpoint requires the permission: `agents:read`.
func (*AIService) GetTools ¶
func (r *AIService) GetTools(ctx context.Context, query AIGetToolsParams, opts ...option.RequestOption) (res *ListAvailableTool, err error)
Returns a paginated list of every capability that can be granted to an agent.
The catalog is platform-defined and identical for every account, and covers both built-in runtime capabilities and the API operations agents are allowed to perform. The `q` search term matches against tool names and the name of the group a tool belongs to.
This endpoint requires the permission: `agents:read`.
type APIKey ¶
type APIKey struct {
// API key ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// When the key expires and stops authenticating requests.
//
// A key with no expiration keeps working until it is revoked or rotated.
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// When the key was last used to authenticate a request.
//
// Recorded at most once every 24 hours, so it can lag the key's most recent use by
// up to a day.
LastUsedAt time.Time `json:"last_used_at" api:"required" format:"date-time"`
// Human-readable name for the API key.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "api_key".
Object APIKeyObject `json:"object" api:"required"`
// Redacted key value safe for display.
//
// The key's prefix followed by its last four characters, e.g.
// `mrp_sk_prod_****hjt4`.
RedactedValue string `json:"redacted_value" api:"required"`
// When the key's revocation takes effect.
//
// A future timestamp means revocation was scheduled (for example, by a rotation)
// and the key continues to authenticate requests until that time.
RevokedAt time.Time `json:"revoked_at" api:"required" format:"date-time"`
// A named set of permissions that can be assigned to users to control what they
// can access.
Role Role `json:"role" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
ExpiresAt respjson.Field
LastUsedAt respjson.Field
Name respjson.Field
Object respjson.Field
RedactedValue respjson.Field
RevokedAt respjson.Field
Role respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An API key used to authenticate requests to the OpenMRP API.
A key always acts on behalf of the account it was created under, with the permissions of the role assigned to it.
func (*APIKey) UnmarshalJSON ¶
type APIKeyObject ¶
type APIKeyObject string
Resource type identifier.
const (
APIKeyObjectAPIKey APIKeyObject = "api_key"
)
type Account ¶
type Account struct {
// Account ID.
ID string `json:"id" api:"required"`
// The customer-facing branding an account presents on its portal, emails, and
// documents.
Branding AccountBranding `json:"branding" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
DefaultBillingAddress Address `json:"default_billing_address" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
DefaultShippingAddress Address `json:"default_shipping_address" api:"required"`
// The account's display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "account".
Object AccountObject `json:"object" api:"required"`
// The customer portal an account publishes for its customers to sign in to.
Portal AccountPortal `json:"portal" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Branding respjson.Field
CreatedAt respjson.Field
DefaultBillingAddress respjson.Field
DefaultShippingAddress respjson.Field
Name respjson.Field
Object respjson.Field
Portal respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An organization on OpenMRP, including its branding and customer portal sub-resources.
Your own account and any customer or supplier account you trade with are both represented by this object.
func (*Account) UnmarshalJSON ¶
type AccountBranding ¶
type AccountBranding struct {
// Branding ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Facebook handle.
FacebookHandle string `json:"facebook_handle" api:"required"`
// Stored location of the account's customer-portal favicon.
//
// Favicons uploaded through the API are stored as an object key rather than a
// fetchable link, so use the Get Account Favicon URL endpoint to obtain a download
// URL.
FaviconURL string `json:"favicon_url" api:"required"`
// Instagram handle.
InstagramHandle string `json:"instagram_handle" api:"required"`
// LinkedIn handle.
LinkedinHandle string `json:"linkedin_handle" api:"required"`
// Stored location of the account's logo image.
//
// Logos uploaded through the API are stored as an object key rather than a
// fetchable link, so use the Get Account Logo URL endpoint to obtain a download
// URL.
LogoURL string `json:"logo_url" api:"required"`
// Resource type identifier.
//
// Any of "account_branding".
Object AccountBrandingObject `json:"object" api:"required"`
// The account's public contact phone number.
PhoneNumber string `json:"phone_number" api:"required"`
// The email address customers are directed to for support.
SupportEmail string `json:"support_email" api:"required"`
// Twitter handle.
TwitterHandle string `json:"twitter_handle" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// The account's public website.
WebsiteURL string `json:"website_url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
FacebookHandle respjson.Field
FaviconURL respjson.Field
InstagramHandle respjson.Field
LinkedinHandle respjson.Field
LogoURL respjson.Field
Object respjson.Field
PhoneNumber respjson.Field
SupportEmail respjson.Field
TwitterHandle respjson.Field
UpdatedAt respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The customer-facing branding an account presents on its portal, emails, and documents.
func (AccountBranding) RawJSON ¶
func (r AccountBranding) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountBranding) UnmarshalJSON ¶
func (r *AccountBranding) UnmarshalJSON(data []byte) error
type AccountBrandingObject ¶
type AccountBrandingObject string
Resource type identifier.
const (
AccountBrandingObjectAccountBranding AccountBrandingObject = "account_branding"
)
type AccountGroup ¶
type AccountGroup struct {
// Account group ID.
ID string `json:"id" api:"required"`
// How sales commission applies to accounts in this group.
//
// - `commission_applied`: sales commission is calculated on orders from accounts
// in this group.
// - `commission_exempt`: orders from accounts in this group are exempt from
// commission.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy AccountGroupCommissionPolicy `json:"commission_policy" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Calendar days between an order being issued and it being due to ship, inherited
// by every customer in this group that has neither set its own nor inherited one
// from a parent account.
DefaultLeadTimeDays int64 `json:"default_lead_time_days" api:"required"`
// Free-form description of the account group.
Description string `json:"description" api:"required"`
// How freight charges apply to orders from accounts in this group.
//
// - `free_freight`: customers within this group will not have to pay for freight.
// - `billed_freight`: freight will be applied to any order within this account
// group, unless overridden elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy AccountGroupFreightPolicy `json:"freight_policy" api:"required"`
// Display name of the account group.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "account_group".
Object AccountGroupObject `json:"object" api:"required"`
// How this account group is used.
//
// - `pricing_group`: used for pricing rules, such as a "Preferred" group that
// receives a special discount.
// - `type_group`: used to categorize accounts, such as "Consumers" or
// "Distributors".
//
// A group's type is fixed when it is created and cannot be changed afterwards.
//
// Any of "pricing_group", "type_group".
Type AccountGroupType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CommissionPolicy respjson.Field
CreatedAt respjson.Field
DefaultLeadTimeDays respjson.Field
Description respjson.Field
FreightPolicy respjson.Field
Name respjson.Field
Object respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named grouping of customer accounts, used for pricing rules or to categorize accounts.
A customer carries at most one group of type `type_group` as its customer type, plus any number of groups of type `pricing_group`. Membership of either kind can scope a volume discount to the customer and open up product lines for it to order from.
func (AccountGroup) RawJSON ¶
func (r AccountGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountGroup) UnmarshalJSON ¶
func (r *AccountGroup) UnmarshalJSON(data []byte) error
type AccountGroupCommissionPolicy ¶
type AccountGroupCommissionPolicy string
How sales commission applies to accounts in this group.
- `commission_applied`: sales commission is calculated on orders from accounts in this group.
- `commission_exempt`: orders from accounts in this group are exempt from commission.
const ( AccountGroupCommissionPolicyCommissionApplied AccountGroupCommissionPolicy = "commission_applied" AccountGroupCommissionPolicyCommissionExempt AccountGroupCommissionPolicy = "commission_exempt" )
type AccountGroupFreightPolicy ¶
type AccountGroupFreightPolicy string
How freight charges apply to orders from accounts in this group.
- `free_freight`: customers within this group will not have to pay for freight.
- `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const ( AccountGroupFreightPolicyFreeFreight AccountGroupFreightPolicy = "free_freight" AccountGroupFreightPolicyBilledFreight AccountGroupFreightPolicy = "billed_freight" )
type AccountGroupObject ¶
type AccountGroupObject string
Resource type identifier.
const (
AccountGroupObjectAccountGroup AccountGroupObject = "account_group"
)
type AccountGroupType ¶
type AccountGroupType string
How this account group is used.
- `pricing_group`: used for pricing rules, such as a "Preferred" group that receives a special discount.
- `type_group`: used to categorize accounts, such as "Consumers" or "Distributors".
A group's type is fixed when it is created and cannot be changed afterwards.
const ( AccountGroupTypePricingGroup AccountGroupType = "pricing_group" AccountGroupTypeTypeGroup AccountGroupType = "type_group" )
type AccountIntegration ¶
type AccountIntegration struct {
// Account integration ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the integration.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "account_integration".
Object AccountIntegrationObject `json:"object" api:"required"`
// Integration provider code.
//
// - `stripe`: Stripe payment processing.
// - `shippo`: Shippo shipping and label generation.
// - `hubspot`: HubSpot CRM.
//
// Any of "stripe", "shippo", "hubspot".
Provider AccountIntegrationProvider `json:"provider" api:"required"`
// Lifecycle status of the integration.
//
// Integrations are created `active`. Setting an integration to `inactive` keeps
// its stored credentials but stops it from being used (for example, the Stripe
// publishable key cannot be retrieved while the Stripe integration is inactive).
//
// Any of "active", "inactive".
Status AccountIntegrationStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Provider respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Third-party integration connected to an account.
An account can have at most one integration per provider. The credentials supplied when the integration was connected are encrypted at rest and are never returned by the API.
func (AccountIntegration) RawJSON ¶
func (r AccountIntegration) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountIntegration) UnmarshalJSON ¶
func (r *AccountIntegration) UnmarshalJSON(data []byte) error
type AccountIntegrationObject ¶
type AccountIntegrationObject string
Resource type identifier.
const (
AccountIntegrationObjectAccountIntegration AccountIntegrationObject = "account_integration"
)
type AccountIntegrationProvider ¶
type AccountIntegrationProvider string
Integration provider code.
- `stripe`: Stripe payment processing. - `shippo`: Shippo shipping and label generation. - `hubspot`: HubSpot CRM.
const ( AccountIntegrationProviderStripe AccountIntegrationProvider = "stripe" AccountIntegrationProviderShippo AccountIntegrationProvider = "shippo" AccountIntegrationProviderHubspot AccountIntegrationProvider = "hubspot" )
type AccountIntegrationStatus ¶
type AccountIntegrationStatus string
Lifecycle status of the integration.
Integrations are created `active`. Setting an integration to `inactive` keeps its stored credentials but stops it from being used (for example, the Stripe publishable key cannot be retrieved while the Stripe integration is inactive).
const ( AccountIntegrationStatusActive AccountIntegrationStatus = "active" AccountIntegrationStatusInactive AccountIntegrationStatus = "inactive" )
type AccountObject ¶
type AccountObject string
Resource type identifier.
const (
AccountObjectAccount AccountObject = "account"
)
type AccountPortal ¶
type AccountPortal struct {
// Portal ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "account_portal".
Object AccountPortalObject `json:"object" api:"required"`
// URL slug that identifies the account's customer portal.
//
// Unique across all accounts.
Slug string `json:"slug" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Object respjson.Field
Slug respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The customer portal an account publishes for its customers to sign in to.
func (AccountPortal) RawJSON ¶
func (r AccountPortal) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountPortal) UnmarshalJSON ¶
func (r *AccountPortal) UnmarshalJSON(data []byte) error
type AccountPortalObject ¶
type AccountPortalObject string
Resource type identifier.
const (
AccountPortalObjectAccountPortal AccountPortalObject = "account_portal"
)
type AccountPrice ¶
type AccountPrice struct {
// Account price ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Attributes ListAttribute `json:"attributes" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Categories ListItemCategory `json:"categories" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "account_price".
Object AccountPriceObject `json:"object" api:"required"`
// A named grouping of related products in your catalog.
//
// A product line carries the default commission and freight policies for the
// products assigned to it, along with the unit group that determines how those
// products are measured. Product lines are also the unit that catalog access is
// granted over, for both customers and account groups.
ProductLine ProductLine `json:"product_line" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
Rate Rate `json:"rate" api:"required"`
// A business you sell to, with its contact details, default fulfillment settings,
// and order policies.
RecipientAccount Customer `json:"recipient_account" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Attributes respjson.Field
Categories respjson.Field
CreatedAt respjson.Field
Object respjson.Field
ProductLine respjson.Field
Rate respjson.Field
RecipientAccount respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A customer-specific price for a product line.
When a sales order line matches an account price, that price replaces the unit price the line would otherwise be given — including the effect of any volume discount — rather than discounting it. If more than one account price matches a line, the most recently created one wins.
func (AccountPrice) RawJSON ¶
func (r AccountPrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountPrice) UnmarshalJSON ¶
func (r *AccountPrice) UnmarshalJSON(data []byte) error
type AccountPriceObject ¶
type AccountPriceObject string
Resource type identifier.
const (
AccountPriceObjectAccountPrice AccountPriceObject = "account_price"
)
type AccountStatus ¶
type AccountStatus struct {
// Account status ID.
ID string `json:"id" api:"required"`
// Machine-readable status code.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the account's shipments should be held, typically over a
// credit problem, while orders can still be placed.
// - `hold_all`: all activity for the account should be held.
//
// The hold statuses are advisory: they are surfaced as credit-hold warnings on the
// customer's orders, but they do not by themselves cause order or shipment
// requests to be rejected.
//
// Any of "normal", "preferred", "hold_shipment", "hold_all".
Code AccountStatusCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Human-readable label for the status.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "account_status".
Object AccountStatusObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A lookup value describing the standing of a customer account, such as whether shipments or all activity should be held.
The set of statuses is fixed by OpenMRP and cannot be added to or edited; you apply one to a customer by setting the customer's `status`.
func (AccountStatus) RawJSON ¶
func (r AccountStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountStatus) UnmarshalJSON ¶
func (r *AccountStatus) UnmarshalJSON(data []byte) error
type AccountStatusCode ¶
type AccountStatusCode string
Machine-readable status code.
- `normal`: standard account with no restrictions.
- `preferred`: account flagged for prioritized handling.
- `hold_shipment`: the account's shipments should be held, typically over a credit problem, while orders can still be placed.
- `hold_all`: all activity for the account should be held.
The hold statuses are advisory: they are surfaced as credit-hold warnings on the customer's orders, but they do not by themselves cause order or shipment requests to be rejected.
const ( AccountStatusCodeNormal AccountStatusCode = "normal" AccountStatusCodePreferred AccountStatusCode = "preferred" AccountStatusCodeHoldShipment AccountStatusCode = "hold_shipment" AccountStatusCodeHoldAll AccountStatusCode = "hold_all" )
type AccountStatusObject ¶
type AccountStatusObject string
Resource type identifier.
const (
AccountStatusObjectAccountStatus AccountStatusObject = "account_status"
)
type AccountUser ¶
type AccountUser struct {
// Account user ID.
ID string `json:"id" api:"required"`
// When the account user was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A functional area of a production operation, such as fabrication or packaging,
// that groups scanning stations and machines.
Department Department `json:"department" api:"required"`
// Whether this user can be assigned as a sales representative on orders,
// territories, and targets.
//
// Independent of the `sales_rep` role type, which still scopes analytics and hides
// cost. Users with the `sales_rep` role are always eligible.
IsCommissionEligible bool `json:"is_commission_eligible" api:"required"`
// When the user last accessed this account.
LastUsedAt time.Time `json:"last_used_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "account_user".
Object AccountUserObject `json:"object" api:"required"`
// A named set of permissions that can be assigned to users to control what they
// can access.
Role Role `json:"role" api:"required"`
// The current state of this user's membership in the account.
//
// - `active`: the user can sign in to the account and occupies one of the plan's
// seats.
// - `disabled`: the user is locked out of the account and their sessions have been
// revoked, but the membership is retained.
// - `removed`: the membership has been soft-deleted; it is hidden from listings by
// default and can be restored with the activate action.
//
// Any of "active", "disabled", "removed".
Status AccountUserStatus `json:"status" api:"required"`
// When the account user was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// A user's global profile, shared across every account they belong to.
//
// Account-specific settings (status, role, department) live on the account user
// resource that links the user to each account.
User User `json:"user" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
IsCommissionEligible respjson.Field
LastUsedAt respjson.Field
Object respjson.Field
Role respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
User respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user's membership in an account, carrying the account-specific status, role, and department.
Profile fields (name, email, username, image URL) live on the `user` sub-resource, which is shared across every account the user belongs to.
func (AccountUser) RawJSON ¶
func (r AccountUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccountUser) UnmarshalJSON ¶
func (r *AccountUser) UnmarshalJSON(data []byte) error
type AccountUserObject ¶
type AccountUserObject string
Resource type identifier.
const (
AccountUserObjectAccountUser AccountUserObject = "account_user"
)
type AccountUserStatus ¶
type AccountUserStatus string
The current state of this user's membership in the account.
- `active`: the user can sign in to the account and occupies one of the plan's seats.
- `disabled`: the user is locked out of the account and their sessions have been revoked, but the membership is retained.
- `removed`: the membership has been soft-deleted; it is hidden from listings by default and can be restored with the activate action.
const ( AccountUserStatusActive AccountUserStatus = "active" AccountUserStatusDisabled AccountUserStatus = "disabled" AccountUserStatusRemoved AccountUserStatus = "removed" )
type Actor ¶
type Actor struct {
// Unique identifier of the actor.
ID string `json:"id" api:"required"`
// URL of the actor's profile photo, if one is set.
//
// Only populated for `user` actors.
AvatarURL string `json:"avatar_url" api:"required"`
// Human-readable handle identifying the actor.
//
// - For `user` actors: the user's email address.
// - For `api_key` actors: the redacted key value.
//
// Other actor types carry no handle.
Handle string `json:"handle" api:"required"`
// The actor's display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "actor".
Object ActorObject `json:"object" api:"required"`
// A named set of permissions that can be assigned to users to control what they
// can access.
Role Role `json:"role" api:"required"`
// Actor type.
//
// - `user`: a human user account.
// - `api_key`: a programmatic caller authenticating with an API key.
// - `agent`: an automated agent acting on the account's behalf.
// - `group`: a shared group identity, such as a "Customer Service" persona, rather
// than a single individual.
//
// Any of "user", "api_key", "agent", "group".
Type ActorType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AvatarURL respjson.Field
Handle respjson.Field
Name respjson.Field
Object respjson.Field
Role respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to an actor — the user, API key, agent, or group identity associated with an action.
func (*Actor) UnmarshalJSON ¶
type ActorObject ¶
type ActorObject string
Resource type identifier.
const (
ActorObjectActor ActorObject = "actor"
)
type ActorType ¶
type ActorType string
Actor type.
- `user`: a human user account.
- `api_key`: a programmatic caller authenticating with an API key.
- `agent`: an automated agent acting on the account's behalf.
- `group`: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
type AddConversationLinkRequestParam ¶
type AddConversationLinkRequestParam struct {
// The id of the business record to link.
ResourceID string `json:"resource_id" api:"required"`
// The kind of business record to link.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
ResourceType AddConversationLinkRequestResourceType `json:"resource_type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to link a business record to a conversation.
The properties ResourceID, ResourceType are required.
func (AddConversationLinkRequestParam) MarshalJSON ¶
func (r AddConversationLinkRequestParam) MarshalJSON() (data []byte, err error)
func (*AddConversationLinkRequestParam) UnmarshalJSON ¶
func (r *AddConversationLinkRequestParam) UnmarshalJSON(data []byte) error
type AddConversationLinkRequestResourceType ¶
type AddConversationLinkRequestResourceType string
The kind of business record to link.
const ( AddConversationLinkRequestResourceTypeAccount AddConversationLinkRequestResourceType = "account" AddConversationLinkRequestResourceTypeActor AddConversationLinkRequestResourceType = "actor" AddConversationLinkRequestResourceTypeEntity AddConversationLinkRequestResourceType = "entity" AddConversationLinkRequestResourceTypeRecord AddConversationLinkRequestResourceType = "record" AddConversationLinkRequestResourceTypeFreight AddConversationLinkRequestResourceType = "freight" AddConversationLinkRequestResourceTypeCommitment AddConversationLinkRequestResourceType = "commitment" AddConversationLinkRequestResourceTypeSalesOrderTotals AddConversationLinkRequestResourceType = "sales_order_totals" AddConversationLinkRequestResourceTypeSalesOrderStageTotal AddConversationLinkRequestResourceType = "sales_order_stage_total" AddConversationLinkRequestResourceTypeSalesOrderRelated AddConversationLinkRequestResourceType = "sales_order_related" AddConversationLinkRequestResourceTypeOrderContact AddConversationLinkRequestResourceType = "order_contact" AddConversationLinkRequestResourceTypeUser AddConversationLinkRequestResourceType = "user" AddConversationLinkRequestResourceTypeAddress AddConversationLinkRequestResourceType = "address" AddConversationLinkRequestResourceTypeAPIKey AddConversationLinkRequestResourceType = "api_key" AddConversationLinkRequestResourceTypeCreatedAPIKey AddConversationLinkRequestResourceType = "created_api_key" AddConversationLinkRequestResourceTypeRefreshToken AddConversationLinkRequestResourceType = "refresh_token" AddConversationLinkRequestResourceTypeList AddConversationLinkRequestResourceType = "list" AddConversationLinkRequestResourceTypeSandbox AddConversationLinkRequestResourceType = "sandbox" AddConversationLinkRequestResourceTypeRegistrationSession AddConversationLinkRequestResourceType = "registration_session" AddConversationLinkRequestResourceTypePricingPlan AddConversationLinkRequestResourceType = "pricing_plan" AddConversationLinkRequestResourceTypeAccountPlan AddConversationLinkRequestResourceType = "account_plan" AddConversationLinkRequestResourceTypePlanChange AddConversationLinkRequestResourceType = "plan_change" AddConversationLinkRequestResourceTypeEnterpriseInquiry AddConversationLinkRequestResourceType = "enterprise_inquiry" AddConversationLinkRequestResourceTypeRequestLog AddConversationLinkRequestResourceType = "request_log" AddConversationLinkRequestResourceTypeAuditEvent AddConversationLinkRequestResourceType = "audit_event" AddConversationLinkRequestResourceTypeAuditFieldChange AddConversationLinkRequestResourceType = "audit_field_change" AddConversationLinkRequestResourceTypeRole AddConversationLinkRequestResourceType = "role" AddConversationLinkRequestResourceTypeUnit AddConversationLinkRequestResourceType = "unit" AddConversationLinkRequestResourceTypeAccountAffiliation AddConversationLinkRequestResourceType = "account_affiliation" AddConversationLinkRequestResourceTypeAgentDefinition AddConversationLinkRequestResourceType = "agent_definition" AddConversationLinkRequestResourceTypeAvailableTool AddConversationLinkRequestResourceType = "available_tool" AddConversationLinkRequestResourceTypeAgentDefinitionTool AddConversationLinkRequestResourceType = "agent_definition_tool" AddConversationLinkRequestResourceTypeAgentAccountStatus AddConversationLinkRequestResourceType = "agent_account_status" AddConversationLinkRequestResourceTypeAgentRun AddConversationLinkRequestResourceType = "agent_run" AddConversationLinkRequestResourceTypeAgentAction AddConversationLinkRequestResourceType = "agent_action" AddConversationLinkRequestResourceTypeAgentRunStep AddConversationLinkRequestResourceType = "agent_run_step" AddConversationLinkRequestResourceTypeAgentTokenUsage AddConversationLinkRequestResourceType = "agent_token_usage" AddConversationLinkRequestResourceTypeAgentMemory AddConversationLinkRequestResourceType = "agent_memory" AddConversationLinkRequestResourceTypeNotification AddConversationLinkRequestResourceType = "notification" AddConversationLinkRequestResourceTypeNotificationUnreadCount AddConversationLinkRequestResourceType = "notification_unread_count" AddConversationLinkRequestResourceTypeNotificationSendResult AddConversationLinkRequestResourceType = "notification_send_result" AddConversationLinkRequestResourceTypeNotificationUnreadSummary AddConversationLinkRequestResourceType = "notification_unread_summary" AddConversationLinkRequestResourceTypeAnnouncement AddConversationLinkRequestResourceType = "announcement" AddConversationLinkRequestResourceTypeConversation AddConversationLinkRequestResourceType = "conversation" AddConversationLinkRequestResourceTypeSupportCase AddConversationLinkRequestResourceType = "support_case" AddConversationLinkRequestResourceTypeConversationParticipant AddConversationLinkRequestResourceType = "conversation_participant" AddConversationLinkRequestResourceTypeReadCursor AddConversationLinkRequestResourceType = "read_cursor" AddConversationLinkRequestResourceTypeChatMessage AddConversationLinkRequestResourceType = "chat_message" AddConversationLinkRequestResourceTypeNotificationUnreadSummaryAccount AddConversationLinkRequestResourceType = "notification_unread_summary_account" AddConversationLinkRequestResourceTypeMessagingBlock AddConversationLinkRequestResourceType = "messaging_block" AddConversationLinkRequestResourceTypeNotificationPreference AddConversationLinkRequestResourceType = "notification_preference" AddConversationLinkRequestResourceTypeMessageAttachment AddConversationLinkRequestResourceType = "message_attachment" AddConversationLinkRequestResourceTypeAttachmentUploadTarget AddConversationLinkRequestResourceType = "attachment_upload_target" AddConversationLinkRequestResourceTypeScheduledMessage AddConversationLinkRequestResourceType = "scheduled_message" AddConversationLinkRequestResourceTypeMessagingContact AddConversationLinkRequestResourceType = "messaging_contact" AddConversationLinkRequestResourceTypeMessageReport AddConversationLinkRequestResourceType = "message_report" AddConversationLinkRequestResourceTypeToolGroup AddConversationLinkRequestResourceType = "tool_group" AddConversationLinkRequestResourceTypeModel AddConversationLinkRequestResourceType = "model" AddConversationLinkRequestResourceTypePaymentTerm AddConversationLinkRequestResourceType = "payment_term" AddConversationLinkRequestResourceTypeShippingTerm AddConversationLinkRequestResourceType = "shipping_term" AddConversationLinkRequestResourceTypeQuantity AddConversationLinkRequestResourceType = "quantity" AddConversationLinkRequestResourceTypeAccountGroup AddConversationLinkRequestResourceType = "account_group" AddConversationLinkRequestResourceTypeSupportRoute AddConversationLinkRequestResourceType = "support_route" AddConversationLinkRequestResourceTypeSupportAvailability AddConversationLinkRequestResourceType = "support_availability" AddConversationLinkRequestResourceTypeAccountStatus AddConversationLinkRequestResourceType = "account_status" AddConversationLinkRequestResourceTypeGeolocation AddConversationLinkRequestResourceType = "geolocation" AddConversationLinkRequestResourceTypeAccountUser AddConversationLinkRequestResourceType = "account_user" AddConversationLinkRequestResourceTypeDepartment AddConversationLinkRequestResourceType = "department" AddConversationLinkRequestResourceTypeAccountIntegration AddConversationLinkRequestResourceType = "account_integration" AddConversationLinkRequestResourceTypeAccountPrice AddConversationLinkRequestResourceType = "account_price" AddConversationLinkRequestResourceTypeProductLine AddConversationLinkRequestResourceType = "product_line" AddConversationLinkRequestResourceTypeItemCategory AddConversationLinkRequestResourceType = "item_category" AddConversationLinkRequestResourceTypeAttribute AddConversationLinkRequestResourceType = "attribute" AddConversationLinkRequestResourceTypeRate AddConversationLinkRequestResourceType = "rate" AddConversationLinkRequestResourceTypeAccountGroupProductLineAccess AddConversationLinkRequestResourceType = "account_group_product_line_access" AddConversationLinkRequestResourceTypeSalesTarget AddConversationLinkRequestResourceType = "sales_target" AddConversationLinkRequestResourceTypeAdjustmentType AddConversationLinkRequestResourceType = "adjustment_type" AddConversationLinkRequestResourceTypeAccountBranding AddConversationLinkRequestResourceType = "account_branding" AddConversationLinkRequestResourceTypeAccountPortal AddConversationLinkRequestResourceType = "account_portal" AddConversationLinkRequestResourceTypeAccountLogoURL AddConversationLinkRequestResourceType = "account_logo_url" AddConversationLinkRequestResourceTypeAccountFaviconURL AddConversationLinkRequestResourceType = "account_favicon_url" AddConversationLinkRequestResourceTypePublicAccount AddConversationLinkRequestResourceType = "public_account" AddConversationLinkRequestResourceTypeProperty AddConversationLinkRequestResourceType = "property" AddConversationLinkRequestResourceTypeCarrier AddConversationLinkRequestResourceType = "carrier" AddConversationLinkRequestResourceTypeServiceLevel AddConversationLinkRequestResourceType = "service_level" AddConversationLinkRequestResourceTypeItem AddConversationLinkRequestResourceType = "item" AddConversationLinkRequestResourceTypeItemLotDefault AddConversationLinkRequestResourceType = "item_lot_default" AddConversationLinkRequestResourceTypeItemInventory AddConversationLinkRequestResourceType = "item_inventory" AddConversationLinkRequestResourceTypeProduct AddConversationLinkRequestResourceType = "product" AddConversationLinkRequestResourceTypeBatch AddConversationLinkRequestResourceType = "batch" AddConversationLinkRequestResourceTypeBatchFlowNode AddConversationLinkRequestResourceType = "batch_flow_node" AddConversationLinkRequestResourceTypeScanningConsumption AddConversationLinkRequestResourceType = "scanning_consumption" AddConversationLinkRequestResourceTypeOpenBatchSummary AddConversationLinkRequestResourceType = "open_batch_summary" AddConversationLinkRequestResourceTypeScanningProductionStepInfo AddConversationLinkRequestResourceType = "scanning_production_step_info" AddConversationLinkRequestResourceTypeScanningStation AddConversationLinkRequestResourceType = "scanning_station" AddConversationLinkRequestResourceTypeProductionStep AddConversationLinkRequestResourceType = "production_step" AddConversationLinkRequestResourceTypeProductionRun AddConversationLinkRequestResourceType = "production_run" AddConversationLinkRequestResourceTypeMachine AddConversationLinkRequestResourceType = "machine" AddConversationLinkRequestResourceTypeMachineStatus AddConversationLinkRequestResourceType = "machine_status" AddConversationLinkRequestResourceTypeMachineDowntimeEvent AddConversationLinkRequestResourceType = "machine_downtime_event" AddConversationLinkRequestResourceTypeDemandOverride AddConversationLinkRequestResourceType = "demand_override" AddConversationLinkRequestResourceTypeDemandOverrideType AddConversationLinkRequestResourceType = "demand_override_type" AddConversationLinkRequestResourceTypeMachineDowntimeReason AddConversationLinkRequestResourceType = "machine_downtime_reason" AddConversationLinkRequestResourceTypeProductionSchedulePreview AddConversationLinkRequestResourceType = "production_schedule_preview" AddConversationLinkRequestResourceTypeProductionScheduleRegeneratePreview AddConversationLinkRequestResourceType = "production_schedule_regenerate_preview" AddConversationLinkRequestResourceTypeProductionSchedule AddConversationLinkRequestResourceType = "production_schedule" AddConversationLinkRequestResourceTypeProductionScheduleLine AddConversationLinkRequestResourceType = "production_schedule_line" AddConversationLinkRequestResourceTypeProductionScheduleDeviation AddConversationLinkRequestResourceType = "production_schedule_deviation" AddConversationLinkRequestResourceTypeProductionScheduleDerivedLine AddConversationLinkRequestResourceType = "production_schedule_derived_line" AddConversationLinkRequestResourceTypeProductionScheduleSettings AddConversationLinkRequestResourceType = "production_schedule_settings" AddConversationLinkRequestResourceTypeProductionScheduleResourceSetting AddConversationLinkRequestResourceType = "production_schedule_resource_setting" AddConversationLinkRequestResourceTypeProductionScheduleItemSetting AddConversationLinkRequestResourceType = "production_schedule_item_setting" AddConversationLinkRequestResourceTypeFulfillmentRecommendation AddConversationLinkRequestResourceType = "fulfillment_recommendation" AddConversationLinkRequestResourceTypeAnalyzeDeliveryPerformanceResponse AddConversationLinkRequestResourceType = "analyze_delivery_performance_response" AddConversationLinkRequestResourceTypeDeliveryPerformance AddConversationLinkRequestResourceType = "delivery_performance" AddConversationLinkRequestResourceTypeDeliveryBacklogBucket AddConversationLinkRequestResourceType = "delivery_backlog_bucket" AddConversationLinkRequestResourceTypeDeliveryLatenessBucket AddConversationLinkRequestResourceType = "delivery_lateness_bucket" AddConversationLinkRequestResourceTypeDeliveryBreakdown AddConversationLinkRequestResourceType = "delivery_breakdown" AddConversationLinkRequestResourceTypeAnalyzeSalesBreakdownResponse AddConversationLinkRequestResourceType = "analyze_sales_breakdown_response" AddConversationLinkRequestResourceTypeSalesTotals AddConversationLinkRequestResourceType = "sales_totals" AddConversationLinkRequestResourceTypeSalesBreakdown AddConversationLinkRequestResourceType = "sales_breakdown" AddConversationLinkRequestResourceTypeScheduleOrderCoverage AddConversationLinkRequestResourceType = "schedule_order_coverage" AddConversationLinkRequestResourceTypeScheduleOrderCoverageLine AddConversationLinkRequestResourceType = "schedule_order_coverage_line" AddConversationLinkRequestResourceTypeScheduleDeviationType AddConversationLinkRequestResourceType = "schedule_deviation_type" AddConversationLinkRequestResourceTypeScheduleAtRiskOrder AddConversationLinkRequestResourceType = "schedule_at_risk_order" AddConversationLinkRequestResourceTypeProductionScheduleFinishedPolicy AddConversationLinkRequestResourceType = "production_schedule_finished_policy" AddConversationLinkRequestResourceTypeProductionScheduleFinishingLine AddConversationLinkRequestResourceType = "production_schedule_finishing_line" AddConversationLinkRequestResourceTypeProductionScheduleWeekRelease AddConversationLinkRequestResourceType = "production_schedule_week_release" AddConversationLinkRequestResourceTypeProductionScheduleWeekReleasePreview AddConversationLinkRequestResourceType = "production_schedule_week_release_preview" AddConversationLinkRequestResourceTypeProductionScheduleItemPolicy AddConversationLinkRequestResourceType = "production_schedule_item_policy" AddConversationLinkRequestResourceTypeChildAccount AddConversationLinkRequestResourceType = "child_account" AddConversationLinkRequestResourceTypeUnitGroup AddConversationLinkRequestResourceType = "unit_group" AddConversationLinkRequestResourceTypeUnitGroupUnit AddConversationLinkRequestResourceType = "unit_group_unit" AddConversationLinkRequestResourceTypeConsumption AddConversationLinkRequestResourceType = "consumption" AddConversationLinkRequestResourceTypeCustomerProductLineAccess AddConversationLinkRequestResourceType = "customer_product_line_access" AddConversationLinkRequestResourceTypeCustomer AddConversationLinkRequestResourceType = "customer" AddConversationLinkRequestResourceTypeFrequentlyOrderedProduct AddConversationLinkRequestResourceType = "frequently_ordered_product" AddConversationLinkRequestResourceTypePriority AddConversationLinkRequestResourceType = "priority" AddConversationLinkRequestResourceTypeDelivery AddConversationLinkRequestResourceType = "delivery" AddConversationLinkRequestResourceTypeDeliveryLine AddConversationLinkRequestResourceType = "delivery_line" AddConversationLinkRequestResourceTypeDeliveryRelated AddConversationLinkRequestResourceType = "delivery_related" AddConversationLinkRequestResourceTypeSalesOrder AddConversationLinkRequestResourceType = "sales_order" AddConversationLinkRequestResourceTypeLocation AddConversationLinkRequestResourceType = "location" AddConversationLinkRequestResourceTypeLocationType AddConversationLinkRequestResourceType = "location_type" AddConversationLinkRequestResourceTypeLot AddConversationLinkRequestResourceType = "lot" AddConversationLinkRequestResourceTypeEmailLog AddConversationLinkRequestResourceType = "email_log" AddConversationLinkRequestResourceTypeEmailDomain AddConversationLinkRequestResourceType = "email_domain" AddConversationLinkRequestResourceTypeEmailInbox AddConversationLinkRequestResourceType = "email_inbox" AddConversationLinkRequestResourceTypeEmailSender AddConversationLinkRequestResourceType = "email_sender" AddConversationLinkRequestResourceTypePortalDomain AddConversationLinkRequestResourceType = "portal_domain" AddConversationLinkRequestResourceTypeDNSRecord AddConversationLinkRequestResourceType = "dns_record" AddConversationLinkRequestResourceTypeInventoryChangeLog AddConversationLinkRequestResourceType = "inventory_change_log" AddConversationLinkRequestResourceTypeInvoice AddConversationLinkRequestResourceType = "invoice" AddConversationLinkRequestResourceTypeInvoiceSummary AddConversationLinkRequestResourceType = "invoice_summary" AddConversationLinkRequestResourceTypeInvoiceLine AddConversationLinkRequestResourceType = "invoice_line" AddConversationLinkRequestResourceTypeInvoiceAllocation AddConversationLinkRequestResourceType = "invoice_allocation" AddConversationLinkRequestResourceTypeInvoiceForPayment AddConversationLinkRequestResourceType = "invoice_for_payment" AddConversationLinkRequestResourceTypeShipment AddConversationLinkRequestResourceType = "shipment" AddConversationLinkRequestResourceTypeShipmentSummary AddConversationLinkRequestResourceType = "shipment_summary" AddConversationLinkRequestResourceTypeShipmentLine AddConversationLinkRequestResourceType = "shipment_line" AddConversationLinkRequestResourceTypeShippingCase AddConversationLinkRequestResourceType = "shipping_case" AddConversationLinkRequestResourceTypeShippingCaseLabelURL AddConversationLinkRequestResourceType = "shipping_case_label_url" AddConversationLinkRequestResourceTypeSettlement AddConversationLinkRequestResourceType = "settlement" AddConversationLinkRequestResourceTypeSettlementSummary AddConversationLinkRequestResourceType = "settlement_summary" AddConversationLinkRequestResourceTypeRolePermission AddConversationLinkRequestResourceType = "role_permission" AddConversationLinkRequestResourceTypeRegistrationFlow AddConversationLinkRequestResourceType = "registration_flow" AddConversationLinkRequestResourceTypeRegistrationFlowOption AddConversationLinkRequestResourceType = "registration_flow_option" AddConversationLinkRequestResourceTypeTransaction AddConversationLinkRequestResourceType = "transaction" AddConversationLinkRequestResourceTypeTransactionSummary AddConversationLinkRequestResourceType = "transaction_summary" AddConversationLinkRequestResourceTypeTransactionMethod AddConversationLinkRequestResourceType = "transaction_method" AddConversationLinkRequestResourceTypeTransactionType AddConversationLinkRequestResourceType = "transaction_type" AddConversationLinkRequestResourceTypeTransactionAllocation AddConversationLinkRequestResourceType = "transaction_allocation" AddConversationLinkRequestResourceTypeUsageItem AddConversationLinkRequestResourceType = "usage_item" AddConversationLinkRequestResourceTypeAccountUsageResponse AddConversationLinkRequestResourceType = "account_usage_response" AddConversationLinkRequestResourceTypeSubscriptionInfo AddConversationLinkRequestResourceType = "subscription_info" AddConversationLinkRequestResourceTypeBillingPortalSessionResponse AddConversationLinkRequestResourceType = "billing_portal_session_response" AddConversationLinkRequestResourceTypeSwitchPlanResponse AddConversationLinkRequestResourceType = "switch_plan_response" AddConversationLinkRequestResourceTypeEnsureBillingCustomerResponse AddConversationLinkRequestResourceType = "ensure_billing_customer_response" AddConversationLinkRequestResourceTypeSpendingCapResponse AddConversationLinkRequestResourceType = "spending_cap_response" AddConversationLinkRequestResourceTypeAgentSpendInfo AddConversationLinkRequestResourceType = "agent_spend_info" AddConversationLinkRequestResourceTypeWebhookResponse AddConversationLinkRequestResourceType = "webhook_response" AddConversationLinkRequestResourceTypeAddressSuggestion AddConversationLinkRequestResourceType = "address_suggestion" AddConversationLinkRequestResourceTypeAddressComponents AddConversationLinkRequestResourceType = "address_components" AddConversationLinkRequestResourceTypeAddressDetailsResult AddConversationLinkRequestResourceType = "address_details_result" AddConversationLinkRequestResourceTypeValidatedAddress AddConversationLinkRequestResourceType = "validated_address" AddConversationLinkRequestResourceTypePlanLimit AddConversationLinkRequestResourceType = "plan_limit" AddConversationLinkRequestResourceTypePlanChangeProration AddConversationLinkRequestResourceType = "plan_change_proration" AddConversationLinkRequestResourceTypePlanChangeLineItem AddConversationLinkRequestResourceType = "plan_change_line_item" AddConversationLinkRequestResourceTypeSetupBillingResponse AddConversationLinkRequestResourceType = "setup_billing_response" AddConversationLinkRequestResourceTypeConfirmPaymentResponse AddConversationLinkRequestResourceType = "confirm_payment_response" AddConversationLinkRequestResourceTypeOAuthResponse AddConversationLinkRequestResourceType = "oauth_response" AddConversationLinkRequestResourceTypeOAuthStatusResponse AddConversationLinkRequestResourceType = "oauth_status_response" AddConversationLinkRequestResourceTypeStripePublishableKey AddConversationLinkRequestResourceType = "stripe_publishable_key" AddConversationLinkRequestResourceTypeStripeStatus AddConversationLinkRequestResourceType = "stripe_status" AddConversationLinkRequestResourceTypeHealthcheck AddConversationLinkRequestResourceType = "healthcheck" AddConversationLinkRequestResourceTypeAgentDefinitionConfig AddConversationLinkRequestResourceType = "agent_definition_config" AddConversationLinkRequestResourceTypeTriggerConfig AddConversationLinkRequestResourceType = "trigger_config" AddConversationLinkRequestResourceTypeCustomerContactInfo AddConversationLinkRequestResourceType = "customer_contact_info" AddConversationLinkRequestResourceTypeCustomerFreightPreferences AddConversationLinkRequestResourceType = "customer_freight_preferences" AddConversationLinkRequestResourceTypeCustomerDefaults AddConversationLinkRequestResourceType = "customer_defaults" AddConversationLinkRequestResourceTypeCustomerLeadTime AddConversationLinkRequestResourceType = "customer_lead_time" AddConversationLinkRequestResourceTypeCustomerNotificationPreferences AddConversationLinkRequestResourceType = "customer_notification_preferences" AddConversationLinkRequestResourceTypeOrderNotificationRecipient AddConversationLinkRequestResourceType = "order_notification_recipient" AddConversationLinkRequestResourceTypeOrderDiscount AddConversationLinkRequestResourceType = "order_discount" AddConversationLinkRequestResourceTypeSalesOrderLine AddConversationLinkRequestResourceType = "sales_order_line" AddConversationLinkRequestResourceTypeSalesOrderType AddConversationLinkRequestResourceType = "sales_order_type" AddConversationLinkRequestResourceTypeSalesOrderStatus AddConversationLinkRequestResourceType = "sales_order_status" AddConversationLinkRequestResourceTypeMaterial AddConversationLinkRequestResourceType = "material" AddConversationLinkRequestResourceTypeSupplierMaterial AddConversationLinkRequestResourceType = "supplier_material" AddConversationLinkRequestResourceTypePart AddConversationLinkRequestResourceType = "part" AddConversationLinkRequestResourceTypePermissionGroup AddConversationLinkRequestResourceType = "permission_group" AddConversationLinkRequestResourceTypePermission AddConversationLinkRequestResourceType = "permission" AddConversationLinkRequestResourceTypePick AddConversationLinkRequestResourceType = "pick" AddConversationLinkRequestResourceTypePickLine AddConversationLinkRequestResourceType = "pick_line" AddConversationLinkRequestResourceTypeProductType AddConversationLinkRequestResourceType = "product_type" AddConversationLinkRequestResourceTypeProduction AddConversationLinkRequestResourceType = "production" AddConversationLinkRequestResourceTypeProductionFlow AddConversationLinkRequestResourceType = "production_flow" AddConversationLinkRequestResourceTypeMap AddConversationLinkRequestResourceType = "map" AddConversationLinkRequestResourceTypePurchaseOrder AddConversationLinkRequestResourceType = "purchase_order" AddConversationLinkRequestResourceTypePurchaseOrderLine AddConversationLinkRequestResourceType = "purchase_order_line" AddConversationLinkRequestResourceTypePurchaseOrderRelated AddConversationLinkRequestResourceType = "purchase_order_related" AddConversationLinkRequestResourceTypeSupplier AddConversationLinkRequestResourceType = "supplier" AddConversationLinkRequestResourceTypeReceivableEntry AddConversationLinkRequestResourceType = "receivable_entry" AddConversationLinkRequestResourceTypeReceivingOrder AddConversationLinkRequestResourceType = "receiving_order" AddConversationLinkRequestResourceTypeReceivingOrderLine AddConversationLinkRequestResourceType = "receiving_order_line" AddConversationLinkRequestResourceTypeReceivingOrderTotals AddConversationLinkRequestResourceType = "receiving_order_totals" AddConversationLinkRequestResourceTypeReceivingOrderStageTotal AddConversationLinkRequestResourceType = "receiving_order_stage_total" AddConversationLinkRequestResourceTypeReceivingOrderRelated AddConversationLinkRequestResourceType = "receiving_order_related" AddConversationLinkRequestResourceTypeEmailContact AddConversationLinkRequestResourceType = "email_contact" AddConversationLinkRequestResourceTypeAllocationEntry AddConversationLinkRequestResourceType = "allocation_entry" AddConversationLinkRequestResourceTypeOpenCreditEntry AddConversationLinkRequestResourceType = "open_credit_entry" AddConversationLinkRequestResourceTypeVolumeDiscount AddConversationLinkRequestResourceType = "volume_discount" AddConversationLinkRequestResourceTypeVolumeDiscountTier AddConversationLinkRequestResourceType = "volume_discount_tier" AddConversationLinkRequestResourceTypeAnalyzeDeliveriesResponse AddConversationLinkRequestResourceType = "analyze_deliveries_response" AddConversationLinkRequestResourceTypeAnalyzeManufacturingResponse AddConversationLinkRequestResourceType = "analyze_manufacturing_response" AddConversationLinkRequestResourceTypeAnalyzeManufacturingBatchResponse AddConversationLinkRequestResourceType = "analyze_manufacturing_batch_response" AddConversationLinkRequestResourceTypeAnalyzeQuarterlyOrdersResponse AddConversationLinkRequestResourceType = "analyze_quarterly_orders_response" AddConversationLinkRequestResourceTypeAnalyzeNewCustomersResponse AddConversationLinkRequestResourceType = "analyze_new_customers_response" AddConversationLinkRequestResourceTypeAnalyzeDemandForecastResponse AddConversationLinkRequestResourceType = "analyze_demand_forecast_response" AddConversationLinkRequestResourceTypeAnalyzeOeeResponse AddConversationLinkRequestResourceType = "analyze_oee_response" AddConversationLinkRequestResourceTypeAnalyzeOeeTrendResponse AddConversationLinkRequestResourceType = "analyze_oee_trend_response" AddConversationLinkRequestResourceTypeAnalyzeScheduleAttainmentResponse AddConversationLinkRequestResourceType = "analyze_schedule_attainment_response" AddConversationLinkRequestResourceTypeCatalogProductLine AddConversationLinkRequestResourceType = "catalog_product_line" AddConversationLinkRequestResourceTypeCatalogCategory AddConversationLinkRequestResourceType = "catalog_category" AddConversationLinkRequestResourceTypeCatalogProduct AddConversationLinkRequestResourceType = "catalog_product" AddConversationLinkRequestResourceTypeCatalogProperty AddConversationLinkRequestResourceType = "catalog_property" AddConversationLinkRequestResourceTypeCatalogAttribute AddConversationLinkRequestResourceType = "catalog_attribute" AddConversationLinkRequestResourceTypeDcLocation AddConversationLinkRequestResourceType = "dc_location" AddConversationLinkRequestResourceTypeEdiRun AddConversationLinkRequestResourceType = "edi_run" AddConversationLinkRequestResourceTypeInventoryItem AddConversationLinkRequestResourceType = "inventory_item" AddConversationLinkRequestResourceTypeAnalyzeWeeksOfSalesResponse AddConversationLinkRequestResourceType = "analyze_weeks_of_sales_response" AddConversationLinkRequestResourceTypeBulkReconcileItemsResponse AddConversationLinkRequestResourceType = "bulk_reconcile_items_response" AddConversationLinkRequestResourceTypeSysProperty AddConversationLinkRequestResourceType = "sys_property" AddConversationLinkRequestResourceTypeSysPropertyType AddConversationLinkRequestResourceType = "sys_property_type" AddConversationLinkRequestResourceTypeSysPropertyValue AddConversationLinkRequestResourceType = "sys_property_value" AddConversationLinkRequestResourceTypeTerritory AddConversationLinkRequestResourceType = "territory" AddConversationLinkRequestResourceTypeTenancy AddConversationLinkRequestResourceType = "tenancy" AddConversationLinkRequestResourceTypeCheckoutSession AddConversationLinkRequestResourceType = "checkout_session" AddConversationLinkRequestResourceTypeEstimateRateResult AddConversationLinkRequestResourceType = "estimate_rate_result" AddConversationLinkRequestResourceTypeRateShopOption AddConversationLinkRequestResourceType = "rate_shop_option" AddConversationLinkRequestResourceTypeRateShopResult AddConversationLinkRequestResourceType = "rate_shop_result" AddConversationLinkRequestResourceTypeOwner AddConversationLinkRequestResourceType = "owner" AddConversationLinkRequestResourceTypeCreatedBy AddConversationLinkRequestResourceType = "created_by" AddConversationLinkRequestResourceTypeMessage AddConversationLinkRequestResourceType = "message" AddConversationLinkRequestResourceTypeAccountPhotoUploadResult AddConversationLinkRequestResourceType = "account_photo_upload_result" AddConversationLinkRequestResourceTypeUserPhotoUploadResult AddConversationLinkRequestResourceType = "user_photo_upload_result" AddConversationLinkRequestResourceTypeUserPhotoURL AddConversationLinkRequestResourceType = "user_photo_url" AddConversationLinkRequestResourceTypeBatchLot AddConversationLinkRequestResourceType = "batch_lot" AddConversationLinkRequestResourceTypeCheckDuplicateResult AddConversationLinkRequestResourceType = "check_duplicate_result" AddConversationLinkRequestResourceTypeItemCosts AddConversationLinkRequestResourceType = "item_costs" AddConversationLinkRequestResourceTypeItemTrends AddConversationLinkRequestResourceType = "item_trends" AddConversationLinkRequestResourceTypeReconciledItemResult AddConversationLinkRequestResourceType = "reconciled_item_result" AddConversationLinkRequestResourceTypeSkippedItemResult AddConversationLinkRequestResourceType = "skipped_item_result" AddConversationLinkRequestResourceTypeReconcileErrorResult AddConversationLinkRequestResourceType = "reconcile_error_result" AddConversationLinkRequestResourceTypeItemTrendPoint AddConversationLinkRequestResourceType = "item_trend_point" AddConversationLinkRequestResourceTypeTenancyPendingRegistration AddConversationLinkRequestResourceType = "tenancy_pending_registration" AddConversationLinkRequestResourceTypeInvoiceAllocationEntry AddConversationLinkRequestResourceType = "invoice_allocation_entry" AddConversationLinkRequestResourceTypeAllocationCustomer AddConversationLinkRequestResourceType = "allocation_customer" AddConversationLinkRequestResourceTypeCheckoutSalesOrder AddConversationLinkRequestResourceType = "checkout_sales_order" AddConversationLinkRequestResourceTypeSalesOrderPriceQuote AddConversationLinkRequestResourceType = "sales_order_price_quote" AddConversationLinkRequestResourceTypeSalesOrderFreightQuote AddConversationLinkRequestResourceType = "sales_order_freight_quote" AddConversationLinkRequestResourceTypeSalesOrderCommitmentQuote AddConversationLinkRequestResourceType = "sales_order_commitment_quote" AddConversationLinkRequestResourceTypeOperatingCalendar AddConversationLinkRequestResourceType = "operating_calendar" AddConversationLinkRequestResourceTypeOperatingCalendarClosure AddConversationLinkRequestResourceType = "operating_calendar_closure" AddConversationLinkRequestResourceTypeSalesOrderPriceQuoteLine AddConversationLinkRequestResourceType = "sales_order_price_quote_line" AddConversationLinkRequestResourceTypeHubspotSyncJob AddConversationLinkRequestResourceType = "hubspot_sync_job" AddConversationLinkRequestResourceTypeHubspotSyncReport AddConversationLinkRequestResourceType = "hubspot_sync_report" AddConversationLinkRequestResourceTypeHubspotCompanyReview AddConversationLinkRequestResourceType = "hubspot_company_review" AddConversationLinkRequestResourceTypeHubspotCompanyCandidate AddConversationLinkRequestResourceType = "hubspot_company_candidate" AddConversationLinkRequestResourceTypeHubspotSyncRecord AddConversationLinkRequestResourceType = "hubspot_sync_record" AddConversationLinkRequestResourceTypeContactMatch AddConversationLinkRequestResourceType = "contact_match" AddConversationLinkRequestResourceTypeReplyDraft AddConversationLinkRequestResourceType = "reply_draft" AddConversationLinkRequestResourceTypeConversationLink AddConversationLinkRequestResourceType = "conversation_link" AddConversationLinkRequestResourceTypeMessagingGroup AddConversationLinkRequestResourceType = "messaging_group" AddConversationLinkRequestResourceTypeMessagingGroupMember AddConversationLinkRequestResourceType = "messaging_group_member" AddConversationLinkRequestResourceTypePortalProfile AddConversationLinkRequestResourceType = "portal_profile" AddConversationLinkRequestResourceTypePortalRegistrationSession AddConversationLinkRequestResourceType = "portal_registration_session" AddConversationLinkRequestResourceTypePortalRegistrationSessionData AddConversationLinkRequestResourceType = "portal_registration_session_data" AddConversationLinkRequestResourceTypePackList AddConversationLinkRequestResourceType = "pack_list" AddConversationLinkRequestResourceTypePackListParty AddConversationLinkRequestResourceType = "pack_list_party" AddConversationLinkRequestResourceTypePackListLineItem AddConversationLinkRequestResourceType = "pack_list_line_item" AddConversationLinkRequestResourceTypePackListBackOrder AddConversationLinkRequestResourceType = "pack_list_back_order" AddConversationLinkRequestResourceTypePackListCase AddConversationLinkRequestResourceType = "pack_list_case" AddConversationLinkRequestResourceTypeJob AddConversationLinkRequestResourceType = "job" AddConversationLinkRequestResourceTypeJobResult AddConversationLinkRequestResourceType = "job_result" AddConversationLinkRequestResourceTypeJobExport AddConversationLinkRequestResourceType = "job_export" AddConversationLinkRequestResourceTypeAnalyzeCustomerPricingResponse AddConversationLinkRequestResourceType = "analyze_customer_pricing_response" AddConversationLinkRequestResourceTypeCustomerPricingFinding AddConversationLinkRequestResourceType = "customer_pricing_finding" AddConversationLinkRequestResourceTypeCustomerPricingSummary AddConversationLinkRequestResourceType = "customer_pricing_summary" AddConversationLinkRequestResourceTypeComputedRate AddConversationLinkRequestResourceType = "computed_rate" AddConversationLinkRequestResourceTypeComputedQuantity AddConversationLinkRequestResourceType = "computed_quantity" AddConversationLinkRequestResourceTypeAnalyzeRealizedMarginsResponse AddConversationLinkRequestResourceType = "analyze_realized_margins_response" AddConversationLinkRequestResourceTypeRealizedMarginFinding AddConversationLinkRequestResourceType = "realized_margin_finding" AddConversationLinkRequestResourceTypeRealizedMarginSummary AddConversationLinkRequestResourceType = "realized_margin_summary" AddConversationLinkRequestResourceTypeShipmentRelated AddConversationLinkRequestResourceType = "shipment_related" AddConversationLinkRequestResourceTypeInvoiceRelated AddConversationLinkRequestResourceType = "invoice_related" AddConversationLinkRequestResourceTypePickRelated AddConversationLinkRequestResourceType = "pick_related" AddConversationLinkRequestResourceTypePickTotals AddConversationLinkRequestResourceType = "pick_totals" AddConversationLinkRequestResourceTypePickStageTotal AddConversationLinkRequestResourceType = "pick_stage_total" )
type AddMessagingGroupMemberRequestMemberType ¶
type AddMessagingGroupMemberRequestMemberType string
The kind of member being added, which decides whether `account_user_id` or `agent_config_id` is expected.
const ( AddMessagingGroupMemberRequestMemberTypeUser AddMessagingGroupMemberRequestMemberType = "user" AddMessagingGroupMemberRequestMemberTypeAgent AddMessagingGroupMemberRequestMemberType = "agent" )
type AddMessagingGroupMemberRequestParam ¶
type AddMessagingGroupMemberRequestParam struct {
// The kind of member being added, which decides whether `account_user_id` or
// `agent_config_id` is expected.
//
// Any of "user", "agent".
MemberType AddMessagingGroupMemberRequestMemberType `json:"member_type,omitzero" api:"required"`
// The account user to add (required when `member_type` is `user`).
AccountUserID param.Opt[string] `json:"account_user_id,omitzero"`
// The agent to add (required when `member_type` is `agent`).
AgentConfigID param.Opt[string] `json:"agent_config_id,omitzero"`
// contains filtered or unexported fields
}
Request to add a member to a reusable roster.
The property MemberType is required.
func (AddMessagingGroupMemberRequestParam) MarshalJSON ¶
func (r AddMessagingGroupMemberRequestParam) MarshalJSON() (data []byte, err error)
func (*AddMessagingGroupMemberRequestParam) UnmarshalJSON ¶
func (r *AddMessagingGroupMemberRequestParam) UnmarshalJSON(data []byte) error
type AddParticipantRequestParam ¶
type AddParticipantRequestParam struct {
// The account user to add.
AccountUserID string `json:"account_user_id" api:"required"`
// Role to grant the new participant.
//
// - `admin`: can add and remove members and rename the conversation.
// - `member`: can post, leave, mute, and react.
// - `viewer`: read-only access.
//
// `owner` is not accepted here; use the set-role endpoint to make an existing
// participant an owner.
//
// Any of "owner", "admin", "member", "viewer".
Role AddParticipantRequestRole `json:"role,omitzero"`
// contains filtered or unexported fields
}
Request to add an account user to a group conversation.
The property AccountUserID is required.
func (AddParticipantRequestParam) MarshalJSON ¶
func (r AddParticipantRequestParam) MarshalJSON() (data []byte, err error)
func (*AddParticipantRequestParam) UnmarshalJSON ¶
func (r *AddParticipantRequestParam) UnmarshalJSON(data []byte) error
type AddParticipantRequestRole ¶
type AddParticipantRequestRole string
Role to grant the new participant.
- `admin`: can add and remove members and rename the conversation. - `member`: can post, leave, mute, and react. - `viewer`: read-only access.
`owner` is not accepted here; use the set-role endpoint to make an existing participant an owner.
const ( AddParticipantRequestRoleOwner AddParticipantRequestRole = "owner" AddParticipantRequestRoleAdmin AddParticipantRequestRole = "admin" AddParticipantRequestRoleMember AddParticipantRequestRole = "member" AddParticipantRequestRoleViewer AddParticipantRequestRole = "viewer" )
type Address ¶
type Address struct {
// Address ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Email address associated with the address.
Email string `json:"email" api:"required"`
// The street-level location details of an address.
Geolocation Geolocation `json:"geolocation" api:"required"`
// Display name of the address.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "address".
Object AddressObject `json:"object" api:"required"`
// Phone number associated with the address.
Phone string `json:"phone" api:"required"`
// The operating calendar naming the days this dock accepts freight.
//
// The most specific link in the receiving chain: set it when one of a customer's
// sites keeps different days from the rest. Null falls through to the customer,
// then their group, then the account default.
ReceiveCalendarID string `json:"receive_calendar_id" api:"required"`
// How the address is used.
//
// - `standard`: a normal shipping or billing address.
// - `drop_ship`: an address an order is shipped to directly, typically a third
// party or end customer rather than the account itself.
//
// Any of "standard", "drop_ship".
Type AddressType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Email respjson.Field
Geolocation respjson.Field
Name respjson.Field
Object respjson.Field
Phone respjson.Field
ReceiveCalendarID respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A saved address that can be used for billing and shipping on sales orders, invoices, and shipments.
func (*Address) UnmarshalJSON ¶
type AddressComponents ¶
type AddressComponents struct {
// First line of the street address.
AddressLine1 string `json:"address_line_1" api:"required"`
// Second line of the street address.
AddressLine2 string `json:"address_line_2" api:"required"`
// City or locality.
City string `json:"city" api:"required"`
// Country name or code.
Country string `json:"country" api:"required"`
// Two-letter country code.
CountryCode string `json:"country_code" api:"required"`
// Resource type identifier.
//
// Any of "address_components".
Object AddressComponentsObject `json:"object" api:"required"`
// Postal or ZIP code.
PostalCode string `json:"postal_code" api:"required"`
// State or administrative area.
State string `json:"state" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddressLine1 respjson.Field
AddressLine2 respjson.Field
City respjson.Field
Country respjson.Field
CountryCode respjson.Field
Object respjson.Field
PostalCode respjson.Field
State respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Parsed address components.
func (AddressComponents) RawJSON ¶
func (r AddressComponents) RawJSON() string
Returns the unmodified JSON received from the API
func (*AddressComponents) UnmarshalJSON ¶
func (r *AddressComponents) UnmarshalJSON(data []byte) error
type AddressComponentsObject ¶
type AddressComponentsObject string
Resource type identifier.
const (
AddressComponentsObjectAddressComponents AddressComponentsObject = "address_components"
)
type AddressInputParam ¶
type AddressInputParam struct {
// Two-letter ISO 3166-1 country code, such as `US`.
Country string `json:"country" api:"required"`
// Display name of the address.
Name string `json:"name" api:"required"`
// Email address associated with the address.
Email param.Opt[string] `json:"email,omitzero"`
// City or locality.
Locality param.Opt[string] `json:"locality,omitzero"`
// Phone number associated with the address.
Phone param.Opt[string] `json:"phone,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postal_code,omitzero"`
// The operating calendar naming the days this dock accepts freight, overriding the
// customer's own.
ReceiveCalendarID param.Opt[string] `json:"receive_calendar_id,omitzero"`
// State or administrative area.
State param.Opt[string] `json:"state,omitzero"`
// First line of the street address.
StreetLine1 param.Opt[string] `json:"street_line_1,omitzero"`
// Second line of the street address.
StreetLine2 param.Opt[string] `json:"street_line_2,omitzero"`
// How the address is used.
//
// - `standard`: a normal shipping or billing address.
// - `drop_ship`: an address an order is shipped to directly, typically a third
// party or end customer rather than the account itself.
//
// Any of "standard", "drop_ship".
Type AddressInputType `json:"type,omitzero"`
// contains filtered or unexported fields
}
Address details supplied when creating an address, either on its own or inline on another resource.
A few requests, such as shipping rate estimates, take these same fields for a one-off address that is never saved to the account.
The properties Country, Name are required.
func (AddressInputParam) MarshalJSON ¶
func (r AddressInputParam) MarshalJSON() (data []byte, err error)
func (*AddressInputParam) UnmarshalJSON ¶
func (r *AddressInputParam) UnmarshalJSON(data []byte) error
type AddressInputType ¶
type AddressInputType string
How the address is used.
- `standard`: a normal shipping or billing address.
- `drop_ship`: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
const ( AddressInputTypeStandard AddressInputType = "standard" AddressInputTypeDropShip AddressInputType = "drop_ship" )
type AddressObject ¶
type AddressObject string
Resource type identifier.
const (
AddressObjectAddress AddressObject = "address"
)
type AddressSuggestion ¶
type AddressSuggestion struct {
// Identifier of the suggested place.
//
// Pass this value as the `id` path parameter of the address details endpoint to
// retrieve the full parsed address. It is issued by the underlying address
// provider rather than by OpenMRP, so it is not a durable OpenMRP resource ID.
ID string `json:"id" api:"required"`
// Full description of the address.
Description string `json:"description" api:"required"`
// Main text (typically the street address).
MainText string `json:"main_text" api:"required"`
// Resource type identifier.
//
// Any of "address_suggestion".
Object AddressSuggestionObject `json:"object" api:"required"`
// Secondary text (typically city, state, country).
SecondaryText string `json:"secondary_text" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
MainText respjson.Field
Object respjson.Field
SecondaryText respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A candidate address returned by address autocomplete.
A suggestion is a lookup result from the address provider, not a saved address in your account. Creating an address from one is a separate step.
func (AddressSuggestion) RawJSON ¶
func (r AddressSuggestion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AddressSuggestion) UnmarshalJSON ¶
func (r *AddressSuggestion) UnmarshalJSON(data []byte) error
type AddressSuggestionObject ¶
type AddressSuggestionObject string
Resource type identifier.
const (
AddressSuggestionObjectAddressSuggestion AddressSuggestionObject = "address_suggestion"
)
type AddressType ¶
type AddressType string
How the address is used.
- `standard`: a normal shipping or billing address.
- `drop_ship`: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
const ( AddressTypeStandard AddressType = "standard" AddressTypeDropShip AddressType = "drop_ship" )
type AdjustmentType ¶
type AdjustmentType struct {
// Adjustment type ID.
ID string `json:"id" api:"required"`
// Machine-readable code identifying what kind of adjustment this is.
//
// - `discount`: a price reduction.
// - `shipping_discrepancy`: corrects a difference between quoted and actual
// freight.
// - `short_payment`: reconciles an invoice paid for less than the amount due.
// - `write_off`: cancels an uncollectible balance.
// - `fee`: an additional charge.
// - `refund`: returns money to the customer.
//
// Any of "discount", "shipping_discrepancy", "short_payment", "write_off", "fee",
// "refund".
Code AdjustmentTypeCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Human-readable name of the adjustment type (e.g. "Discount").
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "adjustment_type".
Object AdjustmentTypeObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A category of financial adjustment, such as a discount, fee, or write-off.
Adjustment types classify the `adjustment` transactions recorded against a customer.
func (AdjustmentType) RawJSON ¶
func (r AdjustmentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*AdjustmentType) UnmarshalJSON ¶
func (r *AdjustmentType) UnmarshalJSON(data []byte) error
type AdjustmentTypeCode ¶
type AdjustmentTypeCode string
Machine-readable code identifying what kind of adjustment this is.
- `discount`: a price reduction.
- `shipping_discrepancy`: corrects a difference between quoted and actual freight.
- `short_payment`: reconciles an invoice paid for less than the amount due.
- `write_off`: cancels an uncollectible balance.
- `fee`: an additional charge.
- `refund`: returns money to the customer.
const ( AdjustmentTypeCodeDiscount AdjustmentTypeCode = "discount" AdjustmentTypeCodeShippingDiscrepancy AdjustmentTypeCode = "shipping_discrepancy" AdjustmentTypeCodeShortPayment AdjustmentTypeCode = "short_payment" AdjustmentTypeCodeWriteOff AdjustmentTypeCode = "write_off" AdjustmentTypeCodeFee AdjustmentTypeCode = "fee" AdjustmentTypeCodeRefund AdjustmentTypeCode = "refund" )
type AdjustmentTypeObject ¶
type AdjustmentTypeObject string
Resource type identifier.
const (
AdjustmentTypeObjectAdjustmentType AdjustmentTypeObject = "adjustment_type"
)
type AgentAction ¶
type AgentAction struct {
// Agent action ID.
ID string `json:"id" api:"required"`
// When this action was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Longer description of what the action does.
Description string `json:"description" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Entity Entity `json:"entity" api:"required"`
// Error message if the action failed.
ErrorMessage string `json:"error_message" api:"required"`
// When the action was executed.
ExecutedAt time.Time `json:"executed_at" api:"required" format:"date-time"`
// Arguments passed to the tool, as JSON.
//
// Shape depends on `tool`. Encoded as a JSON value (object, array, string, number,
// boolean, or null), not a JSON-encoded string.
Input any `json:"input" api:"required"`
// Short human-readable label summarizing the action.
Label string `json:"label" api:"required"`
// Resource type identifier.
//
// Any of "agent_action".
Object AgentActionObject `json:"object" api:"required"`
// Result returned by the tool, as JSON.
//
// The shape depends on `tool`. An action that has not executed — because it is
// still waiting on a review decision, or was rejected — carries `{}`. Encoded as a
// JSON value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
Output any `json:"output" api:"required"`
// Whether a person must approve this action before it takes effect.
//
// Fixed when the action is recorded, from the agent's review setting for that
// tool; tools that take an externally visible action, such as `send_email`, always
// require review and cannot be exempted. When review is required the action starts
// in `pending_review` and stays there until someone approves or rejects it;
// otherwise it is `auto_approved`.
//
// Any of "not_required", "required".
ReviewRequirement AgentActionReviewRequirement `json:"review_requirement" api:"required"`
// When a human review decision was recorded for the action.
ReviewedAt time.Time `json:"reviewed_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
ReviewedBy Actor `json:"reviewed_by" api:"required"`
// A single execution of an agent, from trigger through completion.
Run *AgentRun `json:"run" api:"required"`
// Current action status.
//
// - `pending_review`: awaiting human review before it can execute.
// - `auto_approved`: automatically approved by policy.
// - `approved`: manually approved by a user.
// - `rejected`: rejected by a user; will not execute.
// - `executed`: successfully executed.
// - `failed`: errored during execution; see `error_message`.
//
// Any of "pending_review", "auto_approved", "approved", "rejected", "executed",
// "failed".
Status AgentActionStatus `json:"status" api:"required"`
// The tool the agent invoked for this action.
//
// - `create_artifact`: create an artifact such as a report, document, or data
// export.
// - `read_doc`: read OpenMRP documentation pages.
// - `fetch_url`: fetch content from a public URL.
// - `draft_reply`: propose a reply to the case's external party as a draft held
// for human approval (not sent).
// - `send_email`: send an email reply through the conversation's bound inbox.
//
// Any of "create_artifact", "read_doc", "fetch_url", "send_email", "draft_reply".
Tool AgentActionTool `json:"tool" api:"required"`
// When this action was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Entity respjson.Field
ErrorMessage respjson.Field
ExecutedAt respjson.Field
Input respjson.Field
Label respjson.Field
Object respjson.Field
Output respjson.Field
ReviewRequirement respjson.Field
ReviewedAt respjson.Field
ReviewedBy respjson.Field
Run respjson.Field
Status respjson.Field
Tool respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single tool invocation performed by an agent during a run.
Each action records the tool that was called, its input and output, and any human review decision.
func (AgentAction) RawJSON ¶
func (r AgentAction) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentAction) UnmarshalJSON ¶
func (r *AgentAction) UnmarshalJSON(data []byte) error
type AgentActionObject ¶
type AgentActionObject string
Resource type identifier.
const (
AgentActionObjectAgentAction AgentActionObject = "agent_action"
)
type AgentActionReviewRequirement ¶
type AgentActionReviewRequirement string
Whether a person must approve this action before it takes effect.
Fixed when the action is recorded, from the agent's review setting for that tool; tools that take an externally visible action, such as `send_email`, always require review and cannot be exempted. When review is required the action starts in `pending_review` and stays there until someone approves or rejects it; otherwise it is `auto_approved`.
const ( AgentActionReviewRequirementNotRequired AgentActionReviewRequirement = "not_required" AgentActionReviewRequirementRequired AgentActionReviewRequirement = "required" )
type AgentActionStatus ¶
type AgentActionStatus string
Current action status.
- `pending_review`: awaiting human review before it can execute. - `auto_approved`: automatically approved by policy. - `approved`: manually approved by a user. - `rejected`: rejected by a user; will not execute. - `executed`: successfully executed. - `failed`: errored during execution; see `error_message`.
const ( AgentActionStatusPendingReview AgentActionStatus = "pending_review" AgentActionStatusAutoApproved AgentActionStatus = "auto_approved" AgentActionStatusApproved AgentActionStatus = "approved" AgentActionStatusRejected AgentActionStatus = "rejected" AgentActionStatusExecuted AgentActionStatus = "executed" AgentActionStatusFailed AgentActionStatus = "failed" )
type AgentActionTool ¶
type AgentActionTool string
The tool the agent invoked for this action.
- `create_artifact`: create an artifact such as a report, document, or data export.
- `read_doc`: read OpenMRP documentation pages.
- `fetch_url`: fetch content from a public URL.
- `draft_reply`: propose a reply to the case's external party as a draft held for human approval (not sent).
- `send_email`: send an email reply through the conversation's bound inbox.
const ( AgentActionToolCreateArtifact AgentActionTool = "create_artifact" AgentActionToolReadDoc AgentActionTool = "read_doc" AgentActionToolFetchURL AgentActionTool = "fetch_url" AgentActionToolSendEmail AgentActionTool = "send_email" AgentActionToolDraftReply AgentActionTool = "draft_reply" )
type AgentDefinition ¶
type AgentDefinition struct {
// Agent definition ID.
ID string `json:"id" api:"required"`
// Category grouping for the agent (e.g. `order_processing`), used to organize
// agents in the UI.
CategoryCode string `json:"category_code" api:"required"`
// Agent-level configuration controlling LLM behavior and trigger settings.
//
// Distinct from per-tool configuration (`tools[].config`), which configures
// individual tools attached to the agent.
Config AgentDefinitionConfig `json:"config" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether the agent is provided by OpenMRP or created in this account.
//
// - `system`: provided by OpenMRP; cannot be edited or deleted.
// - `custom`: created by a user in this account.
//
// Any of "system", "custom".
DefinitionType AgentDefinitionDefinitionType `json:"definition_type" api:"required"`
// Description of what the agent does.
Description string `json:"description" api:"required"`
// Whether this agent definition can be edited.
//
// Always `read_only` for `system` definitions.
//
// Any of "editable", "read_only".
Editability AgentDefinitionEditability `json:"editability" api:"required"`
// Human-readable name of the agent.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "agent_definition".
Object AgentDefinitionObject `json:"object" api:"required"`
// A named set of permissions that can be assigned to users to control what they
// can access.
Role Role `json:"role" api:"required"`
// URL-friendly identifier for the agent.
//
// Unique within the account.
Slug string `json:"slug" api:"required"`
// Whether this agent is enabled for the current account.
//
// Activation is per-account: a `system` agent shared across accounts can be
// `active` for one account and `inactive` for another. An `inactive` agent cannot
// be triggered.
//
// Any of "active", "inactive".
Status AgentDefinitionStatus `json:"status" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Tools ListAgentDefinitionTool `json:"tools" api:"required"`
// How runs of this agent are initiated.
//
// - `scheduled`: runs on a cron schedule (see
// `config.trigger_config.cron_schedule`).
// - `event`: runs in response to platform events (see
// `config.trigger_config.event_filters`).
// - `manual`: runs only when explicitly invoked.
// - `chat`: runs in response to a chat message; the run is linked to a
// conversation and posts its reply back into it.
//
// Any of "scheduled", "manual", "event", "chat".
TriggerType AgentDefinitionTriggerType `json:"trigger_type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CategoryCode respjson.Field
Config respjson.Field
CreatedAt respjson.Field
DefinitionType respjson.Field
Description respjson.Field
Editability respjson.Field
Name respjson.Field
Object respjson.Field
Role respjson.Field
Slug respjson.Field
Status respjson.Field
Tools respjson.Field
TriggerType respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An AI agent available to the account.
The definition describes what the agent does, how its runs are triggered, the tools it can use, and whether it is currently enabled for the account.
func (AgentDefinition) RawJSON ¶
func (r AgentDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentDefinition) UnmarshalJSON ¶
func (r *AgentDefinition) UnmarshalJSON(data []byte) error
type AgentDefinitionConfig ¶
type AgentDefinitionConfig struct {
// Per-endpoint-tool human-review overrides, keyed by tool slug.
//
// When an entry is `true`, the run pauses in `awaiting_approval` each time the
// agent calls that endpoint-tool until it is approved via the Continue Agent Run
// endpoint. Slugs absent from the map do not require review.
EndpointToolReview map[string]bool `json:"endpoint_tool_review" api:"required"`
// API-endpoint tools the agent may discover and use, by slug (e.g.
// `create_account_group`).
//
// These correspond to tools listed by the List Tools endpoint with category
// `api_endpoint`. A single entry `*` grants the entire endpoint-tool catalog.
EndpointToolSlugs []string `json:"endpoint_tool_slugs" api:"required"`
// Resource type identifier.
//
// Any of "agent_definition_config".
Object AgentDefinitionConfigObject `json:"object" api:"required"`
// Standing instructions that define the agent's role and how it should behave on
// every run.
SystemPrompt string `json:"system_prompt" api:"required"`
// LLM sampling temperature between 0 and 1.
//
// Lower values make the agent's output more repeatable and literal; higher values
// make it more varied.
Temperature float64 `json:"temperature" api:"required"`
// Intelligence and cost tier for the agent's reasoning.
//
// Selects how capable and expensive a model the agent uses without pinning a
// specific model; higher tiers reason better but cost more. Each tier resolves to
// an ordered chain of equivalent models, so a run automatically fails over to
// another provider's model if the preferred one is unavailable.
//
// - `frontier`: the most capable tier, for multi-step planning, ambiguous agent
// work, and hard coding or architecture tasks.
// - `high`: for normal planning, code edits, synthesis, and customer-facing
// reasoning.
// - `balanced`: for research, summarization, classification, structured
// extraction, and light tool use.
// - `cheap`: for simple transforms, validation, formatting, and routing.
// - `legacy`: older-generation models kept for compatibility and regression
// comparison; avoid unless you specifically need them.
//
// Leaving the tier unset picks one from how the agent is triggered: chat and
// manual runs use `high`, while scheduled and event-driven runs use `balanced` so
// background work stays cheap.
//
// Any of "frontier", "high", "balanced", "cheap", "legacy".
Tier AgentDefinitionConfigTier `json:"tier" api:"required"`
// Trigger-type-specific configuration.
//
// Which fields are populated depends on the agent's `trigger_type`:
//
// - `scheduled`: `cron_schedule` (and optionally `timezone`) is set.
// - `event`: `event_filters` is set.
// - `manual`: all fields are empty.
TriggerConfig TriggerConfig `json:"trigger_config" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EndpointToolReview respjson.Field
EndpointToolSlugs respjson.Field
Object respjson.Field
SystemPrompt respjson.Field
Temperature respjson.Field
Tier respjson.Field
TriggerConfig respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Agent-level configuration controlling LLM behavior and trigger settings.
Distinct from per-tool configuration (`tools[].config`), which configures individual tools attached to the agent.
func (AgentDefinitionConfig) RawJSON ¶
func (r AgentDefinitionConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentDefinitionConfig) UnmarshalJSON ¶
func (r *AgentDefinitionConfig) UnmarshalJSON(data []byte) error
type AgentDefinitionConfigObject ¶
type AgentDefinitionConfigObject string
Resource type identifier.
const (
AgentDefinitionConfigObjectAgentDefinitionConfig AgentDefinitionConfigObject = "agent_definition_config"
)
type AgentDefinitionConfigTier ¶
type AgentDefinitionConfigTier string
Intelligence and cost tier for the agent's reasoning.
Selects how capable and expensive a model the agent uses without pinning a specific model; higher tiers reason better but cost more. Each tier resolves to an ordered chain of equivalent models, so a run automatically fails over to another provider's model if the preferred one is unavailable.
- `frontier`: the most capable tier, for multi-step planning, ambiguous agent work, and hard coding or architecture tasks.
- `high`: for normal planning, code edits, synthesis, and customer-facing reasoning.
- `balanced`: for research, summarization, classification, structured extraction, and light tool use.
- `cheap`: for simple transforms, validation, formatting, and routing.
- `legacy`: older-generation models kept for compatibility and regression comparison; avoid unless you specifically need them.
Leaving the tier unset picks one from how the agent is triggered: chat and manual runs use `high`, while scheduled and event-driven runs use `balanced` so background work stays cheap.
const ( AgentDefinitionConfigTierFrontier AgentDefinitionConfigTier = "frontier" AgentDefinitionConfigTierHigh AgentDefinitionConfigTier = "high" AgentDefinitionConfigTierBalanced AgentDefinitionConfigTier = "balanced" AgentDefinitionConfigTierCheap AgentDefinitionConfigTier = "cheap" AgentDefinitionConfigTierLegacy AgentDefinitionConfigTier = "legacy" )
type AgentDefinitionDefinitionType ¶
type AgentDefinitionDefinitionType string
Whether the agent is provided by OpenMRP or created in this account.
- `system`: provided by OpenMRP; cannot be edited or deleted. - `custom`: created by a user in this account.
const ( AgentDefinitionDefinitionTypeSystem AgentDefinitionDefinitionType = "system" AgentDefinitionDefinitionTypeCustom AgentDefinitionDefinitionType = "custom" )
type AgentDefinitionEditability ¶
type AgentDefinitionEditability string
Whether this agent definition can be edited.
Always `read_only` for `system` definitions.
const ( AgentDefinitionEditabilityEditable AgentDefinitionEditability = "editable" AgentDefinitionEditabilityReadOnly AgentDefinitionEditability = "read_only" )
type AgentDefinitionObject ¶
type AgentDefinitionObject string
Resource type identifier.
const (
AgentDefinitionObjectAgentDefinition AgentDefinitionObject = "agent_definition"
)
type AgentDefinitionStatus ¶
type AgentDefinitionStatus string
Whether this agent is enabled for the current account.
Activation is per-account: a `system` agent shared across accounts can be `active` for one account and `inactive` for another. An `inactive` agent cannot be triggered.
const ( AgentDefinitionStatusActive AgentDefinitionStatus = "active" AgentDefinitionStatusInactive AgentDefinitionStatus = "inactive" )
type AgentDefinitionTool ¶
type AgentDefinitionTool struct {
// Agent definition tool ID.
ID string `json:"id" api:"required"`
// Instance-specific configuration for this tool.
//
// Must conform to the tool's `config_schema`. Encoded as a JSON value (object,
// array, string, number, boolean, or null), not a JSON-encoded string.
Config any `json:"config" api:"required"`
// Resource type identifier.
//
// Any of "agent_definition_tool".
Object AgentDefinitionToolObject `json:"object" api:"required"`
// Whether calls to this tool must be approved by a user before they execute.
//
// When `required`, the run pauses in the `awaiting_approval` status each time the
// agent invokes this tool; approve or allow the tool via the Continue Agent Run
// endpoint to proceed. A tool whose `mutating` flag is true still pauses for
// approval even when this is `not_required`.
//
// Any of "not_required", "required".
ReviewRequirement AgentDefinitionToolReviewRequirement `json:"review_requirement" api:"required"`
// Sort order within the agent.
SortOrder int64 `json:"sort_order" api:"required"`
// A capability an agent can be granted, allowing it to take that action during a
// run.
//
// The catalog of available tools is the same for every account; granting one to an
// agent is what makes it callable.
Tool AvailableTool `json:"tool" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Config respjson.Field
Object respjson.Field
ReviewRequirement respjson.Field
SortOrder respjson.Field
Tool respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tool attached to an agent definition.
Pairs an AvailableTool with agent-specific config values.
func (AgentDefinitionTool) RawJSON ¶
func (r AgentDefinitionTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentDefinitionTool) UnmarshalJSON ¶
func (r *AgentDefinitionTool) UnmarshalJSON(data []byte) error
type AgentDefinitionToolObject ¶
type AgentDefinitionToolObject string
Resource type identifier.
const (
AgentDefinitionToolObjectAgentDefinitionTool AgentDefinitionToolObject = "agent_definition_tool"
)
type AgentDefinitionToolReviewRequirement ¶
type AgentDefinitionToolReviewRequirement string
Whether calls to this tool must be approved by a user before they execute.
When `required`, the run pauses in the `awaiting_approval` status each time the agent invokes this tool; approve or allow the tool via the Continue Agent Run endpoint to proceed. A tool whose `mutating` flag is true still pauses for approval even when this is `not_required`.
const ( AgentDefinitionToolReviewRequirementNotRequired AgentDefinitionToolReviewRequirement = "not_required" AgentDefinitionToolReviewRequirementRequired AgentDefinitionToolReviewRequirement = "required" )
type AgentDefinitionTriggerType ¶
type AgentDefinitionTriggerType string
How runs of this agent are initiated.
- `scheduled`: runs on a cron schedule (see `config.trigger_config.cron_schedule`).
- `event`: runs in response to platform events (see `config.trigger_config.event_filters`).
- `manual`: runs only when explicitly invoked.
- `chat`: runs in response to a chat message; the run is linked to a conversation and posts its reply back into it.
const ( AgentDefinitionTriggerTypeScheduled AgentDefinitionTriggerType = "scheduled" AgentDefinitionTriggerTypeManual AgentDefinitionTriggerType = "manual" AgentDefinitionTriggerTypeEvent AgentDefinitionTriggerType = "event" AgentDefinitionTriggerTypeChat AgentDefinitionTriggerType = "chat" )
type AgentMemory ¶
type AgentMemory struct {
// Memory ID.
ID string `json:"id" api:"required"`
// The kind of information this memory holds, used to group related memories.
//
// - `preference`: how someone likes things done, such as a customer who always
// wants express shipping.
// - `fact`: a durable detail worth remembering about the account or one of its
// records, such as a customer's typical order size.
// - `instruction`: standing guidance for agents to follow, such as always
// confirming freight before issuing an order.
//
// Any of "preference", "fact", "instruction".
Category AgentMemoryCategory `json:"category" api:"required"`
// The information itself, written as plain text for an agent to read.
Content string `json:"content" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Entity Entity `json:"entity" api:"required"`
// When this memory stops being used.
//
// Past this time the memory is no longer recalled by agents and is omitted from
// list results, but it is not deleted and can still be retrieved by ID. A memory
// with no expiration is used indefinitely.
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// Relative importance from `0` to `1`, used to prioritize which memories the agent
// recalls.
//
// An agent takes in only a limited number of memories per run, and the
// highest-importance ones are recalled first.
Importance float64 `json:"importance" api:"required"`
// Arbitrary metadata as JSON. Encoded as a JSON value (object, array, string,
// number, boolean, or null), not a JSON-encoded string.
Metadata any `json:"metadata" api:"required"`
// Resource type identifier.
//
// Any of "agent_memory".
Object AgentMemoryObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Category respjson.Field
Content respjson.Field
CreatedAt respjson.Field
Entity respjson.Field
ExpiresAt respjson.Field
Importance respjson.Field
Metadata respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A piece of information an agent has saved for recall in future runs.
func (AgentMemory) RawJSON ¶
func (r AgentMemory) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentMemory) UnmarshalJSON ¶
func (r *AgentMemory) UnmarshalJSON(data []byte) error
type AgentMemoryCategory ¶
type AgentMemoryCategory string
The kind of information this memory holds, used to group related memories.
- `preference`: how someone likes things done, such as a customer who always wants express shipping.
- `fact`: a durable detail worth remembering about the account or one of its records, such as a customer's typical order size.
- `instruction`: standing guidance for agents to follow, such as always confirming freight before issuing an order.
const ( AgentMemoryCategoryPreference AgentMemoryCategory = "preference" AgentMemoryCategoryFact AgentMemoryCategory = "fact" AgentMemoryCategoryInstruction AgentMemoryCategory = "instruction" )
type AgentMemoryObject ¶
type AgentMemoryObject string
Resource type identifier.
const (
AgentMemoryObjectAgentMemory AgentMemoryObject = "agent_memory"
)
type AgentRun ¶
type AgentRun struct {
// Agent run ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Actions *ListAgentAction `json:"actions" api:"required"`
// When the run completed.
CompletedAt time.Time `json:"completed_at" api:"required" format:"date-time"`
// When this run was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An AI agent available to the account.
//
// The definition describes what the agent does, how its runs are triggered, the
// tools it can use, and whether it is currently enabled for the account.
Definition AgentDefinition `json:"definition" api:"required"`
// How long the run took, in milliseconds.
DurationMs int64 `json:"duration_ms" api:"required"`
// Error message if the run failed.
ErrorMessage string `json:"error_message" api:"required"`
// Input provided to the agent at the start of the run.
//
// The shape depends on what started the run; a manually triggered run records
// `{"message": "<your input>"}`. Encoded as a JSON value (object, array, string,
// number, boolean, or null), not a JSON-encoded string.
Input any `json:"input" api:"required"`
// Resource type identifier.
//
// Any of "agent_run".
Object AgentRunObject `json:"object" api:"required"`
// Final output produced by the agent.
//
// Present once the agent has produced a result, including on a run that paused for
// more input or was cancelled part-way through. A run that has not produced one
// yet carries an empty object. Encoded as a JSON value (object, array, string,
// number, boolean, or null), not a JSON-encoded string.
Output any `json:"output" api:"required"`
// When the run started executing.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// Current run status.
//
// - `pending`: queued but not yet started.
// - `running`: currently executing.
// - `awaiting_input`: paused, waiting for user input before continuing.
// - `awaiting_approval`: paused, waiting for a pending action to be approved.
// - `completed`: finished successfully.
// - `failed`: stopped after an error; see `error_message`.
// - `cancelled`: stopped before completion by a user.
//
// Any of "pending", "running", "completed", "failed", "cancelled",
// "awaiting_input", "awaiting_approval".
Status AgentRunStatus `json:"status" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Steps ListAgentRunStep `json:"steps" api:"required"`
// How this run was initiated.
//
// - `scheduled`: started by the agent's cron schedule.
// - `event`: started in response to a platform event.
// - `manual`: started by an explicit request; see `triggered_by`.
// - `chat`: started by a message in a conversation, with the agent's reply posted
// back into that conversation.
//
// Any of "scheduled", "manual", "event", "chat".
TriggerType AgentRunTriggerType `json:"trigger_type" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
TriggeredBy Actor `json:"triggered_by" api:"required"`
// When this run was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Actions respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
Definition respjson.Field
DurationMs respjson.Field
ErrorMessage respjson.Field
Input respjson.Field
Object respjson.Field
Output respjson.Field
StartedAt respjson.Field
Status respjson.Field
Steps respjson.Field
TriggerType respjson.Field
TriggeredBy respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single execution of an agent, from trigger through completion.
func (*AgentRun) UnmarshalJSON ¶
type AgentRunObject ¶
type AgentRunObject string
Resource type identifier.
const (
AgentRunObjectAgentRun AgentRunObject = "agent_run"
)
type AgentRunStatus ¶
type AgentRunStatus string
Current run status.
- `pending`: queued but not yet started. - `running`: currently executing. - `awaiting_input`: paused, waiting for user input before continuing. - `awaiting_approval`: paused, waiting for a pending action to be approved. - `completed`: finished successfully. - `failed`: stopped after an error; see `error_message`. - `cancelled`: stopped before completion by a user.
const ( AgentRunStatusPending AgentRunStatus = "pending" AgentRunStatusRunning AgentRunStatus = "running" AgentRunStatusCompleted AgentRunStatus = "completed" AgentRunStatusFailed AgentRunStatus = "failed" AgentRunStatusCancelled AgentRunStatus = "cancelled" AgentRunStatusAwaitingInput AgentRunStatus = "awaiting_input" AgentRunStatusAwaitingApproval AgentRunStatus = "awaiting_approval" )
type AgentRunStep ¶
type AgentRunStep struct {
// Agent run step ID.
ID string `json:"id" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// Text payload for the step, such as a message body or a tool result.
Content string `json:"content" api:"required"`
// When this step was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// How long this step took, in milliseconds.
DurationMs int64 `json:"duration_ms" api:"required"`
// Additional structured data for the step.
//
// The shape depends on `step_type` — for example a `tool_call` step carries the
// tool's arguments. Encoded as a JSON value (object, array, string, number,
// boolean, or null), not a JSON-encoded string.
Metadata any `json:"metadata" api:"required"`
// Resource type identifier.
//
// Any of "agent_run_step".
Object AgentRunStepObject `json:"object" api:"required"`
// Zero-based position of this step within the run's timeline.
Sequence int64 `json:"sequence" api:"required"`
// The kind of timeline event.
//
// Common values are `trigger_received`, `user_message`, `thinking`,
// `assistant_message`, `tool_call`, `tool_result`, `tool_blocked`,
// `awaiting_approval`, `completion`, and `error`. This is an open set — new step
// types are added as the agent runtime evolves, so treat unrecognized values as
// informational rather than failing on them.
StepType string `json:"step_type" api:"required"`
// Short title for the step.
Title string `json:"title" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Actor respjson.Field
Content respjson.Field
CreatedAt respjson.Field
DurationMs respjson.Field
Metadata respjson.Field
Object respjson.Field
Sequence respjson.Field
StepType respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single event in an agent run's execution timeline.
func (AgentRunStep) RawJSON ¶
func (r AgentRunStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*AgentRunStep) UnmarshalJSON ¶
func (r *AgentRunStep) UnmarshalJSON(data []byte) error
type AgentRunStepObject ¶
type AgentRunStepObject string
Resource type identifier.
const (
AgentRunStepObjectAgentRunStep AgentRunStepObject = "agent_run_step"
)
type AgentRunTriggerType ¶
type AgentRunTriggerType string
How this run was initiated.
- `scheduled`: started by the agent's cron schedule.
- `event`: started in response to a platform event.
- `manual`: started by an explicit request; see `triggered_by`.
- `chat`: started by a message in a conversation, with the agent's reply posted back into that conversation.
const ( AgentRunTriggerTypeScheduled AgentRunTriggerType = "scheduled" AgentRunTriggerTypeManual AgentRunTriggerType = "manual" AgentRunTriggerTypeEvent AgentRunTriggerType = "event" AgentRunTriggerTypeChat AgentRunTriggerType = "chat" )
type AnalyzeDeliveryPerformanceRequestGranularity ¶
type AnalyzeDeliveryPerformanceRequestGranularity string
The period to break the results down by. Defaults to `week`.
const ( AnalyzeDeliveryPerformanceRequestGranularityDay AnalyzeDeliveryPerformanceRequestGranularity = "day" AnalyzeDeliveryPerformanceRequestGranularityWeek AnalyzeDeliveryPerformanceRequestGranularity = "week" AnalyzeDeliveryPerformanceRequestGranularityMonth AnalyzeDeliveryPerformanceRequestGranularity = "month" )
type AnalyzeDeliveryPerformanceRequestParam ¶
type AnalyzeDeliveryPerformanceRequestParam struct {
// The end date for the analysis period.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// The start date for the analysis period.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// Only measure orders whose customer sits in these groups.
CustomerGroupIDs []string `json:"customer_group_ids,omitzero"`
// Only measure orders bought by these customers. Their child accounts are
// included, matching how the sales analytics resolve a customer.
CustomerIDs []string `json:"customer_ids,omitzero"`
// The period to break the results down by. Defaults to `week`.
//
// Any of "day", "week", "month".
Granularity AnalyzeDeliveryPerformanceRequestGranularity `json:"granularity,omitzero"`
// Only measure orders containing at least one line in these product lines.
ProductLineIDs []string `json:"product_line_ids,omitzero"`
// Only measure orders owned by these sales reps.
SalesRepIDs []string `json:"sales_rep_ids,omitzero"`
// contains filtered or unexported fields
}
AnalyzeDeliveryPerformanceRequest is the request to measure promises against shipments.
The properties EndsAt, StartsAt are required.
func (AnalyzeDeliveryPerformanceRequestParam) MarshalJSON ¶
func (r AnalyzeDeliveryPerformanceRequestParam) MarshalJSON() (data []byte, err error)
func (*AnalyzeDeliveryPerformanceRequestParam) UnmarshalJSON ¶
func (r *AnalyzeDeliveryPerformanceRequestParam) UnmarshalJSON(data []byte) error
type AnalyzeDeliveryPerformanceResponse ¶
type AnalyzeDeliveryPerformanceResponse struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Backlog ListDeliveryBacklogBucket `json:"backlog" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ByCommitmentSource ListDeliveryBreakdown `json:"by_commitment_source" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ByCustomer ListDeliveryBreakdown `json:"by_customer" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ByCustomerGroup ListDeliveryBreakdown `json:"by_customer_group" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ByProductLine ListDeliveryBreakdown `json:"by_product_line" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lateness ListDeliveryLatenessBucket `json:"lateness" api:"required"`
// Resource type identifier.
//
// Any of "analyze_delivery_performance_response".
Object AnalyzeDeliveryPerformanceResponseObject `json:"object" api:"required"`
// Delivery reliability for one period, or for a whole window.
Overall DeliveryPerformance `json:"overall" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Periods ListDeliveryPerformance `json:"periods" api:"required"`
// Issued orders in the window carrying no ship-by date, excluded from every rate
// above.
//
// Reported so the exclusion is visible: a delivery score computed over half the
// order book, silently, is worse than one that says which half. A non-zero count
// here means orders placed before commitments were tracked still need a ship-by
// date.
UncommittedOrderCount int64 `json:"uncommitted_order_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Backlog respjson.Field
ByCommitmentSource respjson.Field
ByCustomer respjson.Field
ByCustomerGroup respjson.Field
ByProductLine respjson.Field
Lateness respjson.Field
Object respjson.Field
Overall respjson.Field
Periods respjson.Field
UncommittedOrderCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
How reliably promised delivery dates were met.
func (AnalyzeDeliveryPerformanceResponse) RawJSON ¶
func (r AnalyzeDeliveryPerformanceResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AnalyzeDeliveryPerformanceResponse) UnmarshalJSON ¶
func (r *AnalyzeDeliveryPerformanceResponse) UnmarshalJSON(data []byte) error
type AnalyzeDeliveryPerformanceResponseObject ¶
type AnalyzeDeliveryPerformanceResponseObject string
Resource type identifier.
const (
AnalyzeDeliveryPerformanceResponseObjectAnalyzeDeliveryPerformanceResponse AnalyzeDeliveryPerformanceResponseObject = "analyze_delivery_performance_response"
)
type AnalyzeOeeRequestParam ¶
type AnalyzeOeeRequestParam struct {
// The end date for the analysis period.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// The start date for the analysis period.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// Optional department IDs to filter by.
DepartmentIDs []string `json:"department_ids,omitzero"`
// Overrides the scheduled production time per department for the period. When
// omitted it is taken from the published production schedule, so this is only
// needed to measure a period the schedule does not cover. Availability,
// performance and OEE are only returned for departments the scheduled time covers.
PlannedTime []OeeDepartmentPlannedTimeParam `json:"planned_time,omitzero"`
// contains filtered or unexported fields
}
AnalyzeOeeRequest is the request to analyze Overall Equipment Effectiveness (OEE).
The properties EndsAt, StartsAt are required.
func (AnalyzeOeeRequestParam) MarshalJSON ¶
func (r AnalyzeOeeRequestParam) MarshalJSON() (data []byte, err error)
func (*AnalyzeOeeRequestParam) UnmarshalJSON ¶
func (r *AnalyzeOeeRequestParam) UnmarshalJSON(data []byte) error
type AnalyzeOeeResponse ¶
type AnalyzeOeeResponse struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Departments ListOeeDepartment `json:"departments" api:"required"`
// Resource type identifier.
//
// Any of "analyze_oee_response".
Object AnalyzeOeeResponseObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Departments respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AnalyzeOeeResponse represents the response from the analyze OEE endpoint.
func (AnalyzeOeeResponse) RawJSON ¶
func (r AnalyzeOeeResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AnalyzeOeeResponse) UnmarshalJSON ¶
func (r *AnalyzeOeeResponse) UnmarshalJSON(data []byte) error
type AnalyzeOeeResponseObject ¶
type AnalyzeOeeResponseObject string
Resource type identifier.
const (
AnalyzeOeeResponseObjectAnalyzeOeeResponse AnalyzeOeeResponseObject = "analyze_oee_response"
)
type AnalyzeOeeTrendRequestParam ¶
type AnalyzeOeeTrendRequestParam struct {
// The end date for the analysis period.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// The start date for the analysis period.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// Restrict the analysis to these departments.
DepartmentIDs []string `json:"department_ids,omitzero"`
// contains filtered or unexported fields
}
AnalyzeOeeTrendRequest is the request to analyze Overall Equipment Effectiveness (OEE) over time.
The properties EndsAt, StartsAt are required.
func (AnalyzeOeeTrendRequestParam) MarshalJSON ¶
func (r AnalyzeOeeTrendRequestParam) MarshalJSON() (data []byte, err error)
func (*AnalyzeOeeTrendRequestParam) UnmarshalJSON ¶
func (r *AnalyzeOeeTrendRequestParam) UnmarshalJSON(data []byte) error
type AnalyzeOeeTrendResponse ¶
type AnalyzeOeeTrendResponse struct {
// Resource type identifier.
//
// Any of "analyze_oee_trend_response".
Object AnalyzeOeeTrendResponseObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Periods ListOeeTrendPeriod `json:"periods" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
Periods respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
AnalyzeOeeTrendResponse represents the response from the OEE trend endpoint.
func (AnalyzeOeeTrendResponse) RawJSON ¶
func (r AnalyzeOeeTrendResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AnalyzeOeeTrendResponse) UnmarshalJSON ¶
func (r *AnalyzeOeeTrendResponse) UnmarshalJSON(data []byte) error
type AnalyzeOeeTrendResponseObject ¶
type AnalyzeOeeTrendResponseObject string
Resource type identifier.
const (
AnalyzeOeeTrendResponseObjectAnalyzeOeeTrendResponse AnalyzeOeeTrendResponseObject = "analyze_oee_trend_response"
)
type AnalyzeScheduleAttainmentRequestGroupBy ¶
type AnalyzeScheduleAttainmentRequestGroupBy string
The dimension to break the results down by. Defaults to `week`.
const ( AnalyzeScheduleAttainmentRequestGroupByWeek AnalyzeScheduleAttainmentRequestGroupBy = "week" AnalyzeScheduleAttainmentRequestGroupByMachine AnalyzeScheduleAttainmentRequestGroupBy = "machine" AnalyzeScheduleAttainmentRequestGroupByDepartment AnalyzeScheduleAttainmentRequestGroupBy = "department" AnalyzeScheduleAttainmentRequestGroupByItem AnalyzeScheduleAttainmentRequestGroupBy = "item" )
type AnalyzeScheduleAttainmentRequestParam ¶
type AnalyzeScheduleAttainmentRequestParam struct {
// The end date for the analysis period.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// The start date for the analysis period.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// Only measure production in these departments.
DepartmentIDs []string `json:"department_ids,omitzero"`
// The dimension to break the results down by. Defaults to `week`.
//
// Any of "week", "machine", "department", "item".
GroupBy AnalyzeScheduleAttainmentRequestGroupBy `json:"group_by,omitzero"`
// Only measure production on these machines.
MachineIDs []string `json:"machine_ids,omitzero"`
// contains filtered or unexported fields
}
AnalyzeScheduleAttainmentRequest is the request to measure production against plan.
The properties EndsAt, StartsAt are required.
func (AnalyzeScheduleAttainmentRequestParam) MarshalJSON ¶
func (r AnalyzeScheduleAttainmentRequestParam) MarshalJSON() (data []byte, err error)
func (*AnalyzeScheduleAttainmentRequestParam) UnmarshalJSON ¶
func (r *AnalyzeScheduleAttainmentRequestParam) UnmarshalJSON(data []byte) error
type AnalyzeScheduleAttainmentResponse ¶
type AnalyzeScheduleAttainmentResponse struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
BaselineSchedules ListEntity `json:"baseline_schedules" api:"required"`
// Whether the period had a plan to measure against. When `no_baseline`, every
// ratio is null and the period has no plan rather than a missed one.
//
// Any of "measured", "no_baseline".
BaselineStatus AnalyzeScheduleAttainmentResponseBaselineStatus `json:"baseline_status" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Buckets ListAttainmentBucket `json:"buckets" api:"required"`
// End of the measured period.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
FrozenAdherence ListFrozenAdherence `json:"frozen_adherence" api:"required"`
// The dimension the breakdown is grouped by.
//
// Any of "week", "machine", "department", "item".
GroupBy AnalyzeScheduleAttainmentResponseGroupBy `json:"group_by" api:"required"`
// Resource type identifier.
//
// Any of "analyze_schedule_attainment_response".
Object AnalyzeScheduleAttainmentResponseObject `json:"object" api:"required"`
// Machines the plan asked for over this window.
//
// Every figure in this response covers those machines only. Production scanned
// onto a machine no published version scheduled is excluded outright, so the score
// measures the plan that was made rather than the whole plant against it.
ScheduledMachineCount int64 `json:"scheduled_machine_count" api:"required"`
// Start of the measured period.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// One row of a schedule-attainment breakdown.
//
// Both ratios are reported because either alone misleads. `attainment_pct` caps
// each SKU at what was asked for, so over-building one easy item cannot paper over
// a total miss on another; `output_ratio_pct` does not cap, so it is the only one
// that reveals over-production.
Totals AttainmentBucket `json:"totals" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaselineSchedules respjson.Field
BaselineStatus respjson.Field
Buckets respjson.Field
EndsAt respjson.Field
FrozenAdherence respjson.Field
GroupBy respjson.Field
Object respjson.Field
ScheduledMachineCount respjson.Field
StartsAt respjson.Field
Totals respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Actual production measured against the plan that was live at the time.
The baseline for each week is the version that was published on or before that week began, so republishing mid-horizon cannot rewrite a week the floor has already worked. `baseline_schedules` names the versions used, so any number here can be traced back to the plan that produced it.
func (AnalyzeScheduleAttainmentResponse) RawJSON ¶
func (r AnalyzeScheduleAttainmentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AnalyzeScheduleAttainmentResponse) UnmarshalJSON ¶
func (r *AnalyzeScheduleAttainmentResponse) UnmarshalJSON(data []byte) error
type AnalyzeScheduleAttainmentResponseBaselineStatus ¶
type AnalyzeScheduleAttainmentResponseBaselineStatus string
Whether the period had a plan to measure against. When `no_baseline`, every ratio is null and the period has no plan rather than a missed one.
const ( AnalyzeScheduleAttainmentResponseBaselineStatusMeasured AnalyzeScheduleAttainmentResponseBaselineStatus = "measured" AnalyzeScheduleAttainmentResponseBaselineStatusNoBaseline AnalyzeScheduleAttainmentResponseBaselineStatus = "no_baseline" )
type AnalyzeScheduleAttainmentResponseGroupBy ¶
type AnalyzeScheduleAttainmentResponseGroupBy string
The dimension the breakdown is grouped by.
const ( AnalyzeScheduleAttainmentResponseGroupByWeek AnalyzeScheduleAttainmentResponseGroupBy = "week" AnalyzeScheduleAttainmentResponseGroupByMachine AnalyzeScheduleAttainmentResponseGroupBy = "machine" AnalyzeScheduleAttainmentResponseGroupByDepartment AnalyzeScheduleAttainmentResponseGroupBy = "department" AnalyzeScheduleAttainmentResponseGroupByItem AnalyzeScheduleAttainmentResponseGroupBy = "item" )
type AnalyzeScheduleAttainmentResponseObject ¶
type AnalyzeScheduleAttainmentResponseObject string
Resource type identifier.
const (
AnalyzeScheduleAttainmentResponseObjectAnalyzeScheduleAttainmentResponse AnalyzeScheduleAttainmentResponseObject = "analyze_schedule_attainment_response"
)
type Announcement ¶
type Announcement struct {
// Announcement ID.
ID string `json:"id" api:"required"`
// Supporting detail shown beneath the title.
Body string `json:"body" api:"required"`
// The kind of event the announcement is about.
//
// Announcements draw on the same categories as notifications, such as
// `system.broadcast` or `order.updated`, and the category is chosen by whoever
// publishes the announcement. The set is open-ended and may grow over time, so
// clients should tolerate values they do not recognize.
//
// Any of "chat.message", "chat.mention", "chat.added", "order.updated",
// "agent.run_completed", "agent.alert", "system.broadcast", "customer.registered".
Category AnnouncementCategory `json:"category" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// When the calling user dismissed the announcement.
DismissedAt time.Time `json:"dismissed_at" api:"required" format:"date-time"`
// When the announcement stops being shown.
//
// Once it expires the announcement leaves every user's feed and can no longer be
// retrieved; an announcement with no expiry stays until each user dismisses it.
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "announcement".
Object AnnouncementObject `json:"object" api:"required"`
// How prominently the announcement should be surfaced, from `low` through
// `urgent`.
//
// Any of "low", "normal", "high", "urgent".
Priority AnnouncementPriority `json:"priority" api:"required"`
// When the announcement becomes visible in the feed.
//
// An announcement scheduled for the future is not returned by the announcement
// endpoints until this time passes.
PublishAt time.Time `json:"publish_at" api:"required" format:"date-time"`
// When the calling user opened the announcement.
ReadAt time.Time `json:"read_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// Who the announcement reaches.
//
// - `account`: published to a single account and shown only to that account's
// users.
// - `platform`: published by OpenMRP and shown to every user across all accounts.
//
// Any of "account", "platform".
Scope AnnouncementScope `json:"scope" api:"required"`
// When the calling user first saw the announcement.
SeenAt time.Time `json:"seen_at" api:"required" format:"date-time"`
// Where the announcement is in its lifecycle for the calling user.
//
// - `unseen`: not yet surfaced to the caller.
// - `seen`: surfaced in the caller's feed but not opened.
// - `read`: explicitly opened by the caller.
// - `dismissed`: removed from the caller's feed.
//
// The status is derived from the caller's own seen, read, and dismissed timestamps
// and only ever moves forward, so the same announcement can show a different
// status for each user in the account.
//
// Any of "unseen", "seen", "read", "dismissed".
Status AnnouncementStatus `json:"status" api:"required"`
// Short headline shown in the feed.
Title string `json:"title" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Body respjson.Field
Category respjson.Field
CreatedAt respjson.Field
DismissedAt respjson.Field
ExpiresAt respjson.Field
Object respjson.Field
Priority respjson.Field
PublishAt respjson.Field
ReadAt respjson.Field
Resource respjson.Field
Scope respjson.Field
SeenAt respjson.Field
Status respjson.Field
Title respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A broadcast announcement shown in the notification (bell) feed, carrying the calling user's own read state.
A single announcement is published to everyone in an account, or to every user on the platform, and each user keeps their own seen, read, and dismissed state for it. The status and timestamps you read are therefore always the caller's, and never reflect what anyone else has done with the same announcement. Notifications addressed to one user are a separate resource.
func (Announcement) RawJSON ¶
func (r Announcement) RawJSON() string
Returns the unmodified JSON received from the API
func (*Announcement) UnmarshalJSON ¶
func (r *Announcement) UnmarshalJSON(data []byte) error
type AnnouncementCategory ¶
type AnnouncementCategory string
The kind of event the announcement is about.
Announcements draw on the same categories as notifications, such as `system.broadcast` or `order.updated`, and the category is chosen by whoever publishes the announcement. The set is open-ended and may grow over time, so clients should tolerate values they do not recognize.
const ( AnnouncementCategoryChatMessage AnnouncementCategory = "chat.message" AnnouncementCategoryChatMention AnnouncementCategory = "chat.mention" AnnouncementCategoryChatAdded AnnouncementCategory = "chat.added" AnnouncementCategoryOrderUpdated AnnouncementCategory = "order.updated" AnnouncementCategoryAgentRunCompleted AnnouncementCategory = "agent.run_completed" AnnouncementCategoryAgentAlert AnnouncementCategory = "agent.alert" AnnouncementCategorySystemBroadcast AnnouncementCategory = "system.broadcast" AnnouncementCategoryCustomerRegistered AnnouncementCategory = "customer.registered" )
type AnnouncementObject ¶
type AnnouncementObject string
Resource type identifier.
const (
AnnouncementObjectAnnouncement AnnouncementObject = "announcement"
)
type AnnouncementPriority ¶
type AnnouncementPriority string
How prominently the announcement should be surfaced, from `low` through `urgent`.
const ( AnnouncementPriorityLow AnnouncementPriority = "low" AnnouncementPriorityNormal AnnouncementPriority = "normal" AnnouncementPriorityHigh AnnouncementPriority = "high" AnnouncementPriorityUrgent AnnouncementPriority = "urgent" )
type AnnouncementScope ¶
type AnnouncementScope string
Who the announcement reaches.
- `account`: published to a single account and shown only to that account's users.
- `platform`: published by OpenMRP and shown to every user across all accounts.
const ( AnnouncementScopeAccount AnnouncementScope = "account" AnnouncementScopePlatform AnnouncementScope = "platform" )
type AnnouncementStatus ¶
type AnnouncementStatus string
Where the announcement is in its lifecycle for the calling user.
- `unseen`: not yet surfaced to the caller. - `seen`: surfaced in the caller's feed but not opened. - `read`: explicitly opened by the caller. - `dismissed`: removed from the caller's feed.
The status is derived from the caller's own seen, read, and dismissed timestamps and only ever moves forward, so the same announcement can show a different status for each user in the account.
const ( AnnouncementStatusUnseen AnnouncementStatus = "unseen" AnnouncementStatusSeen AnnouncementStatus = "seen" AnnouncementStatusRead AnnouncementStatus = "read" AnnouncementStatusDismissed AnnouncementStatus = "dismissed" )
type ApplyFulfillmentRecommendationsRequestParam ¶
type ApplyFulfillmentRecommendationsRequestParam struct {
// Items whose recommendation should be adopted.
//
// Named explicitly rather than applied wholesale: adopting advice in bulk without
// saying what is being adopted is how a plant changes what it builds by accident.
// Items not named here are left exactly as they are.
ItemIDs []string `json:"item_ids,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to adopt fulfillment recommendations for specific items.
The property ItemIDs is required.
func (ApplyFulfillmentRecommendationsRequestParam) MarshalJSON ¶
func (r ApplyFulfillmentRecommendationsRequestParam) MarshalJSON() (data []byte, err error)
func (*ApplyFulfillmentRecommendationsRequestParam) UnmarshalJSON ¶
func (r *ApplyFulfillmentRecommendationsRequestParam) UnmarshalJSON(data []byte) error
type ApproveSendDraftRequestParam ¶
type ApproveSendDraftRequestParam struct {
// A unique client-generated key for this approval, such as a UUID.
ClientMessageID string `json:"client_message_id" api:"required"`
// contains filtered or unexported fields
}
Request to approve a customer-reply draft and send it to the customer.
The property ClientMessageID is required.
func (ApproveSendDraftRequestParam) MarshalJSON ¶
func (r ApproveSendDraftRequestParam) MarshalJSON() (data []byte, err error)
func (*ApproveSendDraftRequestParam) UnmarshalJSON ¶
func (r *ApproveSendDraftRequestParam) UnmarshalJSON(data []byte) error
type AssignConversationRequestAssigneeResourceType ¶ added in v0.17.1
type AssignConversationRequestAssigneeResourceType string
What kind of owner the case is being assigned to.
- `account_user`: an individual teammate takes the case. - `account_group`: a team takes the case, so anyone on it can pick it up.
const ( AssignConversationRequestAssigneeResourceTypeAccountUser AssignConversationRequestAssigneeResourceType = "account_user" AssignConversationRequestAssigneeResourceTypeAccountGroup AssignConversationRequestAssigneeResourceType = "account_group" )
type AssignConversationRequestParam ¶
type AssignConversationRequestParam struct {
// The owner's id, an `account_user` or `account_group` matching
// `assignee_resource_type`.
//
// Omit this and `assignee_resource_type` to clear the assignment.
AssigneeResourceID param.Opt[string] `json:"assignee_resource_id,omitzero"`
// What kind of owner the case is being assigned to.
//
// - `account_user`: an individual teammate takes the case.
// - `account_group`: a team takes the case, so anyone on it can pick it up.
//
// Any of "account_user", "account_group".
AssigneeResourceType AssignConversationRequestAssigneeResourceType `json:"assignee_resource_type,omitzero"`
// contains filtered or unexported fields
}
Request to assign a customer-service case to a single owner — a user or a team.
The owner is a polymorphic (`assignee_resource_type`, `assignee_resource_id`) reference; omit both fields to clear the assignment.
func (AssignConversationRequestParam) MarshalJSON ¶
func (r AssignConversationRequestParam) MarshalJSON() (data []byte, err error)
func (*AssignConversationRequestParam) UnmarshalJSON ¶
func (r *AssignConversationRequestParam) UnmarshalJSON(data []byte) error
type AttachmentUploadTarget ¶
type AttachmentUploadTarget struct {
// A file, image, link, or resource attached to a message.
Attachment MessageAttachment `json:"attachment" api:"required"`
// When the upload URL stops working.
//
// Targets are short-lived (about fifteen minutes); request a new one if the upload
// has not finished by then.
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "attachment_upload_target".
Object AttachmentUploadTargetObject `json:"object" api:"required"`
// The object-storage key identifying the uploaded file.
//
// Pass it back as an attachment's `s3_key` when sending a message. It is bound to
// the conversation it was minted for and cannot be attached in another one.
S3Key string `json:"s3_key" api:"required"`
// The presigned URL to PUT the file to.
//
// Send the file with the same content type used to mint the target, or the upload
// is rejected.
UploadURL string `json:"upload_url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Attachment respjson.Field
ExpiresAt respjson.Field
Object respjson.Field
S3Key respjson.Field
UploadURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A presigned target for uploading a chat attachment directly to object storage.
PUT the file to `upload_url`, then send a message carrying an attachment whose `s3_key` is the key returned here. An upload that is never sent with a message is discarded automatically, so abandoning a target costs nothing.
func (AttachmentUploadTarget) RawJSON ¶
func (r AttachmentUploadTarget) RawJSON() string
Returns the unmodified JSON received from the API
func (*AttachmentUploadTarget) UnmarshalJSON ¶
func (r *AttachmentUploadTarget) UnmarshalJSON(data []byte) error
type AttachmentUploadTargetObject ¶
type AttachmentUploadTargetObject string
Resource type identifier.
const (
AttachmentUploadTargetObjectAttachmentUploadTarget AttachmentUploadTargetObject = "attachment_upload_target"
)
type AttainmentBucket ¶
type AttainmentBucket struct {
// Units actually produced.
ActualQuantity float64 `json:"actual_quantity" api:"required"`
// Share of the plan that was met. Null when nothing was planned.
AttainmentPct float64 `json:"attainment_pct" api:"required"`
// Batches scanned in this bucket.
BatchCount int64 `json:"batch_count" api:"required"`
// Identifies the bucket within the chosen grouping — a week start, machine ID,
// department ID or item ID.
Key string `json:"key" api:"required"`
// Display label for the bucket.
Label string `json:"label" api:"required"`
// Units produced that were planned for, capped per campaign at what was asked.
MatchedQuantity float64 `json:"matched_quantity" api:"required"`
// Output as a share of plan, uncapped. Null when nothing was planned.
OutputRatioPct float64 `json:"output_ratio_pct" api:"required"`
// Planned campaigns in this bucket.
PlannedLines int64 `json:"planned_lines" api:"required"`
// Units the live plan called for.
PlannedQuantity float64 `json:"planned_quantity" api:"required"`
// Machine hours the plan called for.
PlannedRunHours float64 `json:"planned_run_hours" api:"required"`
// Units produced with no matching planned campaign.
UnplannedQuantity float64 `json:"unplanned_quantity" api:"required"`
// Units scrapped.
WasteQuantity float64 `json:"waste_quantity" api:"required"`
// First day of the week, when grouping by week.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActualQuantity respjson.Field
AttainmentPct respjson.Field
BatchCount respjson.Field
Key respjson.Field
Label respjson.Field
MatchedQuantity respjson.Field
OutputRatioPct respjson.Field
PlannedLines respjson.Field
PlannedQuantity respjson.Field
PlannedRunHours respjson.Field
UnplannedQuantity respjson.Field
WasteQuantity respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One row of a schedule-attainment breakdown.
Both ratios are reported because either alone misleads. `attainment_pct` caps each SKU at what was asked for, so over-building one easy item cannot paper over a total miss on another; `output_ratio_pct` does not cap, so it is the only one that reveals over-production.
func (AttainmentBucket) RawJSON ¶
func (r AttainmentBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*AttainmentBucket) UnmarshalJSON ¶
func (r *AttainmentBucket) UnmarshalJSON(data []byte) error
type Attribute ¶
type Attribute struct {
// Attribute ID.
ID string `json:"id" api:"required"`
// Swatch color used to display this attribute in the UI.
//
// The named colors are arbitrary display choices; `default` is a neutral fallback
// used when no specific swatch applies.
//
// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
// "red", "yellow".
Color AttributeColor `json:"color" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "attribute".
Object AttributeObject `json:"object" api:"required"`
// A named characteristic used to classify items, such as `Color` or `Size`.
//
// Each property defines a set of attributes — the selectable values (e.g. `Red`,
// `Blue`) that can be assigned to items.
Property *Property `json:"property" api:"required"`
// Position of this attribute relative to its siblings within the property,
// starting at `1`.
//
// Positions are kept contiguous: creating, reordering, or deleting an attribute
// automatically shifts its siblings.
SortOrder int64 `json:"sort_order" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// The selectable value this attribute represents, such as `Red` for a `Color`
// property or `Large` for a `Size` property.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Color respjson.Field
CreatedAt respjson.Field
Object respjson.Field
Property respjson.Field
SortOrder respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A selectable value within a property, such as `Red` for a `Color` property.
Attributes are assigned to items to classify them.
func (*Attribute) UnmarshalJSON ¶
type AttributeColor ¶
type AttributeColor string
Swatch color used to display this attribute in the UI.
The named colors are arbitrary display choices; `default` is a neutral fallback used when no specific swatch applies.
const ( AttributeColorBlue AttributeColor = "blue" AttributeColorBrown AttributeColor = "brown" AttributeColorDefault AttributeColor = "default" AttributeColorGray AttributeColor = "gray" AttributeColorGreen AttributeColor = "green" AttributeColorOrange AttributeColor = "orange" AttributeColorPink AttributeColor = "pink" AttributeColorPurple AttributeColor = "purple" AttributeColorRed AttributeColor = "red" AttributeColorYellow AttributeColor = "yellow" )
type AttributeObject ¶
type AttributeObject string
Resource type identifier.
const (
AttributeObjectAttribute AttributeObject = "attribute"
)
type AuditEvent ¶
type AuditEvent struct {
// Audit event ID.
ID string `json:"id" api:"required"`
// An organization on OpenMRP, including its branding and customer portal
// sub-resources.
//
// Your own account and any customer or supplier account you trade with are both
// represented by this object.
Account Account `json:"account" api:"required"`
// The type of action this event records.
//
// - `create`: the resource was created.
// - `update`: one or more fields were changed.
// - `delete`: the resource was deleted.
// - `restore`: a previously deleted resource was restored.
// - `archive`: the resource was archived.
// - `approve`: a human approved a gated action, such as allowing a review-gated
// agent tool to run.
// - `deny`: a human denied a gated action, such as rejecting a review-gated agent
// tool.
//
// Any of "create", "update", "upsert", "delete", "restore", "archive", "approve",
// "deny".
Action AuditEventAction `json:"action" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Changes ListAuditFieldChange `json:"changes" api:"required"`
// When the audit event record was written.
//
// Slightly later than `occurred_at`, since events are recorded out of band from
// the request that caused them.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Idempotency key of the originating request.
IdempotencyKey string `json:"idempotency_key" api:"required"`
// Arbitrary JSON metadata for the mutation (e.g. reason, source, tags). Encoded as
// a JSON value (object, array, string, number, boolean, or null), not a
// JSON-encoded string.
Metadata any `json:"metadata" api:"required"`
// Resource type identifier.
//
// Any of "audit_event".
Object AuditEventObject `json:"object" api:"required"`
// When the audited mutation occurred.
//
// Audit events are ordered and date-filtered by this timestamp rather than by
// `created_at`.
OccurredAt time.Time `json:"occurred_at" api:"required" format:"date-time"`
// A log of a single API request, capturing its route, outcome, latency, and actor.
//
// Logs are written after the response has been sent, so a new entry may take a
// moment to become readable.
Request RequestLog `json:"request" api:"required"`
// Audited resource ID.
ResourceID string `json:"resource_id" api:"required"`
// Resource type of the audited entity.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
ResourceType AuditEventResourceType `json:"resource_type" api:"required"`
// Originating client IP address.
SourceIP string `json:"source_ip" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Account respjson.Field
Action respjson.Field
Actor respjson.Field
Changes respjson.Field
CreatedAt respjson.Field
IdempotencyKey respjson.Field
Metadata respjson.Field
Object respjson.Field
OccurredAt respjson.Field
Request respjson.Field
ResourceID respjson.Field
ResourceType respjson.Field
SourceIP respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An immutable record of a single change to a resource, capturing who made the change, what changed, and when.
Audit events are recorded automatically as mutations happen; they cannot be created, edited, or deleted through the API. Recording is asynchronous, so an event may take a moment to become readable after the request that caused it has returned. An update that leaves every tracked field at its existing value records no event unless the mutation attaches metadata of its own — a password rotation, for example, records metadata and no field changes.
func (AuditEvent) RawJSON ¶
func (r AuditEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuditEvent) UnmarshalJSON ¶
func (r *AuditEvent) UnmarshalJSON(data []byte) error
type AuditEventAction ¶
type AuditEventAction string
The type of action this event records.
- `create`: the resource was created.
- `update`: one or more fields were changed.
- `delete`: the resource was deleted.
- `restore`: a previously deleted resource was restored.
- `archive`: the resource was archived.
- `approve`: a human approved a gated action, such as allowing a review-gated agent tool to run.
- `deny`: a human denied a gated action, such as rejecting a review-gated agent tool.
const ( AuditEventActionCreate AuditEventAction = "create" AuditEventActionUpdate AuditEventAction = "update" AuditEventActionUpsert AuditEventAction = "upsert" AuditEventActionDelete AuditEventAction = "delete" AuditEventActionRestore AuditEventAction = "restore" AuditEventActionArchive AuditEventAction = "archive" AuditEventActionApprove AuditEventAction = "approve" AuditEventActionDeny AuditEventAction = "deny" )
type AuditEventObject ¶
type AuditEventObject string
Resource type identifier.
const (
AuditEventObjectAuditEvent AuditEventObject = "audit_event"
)
type AuditEventResourceType ¶
type AuditEventResourceType string
Resource type of the audited entity.
const ( AuditEventResourceTypeAccount AuditEventResourceType = "account" AuditEventResourceTypeActor AuditEventResourceType = "actor" AuditEventResourceTypeEntity AuditEventResourceType = "entity" AuditEventResourceTypeRecord AuditEventResourceType = "record" AuditEventResourceTypeFreight AuditEventResourceType = "freight" AuditEventResourceTypeCommitment AuditEventResourceType = "commitment" AuditEventResourceTypeSalesOrderTotals AuditEventResourceType = "sales_order_totals" AuditEventResourceTypeSalesOrderStageTotal AuditEventResourceType = "sales_order_stage_total" AuditEventResourceTypeSalesOrderRelated AuditEventResourceType = "sales_order_related" AuditEventResourceTypeOrderContact AuditEventResourceType = "order_contact" AuditEventResourceTypeUser AuditEventResourceType = "user" AuditEventResourceTypeAddress AuditEventResourceType = "address" AuditEventResourceTypeAPIKey AuditEventResourceType = "api_key" AuditEventResourceTypeCreatedAPIKey AuditEventResourceType = "created_api_key" AuditEventResourceTypeRefreshToken AuditEventResourceType = "refresh_token" AuditEventResourceTypeList AuditEventResourceType = "list" AuditEventResourceTypeSandbox AuditEventResourceType = "sandbox" AuditEventResourceTypeRegistrationSession AuditEventResourceType = "registration_session" AuditEventResourceTypePricingPlan AuditEventResourceType = "pricing_plan" AuditEventResourceTypeAccountPlan AuditEventResourceType = "account_plan" AuditEventResourceTypePlanChange AuditEventResourceType = "plan_change" AuditEventResourceTypeEnterpriseInquiry AuditEventResourceType = "enterprise_inquiry" AuditEventResourceTypeRequestLog AuditEventResourceType = "request_log" AuditEventResourceTypeAuditEvent AuditEventResourceType = "audit_event" AuditEventResourceTypeAuditFieldChange AuditEventResourceType = "audit_field_change" AuditEventResourceTypeRole AuditEventResourceType = "role" AuditEventResourceTypeUnit AuditEventResourceType = "unit" AuditEventResourceTypeAccountAffiliation AuditEventResourceType = "account_affiliation" AuditEventResourceTypeAgentDefinition AuditEventResourceType = "agent_definition" AuditEventResourceTypeAvailableTool AuditEventResourceType = "available_tool" AuditEventResourceTypeAgentDefinitionTool AuditEventResourceType = "agent_definition_tool" AuditEventResourceTypeAgentAccountStatus AuditEventResourceType = "agent_account_status" AuditEventResourceTypeAgentRun AuditEventResourceType = "agent_run" AuditEventResourceTypeAgentAction AuditEventResourceType = "agent_action" AuditEventResourceTypeAgentRunStep AuditEventResourceType = "agent_run_step" AuditEventResourceTypeAgentTokenUsage AuditEventResourceType = "agent_token_usage" AuditEventResourceTypeAgentMemory AuditEventResourceType = "agent_memory" AuditEventResourceTypeNotification AuditEventResourceType = "notification" AuditEventResourceTypeNotificationUnreadCount AuditEventResourceType = "notification_unread_count" AuditEventResourceTypeNotificationSendResult AuditEventResourceType = "notification_send_result" AuditEventResourceTypeNotificationUnreadSummary AuditEventResourceType = "notification_unread_summary" AuditEventResourceTypeAnnouncement AuditEventResourceType = "announcement" AuditEventResourceTypeConversation AuditEventResourceType = "conversation" AuditEventResourceTypeSupportCase AuditEventResourceType = "support_case" AuditEventResourceTypeConversationParticipant AuditEventResourceType = "conversation_participant" AuditEventResourceTypeReadCursor AuditEventResourceType = "read_cursor" AuditEventResourceTypeChatMessage AuditEventResourceType = "chat_message" AuditEventResourceTypeNotificationUnreadSummaryAccount AuditEventResourceType = "notification_unread_summary_account" AuditEventResourceTypeMessagingBlock AuditEventResourceType = "messaging_block" AuditEventResourceTypeNotificationPreference AuditEventResourceType = "notification_preference" AuditEventResourceTypeMessageAttachment AuditEventResourceType = "message_attachment" AuditEventResourceTypeAttachmentUploadTarget AuditEventResourceType = "attachment_upload_target" AuditEventResourceTypeScheduledMessage AuditEventResourceType = "scheduled_message" AuditEventResourceTypeMessagingContact AuditEventResourceType = "messaging_contact" AuditEventResourceTypeMessageReport AuditEventResourceType = "message_report" AuditEventResourceTypeToolGroup AuditEventResourceType = "tool_group" AuditEventResourceTypeModel AuditEventResourceType = "model" AuditEventResourceTypePaymentTerm AuditEventResourceType = "payment_term" AuditEventResourceTypeShippingTerm AuditEventResourceType = "shipping_term" AuditEventResourceTypeQuantity AuditEventResourceType = "quantity" AuditEventResourceTypeAccountGroup AuditEventResourceType = "account_group" AuditEventResourceTypeSupportRoute AuditEventResourceType = "support_route" AuditEventResourceTypeSupportAvailability AuditEventResourceType = "support_availability" AuditEventResourceTypeAccountStatus AuditEventResourceType = "account_status" AuditEventResourceTypeGeolocation AuditEventResourceType = "geolocation" AuditEventResourceTypeAccountUser AuditEventResourceType = "account_user" AuditEventResourceTypeDepartment AuditEventResourceType = "department" AuditEventResourceTypeAccountIntegration AuditEventResourceType = "account_integration" AuditEventResourceTypeAccountPrice AuditEventResourceType = "account_price" AuditEventResourceTypeProductLine AuditEventResourceType = "product_line" AuditEventResourceTypeItemCategory AuditEventResourceType = "item_category" AuditEventResourceTypeAttribute AuditEventResourceType = "attribute" AuditEventResourceTypeRate AuditEventResourceType = "rate" AuditEventResourceTypeAccountGroupProductLineAccess AuditEventResourceType = "account_group_product_line_access" AuditEventResourceTypeSalesTarget AuditEventResourceType = "sales_target" AuditEventResourceTypeAdjustmentType AuditEventResourceType = "adjustment_type" AuditEventResourceTypeAccountBranding AuditEventResourceType = "account_branding" AuditEventResourceTypeAccountPortal AuditEventResourceType = "account_portal" AuditEventResourceTypeAccountLogoURL AuditEventResourceType = "account_logo_url" AuditEventResourceTypeAccountFaviconURL AuditEventResourceType = "account_favicon_url" AuditEventResourceTypePublicAccount AuditEventResourceType = "public_account" AuditEventResourceTypeProperty AuditEventResourceType = "property" AuditEventResourceTypeCarrier AuditEventResourceType = "carrier" AuditEventResourceTypeServiceLevel AuditEventResourceType = "service_level" AuditEventResourceTypeItem AuditEventResourceType = "item" AuditEventResourceTypeItemLotDefault AuditEventResourceType = "item_lot_default" AuditEventResourceTypeItemInventory AuditEventResourceType = "item_inventory" AuditEventResourceTypeProduct AuditEventResourceType = "product" AuditEventResourceTypeBatch AuditEventResourceType = "batch" AuditEventResourceTypeBatchFlowNode AuditEventResourceType = "batch_flow_node" AuditEventResourceTypeScanningConsumption AuditEventResourceType = "scanning_consumption" AuditEventResourceTypeOpenBatchSummary AuditEventResourceType = "open_batch_summary" AuditEventResourceTypeScanningProductionStepInfo AuditEventResourceType = "scanning_production_step_info" AuditEventResourceTypeScanningStation AuditEventResourceType = "scanning_station" AuditEventResourceTypeProductionStep AuditEventResourceType = "production_step" AuditEventResourceTypeProductionRun AuditEventResourceType = "production_run" AuditEventResourceTypeMachine AuditEventResourceType = "machine" AuditEventResourceTypeMachineStatus AuditEventResourceType = "machine_status" AuditEventResourceTypeMachineDowntimeEvent AuditEventResourceType = "machine_downtime_event" AuditEventResourceTypeDemandOverride AuditEventResourceType = "demand_override" AuditEventResourceTypeDemandOverrideType AuditEventResourceType = "demand_override_type" AuditEventResourceTypeMachineDowntimeReason AuditEventResourceType = "machine_downtime_reason" AuditEventResourceTypeProductionSchedulePreview AuditEventResourceType = "production_schedule_preview" AuditEventResourceTypeProductionScheduleRegeneratePreview AuditEventResourceType = "production_schedule_regenerate_preview" AuditEventResourceTypeProductionSchedule AuditEventResourceType = "production_schedule" AuditEventResourceTypeProductionScheduleLine AuditEventResourceType = "production_schedule_line" AuditEventResourceTypeProductionScheduleDeviation AuditEventResourceType = "production_schedule_deviation" AuditEventResourceTypeProductionScheduleDerivedLine AuditEventResourceType = "production_schedule_derived_line" AuditEventResourceTypeProductionScheduleSettings AuditEventResourceType = "production_schedule_settings" AuditEventResourceTypeProductionScheduleResourceSetting AuditEventResourceType = "production_schedule_resource_setting" AuditEventResourceTypeProductionScheduleItemSetting AuditEventResourceType = "production_schedule_item_setting" AuditEventResourceTypeFulfillmentRecommendation AuditEventResourceType = "fulfillment_recommendation" AuditEventResourceTypeAnalyzeDeliveryPerformanceResponse AuditEventResourceType = "analyze_delivery_performance_response" AuditEventResourceTypeDeliveryPerformance AuditEventResourceType = "delivery_performance" AuditEventResourceTypeDeliveryBacklogBucket AuditEventResourceType = "delivery_backlog_bucket" AuditEventResourceTypeDeliveryLatenessBucket AuditEventResourceType = "delivery_lateness_bucket" AuditEventResourceTypeDeliveryBreakdown AuditEventResourceType = "delivery_breakdown" AuditEventResourceTypeAnalyzeSalesBreakdownResponse AuditEventResourceType = "analyze_sales_breakdown_response" AuditEventResourceTypeSalesTotals AuditEventResourceType = "sales_totals" AuditEventResourceTypeSalesBreakdown AuditEventResourceType = "sales_breakdown" AuditEventResourceTypeScheduleOrderCoverage AuditEventResourceType = "schedule_order_coverage" AuditEventResourceTypeScheduleOrderCoverageLine AuditEventResourceType = "schedule_order_coverage_line" AuditEventResourceTypeScheduleDeviationType AuditEventResourceType = "schedule_deviation_type" AuditEventResourceTypeScheduleAtRiskOrder AuditEventResourceType = "schedule_at_risk_order" AuditEventResourceTypeProductionScheduleFinishedPolicy AuditEventResourceType = "production_schedule_finished_policy" AuditEventResourceTypeProductionScheduleFinishingLine AuditEventResourceType = "production_schedule_finishing_line" AuditEventResourceTypeProductionScheduleWeekRelease AuditEventResourceType = "production_schedule_week_release" AuditEventResourceTypeProductionScheduleWeekReleasePreview AuditEventResourceType = "production_schedule_week_release_preview" AuditEventResourceTypeProductionScheduleItemPolicy AuditEventResourceType = "production_schedule_item_policy" AuditEventResourceTypeChildAccount AuditEventResourceType = "child_account" AuditEventResourceTypeUnitGroup AuditEventResourceType = "unit_group" AuditEventResourceTypeUnitGroupUnit AuditEventResourceType = "unit_group_unit" AuditEventResourceTypeConsumption AuditEventResourceType = "consumption" AuditEventResourceTypeCustomerProductLineAccess AuditEventResourceType = "customer_product_line_access" AuditEventResourceTypeCustomer AuditEventResourceType = "customer" AuditEventResourceTypeFrequentlyOrderedProduct AuditEventResourceType = "frequently_ordered_product" AuditEventResourceTypePriority AuditEventResourceType = "priority" AuditEventResourceTypeDelivery AuditEventResourceType = "delivery" AuditEventResourceTypeDeliveryLine AuditEventResourceType = "delivery_line" AuditEventResourceTypeDeliveryRelated AuditEventResourceType = "delivery_related" AuditEventResourceTypeSalesOrder AuditEventResourceType = "sales_order" AuditEventResourceTypeLocation AuditEventResourceType = "location" AuditEventResourceTypeLocationType AuditEventResourceType = "location_type" AuditEventResourceTypeLot AuditEventResourceType = "lot" AuditEventResourceTypeEmailLog AuditEventResourceType = "email_log" AuditEventResourceTypeEmailDomain AuditEventResourceType = "email_domain" AuditEventResourceTypeEmailInbox AuditEventResourceType = "email_inbox" AuditEventResourceTypeEmailSender AuditEventResourceType = "email_sender" AuditEventResourceTypePortalDomain AuditEventResourceType = "portal_domain" AuditEventResourceTypeDNSRecord AuditEventResourceType = "dns_record" AuditEventResourceTypeInventoryChangeLog AuditEventResourceType = "inventory_change_log" AuditEventResourceTypeInvoice AuditEventResourceType = "invoice" AuditEventResourceTypeInvoiceSummary AuditEventResourceType = "invoice_summary" AuditEventResourceTypeInvoiceLine AuditEventResourceType = "invoice_line" AuditEventResourceTypeInvoiceAllocation AuditEventResourceType = "invoice_allocation" AuditEventResourceTypeInvoiceForPayment AuditEventResourceType = "invoice_for_payment" AuditEventResourceTypeShipment AuditEventResourceType = "shipment" AuditEventResourceTypeShipmentSummary AuditEventResourceType = "shipment_summary" AuditEventResourceTypeShipmentLine AuditEventResourceType = "shipment_line" AuditEventResourceTypeShippingCase AuditEventResourceType = "shipping_case" AuditEventResourceTypeShippingCaseLabelURL AuditEventResourceType = "shipping_case_label_url" AuditEventResourceTypeSettlement AuditEventResourceType = "settlement" AuditEventResourceTypeSettlementSummary AuditEventResourceType = "settlement_summary" AuditEventResourceTypeRolePermission AuditEventResourceType = "role_permission" AuditEventResourceTypeRegistrationFlow AuditEventResourceType = "registration_flow" AuditEventResourceTypeRegistrationFlowOption AuditEventResourceType = "registration_flow_option" AuditEventResourceTypeTransaction AuditEventResourceType = "transaction" AuditEventResourceTypeTransactionSummary AuditEventResourceType = "transaction_summary" AuditEventResourceTypeTransactionMethod AuditEventResourceType = "transaction_method" AuditEventResourceTypeTransactionType AuditEventResourceType = "transaction_type" AuditEventResourceTypeTransactionAllocation AuditEventResourceType = "transaction_allocation" AuditEventResourceTypeUsageItem AuditEventResourceType = "usage_item" AuditEventResourceTypeAccountUsageResponse AuditEventResourceType = "account_usage_response" AuditEventResourceTypeSubscriptionInfo AuditEventResourceType = "subscription_info" AuditEventResourceTypeBillingPortalSessionResponse AuditEventResourceType = "billing_portal_session_response" AuditEventResourceTypeSwitchPlanResponse AuditEventResourceType = "switch_plan_response" AuditEventResourceTypeEnsureBillingCustomerResponse AuditEventResourceType = "ensure_billing_customer_response" AuditEventResourceTypeSpendingCapResponse AuditEventResourceType = "spending_cap_response" AuditEventResourceTypeAgentSpendInfo AuditEventResourceType = "agent_spend_info" AuditEventResourceTypeWebhookResponse AuditEventResourceType = "webhook_response" AuditEventResourceTypeAddressSuggestion AuditEventResourceType = "address_suggestion" AuditEventResourceTypeAddressComponents AuditEventResourceType = "address_components" AuditEventResourceTypeAddressDetailsResult AuditEventResourceType = "address_details_result" AuditEventResourceTypeValidatedAddress AuditEventResourceType = "validated_address" AuditEventResourceTypePlanLimit AuditEventResourceType = "plan_limit" AuditEventResourceTypePlanChangeProration AuditEventResourceType = "plan_change_proration" AuditEventResourceTypePlanChangeLineItem AuditEventResourceType = "plan_change_line_item" AuditEventResourceTypeSetupBillingResponse AuditEventResourceType = "setup_billing_response" AuditEventResourceTypeConfirmPaymentResponse AuditEventResourceType = "confirm_payment_response" AuditEventResourceTypeOAuthResponse AuditEventResourceType = "oauth_response" AuditEventResourceTypeOAuthStatusResponse AuditEventResourceType = "oauth_status_response" AuditEventResourceTypeStripePublishableKey AuditEventResourceType = "stripe_publishable_key" AuditEventResourceTypeStripeStatus AuditEventResourceType = "stripe_status" AuditEventResourceTypeHealthcheck AuditEventResourceType = "healthcheck" AuditEventResourceTypeAgentDefinitionConfig AuditEventResourceType = "agent_definition_config" AuditEventResourceTypeTriggerConfig AuditEventResourceType = "trigger_config" AuditEventResourceTypeCustomerContactInfo AuditEventResourceType = "customer_contact_info" AuditEventResourceTypeCustomerFreightPreferences AuditEventResourceType = "customer_freight_preferences" AuditEventResourceTypeCustomerDefaults AuditEventResourceType = "customer_defaults" AuditEventResourceTypeCustomerLeadTime AuditEventResourceType = "customer_lead_time" AuditEventResourceTypeCustomerNotificationPreferences AuditEventResourceType = "customer_notification_preferences" AuditEventResourceTypeOrderNotificationRecipient AuditEventResourceType = "order_notification_recipient" AuditEventResourceTypeOrderDiscount AuditEventResourceType = "order_discount" AuditEventResourceTypeSalesOrderLine AuditEventResourceType = "sales_order_line" AuditEventResourceTypeSalesOrderType AuditEventResourceType = "sales_order_type" AuditEventResourceTypeSalesOrderStatus AuditEventResourceType = "sales_order_status" AuditEventResourceTypeMaterial AuditEventResourceType = "material" AuditEventResourceTypeSupplierMaterial AuditEventResourceType = "supplier_material" AuditEventResourceTypePart AuditEventResourceType = "part" AuditEventResourceTypePermissionGroup AuditEventResourceType = "permission_group" AuditEventResourceTypePermission AuditEventResourceType = "permission" AuditEventResourceTypePick AuditEventResourceType = "pick" AuditEventResourceTypePickLine AuditEventResourceType = "pick_line" AuditEventResourceTypeProductType AuditEventResourceType = "product_type" AuditEventResourceTypeProduction AuditEventResourceType = "production" AuditEventResourceTypeProductionFlow AuditEventResourceType = "production_flow" AuditEventResourceTypeMap AuditEventResourceType = "map" AuditEventResourceTypePurchaseOrder AuditEventResourceType = "purchase_order" AuditEventResourceTypePurchaseOrderLine AuditEventResourceType = "purchase_order_line" AuditEventResourceTypePurchaseOrderRelated AuditEventResourceType = "purchase_order_related" AuditEventResourceTypeSupplier AuditEventResourceType = "supplier" AuditEventResourceTypeReceivableEntry AuditEventResourceType = "receivable_entry" AuditEventResourceTypeReceivingOrder AuditEventResourceType = "receiving_order" AuditEventResourceTypeReceivingOrderLine AuditEventResourceType = "receiving_order_line" AuditEventResourceTypeReceivingOrderTotals AuditEventResourceType = "receiving_order_totals" AuditEventResourceTypeReceivingOrderStageTotal AuditEventResourceType = "receiving_order_stage_total" AuditEventResourceTypeReceivingOrderRelated AuditEventResourceType = "receiving_order_related" AuditEventResourceTypeEmailContact AuditEventResourceType = "email_contact" AuditEventResourceTypeAllocationEntry AuditEventResourceType = "allocation_entry" AuditEventResourceTypeOpenCreditEntry AuditEventResourceType = "open_credit_entry" AuditEventResourceTypeVolumeDiscount AuditEventResourceType = "volume_discount" AuditEventResourceTypeVolumeDiscountTier AuditEventResourceType = "volume_discount_tier" AuditEventResourceTypeAnalyzeDeliveriesResponse AuditEventResourceType = "analyze_deliveries_response" AuditEventResourceTypeAnalyzeManufacturingResponse AuditEventResourceType = "analyze_manufacturing_response" AuditEventResourceTypeAnalyzeManufacturingBatchResponse AuditEventResourceType = "analyze_manufacturing_batch_response" AuditEventResourceTypeAnalyzeQuarterlyOrdersResponse AuditEventResourceType = "analyze_quarterly_orders_response" AuditEventResourceTypeAnalyzeNewCustomersResponse AuditEventResourceType = "analyze_new_customers_response" AuditEventResourceTypeAnalyzeDemandForecastResponse AuditEventResourceType = "analyze_demand_forecast_response" AuditEventResourceTypeAnalyzeOeeResponse AuditEventResourceType = "analyze_oee_response" AuditEventResourceTypeAnalyzeOeeTrendResponse AuditEventResourceType = "analyze_oee_trend_response" AuditEventResourceTypeAnalyzeScheduleAttainmentResponse AuditEventResourceType = "analyze_schedule_attainment_response" AuditEventResourceTypeCatalogProductLine AuditEventResourceType = "catalog_product_line" AuditEventResourceTypeCatalogCategory AuditEventResourceType = "catalog_category" AuditEventResourceTypeCatalogProduct AuditEventResourceType = "catalog_product" AuditEventResourceTypeCatalogProperty AuditEventResourceType = "catalog_property" AuditEventResourceTypeCatalogAttribute AuditEventResourceType = "catalog_attribute" AuditEventResourceTypeDcLocation AuditEventResourceType = "dc_location" AuditEventResourceTypeEdiRun AuditEventResourceType = "edi_run" AuditEventResourceTypeInventoryItem AuditEventResourceType = "inventory_item" AuditEventResourceTypeAnalyzeWeeksOfSalesResponse AuditEventResourceType = "analyze_weeks_of_sales_response" AuditEventResourceTypeBulkReconcileItemsResponse AuditEventResourceType = "bulk_reconcile_items_response" AuditEventResourceTypeSysProperty AuditEventResourceType = "sys_property" AuditEventResourceTypeSysPropertyType AuditEventResourceType = "sys_property_type" AuditEventResourceTypeSysPropertyValue AuditEventResourceType = "sys_property_value" AuditEventResourceTypeTerritory AuditEventResourceType = "territory" AuditEventResourceTypeTenancy AuditEventResourceType = "tenancy" AuditEventResourceTypeCheckoutSession AuditEventResourceType = "checkout_session" AuditEventResourceTypeEstimateRateResult AuditEventResourceType = "estimate_rate_result" AuditEventResourceTypeRateShopOption AuditEventResourceType = "rate_shop_option" AuditEventResourceTypeRateShopResult AuditEventResourceType = "rate_shop_result" AuditEventResourceTypeOwner AuditEventResourceType = "owner" AuditEventResourceTypeCreatedBy AuditEventResourceType = "created_by" AuditEventResourceTypeMessage AuditEventResourceType = "message" AuditEventResourceTypeAccountPhotoUploadResult AuditEventResourceType = "account_photo_upload_result" AuditEventResourceTypeUserPhotoUploadResult AuditEventResourceType = "user_photo_upload_result" AuditEventResourceTypeUserPhotoURL AuditEventResourceType = "user_photo_url" AuditEventResourceTypeBatchLot AuditEventResourceType = "batch_lot" AuditEventResourceTypeCheckDuplicateResult AuditEventResourceType = "check_duplicate_result" AuditEventResourceTypeItemCosts AuditEventResourceType = "item_costs" AuditEventResourceTypeItemTrends AuditEventResourceType = "item_trends" AuditEventResourceTypeReconciledItemResult AuditEventResourceType = "reconciled_item_result" AuditEventResourceTypeSkippedItemResult AuditEventResourceType = "skipped_item_result" AuditEventResourceTypeReconcileErrorResult AuditEventResourceType = "reconcile_error_result" AuditEventResourceTypeItemTrendPoint AuditEventResourceType = "item_trend_point" AuditEventResourceTypeTenancyPendingRegistration AuditEventResourceType = "tenancy_pending_registration" AuditEventResourceTypeInvoiceAllocationEntry AuditEventResourceType = "invoice_allocation_entry" AuditEventResourceTypeAllocationCustomer AuditEventResourceType = "allocation_customer" AuditEventResourceTypeCheckoutSalesOrder AuditEventResourceType = "checkout_sales_order" AuditEventResourceTypeSalesOrderPriceQuote AuditEventResourceType = "sales_order_price_quote" AuditEventResourceTypeSalesOrderFreightQuote AuditEventResourceType = "sales_order_freight_quote" AuditEventResourceTypeSalesOrderCommitmentQuote AuditEventResourceType = "sales_order_commitment_quote" AuditEventResourceTypeOperatingCalendar AuditEventResourceType = "operating_calendar" AuditEventResourceTypeOperatingCalendarClosure AuditEventResourceType = "operating_calendar_closure" AuditEventResourceTypeSalesOrderPriceQuoteLine AuditEventResourceType = "sales_order_price_quote_line" AuditEventResourceTypeHubspotSyncJob AuditEventResourceType = "hubspot_sync_job" AuditEventResourceTypeHubspotSyncReport AuditEventResourceType = "hubspot_sync_report" AuditEventResourceTypeHubspotCompanyReview AuditEventResourceType = "hubspot_company_review" AuditEventResourceTypeHubspotCompanyCandidate AuditEventResourceType = "hubspot_company_candidate" AuditEventResourceTypeHubspotSyncRecord AuditEventResourceType = "hubspot_sync_record" AuditEventResourceTypeContactMatch AuditEventResourceType = "contact_match" AuditEventResourceTypeReplyDraft AuditEventResourceType = "reply_draft" AuditEventResourceTypeConversationLink AuditEventResourceType = "conversation_link" AuditEventResourceTypeMessagingGroup AuditEventResourceType = "messaging_group" AuditEventResourceTypeMessagingGroupMember AuditEventResourceType = "messaging_group_member" AuditEventResourceTypePortalProfile AuditEventResourceType = "portal_profile" AuditEventResourceTypePortalRegistrationSession AuditEventResourceType = "portal_registration_session" AuditEventResourceTypePortalRegistrationSessionData AuditEventResourceType = "portal_registration_session_data" AuditEventResourceTypePackList AuditEventResourceType = "pack_list" AuditEventResourceTypePackListParty AuditEventResourceType = "pack_list_party" AuditEventResourceTypePackListLineItem AuditEventResourceType = "pack_list_line_item" AuditEventResourceTypePackListBackOrder AuditEventResourceType = "pack_list_back_order" AuditEventResourceTypePackListCase AuditEventResourceType = "pack_list_case" AuditEventResourceTypeJob AuditEventResourceType = "job" AuditEventResourceTypeJobResult AuditEventResourceType = "job_result" AuditEventResourceTypeJobExport AuditEventResourceType = "job_export" AuditEventResourceTypeAnalyzeCustomerPricingResponse AuditEventResourceType = "analyze_customer_pricing_response" AuditEventResourceTypeCustomerPricingFinding AuditEventResourceType = "customer_pricing_finding" AuditEventResourceTypeCustomerPricingSummary AuditEventResourceType = "customer_pricing_summary" AuditEventResourceTypeComputedRate AuditEventResourceType = "computed_rate" AuditEventResourceTypeComputedQuantity AuditEventResourceType = "computed_quantity" AuditEventResourceTypeAnalyzeRealizedMarginsResponse AuditEventResourceType = "analyze_realized_margins_response" AuditEventResourceTypeRealizedMarginFinding AuditEventResourceType = "realized_margin_finding" AuditEventResourceTypeRealizedMarginSummary AuditEventResourceType = "realized_margin_summary" AuditEventResourceTypeShipmentRelated AuditEventResourceType = "shipment_related" AuditEventResourceTypeInvoiceRelated AuditEventResourceType = "invoice_related" AuditEventResourceTypePickRelated AuditEventResourceType = "pick_related" AuditEventResourceTypePickTotals AuditEventResourceType = "pick_totals" AuditEventResourceTypePickStageTotal AuditEventResourceType = "pick_stage_total" )
type AuditFieldChange ¶
type AuditFieldChange struct {
// Name of the changed field.
//
// Field names come from the audited record's stored representation and can differ
// slightly from the corresponding field on the API resource — for example
// `commission_policy_code` rather than `commission_policy`.
Field string `json:"field" api:"required"`
// New value as a JSON fragment.
//
// `null` on `delete` events, where the field has no remaining value. Encoded as a
// JSON value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
NewValue any `json:"new_value" api:"required"`
// Resource type identifier.
//
// Any of "audit_field_change".
Object AuditFieldChangeObject `json:"object" api:"required"`
// Previous value as a JSON fragment.
//
// `null` on `create` events, where the field had no prior value. Encoded as a JSON
// value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
OldValue any `json:"old_value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Field respjson.Field
NewValue respjson.Field
Object respjson.Field
OldValue respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Field-level before/after transition recorded during a mutation.
func (AuditFieldChange) RawJSON ¶
func (r AuditFieldChange) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuditFieldChange) UnmarshalJSON ¶
func (r *AuditFieldChange) UnmarshalJSON(data []byte) error
type AuditFieldChangeObject ¶
type AuditFieldChangeObject string
Resource type identifier.
const (
AuditFieldChangeObjectAuditFieldChange AuditFieldChangeObject = "audit_field_change"
)
type AuthAPIKeyActionRotateParams ¶
type AuthAPIKeyActionRotateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// Request to rotate an API key.
RotateAPIKeyRequest RotateAPIKeyRequestParam
// contains filtered or unexported fields
}
func (AuthAPIKeyActionRotateParams) MarshalJSON ¶
func (r AuthAPIKeyActionRotateParams) MarshalJSON() (data []byte, err error)
func (AuthAPIKeyActionRotateParams) URLQuery ¶
func (r AuthAPIKeyActionRotateParams) URLQuery() (v url.Values, err error)
URLQuery serializes AuthAPIKeyActionRotateParams's query parameters as `url.Values`.
func (*AuthAPIKeyActionRotateParams) UnmarshalJSON ¶
func (r *AuthAPIKeyActionRotateParams) UnmarshalJSON(data []byte) error
type AuthAPIKeyActionService ¶
type AuthAPIKeyActionService struct {
// contains filtered or unexported fields
}
Create and manage API keys for programmatic access.
AuthAPIKeyActionService contains methods and other services that help with interacting with the openmrp 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 NewAuthAPIKeyActionService method instead.
func NewAuthAPIKeyActionService ¶
func NewAuthAPIKeyActionService(opts ...option.RequestOption) (r AuthAPIKeyActionService)
NewAuthAPIKeyActionService 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 (*AuthAPIKeyActionService) Rotate ¶
func (r *AuthAPIKeyActionService) Rotate(ctx context.Context, id string, params AuthAPIKeyActionRotateParams, opts ...option.RequestOption) (res *CreatedAPIKey, err error)
Rotates an [API key](https://docs.openmrp.ai/api/api-keys) by revoking the existing key and issuing a replacement with the same name, role, and expiration (unless overridden).
The replacement is a new key with its own ID; the rotated key keeps its ID and stays in the list, moving to a `revoked` status once its revocation takes effect. Use `revoke_at` to keep the old key working while you roll the new secret out.
The secret key is returned once and cannot be retrieved later, so you should store it securely. We provide some [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can manage your API keys.
This endpoint requires the `admin` role type.
type AuthAPIKeyDeleteResponse ¶
type AuthAPIKeyDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AuthAPIKeyDeleteResponse) RawJSON ¶
func (r AuthAPIKeyDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AuthAPIKeyDeleteResponse) UnmarshalJSON ¶
func (r *AuthAPIKeyDeleteResponse) UnmarshalJSON(data []byte) error
type AuthAPIKeyGetParams ¶
type AuthAPIKeyGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AuthAPIKeyGetParams) URLQuery ¶
func (r AuthAPIKeyGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes AuthAPIKeyGetParams's query parameters as `url.Values`.
type AuthAPIKeyListParams ¶
type AuthAPIKeyListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// API key statuses to filter by.
//
// - `active`: the key still authenticates requests. A key whose revocation is
// scheduled for a future time is still active until that time arrives.
// - `expired`: the key passed its expiration time without having been revoked.
// - `revoked`: the key was revoked, which takes precedence over expiration.
//
// When omitted, keys of every status are returned.
//
// Any of "active", "expired", "revoked".
Statuses []string `query:"statuses,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AuthAPIKeyListParams) URLQuery ¶
func (r AuthAPIKeyListParams) URLQuery() (v url.Values, err error)
URLQuery serializes AuthAPIKeyListParams's query parameters as `url.Values`.
type AuthAPIKeyNewParams ¶
type AuthAPIKeyNewParams struct {
// Request to create an API key.
CreateAPIKeyRequest CreateAPIKeyRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "role", "role.permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (AuthAPIKeyNewParams) MarshalJSON ¶
func (r AuthAPIKeyNewParams) MarshalJSON() (data []byte, err error)
func (AuthAPIKeyNewParams) URLQuery ¶
func (r AuthAPIKeyNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes AuthAPIKeyNewParams's query parameters as `url.Values`.
func (*AuthAPIKeyNewParams) UnmarshalJSON ¶
func (r *AuthAPIKeyNewParams) UnmarshalJSON(data []byte) error
type AuthAPIKeyService ¶
type AuthAPIKeyService struct {
// Create and manage API keys for programmatic access.
Actions AuthAPIKeyActionService
// contains filtered or unexported fields
}
Create and manage API keys for programmatic access.
AuthAPIKeyService contains methods and other services that help with interacting with the openmrp 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 NewAuthAPIKeyService method instead.
func NewAuthAPIKeyService ¶
func NewAuthAPIKeyService(opts ...option.RequestOption) (r AuthAPIKeyService)
NewAuthAPIKeyService 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 (*AuthAPIKeyService) Delete ¶
func (r *AuthAPIKeyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AuthAPIKeyDeleteResponse, err error)
Revokes an [API key](https://docs.openmrp.ai/api/api-keys).
Revocation takes effect immediately and cannot be undone; any request still presenting the key is rejected. The key record is kept, so it stays visible in the key list with a `revoked` status. To replace a key without an interruption in access, use Rotate API Key instead.
This endpoint requires the `admin` role type.
func (*AuthAPIKeyService) Get ¶
func (r *AuthAPIKeyService) Get(ctx context.Context, id string, query AuthAPIKeyGetParams, opts ...option.RequestOption) (res *APIKey, err error)
Returns [API key](https://docs.openmrp.ai/api/api-keys) metadata by ID.
Only the redacted key value is returned. The full secret is available only in the response that issued the key, so a lost secret must be replaced by rotating the key.
This endpoint requires the `admin` role type.
func (*AuthAPIKeyService) List ¶
func (r *AuthAPIKeyService) List(ctx context.Context, query AuthAPIKeyListParams, opts ...option.RequestOption) (res *ListAPIKey, err error)
Returns a paginated list of [API keys](https://docs.openmrp.ai/api/api-keys), newest first.
Only keys belonging to the account making the request are returned. The search term matches against the key name.
This endpoint requires the `admin` role type.
func (*AuthAPIKeyService) New ¶
func (r *AuthAPIKeyService) New(ctx context.Context, params AuthAPIKeyNewParams, opts ...option.RequestOption) (res *CreatedAPIKey, err error)
Creates an [API key](https://docs.openmrp.ai/api/api-keys) to authenticate API requests.
The key belongs to the account it was created under and only ever acts on behalf of that account. Keys created under a sandbox account carry an `mrp_sk_test_` prefix; keys created under a production account carry an `mrp_sk_prod_` prefix.
The secret key is returned once and cannot be retrieved later, so you should store it securely. We provide some [recommendations](https://docs.openmrp.ai/api/managing-api-keys) on how you can manage your API keys.
This endpoint requires the `admin` role type.
type AuthService ¶
type AuthService struct {
// Create and manage API keys for programmatic access.
APIKeys AuthAPIKeyService
// contains filtered or unexported fields
}
AuthService contains methods and other services that help with interacting with the openmrp 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 NewAuthService method instead.
func NewAuthService ¶
func NewAuthService(opts ...option.RequestOption) (r AuthService)
NewAuthService 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.
type AvailableTool ¶
type AvailableTool struct {
// Where the tool's behavior comes from.
//
// - `built_in`: a capability implemented by the agent runtime itself, such as
// fetching a web page or drafting a reply for a teammate to approve.
// - `api_endpoint`: an operation of this API exposed as a tool, letting the agent
// perform it on the account's behalf.
//
// Any of "built_in", "api_endpoint".
Category AvailableToolCategory `json:"category" api:"required"`
// JSON schema describing the configuration options this tool accepts.
//
// Defines the shape of the `config` field on AgentDefinitionTool: a schema
// declaring a `max_results` integer property means that tool's `config` may set
// `max_results`. Encoded as a JSON value (object, array, string, number, boolean,
// or null), not a JSON-encoded string.
ConfigSchema any `json:"config_schema" api:"required"`
// Explanation of what the tool does.
//
// This is also the description the agent's model reads when deciding whether to
// call the tool.
Description string `json:"description" api:"required"`
// Whether invoking this tool takes an action rather than only reading data.
//
// True for any `api_endpoint` tool whose underlying operation is not a read, and
// for `built_in` tools that do something externally visible or hard to undo, such
// as sending an email. A mutating `built_in` tool always pauses its run for human
// approval and that gate cannot be turned off for an individual agent; for
// `api_endpoint` tools the flag is advisory and review stays configurable per
// agent.
Mutating bool `json:"mutating" api:"required"`
// Human-readable name for the tool.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "available_tool".
Object AvailableToolObject `json:"object" api:"required"`
// Permission scopes the agent's role must hold for this tool to be usable (e.g.
// `products:read`).
RequiredPermissions []string `json:"required_permissions" api:"required"`
// Role type the caller must have for this tool, when the operation is gated by
// role rather than a permission (e.g. `admin`).
//
// Any of "admin", "user", "scanner", "sales_rep", "agent".
RequiredRoleType AvailableToolRequiredRoleType `json:"required_role_type" api:"required"`
// A stable identifier used when attaching the tool to an agent.
Slug string `json:"slug" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Category respjson.Field
ConfigSchema respjson.Field
Description respjson.Field
Mutating respjson.Field
Name respjson.Field
Object respjson.Field
RequiredPermissions respjson.Field
RequiredRoleType respjson.Field
Slug respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A capability an agent can be granted, allowing it to take that action during a run.
The catalog of available tools is the same for every account; granting one to an agent is what makes it callable.
func (AvailableTool) RawJSON ¶
func (r AvailableTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*AvailableTool) UnmarshalJSON ¶
func (r *AvailableTool) UnmarshalJSON(data []byte) error
type AvailableToolCategory ¶ added in v0.17.1
type AvailableToolCategory string
Where the tool's behavior comes from.
- `built_in`: a capability implemented by the agent runtime itself, such as fetching a web page or drafting a reply for a teammate to approve.
- `api_endpoint`: an operation of this API exposed as a tool, letting the agent perform it on the account's behalf.
const ( AvailableToolCategoryBuiltIn AvailableToolCategory = "built_in" AvailableToolCategoryAPIEndpoint AvailableToolCategory = "api_endpoint" )
type AvailableToolObject ¶
type AvailableToolObject string
Resource type identifier.
const (
AvailableToolObjectAvailableTool AvailableToolObject = "available_tool"
)
type AvailableToolRequiredRoleType ¶ added in v0.17.1
type AvailableToolRequiredRoleType string
Role type the caller must have for this tool, when the operation is gated by role rather than a permission (e.g. `admin`).
const ( AvailableToolRequiredRoleTypeAdmin AvailableToolRequiredRoleType = "admin" AvailableToolRequiredRoleTypeUser AvailableToolRequiredRoleType = "user" AvailableToolRequiredRoleTypeScanner AvailableToolRequiredRoleType = "scanner" AvailableToolRequiredRoleTypeSalesRep AvailableToolRequiredRoleType = "sales_rep" AvailableToolRequiredRoleTypeAgent AvailableToolRequiredRoleType = "agent" )
type BlockRequestParam ¶
type BlockRequestParam struct {
// The account user to block.
//
// It must be someone else in your account; you cannot block yourself.
BlockedAccountUserID string `json:"blocked_account_user_id" api:"required"`
// contains filtered or unexported fields
}
Request to block another account user from messaging the caller.
The property BlockedAccountUserID is required.
func (BlockRequestParam) MarshalJSON ¶
func (r BlockRequestParam) MarshalJSON() (data []byte, err error)
func (*BlockRequestParam) UnmarshalJSON ¶
func (r *BlockRequestParam) UnmarshalJSON(data []byte) error
type BulkDeleteSalesOrdersRequestParam ¶
type BulkDeleteSalesOrdersRequestParam struct {
// IDs of the sales orders to delete.
SalesOrderIDs []string `json:"sales_order_ids,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to bulk delete sales orders.
The property SalesOrderIDs is required.
func (BulkDeleteSalesOrdersRequestParam) MarshalJSON ¶
func (r BulkDeleteSalesOrdersRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkDeleteSalesOrdersRequestParam) UnmarshalJSON ¶
func (r *BulkDeleteSalesOrdersRequestParam) UnmarshalJSON(data []byte) error
type BulkReconcileItemInputParam ¶
type BulkReconcileItemInputParam struct {
// Quantity to apply, interpreted according to the request's `reconcile_type`.
//
// A decimal string rather than a number: a quantity that has been through a binary
// float is not the quantity you sent.
Quantity string `json:"quantity" api:"required" format:"decimal"`
// SKU of the item to reconcile.
//
// Items whose SKU does not match an existing item are reported in the response's
// `skipped_items` rather than failing the request.
SKU string `json:"sku" api:"required"`
// Abbreviation of a unit available to your account (e.g. `kg`).
//
// The unit is checked for existence only: the quantity is always recorded in the
// item's own base unit, so send figures already expressed in that unit. Rows
// naming an abbreviation that matches no built-in or account-defined unit are
// reported in the response's `errors`.
Unit string `json:"unit" api:"required"`
// contains filtered or unexported fields
}
One item to reconcile in a bulk reconcile request.
The properties Quantity, SKU, Unit are required.
func (BulkReconcileItemInputParam) MarshalJSON ¶
func (r BulkReconcileItemInputParam) MarshalJSON() (data []byte, err error)
func (*BulkReconcileItemInputParam) UnmarshalJSON ¶
func (r *BulkReconcileItemInputParam) UnmarshalJSON(data []byte) error
type BulkReconcileItemsRequestParam ¶
type BulkReconcileItemsRequestParam struct {
// Items to reconcile.
Data []BulkReconcileItemInputParam `json:"data,omitzero" api:"required"`
// How each item's quantity is applied to its current quantity.
//
// - `addition`: adds the quantity to the item's current quantity.
// - `force`: sets the item's current quantity to exactly the given quantity.
//
// Any of "addition", "force".
ReconcileType BulkReconcileItemsRequestReconcileType `json:"reconcile_type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to reconcile inventory for many items at once.
The properties Data, ReconcileType are required.
func (BulkReconcileItemsRequestParam) MarshalJSON ¶
func (r BulkReconcileItemsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkReconcileItemsRequestParam) UnmarshalJSON ¶
func (r *BulkReconcileItemsRequestParam) UnmarshalJSON(data []byte) error
type BulkReconcileItemsRequestReconcileType ¶ added in v0.17.1
type BulkReconcileItemsRequestReconcileType string
How each item's quantity is applied to its current quantity.
- `addition`: adds the quantity to the item's current quantity. - `force`: sets the item's current quantity to exactly the given quantity.
const ( BulkReconcileItemsRequestReconcileTypeAddition BulkReconcileItemsRequestReconcileType = "addition" BulkReconcileItemsRequestReconcileTypeForce BulkReconcileItemsRequestReconcileType = "force" )
type BulkReconcileItemsResponse ¶
type BulkReconcileItemsResponse struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Errors ListReconcileErrorResult `json:"errors" api:"required"`
// Resource type identifier.
//
// Any of "bulk_reconcile_items_response".
Object BulkReconcileItemsResponseObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ReconciledItems ListReconciledItemResult `json:"reconciled_items" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
SkippedItems ListSkippedItemResult `json:"skipped_items" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Errors respjson.Field
Object respjson.Field
ReconciledItems respjson.Field
SkippedItems respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The outcome of a bulk inventory reconciliation, reported as three separate lists.
func (BulkReconcileItemsResponse) RawJSON ¶
func (r BulkReconcileItemsResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*BulkReconcileItemsResponse) UnmarshalJSON ¶
func (r *BulkReconcileItemsResponse) UnmarshalJSON(data []byte) error
type BulkReconcileItemsResponseObject ¶
type BulkReconcileItemsResponseObject string
Resource type identifier.
const (
BulkReconcileItemsResponseObjectBulkReconcileItemsResponse BulkReconcileItemsResponseObject = "bulk_reconcile_items_response"
)
type BulkUpsertItemCategoriesRequestParam ¶
type BulkUpsertItemCategoriesRequestParam struct {
// Item categories to create or update, matched by name within the account.
ItemCategories []UpsertItemCategoryInputParam `json:"item_categories,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertItemCategoriesRequest is the request to bulk upsert item categories.
The property ItemCategories is required.
func (BulkUpsertItemCategoriesRequestParam) MarshalJSON ¶
func (r BulkUpsertItemCategoriesRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertItemCategoriesRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertItemCategoriesRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertLocationsRequestParam ¶
type BulkUpsertLocationsRequestParam struct {
// Locations to create or update, matched by name within the account.
Locations []UpsertLocationInputParam `json:"locations,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertLocationsRequest is the request to bulk upsert locations.
The property Locations is required.
func (BulkUpsertLocationsRequestParam) MarshalJSON ¶
func (r BulkUpsertLocationsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertLocationsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertLocationsRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertMaterialsRequestParam ¶
type BulkUpsertMaterialsRequestParam struct {
// Materials to create or update, matched by SKU within the account.
Materials []UpsertMaterialInputParam `json:"materials,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to bulk upsert materials.
The property Materials is required.
func (BulkUpsertMaterialsRequestParam) MarshalJSON ¶
func (r BulkUpsertMaterialsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertMaterialsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertMaterialsRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertPartsRequestParam ¶
type BulkUpsertPartsRequestParam struct {
// Parts to create or update, matched by SKU within the account.
Parts []UpsertPartInputParam `json:"parts,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertPartsRequest is the request to bulk upsert parts.
The property Parts is required.
func (BulkUpsertPartsRequestParam) MarshalJSON ¶
func (r BulkUpsertPartsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertPartsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertPartsRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertProductLinesRequestParam ¶
type BulkUpsertProductLinesRequestParam struct {
// Product lines to create or update, matched by name within the account.
ProductLines []UpsertProductLineInputParam `json:"product_lines,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertProductLinesRequest is the request to bulk upsert product lines.
The property ProductLines is required.
func (BulkUpsertProductLinesRequestParam) MarshalJSON ¶
func (r BulkUpsertProductLinesRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertProductLinesRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertProductLinesRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertProductsRequestParam ¶
type BulkUpsertProductsRequestParam struct {
// Products to create or update, matched by SKU within the account.
Products []UpsertProductInputParam `json:"products,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to bulk upsert products.
The property Products is required.
func (BulkUpsertProductsRequestParam) MarshalJSON ¶
func (r BulkUpsertProductsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertProductsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertProductsRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertPropertiesRequestParam ¶
type BulkUpsertPropertiesRequestParam struct {
// Properties to create or update, matched by name (case-insensitive) within the
// account.
Properties []UpsertPropertyInputParam `json:"properties,omitzero" api:"required"`
// contains filtered or unexported fields
}
carries the properties to bulk upsert
The property Properties is required.
func (BulkUpsertPropertiesRequestParam) MarshalJSON ¶
func (r BulkUpsertPropertiesRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertPropertiesRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertPropertiesRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertUnitGroupsRequestParam ¶
type BulkUpsertUnitGroupsRequestParam struct {
// Unit groups to create or update, matched by name within the account.
UnitGroups []UpsertUnitGroupInputParam `json:"unit_groups,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertUnitGroupsRequest is the request to bulk upsert unit groups.
The property UnitGroups is required.
func (BulkUpsertUnitGroupsRequestParam) MarshalJSON ¶
func (r BulkUpsertUnitGroupsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertUnitGroupsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertUnitGroupsRequestParam) UnmarshalJSON(data []byte) error
type BulkUpsertUnitsRequestParam ¶
type BulkUpsertUnitsRequestParam struct {
// Units to create or update, matched by name or abbreviation within the account.
Units []UpsertUnitInputParam `json:"units,omitzero" api:"required"`
// contains filtered or unexported fields
}
BulkUpsertUnitsRequest is the request to bulk upsert units.
The property Units is required.
func (BulkUpsertUnitsRequestParam) MarshalJSON ¶
func (r BulkUpsertUnitsRequestParam) MarshalJSON() (data []byte, err error)
func (*BulkUpsertUnitsRequestParam) UnmarshalJSON ¶
func (r *BulkUpsertUnitsRequestParam) UnmarshalJSON(data []byte) error
type Carrier ¶
type Carrier struct {
// Carrier ID.
ID string `json:"id" api:"required"`
// Your account number with this carrier.
//
// UPS and USPS carrier accounts are connected to Shippo using this number; FedEx
// carriers authorize through OAuth instead, so their account number is not used to
// connect them.
AccountNumber string `json:"account_number" api:"required"`
// Well-known carrier identifier, set only for recognized carriers and absent for
// custom ones.
//
// - `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live
// rating and labels).
// - `will_call`: customer picks the order up; no carrier shipment.
// - `delivery`: delivered by your own vehicles/drivers.
// - `ltl`, `ltl1`: less-than-truckload freight carriers.
// - `freight_collect`: freight billed to and arranged by the receiver.
//
// Any of "fedex", "ups", "usps", "will_call", "delivery", "ltl", "ltl1",
// "freight_collect".
Code CarrierCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether customers can see and select this carrier at checkout in the customer
// portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility CarrierCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
// Soft-delete timestamp.
DeletedAt time.Time `json:"deleted_at" api:"required" format:"date-time"`
// Human-readable name for the carrier, unique among the carriers visible to your
// account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "carrier".
Object CarrierObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ServiceLevels ListServiceLevel `json:"service_levels" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AccountNumber respjson.Field
Code respjson.Field
CreatedAt respjson.Field
CustomerPortalVisibility respjson.Field
DeletedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
ServiceLevels respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A shipping carrier configured for fulfilling orders.
Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected through Shippo for live rating and label purchase; other carriers represent self-managed shipping methods such as will call or local delivery.
func (*Carrier) UnmarshalJSON ¶
type CarrierCode ¶
type CarrierCode string
Well-known carrier identifier, set only for recognized carriers and absent for custom ones.
- `fedex`, `ups`, `usps`: integrated carriers managed through Shippo (live rating and labels).
- `will_call`: customer picks the order up; no carrier shipment.
- `delivery`: delivered by your own vehicles/drivers.
- `ltl`, `ltl1`: less-than-truckload freight carriers.
- `freight_collect`: freight billed to and arranged by the receiver.
const ( CarrierCodeFedex CarrierCode = "fedex" CarrierCodeUps CarrierCode = "ups" CarrierCodeUsps CarrierCode = "usps" CarrierCodeWillCall CarrierCode = "will_call" CarrierCodeDelivery CarrierCode = "delivery" CarrierCodeLtl CarrierCode = "ltl" CarrierCodeLtl1 CarrierCode = "ltl1" CarrierCodeFreightCollect CarrierCode = "freight_collect" )
type CarrierCustomerPortalVisibility ¶
type CarrierCustomerPortalVisibility string
Whether customers can see and select this carrier at checkout in the customer portal.
const ( CarrierCustomerPortalVisibilityVisible CarrierCustomerPortalVisibility = "visible" CarrierCustomerPortalVisibilityHidden CarrierCustomerPortalVisibility = "hidden" )
type CarrierObject ¶
type CarrierObject string
Resource type identifier.
const (
CarrierObjectCarrier CarrierObject = "carrier"
)
type CatalogItemActionBulkReconcileParams ¶
type CatalogItemActionBulkReconcileParams struct {
// Request to reconcile inventory for many items at once.
BulkReconcileItemsRequest BulkReconcileItemsRequestParam
// contains filtered or unexported fields
}
func (CatalogItemActionBulkReconcileParams) MarshalJSON ¶
func (r CatalogItemActionBulkReconcileParams) MarshalJSON() (data []byte, err error)
func (*CatalogItemActionBulkReconcileParams) UnmarshalJSON ¶
func (r *CatalogItemActionBulkReconcileParams) UnmarshalJSON(data []byte) error
type CatalogItemActionService ¶
type CatalogItemActionService struct {
// contains filtered or unexported fields
}
List and manage inventory items.
CatalogItemActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemActionService method instead.
func NewCatalogItemActionService ¶
func NewCatalogItemActionService(opts ...option.RequestOption) (r CatalogItemActionService)
NewCatalogItemActionService 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 (*CatalogItemActionService) BulkReconcile ¶
func (r *CatalogItemActionService) BulkReconcile(ctx context.Context, body CatalogItemActionBulkReconcileParams, opts ...option.RequestOption) (res *BulkReconcileItemsResponse, err error)
Reconciles inventory for multiple items by SKU in one call, the bulk equivalent of counting stock and correcting the books.
`reconcile_type` controls whether each quantity is added to the item's current quantity (`addition`) or replaces it (`force`). The figure a `force` measures against is what is on hand net of demand nothing has covered, the same basis the single-item endpoint uses. The response reports each item as reconciled, skipped (e.g. unknown SKU), or errored (e.g. unknown unit), so a problem with one item does not fail the rest of the batch.
Each correction is written to the item's inventory audit trail as a user correction, attributed to the caller.
This endpoint requires the permission: `items:create`.
type CatalogItemAttributeDeleteParams ¶
type CatalogItemAttributeDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
// "category.unit_group", "category.properties", "category.unit_group.base_unit",
// "category.unit_group.associated_units",
// "category.unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemAttributeDeleteParams) URLQuery ¶
func (r CatalogItemAttributeDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemAttributeDeleteParams's query parameters as `url.Values`.
type CatalogItemAttributeService ¶
type CatalogItemAttributeService struct {
// contains filtered or unexported fields
}
List and manage inventory items.
CatalogItemAttributeService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemAttributeService method instead.
func NewCatalogItemAttributeService ¶
func NewCatalogItemAttributeService(opts ...option.RequestOption) (r CatalogItemAttributeService)
NewCatalogItemAttributeService 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 (*CatalogItemAttributeService) Delete ¶
func (r *CatalogItemAttributeService) Delete(ctx context.Context, attributeID string, params CatalogItemAttributeDeleteParams, opts ...option.RequestOption) (res *Item, err error)
Unassigns an attribute from an item and returns the updated item.
Returns a not-found error if the attribute is not currently assigned to the item, so unlike adding an attribute, this call is not safe to repeat blindly. The attribute itself is not deleted and stays available for other items.
This endpoint requires the permission: `items:update`.
func (*CatalogItemAttributeService) Update ¶
func (r *CatalogItemAttributeService) Update(ctx context.Context, attributeID string, params CatalogItemAttributeUpdateParams, opts ...option.RequestOption) (res *Item, err error)
Assigns an attribute to an item and returns the updated item.
The attribute's property must be one the item's category carries, so link the property to the category before assigning any of its attributes.
Adding an attribute the item already carries succeeds and changes nothing, so the call is safe to repeat.
This endpoint requires the permission: `items:update`.
type CatalogItemAttributeUpdateParams ¶
type CatalogItemAttributeUpdateParams struct {
ID string `path:"id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
// "category.unit_group", "category.properties", "category.unit_group.base_unit",
// "category.unit_group.associated_units",
// "category.unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemAttributeUpdateParams) URLQuery ¶
func (r CatalogItemAttributeUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemAttributeUpdateParams's query parameters as `url.Values`.
type CatalogItemCategoryActionBulkUpsertParams ¶
type CatalogItemCategoryActionBulkUpsertParams struct {
// BulkUpsertItemCategoriesRequest is the request to bulk upsert item categories.
BulkUpsertItemCategoriesRequest BulkUpsertItemCategoriesRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemCategoryActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogItemCategoryActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogItemCategoryActionBulkUpsertParams) URLQuery ¶
func (r CatalogItemCategoryActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemCategoryActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogItemCategoryActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogItemCategoryActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogItemCategoryActionService ¶
type CatalogItemCategoryActionService struct {
// contains filtered or unexported fields
}
List and manage item categories.
CatalogItemCategoryActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemCategoryActionService method instead.
func NewCatalogItemCategoryActionService ¶
func NewCatalogItemCategoryActionService(opts ...option.RequestOption) (r CatalogItemCategoryActionService)
NewCatalogItemCategoryActionService 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 (*CatalogItemCategoryActionService) BulkUpsert ¶
func (r *CatalogItemCategoryActionService) BulkUpsert(ctx context.Context, params CatalogItemCategoryActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple item categories for the account, matched by name (case-insensitive), then writes asynchronously — 202 with a job to poll.
type CatalogItemCategoryChangeUnitGroupParams ¶
type CatalogItemCategoryChangeUnitGroupParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogItemCategoryChangeUnitGroupResponse ¶
type CatalogItemCategoryChangeUnitGroupResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogItemCategoryChangeUnitGroupResponse) RawJSON ¶
func (r CatalogItemCategoryChangeUnitGroupResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogItemCategoryChangeUnitGroupResponse) UnmarshalJSON ¶
func (r *CatalogItemCategoryChangeUnitGroupResponse) UnmarshalJSON(data []byte) error
type CatalogItemCategoryDeleteResponse ¶
type CatalogItemCategoryDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogItemCategoryDeleteResponse) RawJSON ¶
func (r CatalogItemCategoryDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogItemCategoryDeleteResponse) UnmarshalJSON ¶
func (r *CatalogItemCategoryDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogItemCategoryGetParams ¶
type CatalogItemCategoryGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "properties", "unit_group",
// "unit_group.base_unit", "unit_group.associated_units",
// "unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemCategoryGetParams) URLQuery ¶
func (r CatalogItemCategoryGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemCategoryGetParams's query parameters as `url.Values`.
type CatalogItemCategoryListParams ¶
type CatalogItemCategoryListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "properties", "unit_group",
// "unit_group.base_unit", "unit_group.associated_units",
// "unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// Filter by item category type.
//
// Any of "material_category", "product_category".
Type CatalogItemCategoryListParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemCategoryListParams) URLQuery ¶
func (r CatalogItemCategoryListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemCategoryListParams's query parameters as `url.Values`.
type CatalogItemCategoryListParamsType ¶
type CatalogItemCategoryListParamsType string
Filter by item category type.
const ( CatalogItemCategoryListParamsTypeMaterialCategory CatalogItemCategoryListParamsType = "material_category" CatalogItemCategoryListParamsTypeProductCategory CatalogItemCategoryListParamsType = "product_category" )
type CatalogItemCategoryNewParams ¶
type CatalogItemCategoryNewParams struct {
// Request to create an item category.
CreateItemCategoryRequest CreateItemCategoryRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "properties", "unit_group",
// "unit_group.base_unit", "unit_group.associated_units",
// "unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemCategoryNewParams) MarshalJSON ¶
func (r CatalogItemCategoryNewParams) MarshalJSON() (data []byte, err error)
func (CatalogItemCategoryNewParams) URLQuery ¶
func (r CatalogItemCategoryNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemCategoryNewParams's query parameters as `url.Values`.
func (*CatalogItemCategoryNewParams) UnmarshalJSON ¶
func (r *CatalogItemCategoryNewParams) UnmarshalJSON(data []byte) error
type CatalogItemCategoryPropertyDeleteParams ¶
type CatalogItemCategoryPropertyDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogItemCategoryPropertyDeleteResponse ¶
type CatalogItemCategoryPropertyDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogItemCategoryPropertyDeleteResponse) RawJSON ¶
func (r CatalogItemCategoryPropertyDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogItemCategoryPropertyDeleteResponse) UnmarshalJSON ¶
func (r *CatalogItemCategoryPropertyDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogItemCategoryPropertyService ¶
type CatalogItemCategoryPropertyService struct {
// contains filtered or unexported fields
}
List and manage item categories.
CatalogItemCategoryPropertyService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemCategoryPropertyService method instead.
func NewCatalogItemCategoryPropertyService ¶
func NewCatalogItemCategoryPropertyService(opts ...option.RequestOption) (r CatalogItemCategoryPropertyService)
NewCatalogItemCategoryPropertyService 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 (*CatalogItemCategoryPropertyService) Delete ¶
func (r *CatalogItemCategoryPropertyService) Delete(ctx context.Context, propertyID string, body CatalogItemCategoryPropertyDeleteParams, opts ...option.RequestOption) (res *CatalogItemCategoryPropertyDeleteResponse, err error)
Detaches a property from an item category.
Only the link between the property and the category is removed; the property itself and its attributes are left intact and stay available to other categories. The property must belong to your account.
This endpoint requires the permission: `item_categories:update`.
func (*CatalogItemCategoryPropertyService) Update ¶
func (r *CatalogItemCategoryPropertyService) Update(ctx context.Context, propertyID string, body CatalogItemCategoryPropertyUpdateParams, opts ...option.RequestOption) (res *CatalogItemCategoryPropertyUpdateResponse, err error)
Attaches one of your account's properties to an item category.
The property then appears among the category's properties, including in the customer-facing catalog, describing a dimension along which the category's items vary. Each property name can appear only once per category, so attaching a property whose name duplicates one already there returns a conflict error.
This endpoint requires the permission: `item_categories:update`.
type CatalogItemCategoryPropertyUpdateParams ¶
type CatalogItemCategoryPropertyUpdateParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogItemCategoryPropertyUpdateResponse ¶
type CatalogItemCategoryPropertyUpdateResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogItemCategoryPropertyUpdateResponse) RawJSON ¶
func (r CatalogItemCategoryPropertyUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogItemCategoryPropertyUpdateResponse) UnmarshalJSON ¶
func (r *CatalogItemCategoryPropertyUpdateResponse) UnmarshalJSON(data []byte) error
type CatalogItemCategoryService ¶
type CatalogItemCategoryService struct {
// List and manage item categories.
Properties CatalogItemCategoryPropertyService
// List and manage item categories.
Actions CatalogItemCategoryActionService
// contains filtered or unexported fields
}
List and manage item categories.
CatalogItemCategoryService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemCategoryService method instead.
func NewCatalogItemCategoryService ¶
func NewCatalogItemCategoryService(opts ...option.RequestOption) (r CatalogItemCategoryService)
NewCatalogItemCategoryService 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 (*CatalogItemCategoryService) ChangeUnitGroup ¶
func (r *CatalogItemCategoryService) ChangeUnitGroup(ctx context.Context, unitGroupID string, body CatalogItemCategoryChangeUnitGroupParams, opts ...option.RequestOption) (res *CatalogItemCategoryChangeUnitGroupResponse, err error)
Changes the unit group of an item category, and with it the units its items can be ordered in.
The new unit group must have the same unit type as the current one — for example, a category measured in `mass` units can only switch to another `mass` unit group. System-owned categories cannot be modified.
This endpoint requires the permission: `item_categories:update`.
func (*CatalogItemCategoryService) Delete ¶
func (r *CatalogItemCategoryService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogItemCategoryDeleteResponse, err error)
Deletes an item category owned by your account.
System-owned categories cannot be deleted. Deleting a category that was already deleted returns an already-deleted error rather than a not-found error.
This endpoint requires the permission: `item_categories:delete`.
func (*CatalogItemCategoryService) Get ¶
func (r *CatalogItemCategoryService) Get(ctx context.Context, id string, query CatalogItemCategoryGetParams, opts ...option.RequestOption) (res *ItemCategory, err error)
Returns an item category by ID.
Both account-owned categories and global system categories can be retrieved.
This endpoint requires the permission: `item_categories:read`.
func (*CatalogItemCategoryService) List ¶
func (r *CatalogItemCategoryService) List(ctx context.Context, query CatalogItemCategoryListParams, opts ...option.RequestOption) (res *ListItemCategory, err error)
Returns a paginated list of the item categories available to the current account, newest first.
Both the account's own categories and the platform-provided system categories are included. The `q` search term is matched against the category name.
This endpoint requires the permission: `item_categories:read`.
func (*CatalogItemCategoryService) New ¶
func (r *CatalogItemCategoryService) New(ctx context.Context, params CatalogItemCategoryNewParams, opts ...option.RequestOption) (res *ItemCategory, err error)
Creates an item category owned by your account.
The new category starts with no properties; attach them afterwards with the Add Item Category Property endpoint.
This endpoint requires the permission: `item_categories:create`.
func (*CatalogItemCategoryService) Update ¶
func (r *CatalogItemCategoryService) Update(ctx context.Context, id string, params CatalogItemCategoryUpdateParams, opts ...option.RequestOption) (res *ItemCategory, err error)
Updates the name or notes of an item category owned by your account.
Only the fields present in the request body are changed. A category's type is fixed at creation, and its unit group is changed through the Change Item Category Unit Group endpoint. System-owned categories cannot be updated.
This endpoint requires the permission: `item_categories:update`.
type CatalogItemCategoryUpdateParams ¶
type CatalogItemCategoryUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "properties", "unit_group",
// "unit_group.base_unit", "unit_group.associated_units",
// "unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update an item category.
UpdateItemCategoryRequest UpdateItemCategoryRequestParam
// contains filtered or unexported fields
}
func (CatalogItemCategoryUpdateParams) MarshalJSON ¶
func (r CatalogItemCategoryUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogItemCategoryUpdateParams) URLQuery ¶
func (r CatalogItemCategoryUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemCategoryUpdateParams's query parameters as `url.Values`.
func (*CatalogItemCategoryUpdateParams) UnmarshalJSON ¶
func (r *CatalogItemCategoryUpdateParams) UnmarshalJSON(data []byte) error
type CatalogItemChangeCategoryParams ¶
type CatalogItemChangeCategoryParams struct {
ID string `path:"id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
// "category.unit_group", "category.properties", "category.unit_group.base_unit",
// "category.unit_group.associated_units",
// "category.unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemChangeCategoryParams) URLQuery ¶
func (r CatalogItemChangeCategoryParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemChangeCategoryParams's query parameters as `url.Values`.
type CatalogItemGetLotDefaultParams ¶
type CatalogItemGetLotDefaultParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemGetLotDefaultParams) URLQuery ¶
func (r CatalogItemGetLotDefaultParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemGetLotDefaultParams's query parameters as `url.Values`.
type CatalogItemGetParams ¶
type CatalogItemGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
// "category.unit_group", "category.properties", "category.unit_group.base_unit",
// "category.unit_group.associated_units",
// "category.unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemGetParams) URLQuery ¶
func (r CatalogItemGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemGetParams's query parameters as `url.Values`.
type CatalogItemInventoryListParams ¶
type CatalogItemInventoryListParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "on_hand", "reserved", "available_to_promise", "short".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemInventoryListParams) URLQuery ¶
func (r CatalogItemInventoryListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemInventoryListParams's query parameters as `url.Values`.
type CatalogItemInventoryService ¶
type CatalogItemInventoryService struct {
// contains filtered or unexported fields
}
List and manage inventory items.
CatalogItemInventoryService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemInventoryService method instead.
func NewCatalogItemInventoryService ¶
func NewCatalogItemInventoryService(opts ...option.RequestOption) (r CatalogItemInventoryService)
NewCatalogItemInventoryService 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 (*CatalogItemInventoryService) List ¶
func (r *CatalogItemInventoryService) List(ctx context.Context, id string, query CatalogItemInventoryListParams, opts ...option.RequestOption) (res *ItemInventory, err error)
Returns the stock position for an item: what is on hand, what is reserved against existing orders, what is free to promise, and what is short.
Stock your account either owns or holds counts toward the on-hand figure, so customer-supplied material sitting in your facility is included. All four quantities are reported in the base unit of the item's category.
This endpoint requires the permission: `items:read`.
func (*CatalogItemInventoryService) Update ¶
func (r *CatalogItemInventoryService) Update(ctx context.Context, id string, body CatalogItemInventoryUpdateParams, opts ...option.RequestOption) (res *CatalogItemInventoryUpdateResponse, err error)
Adjusts or reconciles the quantity of an item you hold.
With `operation` set to `adjust` (the behavior when it is omitted), `quantity` is added to the current quantity; with `reconcile`, the current quantity is set to exactly `quantity`. Either way it is the resulting difference that gets written, so a difference of zero moves no stock.
The figure a `reconcile` measures against is what is on hand net of demand nothing has covered — the same figure `available_to_promise` is derived from, not the raw on-hand total. Reconciling to the quantity already reported therefore writes nothing.
Stock that arrives is allocated against unfilled demand for the item, so an adjustment can settle a shortfall instead of raising the quantity free to promise. That allocation happens just after the request rather than inside it, because it walks every open issue for the item. The change is recorded in the item's inventory audit trail as a user correction attributed to the caller.
This endpoint requires the permission: `items:update`.
type CatalogItemInventoryUpdateParams ¶
type CatalogItemInventoryUpdateParams struct {
// Request to adjust or reconcile inventory for an item.
UpdateItemInventoryRequest UpdateItemInventoryRequestParam
// contains filtered or unexported fields
}
func (CatalogItemInventoryUpdateParams) MarshalJSON ¶
func (r CatalogItemInventoryUpdateParams) MarshalJSON() (data []byte, err error)
func (*CatalogItemInventoryUpdateParams) UnmarshalJSON ¶
func (r *CatalogItemInventoryUpdateParams) UnmarshalJSON(data []byte) error
type CatalogItemInventoryUpdateResponse ¶
type CatalogItemInventoryUpdateResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogItemInventoryUpdateResponse) RawJSON ¶
func (r CatalogItemInventoryUpdateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogItemInventoryUpdateResponse) UnmarshalJSON ¶
func (r *CatalogItemInventoryUpdateResponse) UnmarshalJSON(data []byte) error
type CatalogItemListParams ¶
type CatalogItemListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Filter to items created on or before this date.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filter to items created on or after this date.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter to materials this supplier account supplies to you.
//
// Only materials can have suppliers, so combining this with a `types` filter that
// excludes `material` returns nothing.
SupplierID param.Opt[string] `query:"supplier_id,omitzero" json:"-"`
// Filter to items carrying any of these attributes.
AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
// Filter to items in any of these categories.
CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
// Filter to items any of these customers are allowed to order.
//
// A customer qualifies when its relationship, its account group, or its price
// group grants access to the product line the item's product sits in. Items with
// no product line, including materials and parts, never match.
CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "category", "unit_value", "unit_cost", "burn_rate", "attributes",
// "category.unit_group", "category.properties", "category.unit_group.base_unit",
// "category.unit_group.associated_units",
// "category.unit_group.associated_units.unit".
Include []string `query:"include,omitzero" json:"-"`
// Filter to items whose product belongs to any of these product lines.
ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
// Restricts results based on where the item is produced in its production flow.
//
// - `all`: no restriction.
// - `initial_only`: only items produced by an initial production step, i.e. a step
// with no upstream steps feeding into it.
//
// Any of "all", "initial_only".
SubassemblyFilter CatalogItemListParamsSubassemblyFilter `query:"subassembly_filter,omitzero" json:"-"`
// Filter to items of these types (`product`, `material`, `part`).
Types []string `query:"types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogItemListParams) URLQuery ¶
func (r CatalogItemListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogItemListParams's query parameters as `url.Values`.
type CatalogItemListParamsSubassemblyFilter ¶
type CatalogItemListParamsSubassemblyFilter string
Restricts results based on where the item is produced in its production flow.
- `all`: no restriction.
- `initial_only`: only items produced by an initial production step, i.e. a step with no upstream steps feeding into it.
const ( CatalogItemListParamsSubassemblyFilterAll CatalogItemListParamsSubassemblyFilter = "all" CatalogItemListParamsSubassemblyFilterInitialOnly CatalogItemListParamsSubassemblyFilter = "initial_only" )
type CatalogItemService ¶
type CatalogItemService struct {
// List and manage inventory items.
Inventory CatalogItemInventoryService
// List and manage inventory items.
Attributes CatalogItemAttributeService
// List and manage inventory items.
Actions CatalogItemActionService
// contains filtered or unexported fields
}
List and manage inventory items.
CatalogItemService contains methods and other services that help with interacting with the openmrp 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 NewCatalogItemService method instead.
func NewCatalogItemService ¶
func NewCatalogItemService(opts ...option.RequestOption) (r CatalogItemService)
NewCatalogItemService 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 (*CatalogItemService) ChangeCategory ¶
func (r *CatalogItemService) ChangeCategory(ctx context.Context, categoryID string, params CatalogItemChangeCategoryParams, opts ...option.RequestOption) (res *Item, err error)
Moves an item to a different category and returns the updated item.
The item's rate units (unit value, unit cost, burn rate) and any related order-point, consumption, and production quantity units are switched to the new category's base unit. Only the units change — the numbers attached to them are carried over as they were, so review any figure whose meaning depends on the unit after moving between categories that count differently.
Re-assigning the item's current category succeeds and changes nothing.
This endpoint requires the permission: `items:update`.
func (*CatalogItemService) Get ¶
func (r *CatalogItemService) Get(ctx context.Context, id string, query CatalogItemGetParams, opts ...option.RequestOption) (res *Item, err error)
Returns a single item by ID.
This endpoint requires the permission: `items:read`.
func (*CatalogItemService) GetLotDefault ¶
func (r *CatalogItemService) GetLotDefault(ctx context.Context, id string, query CatalogItemGetLotDefaultParams, opts ...option.RequestOption) (res *ItemLotDefault, err error)
Returns the lot this item is made in — how many, counted in what.
A lot is a doff, a pallet, a batch: the quantity production is issued in. The unit is what makes it meaningful, since 60 pairs and 60 eaches are different lots, so `quantity` should never be read without `unit`.
Resolved through the same chain the production schedule uses, most specific first: a per-item override, then the item's own product line, then the product lines of the finished goods it becomes, then the account-wide default. `source` names which rule applied. Intermediate items like greige are not sold and have no product line of their own, which is why they inherit from what they become.
`quantity` is `0` when nothing in the chain supplies a lot. That means the item has no lot convention, not that its lot is zero.
This endpoint requires the permission: `items:read`.
func (*CatalogItemService) List ¶
func (r *CatalogItemService) List(ctx context.Context, query CatalogItemListParams, opts ...option.RequestOption) (res *ListItem, err error)
Returns a paginated list of items, newest first.
Items backed by a non-sale product — the service, shipping, tax, credit, and return products that carry charges on orders — are left out, so this reflects the catalog you sell and stock rather than every item row. `q` matches against SKU and description, with closer SKU matches ranked first.
This endpoint requires the permission: `items:read`.
type CatalogMaterialActionBulkUpsertParams ¶
type CatalogMaterialActionBulkUpsertParams struct {
// Request to bulk upsert materials.
BulkUpsertMaterialsRequest BulkUpsertMaterialsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogMaterialActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogMaterialActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogMaterialActionBulkUpsertParams) URLQuery ¶
func (r CatalogMaterialActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogMaterialActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogMaterialActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogMaterialActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogMaterialActionService ¶
type CatalogMaterialActionService struct {
// contains filtered or unexported fields
}
List and manage materials.
CatalogMaterialActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogMaterialActionService method instead.
func NewCatalogMaterialActionService ¶
func NewCatalogMaterialActionService(opts ...option.RequestOption) (r CatalogMaterialActionService)
NewCatalogMaterialActionService 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 (*CatalogMaterialActionService) BulkUpsert ¶
func (r *CatalogMaterialActionService) BulkUpsert(ctx context.Context, params CatalogMaterialActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple materials for the account, matched by SKU. Validates and resolves synchronously, then writes asynchronously — 202 with a job to poll.
type CatalogMaterialGetParams ¶
type CatalogMaterialGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogMaterialGetParams) URLQuery ¶
func (r CatalogMaterialGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogMaterialGetParams's query parameters as `url.Values`.
type CatalogMaterialListParams ¶
type CatalogMaterialListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Filter to materials created on or before this date.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filter to materials created on or after this date.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter to materials carrying any of these attributes.
AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
// Filter to materials in any of these categories.
CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogMaterialListParams) URLQuery ¶
func (r CatalogMaterialListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogMaterialListParams's query parameters as `url.Values`.
type CatalogMaterialNewParams ¶
type CatalogMaterialNewParams struct {
// Request to create a material.
CreateMaterialRequest CreateMaterialRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogMaterialNewParams) MarshalJSON ¶
func (r CatalogMaterialNewParams) MarshalJSON() (data []byte, err error)
func (CatalogMaterialNewParams) URLQuery ¶
func (r CatalogMaterialNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogMaterialNewParams's query parameters as `url.Values`.
func (*CatalogMaterialNewParams) UnmarshalJSON ¶
func (r *CatalogMaterialNewParams) UnmarshalJSON(data []byte) error
type CatalogMaterialService ¶
type CatalogMaterialService struct {
// List and manage materials.
Actions CatalogMaterialActionService
// contains filtered or unexported fields
}
List and manage materials.
CatalogMaterialService contains methods and other services that help with interacting with the openmrp 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 NewCatalogMaterialService method instead.
func NewCatalogMaterialService ¶
func NewCatalogMaterialService(opts ...option.RequestOption) (r CatalogMaterialService)
NewCatalogMaterialService 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 (*CatalogMaterialService) Delete ¶
func (r *CatalogMaterialService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Material, err error)
Deletes a material.
This is a soft delete: the material and the catalog item behind it stop being returned by other endpoints, but the records are retained. The response is the material as it stood immediately before deletion, and deleting an already-deleted material returns an error.
This endpoint requires the permissions: `materials:delete`, `customers:update`, `suppliers:update`.
func (*CatalogMaterialService) Get ¶
func (r *CatalogMaterialService) Get(ctx context.Context, id string, query CatalogMaterialGetParams, opts ...option.RequestOption) (res *Material, err error)
Returns a material by ID.
This endpoint requires the permissions: `materials:read`, `customers:read`, `suppliers:read`.
func (*CatalogMaterialService) List ¶
func (r *CatalogMaterialService) List(ctx context.Context, query CatalogMaterialListParams, opts ...option.RequestOption) (res *ListMaterial, err error)
Returns a paginated list of materials, newest first.
`q` matches against SKU and description, with closer SKU matches ranked first.
This endpoint requires the permissions: `materials:read`, `customers:read`, `suppliers:read`.
func (*CatalogMaterialService) New ¶
func (r *CatalogMaterialService) New(ctx context.Context, params CatalogMaterialNewParams, opts ...option.RequestOption) (res *Material, err error)
Creates a material together with the catalog item that carries its SKU, description, category, pricing, and attributes.
Inventory tracking for the new material starts at a zero on-hand quantity in the category's base unit. The item's consumption rate (`burn_rate`) also starts at zero and cannot be supplied here — it is derived from recorded consumption as production happens.
This endpoint requires the permissions: `materials:create`, `customers:update`, `suppliers:update`.
func (*CatalogMaterialService) Update ¶
func (r *CatalogMaterialService) Update(ctx context.Context, id string, params CatalogMaterialUpdateParams, opts ...option.RequestOption) (res *Material, err error)
Partially updates a material.
Fields not provided retain their current values. Only the cost side of pricing can be changed here; the selling price set at creation is not editable through this endpoint. Use the Change Item Category endpoint to move the material to a different category.
This endpoint requires the permissions: `materials:update`, `customers:update`, `suppliers:update`.
type CatalogMaterialUpdateParams ¶
type CatalogMaterialUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a material.
UpdateMaterialRequest UpdateMaterialRequestParam
// contains filtered or unexported fields
}
func (CatalogMaterialUpdateParams) MarshalJSON ¶
func (r CatalogMaterialUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogMaterialUpdateParams) URLQuery ¶
func (r CatalogMaterialUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogMaterialUpdateParams's query parameters as `url.Values`.
func (*CatalogMaterialUpdateParams) UnmarshalJSON ¶
func (r *CatalogMaterialUpdateParams) UnmarshalJSON(data []byte) error
type CatalogPartActionBulkUpsertParams ¶
type CatalogPartActionBulkUpsertParams struct {
// BulkUpsertPartsRequest is the request to bulk upsert parts.
BulkUpsertPartsRequest BulkUpsertPartsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPartActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogPartActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogPartActionBulkUpsertParams) URLQuery ¶
func (r CatalogPartActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPartActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogPartActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogPartActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogPartActionService ¶
type CatalogPartActionService struct {
// contains filtered or unexported fields
}
List and manage parts.
CatalogPartActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogPartActionService method instead.
func NewCatalogPartActionService ¶
func NewCatalogPartActionService(opts ...option.RequestOption) (r CatalogPartActionService)
NewCatalogPartActionService 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 (*CatalogPartActionService) BulkUpsert ¶
func (r *CatalogPartActionService) BulkUpsert(ctx context.Context, params CatalogPartActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple parts for the account, matched by SKU, then writes asynchronously — 202 with a job to poll.
type CatalogPartGetParams ¶
type CatalogPartGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPartGetParams) URLQuery ¶
func (r CatalogPartGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPartGetParams's query parameters as `url.Values`.
type CatalogPartListParams ¶
type CatalogPartListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Only return parts created at or before this time.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Only return parts created at or after this time.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Only return parts carrying at least one of these attributes.
AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
// Only return parts belonging to any of these item categories.
CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.category.properties",
// "item.category.unit_group", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPartListParams) URLQuery ¶
func (r CatalogPartListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPartListParams's query parameters as `url.Values`.
type CatalogPartNewParams ¶
type CatalogPartNewParams struct {
// Request to create a part.
CreatePartRequest CreatePartRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPartNewParams) MarshalJSON ¶
func (r CatalogPartNewParams) MarshalJSON() (data []byte, err error)
func (CatalogPartNewParams) URLQuery ¶
func (r CatalogPartNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPartNewParams's query parameters as `url.Values`.
func (*CatalogPartNewParams) UnmarshalJSON ¶
func (r *CatalogPartNewParams) UnmarshalJSON(data []byte) error
type CatalogPartService ¶
type CatalogPartService struct {
// List and manage parts.
Actions CatalogPartActionService
// contains filtered or unexported fields
}
List and manage parts.
CatalogPartService contains methods and other services that help with interacting with the openmrp 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 NewCatalogPartService method instead.
func NewCatalogPartService ¶
func NewCatalogPartService(opts ...option.RequestOption) (r CatalogPartService)
NewCatalogPartService 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 (*CatalogPartService) Delete ¶
func (r *CatalogPartService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *Part, err error)
Deletes a part.
This is a soft delete: the part is marked deleted and no longer returned by other endpoints, but the record is retained. Deleting an already-deleted part returns an error.
This endpoint requires the permissions: `parts:delete`, `customers:update`, `suppliers:update`.
func (*CatalogPartService) Get ¶
func (r *CatalogPartService) Get(ctx context.Context, id string, query CatalogPartGetParams, opts ...option.RequestOption) (res *Part, err error)
Returns a part by ID.
This endpoint requires the permissions: `parts:read`, `customers:read`, `suppliers:read`.
func (*CatalogPartService) List ¶
func (r *CatalogPartService) List(ctx context.Context, query CatalogPartListParams, opts ...option.RequestOption) (res *ListPart, err error)
Returns a paginated list of parts for the current account, most recently created first.
The `q` search term matches the part's SKU or description. When it is supplied, the parts whose SKU matches it most closely are returned first, ordered by creation time within each level of match.
This endpoint requires the permissions: `parts:read`, `customers:read`, `suppliers:read`.
func (*CatalogPartService) New ¶
func (r *CatalogPartService) New(ctx context.Context, params CatalogPartNewParams, opts ...option.RequestOption) (res *Part, err error)
Creates a part with the specified SKU and category.
Inventory tracking for the new part starts at a zero on-hand quantity in the category's base unit.
This endpoint requires the permissions: `parts:create`, `customers:update`, `suppliers:update`.
func (*CatalogPartService) Update ¶
func (r *CatalogPartService) Update(ctx context.Context, id string, params CatalogPartUpdateParams, opts ...option.RequestOption) (res *Part, err error)
Partially updates a part.
Fields not provided retain their current values. Only the SKU, description, and notes are editable here; the part's category and attributes are changed through the item endpoints.
This endpoint requires the permissions: `parts:update`, `customers:update`, `suppliers:update`.
type CatalogPartUpdateParams ¶
type CatalogPartUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "item.category", "item.unit_value", "item.unit_cost",
// "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a part.
UpdatePartRequest UpdatePartRequestParam
// contains filtered or unexported fields
}
func (CatalogPartUpdateParams) MarshalJSON ¶
func (r CatalogPartUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogPartUpdateParams) URLQuery ¶
func (r CatalogPartUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPartUpdateParams's query parameters as `url.Values`.
func (*CatalogPartUpdateParams) UnmarshalJSON ¶
func (r *CatalogPartUpdateParams) UnmarshalJSON(data []byte) error
type CatalogProductActionBulkUpsertParams ¶
type CatalogProductActionBulkUpsertParams struct {
// Request to bulk upsert products.
BulkUpsertProductsRequest BulkUpsertProductsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogProductActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogProductActionBulkUpsertParams) URLQuery ¶
func (r CatalogProductActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogProductActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogProductActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogProductActionService ¶
type CatalogProductActionService struct {
// contains filtered or unexported fields
}
List and manage products.
CatalogProductActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogProductActionService method instead.
func NewCatalogProductActionService ¶
func NewCatalogProductActionService(opts ...option.RequestOption) (r CatalogProductActionService)
NewCatalogProductActionService 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 (*CatalogProductActionService) BulkUpsert ¶
func (r *CatalogProductActionService) BulkUpsert(ctx context.Context, params CatalogProductActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple products for the account, matched by SKU. Validates and resolves synchronously, then writes asynchronously — 202 with a job to poll.
type CatalogProductChangeProductLineParams ¶
type CatalogProductChangeProductLineParams struct {
ID string `path:"id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductChangeProductLineParams) URLQuery ¶
func (r CatalogProductChangeProductLineParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductChangeProductLineParams's query parameters as `url.Values`.
type CatalogProductDeleteParams ¶
type CatalogProductDeleteParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductDeleteParams) URLQuery ¶
func (r CatalogProductDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductDeleteParams's query parameters as `url.Values`.
type CatalogProductGetParams ¶
type CatalogProductGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductGetParams) URLQuery ¶
func (r CatalogProductGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductGetParams's query parameters as `url.Values`.
type CatalogProductLineActionBulkUpsertParams ¶
type CatalogProductLineActionBulkUpsertParams struct {
// BulkUpsertProductLinesRequest is the request to bulk upsert product lines.
BulkUpsertProductLinesRequest BulkUpsertProductLinesRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductLineActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogProductLineActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogProductLineActionBulkUpsertParams) URLQuery ¶
func (r CatalogProductLineActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductLineActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogProductLineActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogProductLineActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogProductLineActionService ¶
type CatalogProductLineActionService struct {
// contains filtered or unexported fields
}
List and manage product lines.
CatalogProductLineActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogProductLineActionService method instead.
func NewCatalogProductLineActionService ¶
func NewCatalogProductLineActionService(opts ...option.RequestOption) (r CatalogProductLineActionService)
NewCatalogProductLineActionService 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 (*CatalogProductLineActionService) BulkUpsert ¶
func (r *CatalogProductLineActionService) BulkUpsert(ctx context.Context, params CatalogProductLineActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple product lines for the account, matched by name (case-insensitive), then writes asynchronously — 202 with a job to poll.
type CatalogProductLineDeleteResponse ¶
type CatalogProductLineDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogProductLineDeleteResponse) RawJSON ¶
func (r CatalogProductLineDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogProductLineDeleteResponse) UnmarshalJSON ¶
func (r *CatalogProductLineDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogProductLineGetParams ¶
type CatalogProductLineGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "unit_group", "default_lot",
// "default_lot.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductLineGetParams) URLQuery ¶
func (r CatalogProductLineGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductLineGetParams's query parameters as `url.Values`.
type CatalogProductLineListParams ¶
type CatalogProductLineListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "unit_group", "default_lot",
// "default_lot.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductLineListParams) URLQuery ¶
func (r CatalogProductLineListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductLineListParams's query parameters as `url.Values`.
type CatalogProductLineNewParams ¶
type CatalogProductLineNewParams struct {
// Request to create a product line.
CreateProductLineRequest CreateProductLineRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "unit_group", "default_lot",
// "default_lot.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductLineNewParams) MarshalJSON ¶
func (r CatalogProductLineNewParams) MarshalJSON() (data []byte, err error)
func (CatalogProductLineNewParams) URLQuery ¶
func (r CatalogProductLineNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductLineNewParams's query parameters as `url.Values`.
func (*CatalogProductLineNewParams) UnmarshalJSON ¶
func (r *CatalogProductLineNewParams) UnmarshalJSON(data []byte) error
type CatalogProductLineService ¶
type CatalogProductLineService struct {
// List and manage product lines.
Actions CatalogProductLineActionService
// contains filtered or unexported fields
}
List and manage product lines.
CatalogProductLineService contains methods and other services that help with interacting with the openmrp 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 NewCatalogProductLineService method instead.
func NewCatalogProductLineService ¶
func NewCatalogProductLineService(opts ...option.RequestOption) (r CatalogProductLineService)
NewCatalogProductLineService 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 (*CatalogProductLineService) Delete ¶
func (r *CatalogProductLineService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogProductLineDeleteResponse, err error)
Permanently deletes a product line your account owns.
The reserved `shipping`, `service`, `credit`, and `tax` lines cannot be deleted, and neither can the shared system lines, which belong to no single account. Deleting a line that was already deleted returns an already-deleted error rather than succeeding silently.
This endpoint requires the permission: `product_lines:delete`.
func (*CatalogProductLineService) Get ¶
func (r *CatalogProductLineService) Get(ctx context.Context, id string, query CatalogProductLineGetParams, opts ...option.RequestOption) (res *ProductLine, err error)
Returns a single product line by ID.
Both the product lines your account owns and the shared system lines can be retrieved.
This endpoint requires the permissions: `product_lines:read`, `customers:read`, `suppliers:read`.
func (*CatalogProductLineService) List ¶
func (r *CatalogProductLineService) List(ctx context.Context, query CatalogProductLineListParams, opts ...option.RequestOption) (res *ListProductLine, err error)
Returns a paginated list of product lines, newest first.
Covers both the product lines your account owns and the shared system lines. The `q` search term is matched against the product line name.
This endpoint requires the permissions: `product_lines:read`, `customers:read`, `suppliers:read`.
func (*CatalogProductLineService) New ¶
func (r *CatalogProductLineService) New(ctx context.Context, params CatalogProductLineNewParams, opts ...option.RequestOption) (res *ProductLine, err error)
Creates a product line owned by your account.
The new line starts with no products; assign products to it by setting their product line. Customers and account groups can only be granted access to lines your account owns, so this is the starting point for scoping a customer's catalog.
This endpoint requires the permission: `product_lines:create`.
func (*CatalogProductLineService) Update ¶
func (r *CatalogProductLineService) Update(ctx context.Context, id string, params CatalogProductLineUpdateParams, opts ...option.RequestOption) (res *ProductLine, err error)
Partially updates a product line your account owns.
Only the provided fields are changed. The reserved `shipping`, `service`, `credit`, and `tax` lines cannot be updated, and neither can the shared system lines, which belong to no single account.
This endpoint requires the permission: `product_lines:update`.
type CatalogProductLineUpdateParams ¶
type CatalogProductLineUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "unit_group", "default_lot",
// "default_lot.unit".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a product line.
UpdateProductLineRequest UpdateProductLineRequestParam
// contains filtered or unexported fields
}
func (CatalogProductLineUpdateParams) MarshalJSON ¶
func (r CatalogProductLineUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogProductLineUpdateParams) URLQuery ¶
func (r CatalogProductLineUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductLineUpdateParams's query parameters as `url.Values`.
func (*CatalogProductLineUpdateParams) UnmarshalJSON ¶
func (r *CatalogProductLineUpdateParams) UnmarshalJSON(data []byte) error
type CatalogProductListParams ¶
type CatalogProductListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// End of creation date range.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Start of creation date range.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter to products whose item carries at least one of these attributes.
AttributeIDs []string `query:"attribute_ids,omitzero" json:"-"`
// Filter by the item category the product's item belongs to.
CategoryIDs []string `query:"category_ids,omitzero" json:"-"`
// Restrict results to products these customer accounts are entitled to buy.
//
// A product matches when its product line has been granted to the customer
// directly, through the customer's account group, or through the account group
// used for the customer's pricing. Combined with `product_line_ids` this widens
// the results rather than narrowing them: products matching either filter are
// returned.
CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// Filter by customer portal visibility.
//
// Any of "visible", "hidden".
PortalVisibility CatalogProductListParamsPortalVisibility `query:"portal_visibility,omitzero" json:"-"`
// Filter by product line IDs.
//
// Combined with `customer_ids`, products matching either filter are returned.
ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductListParams) URLQuery ¶
func (r CatalogProductListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductListParams's query parameters as `url.Values`.
type CatalogProductListParamsPortalVisibility ¶
type CatalogProductListParamsPortalVisibility string
Filter by customer portal visibility.
const ( CatalogProductListParamsPortalVisibilityVisible CatalogProductListParamsPortalVisibility = "visible" CatalogProductListParamsPortalVisibilityHidden CatalogProductListParamsPortalVisibility = "hidden" )
type CatalogProductNewParams ¶
type CatalogProductNewParams struct {
// Request to create a product.
CreateProductRequest CreateProductRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogProductNewParams) MarshalJSON ¶
func (r CatalogProductNewParams) MarshalJSON() (data []byte, err error)
func (CatalogProductNewParams) URLQuery ¶
func (r CatalogProductNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductNewParams's query parameters as `url.Values`.
func (*CatalogProductNewParams) UnmarshalJSON ¶
func (r *CatalogProductNewParams) UnmarshalJSON(data []byte) error
type CatalogProductService ¶
type CatalogProductService struct {
// List and manage products.
Actions CatalogProductActionService
// contains filtered or unexported fields
}
List and manage products.
CatalogProductService contains methods and other services that help with interacting with the openmrp 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 NewCatalogProductService method instead.
func NewCatalogProductService ¶
func NewCatalogProductService(opts ...option.RequestOption) (r CatalogProductService)
NewCatalogProductService 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 (*CatalogProductService) ChangeProductLine ¶
func (r *CatalogProductService) ChangeProductLine(ctx context.Context, productLineID string, params CatalogProductChangeProductLineParams, opts ...option.RequestOption) (res *Product, err error)
Moves a product to a different product line.
The target product line must be one your account owns or a shared system line; anything else fails as not found. Because customer accounts are granted access to whole product lines, moving a product changes which buyers can see and order it in the customer portal, and which default commission and freight policies apply to it.
This endpoint requires the permission: `items:update`.
func (*CatalogProductService) Delete ¶
func (r *CatalogProductService) Delete(ctx context.Context, id string, body CatalogProductDeleteParams, opts ...option.RequestOption) (res *Product, err error)
Soft-deletes a product and returns it as it stood at deletion.
Deletion marks the product's backing item as deleted, so the item and its inventory drop out of catalog and inventory listings too. Deleting the same product again returns an error saying it has already been deleted.
This endpoint requires the permission: `items:delete`.
func (*CatalogProductService) Get ¶
func (r *CatalogProductService) Get(ctx context.Context, id string, query CatalogProductGetParams, opts ...option.RequestOption) (res *Product, err error)
Returns a product by ID.
This endpoint requires the permissions: `items:read`, `customers:read`, `suppliers:read`.
func (*CatalogProductService) List ¶
func (r *CatalogProductService) List(ctx context.Context, query CatalogProductListParams, opts ...option.RequestOption) (res *ListProduct, err error)
Returns a paginated list of products for the target account, newest first.
Only products of type `sale` are listed — service, shipping, credit, return, and tax products are excluded and must be retrieved by ID. A request made by a customer-portal buyer always returns portal-visible products only, and its `customer_ids` filter is replaced with the buyer's own account, so the results reflect what that account is entitled to buy.
The `q` search term is matched against the SKU and description of each product's item; when it is supplied, products whose SKU matches are returned ahead of the rest.
This endpoint requires the permissions: `items:read`, `customers:read`, `suppliers:read`.
func (*CatalogProductService) New ¶
func (r *CatalogProductService) New(ctx context.Context, params CatalogProductNewParams, opts ...option.RequestOption) (res *Product, err error)
Creates a product and its backing inventory item.
The new item starts with zero on-hand inventory, and its pricing defaults to zero rates in the category's base unit unless `unit_price` or `unit_cost` is provided.
Only products of type `sale` appear in the product list and export; products created with any other type are still usable on orders and invoices but must be retrieved by ID.
This endpoint requires the permission: `items:create`.
func (*CatalogProductService) Update ¶
func (r *CatalogProductService) Update(ctx context.Context, id string, params CatalogProductUpdateParams, opts ...option.RequestOption) (res *Product, err error)
Partially updates a product.
`sku`, `description`, `notes`, and `unit_price` all live on the product's backing item and are written there, so the change is visible on the item as well. The product line is reassigned through its own endpoint, and the product type cannot be changed after creation.
This endpoint requires the permission: `items:update`.
type CatalogProductUpdateParams ¶
type CatalogProductUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product_line", "product_line.unit_group",
// "product_line.unit_group.base_unit", "product_line.unit_group.associated_units",
// "product_line.unit_group.associated_units.unit", "item", "item.category",
// "item.category.properties", "item.category.unit_group",
// "item.category.unit_group.base_unit",
// "item.category.unit_group.associated_units",
// "item.category.unit_group.associated_units.unit", "item.unit_value",
// "item.unit_cost", "item.burn_rate", "item.attributes".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a product.
UpdateProductRequest UpdateProductRequestParam
// contains filtered or unexported fields
}
func (CatalogProductUpdateParams) MarshalJSON ¶
func (r CatalogProductUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogProductUpdateParams) URLQuery ¶
func (r CatalogProductUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogProductUpdateParams's query parameters as `url.Values`.
func (*CatalogProductUpdateParams) UnmarshalJSON ¶
func (r *CatalogProductUpdateParams) UnmarshalJSON(data []byte) error
type CatalogPropertyActionBulkUpsertParams ¶
type CatalogPropertyActionBulkUpsertParams struct {
// carries the properties to bulk upsert
BulkUpsertPropertiesRequest BulkUpsertPropertiesRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPropertyActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogPropertyActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogPropertyActionBulkUpsertParams) URLQuery ¶
func (r CatalogPropertyActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogPropertyActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogPropertyActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogPropertyActionService ¶
type CatalogPropertyActionService struct {
// contains filtered or unexported fields
}
List and manage properties and their attributes.
CatalogPropertyActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogPropertyActionService method instead.
func NewCatalogPropertyActionService ¶
func NewCatalogPropertyActionService(opts ...option.RequestOption) (r CatalogPropertyActionService)
NewCatalogPropertyActionService 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 (*CatalogPropertyActionService) BulkUpsert ¶
func (r *CatalogPropertyActionService) BulkUpsert(ctx context.Context, params CatalogPropertyActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple properties and their attributes for the account, matched by name (case-insensitive), then writes asynchronously — 202 with a job to poll.
type CatalogPropertyAttributeDeleteParams ¶
type CatalogPropertyAttributeDeleteParams struct {
PropertyID string `path:"property_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogPropertyAttributeDeleteResponse ¶
type CatalogPropertyAttributeDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogPropertyAttributeDeleteResponse) RawJSON ¶
func (r CatalogPropertyAttributeDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogPropertyAttributeDeleteResponse) UnmarshalJSON ¶
func (r *CatalogPropertyAttributeDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogPropertyAttributeGetParams ¶
type CatalogPropertyAttributeGetParams struct {
PropertyID string `path:"property_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogPropertyAttributeListParams ¶
type CatalogPropertyAttributeListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPropertyAttributeListParams) URLQuery ¶
func (r CatalogPropertyAttributeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyAttributeListParams's query parameters as `url.Values`.
type CatalogPropertyAttributeNewParams ¶
type CatalogPropertyAttributeNewParams struct {
// Request to create an attribute.
CreateAttributeRequest CreateAttributeRequestParam
// contains filtered or unexported fields
}
func (CatalogPropertyAttributeNewParams) MarshalJSON ¶
func (r CatalogPropertyAttributeNewParams) MarshalJSON() (data []byte, err error)
func (*CatalogPropertyAttributeNewParams) UnmarshalJSON ¶
func (r *CatalogPropertyAttributeNewParams) UnmarshalJSON(data []byte) error
type CatalogPropertyAttributeService ¶
type CatalogPropertyAttributeService struct {
// contains filtered or unexported fields
}
List and manage properties and their attributes.
CatalogPropertyAttributeService contains methods and other services that help with interacting with the openmrp 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 NewCatalogPropertyAttributeService method instead.
func NewCatalogPropertyAttributeService ¶
func NewCatalogPropertyAttributeService(opts ...option.RequestOption) (r CatalogPropertyAttributeService)
NewCatalogPropertyAttributeService 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 (*CatalogPropertyAttributeService) Delete ¶
func (r *CatalogPropertyAttributeService) Delete(ctx context.Context, id string, body CatalogPropertyAttributeDeleteParams, opts ...option.RequestOption) (res *CatalogPropertyAttributeDeleteResponse, err error)
Deletes an attribute from a property.
Remaining attributes in the property are shifted so their sort orders stay contiguous.
This endpoint requires the permission: `properties:delete`.
func (*CatalogPropertyAttributeService) Get ¶
func (r *CatalogPropertyAttributeService) Get(ctx context.Context, id string, query CatalogPropertyAttributeGetParams, opts ...option.RequestOption) (res *Attribute, err error)
Returns an attribute by ID within a property.
This endpoint requires the permission: `properties:read`.
func (*CatalogPropertyAttributeService) List ¶
func (r *CatalogPropertyAttributeService) List(ctx context.Context, propertyID string, query CatalogPropertyAttributeListParams, opts ...option.RequestOption) (res *ListAttribute, err error)
Returns a paginated list of attributes for a property.
Attributes come back in the order they are arranged within the property, first to last. The `q` search term is matched against the attribute value.
This endpoint requires the permission: `properties:read`.
func (*CatalogPropertyAttributeService) New ¶
func (r *CatalogPropertyAttributeService) New(ctx context.Context, propertyID string, body CatalogPropertyAttributeNewParams, opts ...option.RequestOption) (res *Attribute, err error)
Creates an attribute under a property.
An attribute is one selectable value of the property, such as `Red` under `Color`, and can then be assigned to items. Returns a conflict error if another attribute in the account already uses the same value.
This endpoint requires the permission: `properties:create`.
func (*CatalogPropertyAttributeService) Update ¶
func (r *CatalogPropertyAttributeService) Update(ctx context.Context, id string, params CatalogPropertyAttributeUpdateParams, opts ...option.RequestOption) (res *Attribute, err error)
Partially updates an attribute.
Items reference attributes by ID, so changing the value renames the attribute everywhere it is already assigned.
This endpoint requires the permission: `properties:update`.
type CatalogPropertyAttributeUpdateParams ¶
type CatalogPropertyAttributeUpdateParams struct {
PropertyID string `path:"property_id" api:"required" json:"-"`
// Request to update an attribute.
UpdateAttributeRequest UpdateAttributeRequestParam
// contains filtered or unexported fields
}
func (CatalogPropertyAttributeUpdateParams) MarshalJSON ¶
func (r CatalogPropertyAttributeUpdateParams) MarshalJSON() (data []byte, err error)
func (*CatalogPropertyAttributeUpdateParams) UnmarshalJSON ¶
func (r *CatalogPropertyAttributeUpdateParams) UnmarshalJSON(data []byte) error
type CatalogPropertyDeleteResponse ¶
type CatalogPropertyDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogPropertyDeleteResponse) RawJSON ¶
func (r CatalogPropertyDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogPropertyDeleteResponse) UnmarshalJSON ¶
func (r *CatalogPropertyDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogPropertyGetParams ¶
type CatalogPropertyGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPropertyGetParams) URLQuery ¶
func (r CatalogPropertyGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyGetParams's query parameters as `url.Values`.
type CatalogPropertyListParams ¶
type CatalogPropertyListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPropertyListParams) URLQuery ¶
func (r CatalogPropertyListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyListParams's query parameters as `url.Values`.
type CatalogPropertyNewParams ¶
type CatalogPropertyNewParams struct {
// Request to create a property.
CreatePropertyRequest CreatePropertyRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogPropertyNewParams) MarshalJSON ¶
func (r CatalogPropertyNewParams) MarshalJSON() (data []byte, err error)
func (CatalogPropertyNewParams) URLQuery ¶
func (r CatalogPropertyNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyNewParams's query parameters as `url.Values`.
func (*CatalogPropertyNewParams) UnmarshalJSON ¶
func (r *CatalogPropertyNewParams) UnmarshalJSON(data []byte) error
type CatalogPropertyService ¶
type CatalogPropertyService struct {
// List and manage properties and their attributes.
Attributes CatalogPropertyAttributeService
// List and manage properties and their attributes.
Actions CatalogPropertyActionService
// contains filtered or unexported fields
}
List and manage properties and their attributes.
CatalogPropertyService contains methods and other services that help with interacting with the openmrp 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 NewCatalogPropertyService method instead.
func NewCatalogPropertyService ¶
func NewCatalogPropertyService(opts ...option.RequestOption) (r CatalogPropertyService)
NewCatalogPropertyService 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 (*CatalogPropertyService) Delete ¶
func (r *CatalogPropertyService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogPropertyDeleteResponse, err error)
Deletes a property and every attribute defined under it.
Items previously classified by those attributes lose that classification.
This endpoint requires the permission: `properties:delete`.
func (*CatalogPropertyService) Get ¶
func (r *CatalogPropertyService) Get(ctx context.Context, id string, query CatalogPropertyGetParams, opts ...option.RequestOption) (res *Property, err error)
Returns a property by ID.
This endpoint requires the permission: `properties:read`.
func (*CatalogPropertyService) List ¶
func (r *CatalogPropertyService) List(ctx context.Context, query CatalogPropertyListParams, opts ...option.RequestOption) (res *ListProperty, err error)
Returns a paginated list of properties for the target account.
Properties come back newest first. The `q` search term is matched against the property name.
This endpoint requires the permission: `properties:read`.
func (*CatalogPropertyService) New ¶
func (r *CatalogPropertyService) New(ctx context.Context, params CatalogPropertyNewParams, opts ...option.RequestOption) (res *Property, err error)
Creates a property.
The property starts with no attributes; add its selectable values afterwards with the create attribute endpoint. Returns a conflict error if a property with the same name already exists.
This endpoint requires the permission: `properties:create`.
func (*CatalogPropertyService) Update ¶
func (r *CatalogPropertyService) Update(ctx context.Context, id string, params CatalogPropertyUpdateParams, opts ...option.RequestOption) (res *Property, err error)
Partially updates a property.
This endpoint requires the permission: `properties:update`.
type CatalogPropertyUpdateParams ¶
type CatalogPropertyUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "attributes".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a property.
UpdatePropertyRequest UpdatePropertyRequestParam
// contains filtered or unexported fields
}
func (CatalogPropertyUpdateParams) MarshalJSON ¶
func (r CatalogPropertyUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogPropertyUpdateParams) URLQuery ¶
func (r CatalogPropertyUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogPropertyUpdateParams's query parameters as `url.Values`.
func (*CatalogPropertyUpdateParams) UnmarshalJSON ¶
func (r *CatalogPropertyUpdateParams) UnmarshalJSON(data []byte) error
type CatalogService ¶
type CatalogService struct {
// List and manage units.
Units CatalogUnitService
// List and manage unit groups and their associated units.
UnitGroups CatalogUnitGroupService
// List and manage properties and their attributes.
Properties CatalogPropertyService
// List and manage inventory items.
Items CatalogItemService
// List and manage item categories.
ItemCategories CatalogItemCategoryService
// List and manage materials.
Materials CatalogMaterialService
// List and manage parts.
Parts CatalogPartService
// List and manage product lines.
ProductLines CatalogProductLineService
// List and manage products.
Products CatalogProductService
// contains filtered or unexported fields
}
CatalogService contains methods and other services that help with interacting with the openmrp 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 NewCatalogService method instead.
func NewCatalogService ¶
func NewCatalogService(opts ...option.RequestOption) (r CatalogService)
NewCatalogService 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.
type CatalogUnitActionBulkUpsertParams ¶
type CatalogUnitActionBulkUpsertParams struct {
// BulkUpsertUnitsRequest is the request to bulk upsert units.
BulkUpsertUnitsRequest BulkUpsertUnitsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogUnitActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitActionBulkUpsertParams) URLQuery ¶
func (r CatalogUnitActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogUnitActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogUnitActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogUnitActionService ¶
type CatalogUnitActionService struct {
// contains filtered or unexported fields
}
List and manage units.
CatalogUnitActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogUnitActionService method instead.
func NewCatalogUnitActionService ¶
func NewCatalogUnitActionService(opts ...option.RequestOption) (r CatalogUnitActionService)
NewCatalogUnitActionService 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 (*CatalogUnitActionService) BulkUpsert ¶
func (r *CatalogUnitActionService) BulkUpsert(ctx context.Context, params CatalogUnitActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple units of measure for the account, matched by name or abbreviation, then writes asynchronously — 202 with a job to poll.
type CatalogUnitDeleteResponse ¶
type CatalogUnitDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogUnitDeleteResponse) RawJSON ¶
func (r CatalogUnitDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogUnitDeleteResponse) UnmarshalJSON ¶
func (r *CatalogUnitDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogUnitGetParams ¶
type CatalogUnitGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGetParams) URLQuery ¶
func (r CatalogUnitGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGetParams's query parameters as `url.Values`.
type CatalogUnitGroupActionBulkUpsertParams ¶
type CatalogUnitGroupActionBulkUpsertParams struct {
// BulkUpsertUnitGroupsRequest is the request to bulk upsert unit groups.
BulkUpsertUnitGroupsRequest BulkUpsertUnitGroupsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupActionBulkUpsertParams) MarshalJSON ¶
func (r CatalogUnitGroupActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitGroupActionBulkUpsertParams) URLQuery ¶
func (r CatalogUnitGroupActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupActionBulkUpsertParams's query parameters as `url.Values`.
func (*CatalogUnitGroupActionBulkUpsertParams) UnmarshalJSON ¶
func (r *CatalogUnitGroupActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type CatalogUnitGroupActionService ¶
type CatalogUnitGroupActionService struct {
// contains filtered or unexported fields
}
List and manage unit groups and their associated units.
CatalogUnitGroupActionService contains methods and other services that help with interacting with the openmrp 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 NewCatalogUnitGroupActionService method instead.
func NewCatalogUnitGroupActionService ¶
func NewCatalogUnitGroupActionService(opts ...option.RequestOption) (r CatalogUnitGroupActionService)
NewCatalogUnitGroupActionService 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 (*CatalogUnitGroupActionService) BulkUpsert ¶
func (r *CatalogUnitGroupActionService) BulkUpsert(ctx context.Context, params CatalogUnitGroupActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple unit groups for the account, matched by name (case-insensitive), then writes asynchronously — 202 with a job to poll.
type CatalogUnitGroupDeleteResponse ¶
type CatalogUnitGroupDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogUnitGroupDeleteResponse) RawJSON ¶
func (r CatalogUnitGroupDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogUnitGroupDeleteResponse) UnmarshalJSON ¶
func (r *CatalogUnitGroupDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogUnitGroupGetParams ¶
type CatalogUnitGroupGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "base_unit", "associated_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupGetParams) URLQuery ¶
func (r CatalogUnitGroupGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupGetParams's query parameters as `url.Values`.
type CatalogUnitGroupListParams ¶
type CatalogUnitGroupListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "base_unit", "associated_units".
Include []string `query:"include,omitzero" json:"-"`
// Filter by unit dimension.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type CatalogUnitGroupListParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupListParams) URLQuery ¶
func (r CatalogUnitGroupListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupListParams's query parameters as `url.Values`.
type CatalogUnitGroupListParamsType ¶
type CatalogUnitGroupListParamsType string
Filter by unit dimension.
const ( CatalogUnitGroupListParamsTypeCurrency CatalogUnitGroupListParamsType = "currency" CatalogUnitGroupListParamsTypeQuantity CatalogUnitGroupListParamsType = "quantity" CatalogUnitGroupListParamsTypeTime CatalogUnitGroupListParamsType = "time" CatalogUnitGroupListParamsTypeMass CatalogUnitGroupListParamsType = "mass" CatalogUnitGroupListParamsTypeVolume CatalogUnitGroupListParamsType = "volume" CatalogUnitGroupListParamsTypeLength CatalogUnitGroupListParamsType = "length" CatalogUnitGroupListParamsTypeTemperature CatalogUnitGroupListParamsType = "temperature" CatalogUnitGroupListParamsTypeArea CatalogUnitGroupListParamsType = "area" )
type CatalogUnitGroupNewParams ¶
type CatalogUnitGroupNewParams struct {
// Request to create a unit group.
CreateUnitGroupRequest CreateUnitGroupRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "base_unit", "associated_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupNewParams) MarshalJSON ¶
func (r CatalogUnitGroupNewParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitGroupNewParams) URLQuery ¶
func (r CatalogUnitGroupNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupNewParams's query parameters as `url.Values`.
func (*CatalogUnitGroupNewParams) UnmarshalJSON ¶
func (r *CatalogUnitGroupNewParams) UnmarshalJSON(data []byte) error
type CatalogUnitGroupService ¶
type CatalogUnitGroupService struct {
// List and manage unit groups and their associated units.
Units CatalogUnitGroupUnitService
// List and manage unit groups and their associated units.
Actions CatalogUnitGroupActionService
// contains filtered or unexported fields
}
List and manage unit groups and their associated units.
CatalogUnitGroupService contains methods and other services that help with interacting with the openmrp 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 NewCatalogUnitGroupService method instead.
func NewCatalogUnitGroupService ¶
func NewCatalogUnitGroupService(opts ...option.RequestOption) (r CatalogUnitGroupService)
NewCatalogUnitGroupService 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 (*CatalogUnitGroupService) Delete ¶
func (r *CatalogUnitGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogUnitGroupDeleteResponse, err error)
Deletes a unit group along with every unit association it contains.
The units themselves are not deleted and remain available to other groups. System unit groups, which are shared across all accounts, cannot be deleted.
This endpoint requires the permission: `unit_groups:delete`.
func (*CatalogUnitGroupService) Get ¶
func (r *CatalogUnitGroupService) Get(ctx context.Context, id string, query CatalogUnitGroupGetParams, opts ...option.RequestOption) (res *UnitGroup, err error)
Returns a unit group by ID, including the system unit groups shared across all accounts.
This endpoint requires the permission: `unit_groups:read`.
func (*CatalogUnitGroupService) List ¶
func (r *CatalogUnitGroupService) List(ctx context.Context, query CatalogUnitGroupListParams, opts ...option.RequestOption) (res *ListUnitGroup, err error)
Returns a paginated list of unit groups, including system unit groups.
This endpoint requires the permission: `unit_groups:read`.
func (*CatalogUnitGroupService) New ¶
func (r *CatalogUnitGroupService) New(ctx context.Context, params CatalogUnitGroupNewParams, opts ...option.RequestOption) (res *UnitGroup, err error)
Creates a unit group, optionally associating units with it in the same request.
The name must be unique within the account, and the base unit and every associated unit must share the group's dimension.
This endpoint requires the permission: `unit_groups:create`.
func (*CatalogUnitGroupService) Update ¶
func (r *CatalogUnitGroupService) Update(ctx context.Context, id string, params CatalogUnitGroupUpdateParams, opts ...option.RequestOption) (res *UnitGroup, err error)
Partially updates a unit group.
System unit groups cannot be modified, and a group's dimension is fixed once it is created.
This endpoint requires the permission: `unit_groups:update`.
type CatalogUnitGroupUnitDeleteParams ¶
type CatalogUnitGroupUnitDeleteParams struct {
UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type CatalogUnitGroupUnitDeleteResponse ¶
type CatalogUnitGroupUnitDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CatalogUnitGroupUnitDeleteResponse) RawJSON ¶
func (r CatalogUnitGroupUnitDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CatalogUnitGroupUnitDeleteResponse) UnmarshalJSON ¶
func (r *CatalogUnitGroupUnitDeleteResponse) UnmarshalJSON(data []byte) error
type CatalogUnitGroupUnitGetParams ¶
type CatalogUnitGroupUnitGetParams struct {
UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupUnitGetParams) URLQuery ¶
func (r CatalogUnitGroupUnitGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupUnitGetParams's query parameters as `url.Values`.
type CatalogUnitGroupUnitListParams ¶
type CatalogUnitGroupUnitListParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupUnitListParams) URLQuery ¶
func (r CatalogUnitGroupUnitListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupUnitListParams's query parameters as `url.Values`.
type CatalogUnitGroupUnitNewParams ¶
type CatalogUnitGroupUnitNewParams struct {
// Request to add a unit to a unit group.
CreateUnitGroupUnitRequest CreateUnitGroupUnitRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitGroupUnitNewParams) MarshalJSON ¶
func (r CatalogUnitGroupUnitNewParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitGroupUnitNewParams) URLQuery ¶
func (r CatalogUnitGroupUnitNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupUnitNewParams's query parameters as `url.Values`.
func (*CatalogUnitGroupUnitNewParams) UnmarshalJSON ¶
func (r *CatalogUnitGroupUnitNewParams) UnmarshalJSON(data []byte) error
type CatalogUnitGroupUnitService ¶
type CatalogUnitGroupUnitService struct {
// contains filtered or unexported fields
}
List and manage unit groups and their associated units.
CatalogUnitGroupUnitService contains methods and other services that help with interacting with the openmrp 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 NewCatalogUnitGroupUnitService method instead.
func NewCatalogUnitGroupUnitService ¶
func NewCatalogUnitGroupUnitService(opts ...option.RequestOption) (r CatalogUnitGroupUnitService)
NewCatalogUnitGroupUnitService 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 (*CatalogUnitGroupUnitService) Delete ¶
func (r *CatalogUnitGroupUnitService) Delete(ctx context.Context, id string, body CatalogUnitGroupUnitDeleteParams, opts ...option.RequestOption) (res *CatalogUnitGroupUnitDeleteResponse, err error)
Removes a unit from a unit group so that products using the group can no longer be ordered in it.
Only the association is deleted; the unit itself remains available. Associations cannot be removed from system unit groups.
This endpoint requires the permission: `unit_groups:delete`.
func (*CatalogUnitGroupUnitService) Get ¶
func (r *CatalogUnitGroupUnitService) Get(ctx context.Context, id string, params CatalogUnitGroupUnitGetParams, opts ...option.RequestOption) (res *UnitGroupUnit, err error)
Returns a single unit association within a unit group, including the discount and customer portal visibility applied to it.
This endpoint requires the permission: `unit_groups:read`.
func (*CatalogUnitGroupUnitService) List ¶
func (r *CatalogUnitGroupUnitService) List(ctx context.Context, unitGroupID string, query CatalogUnitGroupUnitListParams, opts ...option.RequestOption) (res *ListUnitGroupUnit, err error)
Returns the units associated with a unit group, along with the discount and customer portal visibility applied to each.
Every association in the group is returned in a single response; this list is not paginated.
This endpoint requires the permission: `unit_groups:read`.
func (*CatalogUnitGroupUnitService) New ¶
func (r *CatalogUnitGroupUnitService) New(ctx context.Context, unitGroupID string, params CatalogUnitGroupUnitNewParams, opts ...option.RequestOption) (res *UnitGroupUnit, err error)
Adds a unit to a unit group so that products using the group can be ordered in it.
A unit can appear in a group only once, so use the update endpoint to change the discount or visibility of a unit that is already associated. Units cannot be added to system unit groups.
This endpoint requires the permission: `unit_groups:update`.
func (*CatalogUnitGroupUnitService) Update ¶
func (r *CatalogUnitGroupUnitService) Update(ctx context.Context, id string, params CatalogUnitGroupUnitUpdateParams, opts ...option.RequestOption) (res *UnitGroupUnit, err error)
Partially updates a unit's association with a unit group, changing the discount or customer portal visibility applied when ordering in that unit.
Associations within system unit groups cannot be modified.
This endpoint requires the permission: `unit_groups:update`.
type CatalogUnitGroupUnitUpdateParams ¶
type CatalogUnitGroupUnitUpdateParams struct {
UnitGroupID string `path:"unit_group_id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "unit".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update an associated unit within a unit group.
UpdateUnitGroupUnitRequest UpdateUnitGroupUnitRequestParam
// contains filtered or unexported fields
}
func (CatalogUnitGroupUnitUpdateParams) MarshalJSON ¶
func (r CatalogUnitGroupUnitUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitGroupUnitUpdateParams) URLQuery ¶
func (r CatalogUnitGroupUnitUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupUnitUpdateParams's query parameters as `url.Values`.
func (*CatalogUnitGroupUnitUpdateParams) UnmarshalJSON ¶
func (r *CatalogUnitGroupUnitUpdateParams) UnmarshalJSON(data []byte) error
type CatalogUnitGroupUpdateParams ¶
type CatalogUnitGroupUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "base_unit", "associated_units".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a unit group.
UpdateUnitGroupRequest UpdateUnitGroupRequestParam
// contains filtered or unexported fields
}
func (CatalogUnitGroupUpdateParams) MarshalJSON ¶
func (r CatalogUnitGroupUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitGroupUpdateParams) URLQuery ¶
func (r CatalogUnitGroupUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitGroupUpdateParams's query parameters as `url.Values`.
func (*CatalogUnitGroupUpdateParams) UnmarshalJSON ¶
func (r *CatalogUnitGroupUpdateParams) UnmarshalJSON(data []byte) error
type CatalogUnitListParams ¶
type CatalogUnitListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// Filter by unit dimension.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type CatalogUnitListParamsType `query:"type,omitzero" json:"-"`
// Return only units that belong to at least one of the given unit groups.
UnitGroupIDs []string `query:"unit_group_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitListParams) URLQuery ¶
func (r CatalogUnitListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitListParams's query parameters as `url.Values`.
type CatalogUnitListParamsType ¶
type CatalogUnitListParamsType string
Filter by unit dimension.
const ( CatalogUnitListParamsTypeCurrency CatalogUnitListParamsType = "currency" CatalogUnitListParamsTypeQuantity CatalogUnitListParamsType = "quantity" CatalogUnitListParamsTypeTime CatalogUnitListParamsType = "time" CatalogUnitListParamsTypeMass CatalogUnitListParamsType = "mass" CatalogUnitListParamsTypeVolume CatalogUnitListParamsType = "volume" CatalogUnitListParamsTypeLength CatalogUnitListParamsType = "length" CatalogUnitListParamsTypeTemperature CatalogUnitListParamsType = "temperature" CatalogUnitListParamsTypeArea CatalogUnitListParamsType = "area" )
type CatalogUnitNewParams ¶
type CatalogUnitNewParams struct {
// Request to create a unit.
CreateUnitRequest CreateUnitRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CatalogUnitNewParams) MarshalJSON ¶
func (r CatalogUnitNewParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitNewParams) URLQuery ¶
func (r CatalogUnitNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitNewParams's query parameters as `url.Values`.
func (*CatalogUnitNewParams) UnmarshalJSON ¶
func (r *CatalogUnitNewParams) UnmarshalJSON(data []byte) error
type CatalogUnitService ¶
type CatalogUnitService struct {
// List and manage units.
Actions CatalogUnitActionService
// contains filtered or unexported fields
}
List and manage units.
CatalogUnitService contains methods and other services that help with interacting with the openmrp 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 NewCatalogUnitService method instead.
func NewCatalogUnitService ¶
func NewCatalogUnitService(opts ...option.RequestOption) (r CatalogUnitService)
NewCatalogUnitService 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 (*CatalogUnitService) Delete ¶
func (r *CatalogUnitService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CatalogUnitDeleteResponse, err error)
Deletes a unit owned by your account.
The unit is also removed from every unit group it belongs to. System units, which are shared across all accounts, cannot be deleted, and neither can a unit that is a unit group's base unit — change the group's base unit or delete the group first — or one that any quantity or price is recorded in.
This endpoint requires the permission: `units:delete`.
func (*CatalogUnitService) Get ¶
func (r *CatalogUnitService) Get(ctx context.Context, id string, query CatalogUnitGetParams, opts ...option.RequestOption) (res *Unit, err error)
Returns a unit by ID, including both account-owned and global system units.
This endpoint requires the permission: `units:read`.
func (*CatalogUnitService) List ¶
func (r *CatalogUnitService) List(ctx context.Context, query CatalogUnitListParams, opts ...option.RequestOption) (res *ListUnit, err error)
Returns a paginated list of units for the current account, including both account-owned and global system units.
This endpoint requires the permission: `units:read`.
func (*CatalogUnitService) New ¶
func (r *CatalogUnitService) New(ctx context.Context, params CatalogUnitNewParams, opts ...option.RequestOption) (res *Unit, err error)
Creates a unit of measurement owned by your account, in addition to the system units the platform already provides.
The name and abbreviation must each be unique within the account. A unit created here is never a base unit, so its conversion ratio is interpreted relative to the base unit of the chosen dimension.
This endpoint requires the permission: `units:create`.
func (*CatalogUnitService) Update ¶
func (r *CatalogUnitService) Update(ctx context.Context, id string, params CatalogUnitUpdateParams, opts ...option.RequestOption) (res *Unit, err error)
Partially updates a unit owned by your account.
System units cannot be modified, and a unit's dimension is fixed once it is created.
This endpoint requires the permission: `units:update`.
type CatalogUnitUpdateParams ¶
type CatalogUnitUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a unit.
UpdateUnitRequest UpdateUnitRequestParam
// contains filtered or unexported fields
}
func (CatalogUnitUpdateParams) MarshalJSON ¶
func (r CatalogUnitUpdateParams) MarshalJSON() (data []byte, err error)
func (CatalogUnitUpdateParams) URLQuery ¶
func (r CatalogUnitUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes CatalogUnitUpdateParams's query parameters as `url.Values`.
func (*CatalogUnitUpdateParams) UnmarshalJSON ¶
func (r *CatalogUnitUpdateParams) UnmarshalJSON(data []byte) error
type CheckoutSalesOrderRequestParam ¶
type CheckoutSalesOrderRequestParam struct {
// Email address to send the checkout link to.
Email string `json:"email" api:"required"`
// contains filtered or unexported fields
}
Request to create a checkout session for a sales order.
The property Email is required.
func (CheckoutSalesOrderRequestParam) MarshalJSON ¶
func (r CheckoutSalesOrderRequestParam) MarshalJSON() (data []byte, err error)
func (*CheckoutSalesOrderRequestParam) UnmarshalJSON ¶
func (r *CheckoutSalesOrderRequestParam) UnmarshalJSON(data []byte) error
type CheckoutSalesOrderResponse ¶
type CheckoutSalesOrderResponse struct {
// URL of the hosted payment page where the customer completes the checkout.
CheckoutURL string `json:"checkout_url" api:"required"`
// Resource type identifier.
//
// Any of "checkout_sales_order".
Object CheckoutSalesOrderResponseObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CheckoutURL respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Checkout session result.
func (CheckoutSalesOrderResponse) RawJSON ¶
func (r CheckoutSalesOrderResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CheckoutSalesOrderResponse) UnmarshalJSON ¶
func (r *CheckoutSalesOrderResponse) UnmarshalJSON(data []byte) error
type CheckoutSalesOrderResponseObject ¶
type CheckoutSalesOrderResponseObject string
Resource type identifier.
const (
CheckoutSalesOrderResponseObjectCheckoutSalesOrder CheckoutSalesOrderResponseObject = "checkout_sales_order"
)
type Client ¶
type Client struct {
Auth AuthService
// Unified free-text search across resource types, returning lightweight entity
// references.
Core CoreService
Catalog CatalogService
// List available platform tools for agent configuration.
AI AIService
// List messageable contacts (the messaging directory).
Messaging MessagingService
Sales SaleService
// Create, view, update, and delete transactions.
Finance FinanceService
Operations OperationService
// List permission groups and their permissions.
Identity IdentityService
Settings SettingService
// contains filtered or unexported fields
}
Client creates a struct with services and top level methods that help with interacting with the openmrp 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 (OPENMRP_API_KEY, OPENMRP_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 Commitment ¶ added in v0.20.0
type Commitment struct {
// Days the customer's receiving calendar and the plant's shipping calendar pulled
// the ship-by date back, beyond what carrier transit accounted for.
//
// Zero means every date along the way already fell on an open day. This is what
// explains a ship-by date that is earlier than transit alone would suggest.
CalendarAdjustmentDays int64 `json:"calendar_adjustment_days" api:"required"`
// When freight leaving on the ship-by date would reach the customer: transit
// walked forward from it and landed on a day their dock receives.
//
// Reported by the commitment preview, which is asked what a set of inputs would
// produce and so computes the arrival too. A record carries the commitment it was
// stamped with, not a projection, and leaves this null.
EstimatedDeliveryDate time.Time `json:"estimated_delivery_date" api:"required" format:"date-time"`
// Calendar days between issue and the ship-by date.
LeadTimeDays int64 `json:"lead_time_days" api:"required"`
// Days between issue and the ship-by date, set on this record alone in place of
// the customer's standing lead time.
LeadTimeOverrideDays int64 `json:"lead_time_override_days" api:"required"`
// Which rule produced the ship-by date.
//
// Any of "customer", "parent_customer", "account_group", "account", "manual",
// "order_lead_time", "order_ship_by".
LeadTimeSource CommitmentLeadTimeSource `json:"lead_time_source" api:"required"`
// Resource type identifier.
//
// Any of "commitment".
Object CommitmentObject `json:"object" api:"required"`
// Date delivery was promised to the customer, if one was committed.
PromisedAt time.Time `json:"promised_at" api:"required" format:"date-time"`
// When the record is contractually due to ship.
//
// Stamped at issue. With a promised delivery date, this is that date less the
// carrier's transit for the order's lane and less any day the customer cannot
// receive on — when the order has to leave to arrive when promised. Otherwise it
// comes from a lead time, whether the order's own or the one on the customer, its
// parent account, its account group, or the account.
//
// Always a day the plant actually ships on, whichever rule produced it, and
// carries the plant's pickup cutoff as its time of day when the shipping calendar
// sets one — the moment freight has to be tendered by, not just the day. Midnight
// UTC means no cutoff is configured rather than a deadline at midnight.
//
// Recomputed while the order is still open whenever something it was derived from
// moves — the basis above, or the carrier, service level, or ship-to address the
// transit was quoted on. Renegotiating a customer's standing lead time or adding a
// holiday to a calendar does not reach back into commitments already made. Cleared
// if the order is unissued.
ShipByDate time.Time `json:"ship_by_date" api:"required" format:"date-time"`
// The ship date pinned by hand, bypassing transit and the customer's receiving
// days.
ShipByOverrideDate time.Time `json:"ship_by_override_date" api:"required" format:"date-time"`
// Business days the carrier needs to cover this lane, subtracted from the promised
// delivery date to reach the ship-by date.
//
// Only set when a delivery date was promised and the lane could be priced. Without
// it the ship-by date falls back to the promised date itself.
TransitDays int64 `json:"transit_days" api:"required"`
// Where the transit estimate came from.
//
// Any of "carrier_lane", "service_level".
TransitSource CommitmentTransitSource `json:"transit_source" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CalendarAdjustmentDays respjson.Field
EstimatedDeliveryDate respjson.Field
LeadTimeDays respjson.Field
LeadTimeOverrideDays respjson.Field
LeadTimeSource respjson.Field
Object respjson.Field
PromisedAt respjson.Field
ShipByDate respjson.Field
ShipByOverrideDate respjson.Field
TransitDays respjson.Field
TransitSource respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Commitment describes when a record is due to ship: what was asked for, what that resolved to, and which rule decided.
It is a generic, reusable sub-resource shared by anything carrying a ship-by commitment — a sales order, the pick that fulfills it, or a preview of an order that does not exist yet.
The three inputs are alternative answers to the same question and at most one is ever set; `lead_time_source` reports which of them, or which level of the customer chain, produced the date. They are written flat on the create and update bodies, the way a carrier is written as `carrier_id` and read back under `freight`.
func (Commitment) RawJSON ¶ added in v0.20.0
func (r Commitment) RawJSON() string
Returns the unmodified JSON received from the API
func (*Commitment) UnmarshalJSON ¶ added in v0.20.0
func (r *Commitment) UnmarshalJSON(data []byte) error
type CommitmentLeadTimeSource ¶ added in v0.20.0
type CommitmentLeadTimeSource string
Which rule produced the ship-by date.
const ( CommitmentLeadTimeSourceCustomer CommitmentLeadTimeSource = "customer" CommitmentLeadTimeSourceParentCustomer CommitmentLeadTimeSource = "parent_customer" CommitmentLeadTimeSourceAccountGroup CommitmentLeadTimeSource = "account_group" CommitmentLeadTimeSourceAccount CommitmentLeadTimeSource = "account" CommitmentLeadTimeSourceManual CommitmentLeadTimeSource = "manual" CommitmentLeadTimeSourceOrderLeadTime CommitmentLeadTimeSource = "order_lead_time" CommitmentLeadTimeSourceOrderShipBy CommitmentLeadTimeSource = "order_ship_by" )
type CommitmentObject ¶ added in v0.20.0
type CommitmentObject string
Resource type identifier.
const (
CommitmentObjectCommitment CommitmentObject = "commitment"
)
type CommitmentQuoteStep ¶
type CommitmentQuoteStep struct {
// Which rule applied.
//
// Any of "basis", "receive_calendar", "carrier_transit", "ship_calendar",
// "pickup_cutoff".
Code CommitmentQuoteStepCode `json:"code" api:"required"`
// Where the running date stood after this rule.
Date time.Time `json:"date" api:"required" format:"date-time"`
// How far this rule pulled the date back. Zero means the rule applied and changed
// nothing, which is worth showing: it says the date was already on an open day.
DaysMoved int64 `json:"days_moved" api:"required"`
// The rule's own parameter — where a transit estimate came from, or the cutoff
// time applied. Null for a rule that takes none, rather than an empty string:
// snapping onto an open day has no parameter to report.
Detail string `json:"detail" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Date respjson.Field
DaysMoved respjson.Field
Detail respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
CommitmentQuoteStep is one rule's contribution to a previewed ship-by date.
Returned as an ordered list so a caller can show why a date is what it is without reimplementing the arithmetic, and so the explanation cannot drift from the calculation that produced it.
func (CommitmentQuoteStep) RawJSON ¶
func (r CommitmentQuoteStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*CommitmentQuoteStep) UnmarshalJSON ¶
func (r *CommitmentQuoteStep) UnmarshalJSON(data []byte) error
type CommitmentQuoteStepCode ¶
type CommitmentQuoteStepCode string
Which rule applied.
const ( CommitmentQuoteStepCodeBasis CommitmentQuoteStepCode = "basis" CommitmentQuoteStepCodeReceiveCalendar CommitmentQuoteStepCode = "receive_calendar" CommitmentQuoteStepCodeCarrierTransit CommitmentQuoteStepCode = "carrier_transit" CommitmentQuoteStepCodeShipCalendar CommitmentQuoteStepCode = "ship_calendar" CommitmentQuoteStepCodePickupCutoff CommitmentQuoteStepCode = "pickup_cutoff" )
type CommitmentTransitSource ¶ added in v0.20.0
type CommitmentTransitSource string
Where the transit estimate came from.
const ( CommitmentTransitSourceCarrierLane CommitmentTransitSource = "carrier_lane" CommitmentTransitSourceServiceLevel CommitmentTransitSource = "service_level" )
type ComputedQuantity ¶
type ComputedQuantity struct {
// Formatted value with unit abbreviation (e.g. "1,200 pr").
DisplayValue string `json:"display_value" api:"required"`
// Resource type identifier.
//
// Any of "computed_quantity".
Object ComputedQuantityObject `json:"object" api:"required"`
// Unit of measurement used for conversions and product quantities.
Unit Unit `json:"unit" api:"required"`
// Raw decimal value, as a string to preserve precision.
//
// This is the unformatted machine value; see `display_value` for the
// human-readable rendering.
Value string `json:"value" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DisplayValue respjson.Field
Object respjson.Field
Unit respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An amount calculated on demand rather than stored.
The same shape as a quantity minus the ID, because nothing was written: it is derived per request, such as a total rolled up across invoiced lines for one analysis.
func (ComputedQuantity) RawJSON ¶
func (r ComputedQuantity) RawJSON() string
Returns the unmodified JSON received from the API
func (*ComputedQuantity) UnmarshalJSON ¶
func (r *ComputedQuantity) UnmarshalJSON(data []byte) error
type ComputedQuantityObject ¶
type ComputedQuantityObject string
Resource type identifier.
const (
ComputedQuantityObjectComputedQuantity ComputedQuantityObject = "computed_quantity"
)
type ComputedRate ¶
type ComputedRate struct {
// Unit of measurement used for conversions and product quantities.
DenominatorUnit Unit `json:"denominator_unit" api:"required"`
// Human-readable formatted value (e.g. "$25.50 / pr").
DisplayValue string `json:"display_value" api:"required"`
// Unit of measurement used for conversions and product quantities.
NumeratorUnit Unit `json:"numerator_unit" api:"required"`
// Resource type identifier.
//
// Any of "computed_rate".
Object ComputedRateObject `json:"object" api:"required"`
// Decimal value of the rate, as a string to preserve precision.
//
// Expressed as the amount of the numerator unit per one denominator unit.
Value string `json:"value" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DenominatorUnit respjson.Field
DisplayValue respjson.Field
NumeratorUnit respjson.Field
Object respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A rate calculated on demand rather than stored.
The same shape as a rate minus the fields only a persisted row can have: it carries no ID and no timestamps because nothing was written. Used where a figure is derived per request, such as an analysis comparing one customer's price against the median other customers pay.
func (ComputedRate) RawJSON ¶
func (r ComputedRate) RawJSON() string
Returns the unmodified JSON received from the API
func (*ComputedRate) UnmarshalJSON ¶
func (r *ComputedRate) UnmarshalJSON(data []byte) error
type ComputedRateObject ¶
type ComputedRateObject string
Resource type identifier.
const (
ComputedRateObjectComputedRate ComputedRateObject = "computed_rate"
)
type ConfigInputParam ¶
type ConfigInputParam struct {
// Instructions that define the agent's role and how it should behave.
//
// Sent to the model on every turn of a run, alongside the platform guidance
// OpenMRP adds automatically.
SystemPrompt param.Opt[string] `json:"system_prompt,omitzero"`
// How much randomness the model uses when generating text.
//
// Lower values make the agent's output more repeatable; higher values make it more
// varied.
Temperature param.Opt[float64] `json:"temperature,omitzero"`
// Per-endpoint-tool human-review overrides, keyed by tool slug.
//
// Set a slug to `true` to require human approval before the agent may execute that
// endpoint-tool; the run pauses in `awaiting_approval` until approved via the
// Continue Agent Run endpoint. Slugs omitted from the map do not require review.
EndpointToolReview map[string]bool `json:"endpoint_tool_review,omitzero"`
// API-endpoint tools the agent may discover and use, by slug (e.g.
// `create_account_group`).
//
// These are the tools listed by the List Tools endpoint with category
// `api_endpoint`. The single entry `*` grants the entire endpoint-tool catalog.
// Omit or leave empty to grant none.
EndpointToolSlugs []string `json:"endpoint_tool_slugs,omitzero"`
// Intelligence and cost tier for the agent's reasoning.
//
// Selects how capable (and how expensive) a model the agent uses without pinning a
// specific model, so the agent keeps working as the underlying model catalog
// changes.
//
// - `frontier`: the most capable and most expensive; multi-step planning,
// ambiguous work, tool-heavy workflows.
// - `high`: normal planning, synthesis, and customer-facing reasoning.
// - `balanced`: research, summarization, classification, structured extraction,
// and light tool use.
// - `cheap`: simple transforms, validation, formatting, keyword lookup, and
// routing.
// - `legacy`: older models kept for compatibility and regression comparison; avoid
// unless you specifically need them.
//
// Any of "frontier", "high", "balanced", "cheap", "legacy".
Tier ConfigInputTier `json:"tier,omitzero"`
// Trigger-type-specific settings for agent creation/update requests.
//
// Required contents depend on the agent's `trigger_type`:
//
// - `scheduled`: `cron_schedule` is required.
// - `event`: at least one entry in `event_filters` is required.
// - `manual` and `chat`: no trigger configuration is needed.
TriggerConfig TriggerConfigInputParam `json:"trigger_config,omitzero"`
// contains filtered or unexported fields
}
Agent-level configuration for creation/update requests.
func (ConfigInputParam) MarshalJSON ¶
func (r ConfigInputParam) MarshalJSON() (data []byte, err error)
func (*ConfigInputParam) UnmarshalJSON ¶
func (r *ConfigInputParam) UnmarshalJSON(data []byte) error
type ConfigInputTier ¶
type ConfigInputTier string
Intelligence and cost tier for the agent's reasoning.
Selects how capable (and how expensive) a model the agent uses without pinning a specific model, so the agent keeps working as the underlying model catalog changes.
- `frontier`: the most capable and most expensive; multi-step planning, ambiguous work, tool-heavy workflows.
- `high`: normal planning, synthesis, and customer-facing reasoning.
- `balanced`: research, summarization, classification, structured extraction, and light tool use.
- `cheap`: simple transforms, validation, formatting, keyword lookup, and routing.
- `legacy`: older models kept for compatibility and regression comparison; avoid unless you specifically need them.
const ( ConfigInputTierFrontier ConfigInputTier = "frontier" ConfigInputTierHigh ConfigInputTier = "high" ConfigInputTierBalanced ConfigInputTier = "balanced" ConfigInputTierCheap ConfigInputTier = "cheap" ConfigInputTierLegacy ConfigInputTier = "legacy" )
type Consumption ¶
type Consumption struct {
// Consumption ID.
ID string `json:"id" api:"required"`
// An entry in your catalog: something you sell, consume, or build with.
ConsumedItem Item `json:"consumed_item" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Instructions for how this material is consumed.
Instructions string `json:"instructions" api:"required"`
// Resource type identifier.
//
// Any of "consumption".
Object ConsumptionObject `json:"object" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
Quantity Quantity `json:"quantity" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
WasteQuantity Quantity `json:"waste_quantity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ConsumedItem respjson.Field
CreatedAt respjson.Field
Instructions respjson.Field
Object respjson.Field
Quantity respjson.Field
UpdatedAt respjson.Field
WasteQuantity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Material consumed by a production step.
Each consumption records one input item and how much of it the step uses. Consumptions also determine the production flow: when another step produces the consumed item, the two steps are linked upstream/downstream automatically.
The quantities are stated against the step's own output, so a step producing 100 pairs and consuming 5 kg of yarn needs 5 kg per 100 pairs. Material requirements for an order scale every consumption in the flow by how much of the finished item is wanted.
func (Consumption) RawJSON ¶
func (r Consumption) RawJSON() string
Returns the unmodified JSON received from the API
func (*Consumption) UnmarshalJSON ¶
func (r *Consumption) UnmarshalJSON(data []byte) error
type ConsumptionObject ¶
type ConsumptionObject string
Resource type identifier.
const (
ConsumptionObjectConsumption ConsumptionObject = "consumption"
)
type ContactMatch ¶
type ContactMatch struct {
// Contact match ID.
//
// This is the matched account user's ID, so the same value also appears as
// `account_user.id`.
ID string `json:"id" api:"required"`
// An organization on OpenMRP, including its branding and customer portal
// sub-resources.
//
// Your own account and any customer or supplier account you trade with are both
// represented by this object.
Account Account `json:"account" api:"required"`
// A user's membership in an account, carrying the account-specific status, role,
// and department.
//
// Profile fields (name, email, username, image URL) live on the `user`
// sub-resource, which is shared across every account the user belongs to.
AccountUser AccountUser `json:"account_user" api:"required"`
// The email address that was matched.
Email string `json:"email" api:"required"`
// Resource type identifier.
//
// Any of "contact_match".
Object ContactMatchObject `json:"object" api:"required"`
// How you relate to the account this contact belongs to.
//
// - `customer`: the account is one of your customers.
// - `supplier`: the account is one of your suppliers.
// - `self`: the account is your own.
//
// Any of "customer", "supplier", "self".
Relationship ContactMatchRelationship `json:"relationship" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Account respjson.Field
AccountUser respjson.Field
Email respjson.Field
Object respjson.Field
Relationship respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A contact found by email on an account you have a relationship with — one of your customers, your suppliers, or your own account.
The same email can be a contact on many accounts across the platform; only accounts you relate to are returned.
Only active people are matched — someone who has been disabled or removed on an account never produces a match for that account.
func (ContactMatch) RawJSON ¶
func (r ContactMatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContactMatch) UnmarshalJSON ¶
func (r *ContactMatch) UnmarshalJSON(data []byte) error
type ContactMatchObject ¶
type ContactMatchObject string
Resource type identifier.
const (
ContactMatchObjectContactMatch ContactMatchObject = "contact_match"
)
type ContactMatchRelationship ¶
type ContactMatchRelationship string
How you relate to the account this contact belongs to.
- `customer`: the account is one of your customers. - `supplier`: the account is one of your suppliers. - `self`: the account is your own.
const ( ContactMatchRelationshipCustomer ContactMatchRelationship = "customer" ContactMatchRelationshipSupplier ContactMatchRelationship = "supplier" ContactMatchRelationshipSelf ContactMatchRelationship = "self" )
type ContinueRunRequestParam ¶
type ContinueRunRequestParam struct {
// Message to send to the agent as the next turn of the run.
//
// It accompanies any approval or denial in the same request, so use it to tell the
// agent how to proceed with what you just allowed or blocked.
Message string `json:"message" api:"required"`
// Tool-call IDs (the `tool_use_id` of individual blocked calls) to approve.
//
// Use this instead of `approved_tool_slugs` to approve ONE specific call when
// several pending calls share the same tool slug — approving by slug would approve
// all of them. Approvals are one-time.
ApprovedToolCallIDs []string `json:"approved_tool_call_ids,omitzero"`
// Slugs of tools whose pending calls should be approved.
//
// Approves every call currently pending review for each named tool. Approval is
// one-time — the next call to the same tool pauses for review again. Tools you do
// not name are left pending, and the run resumes without them.
ApprovedToolSlugs []string `json:"approved_tool_slugs,omitzero"`
// Tool-call IDs (the `tool_use_id` of individual blocked calls) to deny.
//
// Per-call counterpart of `rejected_tool_slugs`, letting you deny one specific
// call among several that share a slug. Each denied call is answered with a
// "denied by user" result and the run continues.
RejectedToolCallIDs []string `json:"rejected_tool_call_ids,omitzero"`
// Slugs of tools whose pending calls should be denied.
//
// The run keeps going: each denied call is answered with a "denied by user" result
// so the agent proceeds without it, instead of cancelling the run. A single resume
// may both approve and reject different tools.
RejectedToolSlugs []string `json:"rejected_tool_slugs,omitzero"`
// contains filtered or unexported fields
}
Request to resume a paused agent run.
The property Message is required.
func (ContinueRunRequestParam) MarshalJSON ¶
func (r ContinueRunRequestParam) MarshalJSON() (data []byte, err error)
func (*ContinueRunRequestParam) UnmarshalJSON ¶
func (r *ContinueRunRequestParam) UnmarshalJSON(data []byte) error
type Conversation ¶
type Conversation struct {
// Conversation ID.
ID string `json:"id" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Assignee Actor `json:"assignee" api:"required"`
// Whether this is a team-only conversation (`internal`) or a customer-facing case
// (`customer`).
//
// A customer never sees an `internal` conversation, even one that is about them;
// within a `customer` case they see only the messages that were sent to them, not
// the team's internal notes on the case.
//
// Any of "internal", "customer".
Audience ConversationAudience `json:"audience" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A reusable roster: a named set of members (users and/or agents) that seeds new
// conversations.
//
// Starting a conversation from a group snapshots its current members into that
// conversation, so the same group can back many conversations (each with its own
// title); later edits to the group never change conversations already created from
// it.
Group MessagingGroup `json:"group" api:"required"`
// A chat message within a conversation.
//
// One resource covers every stage of a message's life: a delivered timeline
// message, a message queued for a future send, and a customer-reply draft awaiting
// approval. Read `status` to tell them apart.
LastMessage *Message `json:"last_message" api:"required"`
// When the most recent message was sent.
LastMessageAt time.Time `json:"last_message_at" api:"required" format:"date-time"`
// Whether the conversation is under legal hold.
//
// While held, the conversation is exempt from automatic retention purging and from
// redaction until the hold is released.
//
// Any of "released", "held".
LegalHold ConversationLegalHold `json:"legal_hold" api:"required"`
// Resource type identifier.
//
// Any of "conversation".
Object ConversationObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Participants ListConversationParticipant `json:"participants" api:"required"`
// The conversation's state from the caller's point of view.
//
// - `active`: a normal, visible conversation.
// - `archived`: archived for the whole account.
// - `hidden`: the caller dismissed the conversation from their own list while
// everyone else still sees it, which takes precedence over an account-level
// archive.
//
// Any of "active", "archived", "hidden".
Status ConversationStatus `json:"status" api:"required"`
// The display title of a group conversation.
//
// Direct messages carry no stored title; clients derive one from the participants.
Title string `json:"title" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Topic Entity `json:"topic" api:"required"`
// What kind of conversation this is.
//
// - `direct_message`: a 1:1 thread between two users.
// - `group`: a named thread with multiple user or agent members (including
// customer-facing support cases).
// - `system`: a system channel that delivers automated account alerts.
//
// Any of "direct_message", "group", "system".
Type ConversationType `json:"type" api:"required"`
// Number of messages the caller has not yet read.
Unread int64 `json:"unread" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// The triage lane of a customer-facing case.
//
// Only conversations with a `customer` audience have a triage lane. It drives the
// support inbox and is independent of `status`, which is about visibility rather
// than progress.
//
// - `new`: opened but not yet triaged.
// - `open`: actively being worked.
// - `waiting_internal`: blocked on the internal team.
// - `waiting_external`: blocked on an external reply.
// - `needs_approval`: a drafted reply is awaiting human approval.
// - `resolved`: closed out.
//
// Any of "new", "open", "waiting_internal", "waiting_external", "needs_approval",
// "resolved".
WorkflowStatus ConversationWorkflowStatus `json:"workflow_status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Assignee respjson.Field
Audience respjson.Field
CreatedAt respjson.Field
Group respjson.Field
LastMessage respjson.Field
LastMessageAt respjson.Field
LegalHold respjson.Field
Object respjson.Field
Participants respjson.Field
Status respjson.Field
Title respjson.Field
Topic respjson.Field
Type respjson.Field
Unread respjson.Field
UpdatedAt respjson.Field
WorkflowStatus respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A conversation thread the caller participates in.
func (Conversation) RawJSON ¶
func (r Conversation) RawJSON() string
Returns the unmodified JSON received from the API
func (*Conversation) UnmarshalJSON ¶
func (r *Conversation) UnmarshalJSON(data []byte) error
type ConversationAudience ¶
type ConversationAudience string
Whether this is a team-only conversation (`internal`) or a customer-facing case (`customer`).
A customer never sees an `internal` conversation, even one that is about them; within a `customer` case they see only the messages that were sent to them, not the team's internal notes on the case.
const ( ConversationAudienceInternal ConversationAudience = "internal" ConversationAudienceCustomer ConversationAudience = "customer" )
type ConversationLegalHold ¶
type ConversationLegalHold string
Whether the conversation is under legal hold.
While held, the conversation is exempt from automatic retention purging and from redaction until the hold is released.
const ( ConversationLegalHoldReleased ConversationLegalHold = "released" ConversationLegalHoldHeld ConversationLegalHold = "held" )
type ConversationLink ¶
type ConversationLink struct {
// Conversation link ID.
ID string `json:"id" api:"required"`
// A conversation thread the caller participates in.
Conversation Conversation `json:"conversation" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "conversation_link".
Object ConversationLinkObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Conversation respjson.Field
CreatedAt respjson.Field
Object respjson.Field
Resource respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A reference from a conversation to a business record it concerns, such as an order, invoice, shipment, or customer.
Links sit alongside the conversation's primary `topic` anchor, so one thread can reference several records. Listing conversations by business record matches the topic anchor and these links alike, which is what surfaces a conversation on the record's own page.
func (ConversationLink) RawJSON ¶
func (r ConversationLink) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConversationLink) UnmarshalJSON ¶
func (r *ConversationLink) UnmarshalJSON(data []byte) error
type ConversationLinkObject ¶
type ConversationLinkObject string
Resource type identifier.
const (
ConversationLinkObjectConversationLink ConversationLinkObject = "conversation_link"
)
type ConversationObject ¶
type ConversationObject string
Resource type identifier.
const (
ConversationObjectConversation ConversationObject = "conversation"
)
type ConversationParticipant ¶
type ConversationParticipant struct {
// Participant ID.
ID string `json:"id" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// For agent participants with a keyword or mention policy, the keywords that
// trigger it.
//
// Matching is case-insensitive and looks anywhere in the message body: under
// `keyword` the bare word is matched, under `mention` it must appear as
// `@keyword`. Replying directly to one of the agent's own messages always reaches
// it, so an agent with no keywords still answers replies but nothing else.
AgentTriggerKeywords []string `json:"agent_trigger_keywords" api:"required"`
// For agent participants, when the agent is invoked in response to messages.
//
// - `mention`: only when the agent is @mentioned.
// - `keyword`: when a message contains one of the agent's trigger keywords.
// - `always`: on every human message in the conversation.
//
// Any of "mention", "keyword", "always".
AgentTriggerPolicy ConversationParticipantAgentTriggerPolicy `json:"agent_trigger_policy" api:"required"`
// The participant's membership in the conversation.
//
// - `active`: currently a member.
// - `left`: voluntarily left the conversation.
// - `removed`: removed by an admin.
// - `hidden`: still a member but has hidden the conversation from their own list.
//
// Membership records are kept rather than deleted, so re-adding someone who left
// or was removed reactivates their original record and their earlier messages stay
// attributed to them.
//
// Any of "active", "left", "removed", "hidden".
Membership ConversationParticipantMembership `json:"membership" api:"required"`
// The participant's notification preference for the conversation.
//
// - `unmuted`: receives notifications for new messages.
// - `muted`: new-message notifications are suppressed, though a direct @mention
// still raises an in-app alert (never an email), and the conversation still
// counts toward the unread total.
//
// Any of "unmuted", "muted".
Notifications ConversationParticipantNotifications `json:"notifications" api:"required"`
// Resource type identifier.
//
// Any of "conversation_participant".
Object ConversationParticipantObject `json:"object" api:"required"`
// A participant's read position in a conversation — the basis for read receipts
// ("who has seen this").
ReadCursor ReadCursor `json:"read_cursor" api:"required"`
// The participant's permission level in the conversation.
//
// - `owner`: can rename or delete the conversation and manage its members and
// their roles.
// - `admin`: can add or remove members and rename the conversation.
// - `member`: can post, react, mute, and leave.
// - `viewer`: read-only access.
//
// Any of "owner", "admin", "member", "viewer".
Role ConversationParticipantRole `json:"role" api:"required"`
// The kind of participant.
//
// - `user`: an account user (a teammate).
// - `agent`: an AI agent.
// - `system`: the system itself, which posts automated messages.
// - `customer`: an external customer in a support case.
//
// Any of "user", "agent", "system", "customer".
Type ConversationParticipantType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Actor respjson.Field
AgentTriggerKeywords respjson.Field
AgentTriggerPolicy respjson.Field
Membership respjson.Field
Notifications respjson.Field
Object respjson.Field
ReadCursor respjson.Field
Role respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A participant (membership) in a conversation.
func (ConversationParticipant) RawJSON ¶
func (r ConversationParticipant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ConversationParticipant) UnmarshalJSON ¶
func (r *ConversationParticipant) UnmarshalJSON(data []byte) error
type ConversationParticipantAgentTriggerPolicy ¶
type ConversationParticipantAgentTriggerPolicy string
For agent participants, when the agent is invoked in response to messages.
- `mention`: only when the agent is @mentioned. - `keyword`: when a message contains one of the agent's trigger keywords. - `always`: on every human message in the conversation.
const ( ConversationParticipantAgentTriggerPolicyMention ConversationParticipantAgentTriggerPolicy = "mention" ConversationParticipantAgentTriggerPolicyKeyword ConversationParticipantAgentTriggerPolicy = "keyword" ConversationParticipantAgentTriggerPolicyAlways ConversationParticipantAgentTriggerPolicy = "always" )
type ConversationParticipantMembership ¶
type ConversationParticipantMembership string
The participant's membership in the conversation.
- `active`: currently a member. - `left`: voluntarily left the conversation. - `removed`: removed by an admin. - `hidden`: still a member but has hidden the conversation from their own list.
Membership records are kept rather than deleted, so re-adding someone who left or was removed reactivates their original record and their earlier messages stay attributed to them.
const ( ConversationParticipantMembershipActive ConversationParticipantMembership = "active" ConversationParticipantMembershipLeft ConversationParticipantMembership = "left" ConversationParticipantMembershipRemoved ConversationParticipantMembership = "removed" ConversationParticipantMembershipHidden ConversationParticipantMembership = "hidden" )
type ConversationParticipantNotifications ¶
type ConversationParticipantNotifications string
The participant's notification preference for the conversation.
- `unmuted`: receives notifications for new messages.
- `muted`: new-message notifications are suppressed, though a direct @mention still raises an in-app alert (never an email), and the conversation still counts toward the unread total.
const ( ConversationParticipantNotificationsUnmuted ConversationParticipantNotifications = "unmuted" ConversationParticipantNotificationsMuted ConversationParticipantNotifications = "muted" )
type ConversationParticipantObject ¶
type ConversationParticipantObject string
Resource type identifier.
const (
ConversationParticipantObjectConversationParticipant ConversationParticipantObject = "conversation_participant"
)
type ConversationParticipantRole ¶
type ConversationParticipantRole string
The participant's permission level in the conversation.
- `owner`: can rename or delete the conversation and manage its members and their roles.
- `admin`: can add or remove members and rename the conversation.
- `member`: can post, react, mute, and leave.
- `viewer`: read-only access.
const ( ConversationParticipantRoleOwner ConversationParticipantRole = "owner" ConversationParticipantRoleAdmin ConversationParticipantRole = "admin" ConversationParticipantRoleMember ConversationParticipantRole = "member" ConversationParticipantRoleViewer ConversationParticipantRole = "viewer" )
type ConversationParticipantType ¶
type ConversationParticipantType string
The kind of participant.
- `user`: an account user (a teammate). - `agent`: an AI agent. - `system`: the system itself, which posts automated messages. - `customer`: an external customer in a support case.
const ( ConversationParticipantTypeUser ConversationParticipantType = "user" ConversationParticipantTypeAgent ConversationParticipantType = "agent" ConversationParticipantTypeSystem ConversationParticipantType = "system" ConversationParticipantTypeCustomer ConversationParticipantType = "customer" )
type ConversationStatus ¶
type ConversationStatus string
The conversation's state from the caller's point of view.
- `active`: a normal, visible conversation.
- `archived`: archived for the whole account.
- `hidden`: the caller dismissed the conversation from their own list while everyone else still sees it, which takes precedence over an account-level archive.
const ( ConversationStatusActive ConversationStatus = "active" ConversationStatusArchived ConversationStatus = "archived" ConversationStatusHidden ConversationStatus = "hidden" )
type ConversationType ¶
type ConversationType string
What kind of conversation this is.
- `direct_message`: a 1:1 thread between two users.
- `group`: a named thread with multiple user or agent members (including customer-facing support cases).
- `system`: a system channel that delivers automated account alerts.
const ( ConversationTypeDirectMessage ConversationType = "direct_message" ConversationTypeGroup ConversationType = "group" ConversationTypeSystem ConversationType = "system" )
type ConversationWorkflowStatus ¶
type ConversationWorkflowStatus string
The triage lane of a customer-facing case.
Only conversations with a `customer` audience have a triage lane. It drives the support inbox and is independent of `status`, which is about visibility rather than progress.
- `new`: opened but not yet triaged. - `open`: actively being worked. - `waiting_internal`: blocked on the internal team. - `waiting_external`: blocked on an external reply. - `needs_approval`: a drafted reply is awaiting human approval. - `resolved`: closed out.
const ( ConversationWorkflowStatusNew ConversationWorkflowStatus = "new" ConversationWorkflowStatusOpen ConversationWorkflowStatus = "open" ConversationWorkflowStatusWaitingInternal ConversationWorkflowStatus = "waiting_internal" ConversationWorkflowStatusWaitingExternal ConversationWorkflowStatus = "waiting_external" ConversationWorkflowStatusNeedsApproval ConversationWorkflowStatus = "needs_approval" ConversationWorkflowStatusResolved ConversationWorkflowStatus = "resolved" )
type CoreActionEmailRecordParams ¶
type CoreActionEmailRecordParams struct {
// Request to email a record to its configured recipients.
EmailRecordRequest EmailRecordRequestParam
// contains filtered or unexported fields
}
func (CoreActionEmailRecordParams) MarshalJSON ¶
func (r CoreActionEmailRecordParams) MarshalJSON() (data []byte, err error)
func (*CoreActionEmailRecordParams) UnmarshalJSON ¶
func (r *CoreActionEmailRecordParams) UnmarshalJSON(data []byte) error
type CoreActionEmailRecordResponse ¶
type CoreActionEmailRecordResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CoreActionEmailRecordResponse) RawJSON ¶
func (r CoreActionEmailRecordResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CoreActionEmailRecordResponse) UnmarshalJSON ¶
func (r *CoreActionEmailRecordResponse) UnmarshalJSON(data []byte) error
type CoreActionService ¶
type CoreActionService struct {
// contains filtered or unexported fields
}
Utility action endpoints for checking duplicates and emailing records.
CoreActionService contains methods and other services that help with interacting with the openmrp 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 NewCoreActionService method instead.
func NewCoreActionService ¶
func NewCoreActionService(opts ...option.RequestOption) (r CoreActionService)
NewCoreActionService 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 (*CoreActionService) EmailRecord ¶
func (r *CoreActionService) EmailRecord(ctx context.Context, body CoreActionEmailRecordParams, opts ...option.RequestOption) (res *CoreActionEmailRecordResponse, err error)
Emails a record (invoice, sales order, or purchase order) to its configured recipients and marks the record as sent.
Delivery is asynchronous: the endpoint returns `202 Accepted` once the email is queued, so a `202` means the send was accepted, not that it reached the recipients. If the record has no configured recipients the request still succeeds and nothing is sent; in that case a sales order or purchase order is also left unmarked, while an invoice is still marked as sent.
This endpoint requires the permissions: `invoices:read`, `sales_orders:read`, `purchase_orders:read`.
type CoreAddressActionService ¶
type CoreAddressActionService struct {
// contains filtered or unexported fields
}
Autocomplete, look up details, and validate addresses.
CoreAddressActionService contains methods and other services that help with interacting with the openmrp 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 NewCoreAddressActionService method instead.
func NewCoreAddressActionService ¶
func NewCoreAddressActionService(opts ...option.RequestOption) (r CoreAddressActionService)
NewCoreAddressActionService 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 (*CoreAddressActionService) Validate ¶
func (r *CoreAddressActionService) Validate(ctx context.Context, body CoreAddressActionValidateParams, opts ...option.RequestOption) (res *ValidatedAddress, err error)
Checks an address against an address validation service and returns a standardized version of it.
Nothing is created or modified. Use this before creating or updating an address to confirm it is complete and to pick up corrected values. When the service can standardize the address, `formatted_address` and `components` carry the corrected values, and `validation_messages` explains anything that was inferred, replaced, or could not be confirmed.
type CoreAddressActionValidateParams ¶
type CoreAddressActionValidateParams struct {
// Request to validate an address.
ValidateAddressRequest ValidateAddressRequestParam
// contains filtered or unexported fields
}
func (CoreAddressActionValidateParams) MarshalJSON ¶
func (r CoreAddressActionValidateParams) MarshalJSON() (data []byte, err error)
func (*CoreAddressActionValidateParams) UnmarshalJSON ¶
func (r *CoreAddressActionValidateParams) UnmarshalJSON(data []byte) error
type CoreAddressGetSuggestionsParams ¶
type CoreAddressGetSuggestionsParams struct {
// Partial address text to generate suggestions for.
Input string `query:"input" api:"required" json:"-"`
// Opaque token that groups a series of related autocomplete requests into a single
// session.
//
// Reuse the same token for each keystroke of one address entry, and again when you
// retrieve the details of the suggestion the user picks, so the whole entry is
// treated as one lookup.
SessionToken param.Opt[string] `query:"session_token,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreAddressGetSuggestionsParams) URLQuery ¶
func (r CoreAddressGetSuggestionsParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreAddressGetSuggestionsParams's query parameters as `url.Values`.
type CoreAddressService ¶
type CoreAddressService struct {
// Autocomplete, look up details, and validate addresses.
Actions CoreAddressActionService
// contains filtered or unexported fields
}
Autocomplete, look up details, and validate addresses.
CoreAddressService contains methods and other services that help with interacting with the openmrp 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 NewCoreAddressService method instead.
func NewCoreAddressService ¶
func NewCoreAddressService(opts ...option.RequestOption) (r CoreAddressService)
NewCoreAddressService 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 (*CoreAddressService) GetSuggestions ¶
func (r *CoreAddressService) GetSuggestions(ctx context.Context, query CoreAddressGetSuggestionsParams, opts ...option.RequestOption) (res *ListAddressSuggestion, err error)
Returns address suggestions for partial address text, for use in type-ahead address entry.
Only street addresses are suggested; cities, regions, and business listings are not returned. Suggestions are lookup results, not saved addresses in your account. Pass a suggestion's `id` to the address details endpoint to get the full parsed address.
type CoreAnalyticsService ¶
type CoreAnalyticsService struct {
// contains filtered or unexported fields
}
Analyze sales, orders, manufacturing, materials, and other business metrics.
CoreAnalyticsService contains methods and other services that help with interacting with the openmrp 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 NewCoreAnalyticsService method instead.
func NewCoreAnalyticsService ¶
func NewCoreAnalyticsService(opts ...option.RequestOption) (r CoreAnalyticsService)
NewCoreAnalyticsService 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 (*CoreAnalyticsService) UpdateDeliveryPerformance ¶
func (r *CoreAnalyticsService) UpdateDeliveryPerformance(ctx context.Context, body CoreAnalyticsUpdateDeliveryPerformanceParams, opts ...option.RequestOption) (res *AnalyzeDeliveryPerformanceResponse, err error)
Returns how reliably promised delivery dates were met.
Orders are counted in the period their promise came due, not the period they shipped — an order promised in March and shipped in May is March's miss. On time means the first shipment left on or before the promised date, because the promise is that the order starts moving by then; judging on the last shipment would fail an order the customer received on time in two boxes. On time in full adds that the whole ordered quantity was packed.
The denominator is orders that were due, not orders that shipped, so an order past its date and still unshipped counts against the rate rather than being held back until it moves. Excluding open orders would let a plant with a growing late backlog report perfect delivery.
Only orders carrying a ship-by commitment participate. An order with no commitment cannot be late, and counting it as on time would inflate the rate with orders nobody promised anything about — `uncommitted_order_count` says how many were excluded, so the gap is visible rather than silent.
Every rate is null rather than zero when nothing was due, and average lateness is measured over late orders only.
The same window is also returned sliced by customer, customer group, product line, and the rule each ship-by date came from — each ordered worst-first, and each derived from the same set of orders as the headline so a drilldown always adds up to it. `by_product_line` is the one exception to that: an order spanning two lines is counted under both, because a late order is late for every line on it.
Every filter is empty-means-all and they combine with AND. They narrow `uncommitted_order_count` too, so the excluded count always describes the same slice of the order book the rates do.
This endpoint requires the permission: `sales_orders:read`.
func (*CoreAnalyticsService) UpdateOee ¶
func (r *CoreAnalyticsService) UpdateOee(ctx context.Context, body CoreAnalyticsUpdateOeeParams, opts ...option.RequestOption) (res *AnalyzeOeeResponse, err error)
Returns Overall Equipment Effectiveness (OEE) metrics by department.
Availability is the scheduled machine time the plant actually planned, net of logged machine downtime — the planned time comes from the published production schedule (or `planned_time` when supplied), and a department the schedule never covered has no availability rather than a fabricated one. Departments with `has_downtime_data` false have no downtime measured, and their ratios are returned as null rather than as 100%.
This endpoint requires the permission: `machine_downtime:read`.
func (*CoreAnalyticsService) UpdateOeeTrend ¶
func (r *CoreAnalyticsService) UpdateOeeTrend(ctx context.Context, body CoreAnalyticsUpdateOeeTrendParams, opts ...option.RequestOption) (res *AnalyzeOeeTrendResponse, err error)
Returns Overall Equipment Effectiveness (OEE) by production week.
Each period carries the same four terms `/v1/core/analytics/oee` reports for a single window, rolled up across departments and weighted by seconds rather than averaged, so a department that ran for an hour does not weigh as heavily as one that ran all week. Weeks start on Monday, and the first and last period of a window are clipped to the window itself.
Only departments with scheduled time take part: a department with no machines has no availability, so counting its output in quality would leave the three terms describing different plants. Compare two windows by calling this twice.
This endpoint requires the permission: `machine_downtime:read`.
func (*CoreAnalyticsService) UpdateScheduleAttainment ¶
func (r *CoreAnalyticsService) UpdateScheduleAttainment(ctx context.Context, body CoreAnalyticsUpdateScheduleAttainmentParams, opts ...option.RequestOption) (res *AnalyzeScheduleAttainmentResponse, err error)
Returns actual production measured against the plan that was live at the time.
The baseline for each week is the version that froze it — the plan committed for that week — so a version published after the week ended cannot rewrite a week the floor has already worked, while a plan published on the week's own start day still counts as the plan it froze. `baseline_schedules` names the versions used.
Two ratios are returned because either alone misleads: `attainment_pct` caps each campaign at what was asked for, so over-building one SKU cannot hide a miss on another, while `output_ratio_pct` is uncapped and is what reveals over-production. Production with no matching planned campaign is reported as `unplanned_quantity` rather than discarded — that number is the clearest signal a schedule is being worked around.
Every ratio is null rather than zero when nothing was planned, and `has_baseline` is false when nothing was ever published over the period.
This endpoint requires the permission: `production_schedules:read`.
type CoreAnalyticsUpdateDeliveryPerformanceParams ¶
type CoreAnalyticsUpdateDeliveryPerformanceParams struct {
// AnalyzeDeliveryPerformanceRequest is the request to measure promises against
// shipments.
AnalyzeDeliveryPerformanceRequest AnalyzeDeliveryPerformanceRequestParam
// contains filtered or unexported fields
}
func (CoreAnalyticsUpdateDeliveryPerformanceParams) MarshalJSON ¶
func (r CoreAnalyticsUpdateDeliveryPerformanceParams) MarshalJSON() (data []byte, err error)
func (*CoreAnalyticsUpdateDeliveryPerformanceParams) UnmarshalJSON ¶
func (r *CoreAnalyticsUpdateDeliveryPerformanceParams) UnmarshalJSON(data []byte) error
type CoreAnalyticsUpdateOeeParams ¶
type CoreAnalyticsUpdateOeeParams struct {
// AnalyzeOeeRequest is the request to analyze Overall Equipment Effectiveness
// (OEE).
AnalyzeOeeRequest AnalyzeOeeRequestParam
// contains filtered or unexported fields
}
func (CoreAnalyticsUpdateOeeParams) MarshalJSON ¶
func (r CoreAnalyticsUpdateOeeParams) MarshalJSON() (data []byte, err error)
func (*CoreAnalyticsUpdateOeeParams) UnmarshalJSON ¶
func (r *CoreAnalyticsUpdateOeeParams) UnmarshalJSON(data []byte) error
type CoreAnalyticsUpdateOeeTrendParams ¶
type CoreAnalyticsUpdateOeeTrendParams struct {
// AnalyzeOeeTrendRequest is the request to analyze Overall Equipment Effectiveness
// (OEE) over time.
AnalyzeOeeTrendRequest AnalyzeOeeTrendRequestParam
// contains filtered or unexported fields
}
func (CoreAnalyticsUpdateOeeTrendParams) MarshalJSON ¶
func (r CoreAnalyticsUpdateOeeTrendParams) MarshalJSON() (data []byte, err error)
func (*CoreAnalyticsUpdateOeeTrendParams) UnmarshalJSON ¶
func (r *CoreAnalyticsUpdateOeeTrendParams) UnmarshalJSON(data []byte) error
type CoreAnalyticsUpdateScheduleAttainmentParams ¶
type CoreAnalyticsUpdateScheduleAttainmentParams struct {
// AnalyzeScheduleAttainmentRequest is the request to measure production against
// plan.
AnalyzeScheduleAttainmentRequest AnalyzeScheduleAttainmentRequestParam
// contains filtered or unexported fields
}
func (CoreAnalyticsUpdateScheduleAttainmentParams) MarshalJSON ¶
func (r CoreAnalyticsUpdateScheduleAttainmentParams) MarshalJSON() (data []byte, err error)
func (*CoreAnalyticsUpdateScheduleAttainmentParams) UnmarshalJSON ¶
func (r *CoreAnalyticsUpdateScheduleAttainmentParams) UnmarshalJSON(data []byte) error
type CoreAuditEventGetParams ¶
type CoreAuditEventGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account", "actor", "changes", "metadata", "request".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreAuditEventGetParams) URLQuery ¶
func (r CoreAuditEventGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreAuditEventGetParams's query parameters as `url.Values`.
type CoreAuditEventListParams ¶
type CoreAuditEventListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Restricts results to audit events on or before this timestamp.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// ID of the root record whose history tree to return.
//
// Only applied when paired with `root_resource_type`.
RootResourceID param.Opt[string] `query:"root_resource_id,omitzero" json:"-"`
// Restricts results to audit events on or after this timestamp.
//
// Defaults to 24 hours before `ends_at`, or before now when `ends_at` is also
// omitted, unless `resource_ids` or the root resource is given — a record's
// history is returned whole. Pass an earlier timestamp to search further back.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter by the mutation type recorded on the event.
//
// Any of "create", "update", "upsert", "delete", "restore", "archive", "approve",
// "deny".
Actions []string `query:"actions,omitzero" json:"-"`
// Filter by the _acting_ account: the account that performed the mutation.
//
// Results are always scoped to events where your account is either the acting
// account or the target account; this narrows that set to specific acting accounts
// — for example a specific customer's account that mutated a resource on your
// account.
ActorAccountIDs []string `query:"actor_account_ids,omitzero" json:"-"`
// Filter by the actor identifier.
//
// Matches the event's `actor.id`: a user ID for `user` actors, an API key ID for
// `api_key` actors, or an agent ID for `agent` actors.
ActorIDs []string `query:"actor_ids,omitzero" json:"-"`
// Filter by the actor type.
//
// Events are recorded for actors of type `user`, `api_key`, and `agent` — the last
// covering changes an OpenMRP agent made on your account's behalf.
//
// Any of "user", "api_key", "agent", "group".
ActorTypes []string `query:"actor_types,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account", "actor", "changes", "metadata", "request".
Include []string `query:"include,omitzero" json:"-"`
// Filter by the audited resource IDs.
ResourceIDs []string `query:"resource_ids,omitzero" json:"-"`
// Filter by the resource type of the audited entity.
//
// The full set of valid values is available from the List Audit Event Resource
// Types endpoint.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
ResourceTypes []string `query:"resource_types,omitzero" json:"-"`
// Scope results to a root record's entire history tree.
//
// Returns every event whose root resource matches, covering the root record itself
// and all of its descendants — for example a sales order together with its lines,
// picks, shipments, and invoices. Both `root_resource_type` and `root_resource_id`
// must be supplied together; supplying only one has no effect.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
RootResourceType CoreAuditEventListParamsRootResourceType `query:"root_resource_type,omitzero" json:"-"`
// Filter by the _target_ account the mutation was performed against (the event's
// `account`).
//
// Results are always scoped to events where your account is either the acting
// account or the target account; this narrows that set to specific target accounts
// — for example a specific customer's or supplier's account.
TargetAccountIDs []string `query:"target_account_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreAuditEventListParams) URLQuery ¶
func (r CoreAuditEventListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreAuditEventListParams's query parameters as `url.Values`.
type CoreAuditEventListParamsRootResourceType ¶
type CoreAuditEventListParamsRootResourceType string
Scope results to a root record's entire history tree.
Returns every event whose root resource matches, covering the root record itself and all of its descendants — for example a sales order together with its lines, picks, shipments, and invoices. Both `root_resource_type` and `root_resource_id` must be supplied together; supplying only one has no effect.
const ( CoreAuditEventListParamsRootResourceTypeAccount CoreAuditEventListParamsRootResourceType = "account" CoreAuditEventListParamsRootResourceTypeActor CoreAuditEventListParamsRootResourceType = "actor" CoreAuditEventListParamsRootResourceTypeEntity CoreAuditEventListParamsRootResourceType = "entity" CoreAuditEventListParamsRootResourceTypeRecord CoreAuditEventListParamsRootResourceType = "record" CoreAuditEventListParamsRootResourceTypeFreight CoreAuditEventListParamsRootResourceType = "freight" CoreAuditEventListParamsRootResourceTypeCommitment CoreAuditEventListParamsRootResourceType = "commitment" CoreAuditEventListParamsRootResourceTypeSalesOrderTotals CoreAuditEventListParamsRootResourceType = "sales_order_totals" CoreAuditEventListParamsRootResourceTypeSalesOrderStageTotal CoreAuditEventListParamsRootResourceType = "sales_order_stage_total" CoreAuditEventListParamsRootResourceTypeSalesOrderRelated CoreAuditEventListParamsRootResourceType = "sales_order_related" CoreAuditEventListParamsRootResourceTypeOrderContact CoreAuditEventListParamsRootResourceType = "order_contact" CoreAuditEventListParamsRootResourceTypeUser CoreAuditEventListParamsRootResourceType = "user" CoreAuditEventListParamsRootResourceTypeAddress CoreAuditEventListParamsRootResourceType = "address" CoreAuditEventListParamsRootResourceTypeAPIKey CoreAuditEventListParamsRootResourceType = "api_key" CoreAuditEventListParamsRootResourceTypeCreatedAPIKey CoreAuditEventListParamsRootResourceType = "created_api_key" CoreAuditEventListParamsRootResourceTypeRefreshToken CoreAuditEventListParamsRootResourceType = "refresh_token" CoreAuditEventListParamsRootResourceTypeList CoreAuditEventListParamsRootResourceType = "list" CoreAuditEventListParamsRootResourceTypeSandbox CoreAuditEventListParamsRootResourceType = "sandbox" CoreAuditEventListParamsRootResourceTypeRegistrationSession CoreAuditEventListParamsRootResourceType = "registration_session" CoreAuditEventListParamsRootResourceTypePricingPlan CoreAuditEventListParamsRootResourceType = "pricing_plan" CoreAuditEventListParamsRootResourceTypeAccountPlan CoreAuditEventListParamsRootResourceType = "account_plan" CoreAuditEventListParamsRootResourceTypePlanChange CoreAuditEventListParamsRootResourceType = "plan_change" CoreAuditEventListParamsRootResourceTypeEnterpriseInquiry CoreAuditEventListParamsRootResourceType = "enterprise_inquiry" CoreAuditEventListParamsRootResourceTypeRequestLog CoreAuditEventListParamsRootResourceType = "request_log" CoreAuditEventListParamsRootResourceTypeAuditEvent CoreAuditEventListParamsRootResourceType = "audit_event" CoreAuditEventListParamsRootResourceTypeAuditFieldChange CoreAuditEventListParamsRootResourceType = "audit_field_change" CoreAuditEventListParamsRootResourceTypeRole CoreAuditEventListParamsRootResourceType = "role" CoreAuditEventListParamsRootResourceTypeUnit CoreAuditEventListParamsRootResourceType = "unit" CoreAuditEventListParamsRootResourceTypeAccountAffiliation CoreAuditEventListParamsRootResourceType = "account_affiliation" CoreAuditEventListParamsRootResourceTypeAgentDefinition CoreAuditEventListParamsRootResourceType = "agent_definition" CoreAuditEventListParamsRootResourceTypeAvailableTool CoreAuditEventListParamsRootResourceType = "available_tool" CoreAuditEventListParamsRootResourceTypeAgentDefinitionTool CoreAuditEventListParamsRootResourceType = "agent_definition_tool" CoreAuditEventListParamsRootResourceTypeAgentAccountStatus CoreAuditEventListParamsRootResourceType = "agent_account_status" CoreAuditEventListParamsRootResourceTypeAgentRun CoreAuditEventListParamsRootResourceType = "agent_run" CoreAuditEventListParamsRootResourceTypeAgentAction CoreAuditEventListParamsRootResourceType = "agent_action" CoreAuditEventListParamsRootResourceTypeAgentRunStep CoreAuditEventListParamsRootResourceType = "agent_run_step" CoreAuditEventListParamsRootResourceTypeAgentTokenUsage CoreAuditEventListParamsRootResourceType = "agent_token_usage" CoreAuditEventListParamsRootResourceTypeAgentMemory CoreAuditEventListParamsRootResourceType = "agent_memory" CoreAuditEventListParamsRootResourceTypeNotification CoreAuditEventListParamsRootResourceType = "notification" CoreAuditEventListParamsRootResourceTypeNotificationUnreadCount CoreAuditEventListParamsRootResourceType = "notification_unread_count" CoreAuditEventListParamsRootResourceTypeNotificationSendResult CoreAuditEventListParamsRootResourceType = "notification_send_result" CoreAuditEventListParamsRootResourceTypeNotificationUnreadSummary CoreAuditEventListParamsRootResourceType = "notification_unread_summary" CoreAuditEventListParamsRootResourceTypeAnnouncement CoreAuditEventListParamsRootResourceType = "announcement" CoreAuditEventListParamsRootResourceTypeConversation CoreAuditEventListParamsRootResourceType = "conversation" CoreAuditEventListParamsRootResourceTypeSupportCase CoreAuditEventListParamsRootResourceType = "support_case" CoreAuditEventListParamsRootResourceTypeConversationParticipant CoreAuditEventListParamsRootResourceType = "conversation_participant" CoreAuditEventListParamsRootResourceTypeReadCursor CoreAuditEventListParamsRootResourceType = "read_cursor" CoreAuditEventListParamsRootResourceTypeChatMessage CoreAuditEventListParamsRootResourceType = "chat_message" CoreAuditEventListParamsRootResourceTypeNotificationUnreadSummaryAccount CoreAuditEventListParamsRootResourceType = "notification_unread_summary_account" CoreAuditEventListParamsRootResourceTypeMessagingBlock CoreAuditEventListParamsRootResourceType = "messaging_block" CoreAuditEventListParamsRootResourceTypeNotificationPreference CoreAuditEventListParamsRootResourceType = "notification_preference" CoreAuditEventListParamsRootResourceTypeMessageAttachment CoreAuditEventListParamsRootResourceType = "message_attachment" CoreAuditEventListParamsRootResourceTypeAttachmentUploadTarget CoreAuditEventListParamsRootResourceType = "attachment_upload_target" CoreAuditEventListParamsRootResourceTypeScheduledMessage CoreAuditEventListParamsRootResourceType = "scheduled_message" CoreAuditEventListParamsRootResourceTypeMessagingContact CoreAuditEventListParamsRootResourceType = "messaging_contact" CoreAuditEventListParamsRootResourceTypeMessageReport CoreAuditEventListParamsRootResourceType = "message_report" CoreAuditEventListParamsRootResourceTypeToolGroup CoreAuditEventListParamsRootResourceType = "tool_group" CoreAuditEventListParamsRootResourceTypeModel CoreAuditEventListParamsRootResourceType = "model" CoreAuditEventListParamsRootResourceTypePaymentTerm CoreAuditEventListParamsRootResourceType = "payment_term" CoreAuditEventListParamsRootResourceTypeShippingTerm CoreAuditEventListParamsRootResourceType = "shipping_term" CoreAuditEventListParamsRootResourceTypeQuantity CoreAuditEventListParamsRootResourceType = "quantity" CoreAuditEventListParamsRootResourceTypeAccountGroup CoreAuditEventListParamsRootResourceType = "account_group" CoreAuditEventListParamsRootResourceTypeSupportRoute CoreAuditEventListParamsRootResourceType = "support_route" CoreAuditEventListParamsRootResourceTypeSupportAvailability CoreAuditEventListParamsRootResourceType = "support_availability" CoreAuditEventListParamsRootResourceTypeAccountStatus CoreAuditEventListParamsRootResourceType = "account_status" CoreAuditEventListParamsRootResourceTypeGeolocation CoreAuditEventListParamsRootResourceType = "geolocation" CoreAuditEventListParamsRootResourceTypeAccountUser CoreAuditEventListParamsRootResourceType = "account_user" CoreAuditEventListParamsRootResourceTypeDepartment CoreAuditEventListParamsRootResourceType = "department" CoreAuditEventListParamsRootResourceTypeAccountIntegration CoreAuditEventListParamsRootResourceType = "account_integration" CoreAuditEventListParamsRootResourceTypeAccountPrice CoreAuditEventListParamsRootResourceType = "account_price" CoreAuditEventListParamsRootResourceTypeProductLine CoreAuditEventListParamsRootResourceType = "product_line" CoreAuditEventListParamsRootResourceTypeItemCategory CoreAuditEventListParamsRootResourceType = "item_category" CoreAuditEventListParamsRootResourceTypeAttribute CoreAuditEventListParamsRootResourceType = "attribute" CoreAuditEventListParamsRootResourceTypeRate CoreAuditEventListParamsRootResourceType = "rate" CoreAuditEventListParamsRootResourceTypeAccountGroupProductLineAccess CoreAuditEventListParamsRootResourceType = "account_group_product_line_access" CoreAuditEventListParamsRootResourceTypeSalesTarget CoreAuditEventListParamsRootResourceType = "sales_target" CoreAuditEventListParamsRootResourceTypeAdjustmentType CoreAuditEventListParamsRootResourceType = "adjustment_type" CoreAuditEventListParamsRootResourceTypeAccountBranding CoreAuditEventListParamsRootResourceType = "account_branding" CoreAuditEventListParamsRootResourceTypeAccountPortal CoreAuditEventListParamsRootResourceType = "account_portal" CoreAuditEventListParamsRootResourceTypeAccountLogoURL CoreAuditEventListParamsRootResourceType = "account_logo_url" CoreAuditEventListParamsRootResourceTypeAccountFaviconURL CoreAuditEventListParamsRootResourceType = "account_favicon_url" CoreAuditEventListParamsRootResourceTypePublicAccount CoreAuditEventListParamsRootResourceType = "public_account" CoreAuditEventListParamsRootResourceTypeProperty CoreAuditEventListParamsRootResourceType = "property" CoreAuditEventListParamsRootResourceTypeCarrier CoreAuditEventListParamsRootResourceType = "carrier" CoreAuditEventListParamsRootResourceTypeServiceLevel CoreAuditEventListParamsRootResourceType = "service_level" CoreAuditEventListParamsRootResourceTypeItem CoreAuditEventListParamsRootResourceType = "item" CoreAuditEventListParamsRootResourceTypeItemLotDefault CoreAuditEventListParamsRootResourceType = "item_lot_default" CoreAuditEventListParamsRootResourceTypeItemInventory CoreAuditEventListParamsRootResourceType = "item_inventory" CoreAuditEventListParamsRootResourceTypeProduct CoreAuditEventListParamsRootResourceType = "product" CoreAuditEventListParamsRootResourceTypeBatch CoreAuditEventListParamsRootResourceType = "batch" CoreAuditEventListParamsRootResourceTypeBatchFlowNode CoreAuditEventListParamsRootResourceType = "batch_flow_node" CoreAuditEventListParamsRootResourceTypeScanningConsumption CoreAuditEventListParamsRootResourceType = "scanning_consumption" CoreAuditEventListParamsRootResourceTypeOpenBatchSummary CoreAuditEventListParamsRootResourceType = "open_batch_summary" CoreAuditEventListParamsRootResourceTypeScanningProductionStepInfo CoreAuditEventListParamsRootResourceType = "scanning_production_step_info" CoreAuditEventListParamsRootResourceTypeScanningStation CoreAuditEventListParamsRootResourceType = "scanning_station" CoreAuditEventListParamsRootResourceTypeProductionStep CoreAuditEventListParamsRootResourceType = "production_step" CoreAuditEventListParamsRootResourceTypeProductionRun CoreAuditEventListParamsRootResourceType = "production_run" CoreAuditEventListParamsRootResourceTypeMachine CoreAuditEventListParamsRootResourceType = "machine" CoreAuditEventListParamsRootResourceTypeMachineStatus CoreAuditEventListParamsRootResourceType = "machine_status" CoreAuditEventListParamsRootResourceTypeMachineDowntimeEvent CoreAuditEventListParamsRootResourceType = "machine_downtime_event" CoreAuditEventListParamsRootResourceTypeDemandOverride CoreAuditEventListParamsRootResourceType = "demand_override" CoreAuditEventListParamsRootResourceTypeDemandOverrideType CoreAuditEventListParamsRootResourceType = "demand_override_type" CoreAuditEventListParamsRootResourceTypeMachineDowntimeReason CoreAuditEventListParamsRootResourceType = "machine_downtime_reason" CoreAuditEventListParamsRootResourceTypeProductionSchedulePreview CoreAuditEventListParamsRootResourceType = "production_schedule_preview" CoreAuditEventListParamsRootResourceTypeProductionScheduleRegeneratePreview CoreAuditEventListParamsRootResourceType = "production_schedule_regenerate_preview" CoreAuditEventListParamsRootResourceTypeProductionSchedule CoreAuditEventListParamsRootResourceType = "production_schedule" CoreAuditEventListParamsRootResourceTypeProductionScheduleLine CoreAuditEventListParamsRootResourceType = "production_schedule_line" CoreAuditEventListParamsRootResourceTypeProductionScheduleDeviation CoreAuditEventListParamsRootResourceType = "production_schedule_deviation" CoreAuditEventListParamsRootResourceTypeProductionScheduleDerivedLine CoreAuditEventListParamsRootResourceType = "production_schedule_derived_line" CoreAuditEventListParamsRootResourceTypeProductionScheduleSettings CoreAuditEventListParamsRootResourceType = "production_schedule_settings" CoreAuditEventListParamsRootResourceTypeProductionScheduleResourceSetting CoreAuditEventListParamsRootResourceType = "production_schedule_resource_setting" CoreAuditEventListParamsRootResourceTypeProductionScheduleItemSetting CoreAuditEventListParamsRootResourceType = "production_schedule_item_setting" CoreAuditEventListParamsRootResourceTypeFulfillmentRecommendation CoreAuditEventListParamsRootResourceType = "fulfillment_recommendation" CoreAuditEventListParamsRootResourceTypeAnalyzeDeliveryPerformanceResponse CoreAuditEventListParamsRootResourceType = "analyze_delivery_performance_response" CoreAuditEventListParamsRootResourceTypeDeliveryPerformance CoreAuditEventListParamsRootResourceType = "delivery_performance" CoreAuditEventListParamsRootResourceTypeDeliveryBacklogBucket CoreAuditEventListParamsRootResourceType = "delivery_backlog_bucket" CoreAuditEventListParamsRootResourceTypeDeliveryLatenessBucket CoreAuditEventListParamsRootResourceType = "delivery_lateness_bucket" CoreAuditEventListParamsRootResourceTypeDeliveryBreakdown CoreAuditEventListParamsRootResourceType = "delivery_breakdown" CoreAuditEventListParamsRootResourceTypeAnalyzeSalesBreakdownResponse CoreAuditEventListParamsRootResourceType = "analyze_sales_breakdown_response" CoreAuditEventListParamsRootResourceTypeSalesTotals CoreAuditEventListParamsRootResourceType = "sales_totals" CoreAuditEventListParamsRootResourceTypeSalesBreakdown CoreAuditEventListParamsRootResourceType = "sales_breakdown" CoreAuditEventListParamsRootResourceTypeScheduleOrderCoverage CoreAuditEventListParamsRootResourceType = "schedule_order_coverage" CoreAuditEventListParamsRootResourceTypeScheduleOrderCoverageLine CoreAuditEventListParamsRootResourceType = "schedule_order_coverage_line" CoreAuditEventListParamsRootResourceTypeScheduleDeviationType CoreAuditEventListParamsRootResourceType = "schedule_deviation_type" CoreAuditEventListParamsRootResourceTypeScheduleAtRiskOrder CoreAuditEventListParamsRootResourceType = "schedule_at_risk_order" CoreAuditEventListParamsRootResourceTypeProductionScheduleFinishedPolicy CoreAuditEventListParamsRootResourceType = "production_schedule_finished_policy" CoreAuditEventListParamsRootResourceTypeProductionScheduleFinishingLine CoreAuditEventListParamsRootResourceType = "production_schedule_finishing_line" CoreAuditEventListParamsRootResourceTypeProductionScheduleWeekRelease CoreAuditEventListParamsRootResourceType = "production_schedule_week_release" CoreAuditEventListParamsRootResourceTypeProductionScheduleWeekReleasePreview CoreAuditEventListParamsRootResourceType = "production_schedule_week_release_preview" CoreAuditEventListParamsRootResourceTypeProductionScheduleItemPolicy CoreAuditEventListParamsRootResourceType = "production_schedule_item_policy" CoreAuditEventListParamsRootResourceTypeChildAccount CoreAuditEventListParamsRootResourceType = "child_account" CoreAuditEventListParamsRootResourceTypeUnitGroup CoreAuditEventListParamsRootResourceType = "unit_group" CoreAuditEventListParamsRootResourceTypeUnitGroupUnit CoreAuditEventListParamsRootResourceType = "unit_group_unit" CoreAuditEventListParamsRootResourceTypeConsumption CoreAuditEventListParamsRootResourceType = "consumption" CoreAuditEventListParamsRootResourceTypeCustomerProductLineAccess CoreAuditEventListParamsRootResourceType = "customer_product_line_access" CoreAuditEventListParamsRootResourceTypeCustomer CoreAuditEventListParamsRootResourceType = "customer" CoreAuditEventListParamsRootResourceTypeFrequentlyOrderedProduct CoreAuditEventListParamsRootResourceType = "frequently_ordered_product" CoreAuditEventListParamsRootResourceTypePriority CoreAuditEventListParamsRootResourceType = "priority" CoreAuditEventListParamsRootResourceTypeDelivery CoreAuditEventListParamsRootResourceType = "delivery" CoreAuditEventListParamsRootResourceTypeDeliveryLine CoreAuditEventListParamsRootResourceType = "delivery_line" CoreAuditEventListParamsRootResourceTypeDeliveryRelated CoreAuditEventListParamsRootResourceType = "delivery_related" CoreAuditEventListParamsRootResourceTypeSalesOrder CoreAuditEventListParamsRootResourceType = "sales_order" CoreAuditEventListParamsRootResourceTypeLocation CoreAuditEventListParamsRootResourceType = "location" CoreAuditEventListParamsRootResourceTypeLocationType CoreAuditEventListParamsRootResourceType = "location_type" CoreAuditEventListParamsRootResourceTypeLot CoreAuditEventListParamsRootResourceType = "lot" CoreAuditEventListParamsRootResourceTypeEmailLog CoreAuditEventListParamsRootResourceType = "email_log" CoreAuditEventListParamsRootResourceTypeEmailDomain CoreAuditEventListParamsRootResourceType = "email_domain" CoreAuditEventListParamsRootResourceTypeEmailInbox CoreAuditEventListParamsRootResourceType = "email_inbox" CoreAuditEventListParamsRootResourceTypeEmailSender CoreAuditEventListParamsRootResourceType = "email_sender" CoreAuditEventListParamsRootResourceTypePortalDomain CoreAuditEventListParamsRootResourceType = "portal_domain" CoreAuditEventListParamsRootResourceTypeDNSRecord CoreAuditEventListParamsRootResourceType = "dns_record" CoreAuditEventListParamsRootResourceTypeInventoryChangeLog CoreAuditEventListParamsRootResourceType = "inventory_change_log" CoreAuditEventListParamsRootResourceTypeInvoice CoreAuditEventListParamsRootResourceType = "invoice" CoreAuditEventListParamsRootResourceTypeInvoiceSummary CoreAuditEventListParamsRootResourceType = "invoice_summary" CoreAuditEventListParamsRootResourceTypeInvoiceLine CoreAuditEventListParamsRootResourceType = "invoice_line" CoreAuditEventListParamsRootResourceTypeInvoiceAllocation CoreAuditEventListParamsRootResourceType = "invoice_allocation" CoreAuditEventListParamsRootResourceTypeInvoiceForPayment CoreAuditEventListParamsRootResourceType = "invoice_for_payment" CoreAuditEventListParamsRootResourceTypeShipment CoreAuditEventListParamsRootResourceType = "shipment" CoreAuditEventListParamsRootResourceTypeShipmentSummary CoreAuditEventListParamsRootResourceType = "shipment_summary" CoreAuditEventListParamsRootResourceTypeShipmentLine CoreAuditEventListParamsRootResourceType = "shipment_line" CoreAuditEventListParamsRootResourceTypeShippingCase CoreAuditEventListParamsRootResourceType = "shipping_case" CoreAuditEventListParamsRootResourceTypeShippingCaseLabelURL CoreAuditEventListParamsRootResourceType = "shipping_case_label_url" CoreAuditEventListParamsRootResourceTypeSettlement CoreAuditEventListParamsRootResourceType = "settlement" CoreAuditEventListParamsRootResourceTypeSettlementSummary CoreAuditEventListParamsRootResourceType = "settlement_summary" CoreAuditEventListParamsRootResourceTypeRolePermission CoreAuditEventListParamsRootResourceType = "role_permission" CoreAuditEventListParamsRootResourceTypeRegistrationFlow CoreAuditEventListParamsRootResourceType = "registration_flow" CoreAuditEventListParamsRootResourceTypeRegistrationFlowOption CoreAuditEventListParamsRootResourceType = "registration_flow_option" CoreAuditEventListParamsRootResourceTypeTransaction CoreAuditEventListParamsRootResourceType = "transaction" CoreAuditEventListParamsRootResourceTypeTransactionSummary CoreAuditEventListParamsRootResourceType = "transaction_summary" CoreAuditEventListParamsRootResourceTypeTransactionMethod CoreAuditEventListParamsRootResourceType = "transaction_method" CoreAuditEventListParamsRootResourceTypeTransactionType CoreAuditEventListParamsRootResourceType = "transaction_type" CoreAuditEventListParamsRootResourceTypeTransactionAllocation CoreAuditEventListParamsRootResourceType = "transaction_allocation" CoreAuditEventListParamsRootResourceTypeUsageItem CoreAuditEventListParamsRootResourceType = "usage_item" CoreAuditEventListParamsRootResourceTypeAccountUsageResponse CoreAuditEventListParamsRootResourceType = "account_usage_response" CoreAuditEventListParamsRootResourceTypeSubscriptionInfo CoreAuditEventListParamsRootResourceType = "subscription_info" CoreAuditEventListParamsRootResourceTypeBillingPortalSessionResponse CoreAuditEventListParamsRootResourceType = "billing_portal_session_response" CoreAuditEventListParamsRootResourceTypeSwitchPlanResponse CoreAuditEventListParamsRootResourceType = "switch_plan_response" CoreAuditEventListParamsRootResourceTypeEnsureBillingCustomerResponse CoreAuditEventListParamsRootResourceType = "ensure_billing_customer_response" CoreAuditEventListParamsRootResourceTypeSpendingCapResponse CoreAuditEventListParamsRootResourceType = "spending_cap_response" CoreAuditEventListParamsRootResourceTypeAgentSpendInfo CoreAuditEventListParamsRootResourceType = "agent_spend_info" CoreAuditEventListParamsRootResourceTypeWebhookResponse CoreAuditEventListParamsRootResourceType = "webhook_response" CoreAuditEventListParamsRootResourceTypeAddressSuggestion CoreAuditEventListParamsRootResourceType = "address_suggestion" CoreAuditEventListParamsRootResourceTypeAddressComponents CoreAuditEventListParamsRootResourceType = "address_components" CoreAuditEventListParamsRootResourceTypeAddressDetailsResult CoreAuditEventListParamsRootResourceType = "address_details_result" CoreAuditEventListParamsRootResourceTypeValidatedAddress CoreAuditEventListParamsRootResourceType = "validated_address" CoreAuditEventListParamsRootResourceTypePlanLimit CoreAuditEventListParamsRootResourceType = "plan_limit" CoreAuditEventListParamsRootResourceTypePlanChangeProration CoreAuditEventListParamsRootResourceType = "plan_change_proration" CoreAuditEventListParamsRootResourceTypePlanChangeLineItem CoreAuditEventListParamsRootResourceType = "plan_change_line_item" CoreAuditEventListParamsRootResourceTypeSetupBillingResponse CoreAuditEventListParamsRootResourceType = "setup_billing_response" CoreAuditEventListParamsRootResourceTypeConfirmPaymentResponse CoreAuditEventListParamsRootResourceType = "confirm_payment_response" CoreAuditEventListParamsRootResourceTypeOAuthResponse CoreAuditEventListParamsRootResourceType = "oauth_response" CoreAuditEventListParamsRootResourceTypeOAuthStatusResponse CoreAuditEventListParamsRootResourceType = "oauth_status_response" CoreAuditEventListParamsRootResourceTypeStripePublishableKey CoreAuditEventListParamsRootResourceType = "stripe_publishable_key" CoreAuditEventListParamsRootResourceTypeStripeStatus CoreAuditEventListParamsRootResourceType = "stripe_status" CoreAuditEventListParamsRootResourceTypeHealthcheck CoreAuditEventListParamsRootResourceType = "healthcheck" CoreAuditEventListParamsRootResourceTypeAgentDefinitionConfig CoreAuditEventListParamsRootResourceType = "agent_definition_config" CoreAuditEventListParamsRootResourceTypeTriggerConfig CoreAuditEventListParamsRootResourceType = "trigger_config" CoreAuditEventListParamsRootResourceTypeCustomerContactInfo CoreAuditEventListParamsRootResourceType = "customer_contact_info" CoreAuditEventListParamsRootResourceTypeCustomerFreightPreferences CoreAuditEventListParamsRootResourceType = "customer_freight_preferences" CoreAuditEventListParamsRootResourceTypeCustomerDefaults CoreAuditEventListParamsRootResourceType = "customer_defaults" CoreAuditEventListParamsRootResourceTypeCustomerLeadTime CoreAuditEventListParamsRootResourceType = "customer_lead_time" CoreAuditEventListParamsRootResourceTypeCustomerNotificationPreferences CoreAuditEventListParamsRootResourceType = "customer_notification_preferences" CoreAuditEventListParamsRootResourceTypeOrderNotificationRecipient CoreAuditEventListParamsRootResourceType = "order_notification_recipient" CoreAuditEventListParamsRootResourceTypeOrderDiscount CoreAuditEventListParamsRootResourceType = "order_discount" CoreAuditEventListParamsRootResourceTypeSalesOrderLine CoreAuditEventListParamsRootResourceType = "sales_order_line" CoreAuditEventListParamsRootResourceTypeSalesOrderType CoreAuditEventListParamsRootResourceType = "sales_order_type" CoreAuditEventListParamsRootResourceTypeSalesOrderStatus CoreAuditEventListParamsRootResourceType = "sales_order_status" CoreAuditEventListParamsRootResourceTypeMaterial CoreAuditEventListParamsRootResourceType = "material" CoreAuditEventListParamsRootResourceTypeSupplierMaterial CoreAuditEventListParamsRootResourceType = "supplier_material" CoreAuditEventListParamsRootResourceTypePart CoreAuditEventListParamsRootResourceType = "part" CoreAuditEventListParamsRootResourceTypePermissionGroup CoreAuditEventListParamsRootResourceType = "permission_group" CoreAuditEventListParamsRootResourceTypePermission CoreAuditEventListParamsRootResourceType = "permission" CoreAuditEventListParamsRootResourceTypePick CoreAuditEventListParamsRootResourceType = "pick" CoreAuditEventListParamsRootResourceTypePickLine CoreAuditEventListParamsRootResourceType = "pick_line" CoreAuditEventListParamsRootResourceTypeProductType CoreAuditEventListParamsRootResourceType = "product_type" CoreAuditEventListParamsRootResourceTypeProduction CoreAuditEventListParamsRootResourceType = "production" CoreAuditEventListParamsRootResourceTypeProductionFlow CoreAuditEventListParamsRootResourceType = "production_flow" CoreAuditEventListParamsRootResourceTypeMap CoreAuditEventListParamsRootResourceType = "map" CoreAuditEventListParamsRootResourceTypePurchaseOrder CoreAuditEventListParamsRootResourceType = "purchase_order" CoreAuditEventListParamsRootResourceTypePurchaseOrderLine CoreAuditEventListParamsRootResourceType = "purchase_order_line" CoreAuditEventListParamsRootResourceTypePurchaseOrderRelated CoreAuditEventListParamsRootResourceType = "purchase_order_related" CoreAuditEventListParamsRootResourceTypeSupplier CoreAuditEventListParamsRootResourceType = "supplier" CoreAuditEventListParamsRootResourceTypeReceivableEntry CoreAuditEventListParamsRootResourceType = "receivable_entry" CoreAuditEventListParamsRootResourceTypeReceivingOrder CoreAuditEventListParamsRootResourceType = "receiving_order" CoreAuditEventListParamsRootResourceTypeReceivingOrderLine CoreAuditEventListParamsRootResourceType = "receiving_order_line" CoreAuditEventListParamsRootResourceTypeReceivingOrderTotals CoreAuditEventListParamsRootResourceType = "receiving_order_totals" CoreAuditEventListParamsRootResourceTypeReceivingOrderStageTotal CoreAuditEventListParamsRootResourceType = "receiving_order_stage_total" CoreAuditEventListParamsRootResourceTypeReceivingOrderRelated CoreAuditEventListParamsRootResourceType = "receiving_order_related" CoreAuditEventListParamsRootResourceTypeEmailContact CoreAuditEventListParamsRootResourceType = "email_contact" CoreAuditEventListParamsRootResourceTypeAllocationEntry CoreAuditEventListParamsRootResourceType = "allocation_entry" CoreAuditEventListParamsRootResourceTypeOpenCreditEntry CoreAuditEventListParamsRootResourceType = "open_credit_entry" CoreAuditEventListParamsRootResourceTypeVolumeDiscount CoreAuditEventListParamsRootResourceType = "volume_discount" CoreAuditEventListParamsRootResourceTypeVolumeDiscountTier CoreAuditEventListParamsRootResourceType = "volume_discount_tier" CoreAuditEventListParamsRootResourceTypeAnalyzeDeliveriesResponse CoreAuditEventListParamsRootResourceType = "analyze_deliveries_response" CoreAuditEventListParamsRootResourceTypeAnalyzeManufacturingResponse CoreAuditEventListParamsRootResourceType = "analyze_manufacturing_response" CoreAuditEventListParamsRootResourceTypeAnalyzeManufacturingBatchResponse CoreAuditEventListParamsRootResourceType = "analyze_manufacturing_batch_response" CoreAuditEventListParamsRootResourceTypeAnalyzeQuarterlyOrdersResponse CoreAuditEventListParamsRootResourceType = "analyze_quarterly_orders_response" CoreAuditEventListParamsRootResourceTypeAnalyzeNewCustomersResponse CoreAuditEventListParamsRootResourceType = "analyze_new_customers_response" CoreAuditEventListParamsRootResourceTypeAnalyzeDemandForecastResponse CoreAuditEventListParamsRootResourceType = "analyze_demand_forecast_response" CoreAuditEventListParamsRootResourceTypeAnalyzeOeeResponse CoreAuditEventListParamsRootResourceType = "analyze_oee_response" CoreAuditEventListParamsRootResourceTypeAnalyzeOeeTrendResponse CoreAuditEventListParamsRootResourceType = "analyze_oee_trend_response" CoreAuditEventListParamsRootResourceTypeAnalyzeScheduleAttainmentResponse CoreAuditEventListParamsRootResourceType = "analyze_schedule_attainment_response" CoreAuditEventListParamsRootResourceTypeCatalogProductLine CoreAuditEventListParamsRootResourceType = "catalog_product_line" CoreAuditEventListParamsRootResourceTypeCatalogCategory CoreAuditEventListParamsRootResourceType = "catalog_category" CoreAuditEventListParamsRootResourceTypeCatalogProduct CoreAuditEventListParamsRootResourceType = "catalog_product" CoreAuditEventListParamsRootResourceTypeCatalogProperty CoreAuditEventListParamsRootResourceType = "catalog_property" CoreAuditEventListParamsRootResourceTypeCatalogAttribute CoreAuditEventListParamsRootResourceType = "catalog_attribute" CoreAuditEventListParamsRootResourceTypeDcLocation CoreAuditEventListParamsRootResourceType = "dc_location" CoreAuditEventListParamsRootResourceTypeEdiRun CoreAuditEventListParamsRootResourceType = "edi_run" CoreAuditEventListParamsRootResourceTypeInventoryItem CoreAuditEventListParamsRootResourceType = "inventory_item" CoreAuditEventListParamsRootResourceTypeAnalyzeWeeksOfSalesResponse CoreAuditEventListParamsRootResourceType = "analyze_weeks_of_sales_response" CoreAuditEventListParamsRootResourceTypeBulkReconcileItemsResponse CoreAuditEventListParamsRootResourceType = "bulk_reconcile_items_response" CoreAuditEventListParamsRootResourceTypeSysProperty CoreAuditEventListParamsRootResourceType = "sys_property" CoreAuditEventListParamsRootResourceTypeSysPropertyType CoreAuditEventListParamsRootResourceType = "sys_property_type" CoreAuditEventListParamsRootResourceTypeSysPropertyValue CoreAuditEventListParamsRootResourceType = "sys_property_value" CoreAuditEventListParamsRootResourceTypeTerritory CoreAuditEventListParamsRootResourceType = "territory" CoreAuditEventListParamsRootResourceTypeTenancy CoreAuditEventListParamsRootResourceType = "tenancy" CoreAuditEventListParamsRootResourceTypeCheckoutSession CoreAuditEventListParamsRootResourceType = "checkout_session" CoreAuditEventListParamsRootResourceTypeEstimateRateResult CoreAuditEventListParamsRootResourceType = "estimate_rate_result" CoreAuditEventListParamsRootResourceTypeRateShopOption CoreAuditEventListParamsRootResourceType = "rate_shop_option" CoreAuditEventListParamsRootResourceTypeRateShopResult CoreAuditEventListParamsRootResourceType = "rate_shop_result" CoreAuditEventListParamsRootResourceTypeOwner CoreAuditEventListParamsRootResourceType = "owner" CoreAuditEventListParamsRootResourceTypeCreatedBy CoreAuditEventListParamsRootResourceType = "created_by" CoreAuditEventListParamsRootResourceTypeMessage CoreAuditEventListParamsRootResourceType = "message" CoreAuditEventListParamsRootResourceTypeAccountPhotoUploadResult CoreAuditEventListParamsRootResourceType = "account_photo_upload_result" CoreAuditEventListParamsRootResourceTypeUserPhotoUploadResult CoreAuditEventListParamsRootResourceType = "user_photo_upload_result" CoreAuditEventListParamsRootResourceTypeUserPhotoURL CoreAuditEventListParamsRootResourceType = "user_photo_url" CoreAuditEventListParamsRootResourceTypeBatchLot CoreAuditEventListParamsRootResourceType = "batch_lot" CoreAuditEventListParamsRootResourceTypeCheckDuplicateResult CoreAuditEventListParamsRootResourceType = "check_duplicate_result" CoreAuditEventListParamsRootResourceTypeItemCosts CoreAuditEventListParamsRootResourceType = "item_costs" CoreAuditEventListParamsRootResourceTypeItemTrends CoreAuditEventListParamsRootResourceType = "item_trends" CoreAuditEventListParamsRootResourceTypeReconciledItemResult CoreAuditEventListParamsRootResourceType = "reconciled_item_result" CoreAuditEventListParamsRootResourceTypeSkippedItemResult CoreAuditEventListParamsRootResourceType = "skipped_item_result" CoreAuditEventListParamsRootResourceTypeReconcileErrorResult CoreAuditEventListParamsRootResourceType = "reconcile_error_result" CoreAuditEventListParamsRootResourceTypeItemTrendPoint CoreAuditEventListParamsRootResourceType = "item_trend_point" CoreAuditEventListParamsRootResourceTypeTenancyPendingRegistration CoreAuditEventListParamsRootResourceType = "tenancy_pending_registration" CoreAuditEventListParamsRootResourceTypeInvoiceAllocationEntry CoreAuditEventListParamsRootResourceType = "invoice_allocation_entry" CoreAuditEventListParamsRootResourceTypeAllocationCustomer CoreAuditEventListParamsRootResourceType = "allocation_customer" CoreAuditEventListParamsRootResourceTypeCheckoutSalesOrder CoreAuditEventListParamsRootResourceType = "checkout_sales_order" CoreAuditEventListParamsRootResourceTypeSalesOrderPriceQuote CoreAuditEventListParamsRootResourceType = "sales_order_price_quote" CoreAuditEventListParamsRootResourceTypeSalesOrderFreightQuote CoreAuditEventListParamsRootResourceType = "sales_order_freight_quote" CoreAuditEventListParamsRootResourceTypeSalesOrderCommitmentQuote CoreAuditEventListParamsRootResourceType = "sales_order_commitment_quote" CoreAuditEventListParamsRootResourceTypeOperatingCalendar CoreAuditEventListParamsRootResourceType = "operating_calendar" CoreAuditEventListParamsRootResourceTypeOperatingCalendarClosure CoreAuditEventListParamsRootResourceType = "operating_calendar_closure" CoreAuditEventListParamsRootResourceTypeSalesOrderPriceQuoteLine CoreAuditEventListParamsRootResourceType = "sales_order_price_quote_line" CoreAuditEventListParamsRootResourceTypeHubspotSyncJob CoreAuditEventListParamsRootResourceType = "hubspot_sync_job" CoreAuditEventListParamsRootResourceTypeHubspotSyncReport CoreAuditEventListParamsRootResourceType = "hubspot_sync_report" CoreAuditEventListParamsRootResourceTypeHubspotCompanyReview CoreAuditEventListParamsRootResourceType = "hubspot_company_review" CoreAuditEventListParamsRootResourceTypeHubspotCompanyCandidate CoreAuditEventListParamsRootResourceType = "hubspot_company_candidate" CoreAuditEventListParamsRootResourceTypeHubspotSyncRecord CoreAuditEventListParamsRootResourceType = "hubspot_sync_record" CoreAuditEventListParamsRootResourceTypeContactMatch CoreAuditEventListParamsRootResourceType = "contact_match" CoreAuditEventListParamsRootResourceTypeReplyDraft CoreAuditEventListParamsRootResourceType = "reply_draft" CoreAuditEventListParamsRootResourceTypeConversationLink CoreAuditEventListParamsRootResourceType = "conversation_link" CoreAuditEventListParamsRootResourceTypeMessagingGroup CoreAuditEventListParamsRootResourceType = "messaging_group" CoreAuditEventListParamsRootResourceTypeMessagingGroupMember CoreAuditEventListParamsRootResourceType = "messaging_group_member" CoreAuditEventListParamsRootResourceTypePortalProfile CoreAuditEventListParamsRootResourceType = "portal_profile" CoreAuditEventListParamsRootResourceTypePortalRegistrationSession CoreAuditEventListParamsRootResourceType = "portal_registration_session" CoreAuditEventListParamsRootResourceTypePortalRegistrationSessionData CoreAuditEventListParamsRootResourceType = "portal_registration_session_data" CoreAuditEventListParamsRootResourceTypePackList CoreAuditEventListParamsRootResourceType = "pack_list" CoreAuditEventListParamsRootResourceTypePackListParty CoreAuditEventListParamsRootResourceType = "pack_list_party" CoreAuditEventListParamsRootResourceTypePackListLineItem CoreAuditEventListParamsRootResourceType = "pack_list_line_item" CoreAuditEventListParamsRootResourceTypePackListBackOrder CoreAuditEventListParamsRootResourceType = "pack_list_back_order" CoreAuditEventListParamsRootResourceTypePackListCase CoreAuditEventListParamsRootResourceType = "pack_list_case" CoreAuditEventListParamsRootResourceTypeJob CoreAuditEventListParamsRootResourceType = "job" CoreAuditEventListParamsRootResourceTypeJobResult CoreAuditEventListParamsRootResourceType = "job_result" CoreAuditEventListParamsRootResourceTypeJobExport CoreAuditEventListParamsRootResourceType = "job_export" CoreAuditEventListParamsRootResourceTypeAnalyzeCustomerPricingResponse CoreAuditEventListParamsRootResourceType = "analyze_customer_pricing_response" CoreAuditEventListParamsRootResourceTypeCustomerPricingFinding CoreAuditEventListParamsRootResourceType = "customer_pricing_finding" CoreAuditEventListParamsRootResourceTypeCustomerPricingSummary CoreAuditEventListParamsRootResourceType = "customer_pricing_summary" CoreAuditEventListParamsRootResourceTypeComputedRate CoreAuditEventListParamsRootResourceType = "computed_rate" CoreAuditEventListParamsRootResourceTypeComputedQuantity CoreAuditEventListParamsRootResourceType = "computed_quantity" CoreAuditEventListParamsRootResourceTypeAnalyzeRealizedMarginsResponse CoreAuditEventListParamsRootResourceType = "analyze_realized_margins_response" CoreAuditEventListParamsRootResourceTypeRealizedMarginFinding CoreAuditEventListParamsRootResourceType = "realized_margin_finding" CoreAuditEventListParamsRootResourceTypeRealizedMarginSummary CoreAuditEventListParamsRootResourceType = "realized_margin_summary" CoreAuditEventListParamsRootResourceTypeShipmentRelated CoreAuditEventListParamsRootResourceType = "shipment_related" CoreAuditEventListParamsRootResourceTypeInvoiceRelated CoreAuditEventListParamsRootResourceType = "invoice_related" CoreAuditEventListParamsRootResourceTypePickRelated CoreAuditEventListParamsRootResourceType = "pick_related" CoreAuditEventListParamsRootResourceTypePickTotals CoreAuditEventListParamsRootResourceType = "pick_totals" CoreAuditEventListParamsRootResourceTypePickStageTotal CoreAuditEventListParamsRootResourceType = "pick_stage_total" )
type CoreAuditEventService ¶
type CoreAuditEventService struct {
// contains filtered or unexported fields
}
List and retrieve audit events.
CoreAuditEventService contains methods and other services that help with interacting with the openmrp 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 NewCoreAuditEventService method instead.
func NewCoreAuditEventService ¶
func NewCoreAuditEventService(opts ...option.RequestOption) (r CoreAuditEventService)
NewCoreAuditEventService 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 (*CoreAuditEventService) Get ¶
func (r *CoreAuditEventService) Get(ctx context.Context, id string, query CoreAuditEventGetParams, opts ...option.RequestOption) (res *AuditEvent, err error)
Returns a single audit event by ID.
The event is readable when your account is either the acting account or the account that was acted upon.
This endpoint requires the permission: `audit_events:read`.
func (*CoreAuditEventService) GetResourceTypes ¶
func (r *CoreAuditEventService) GetResourceTypes(ctx context.Context, opts ...option.RequestOption) (res *ListObjectType, err error)
Returns every resource type an audit event can refer to, as plain strings.
This is the accepted vocabulary for the `resource_types` filter when listing audit events. It is the API's complete resource-type list rather than a list derived from your account's data, so it includes types you may never have recorded events for.
This endpoint requires the permission: `audit_events:read`.
func (*CoreAuditEventService) List ¶
func (r *CoreAuditEventService) List(ctx context.Context, query CoreAuditEventListParams, opts ...option.RequestOption) (res *ListAuditEvent, err error)
Returns a paginated list of audit events, newest first.
Results cover every change where your account is either the acting account or the account that was acted upon, so a customer's or supplier's changes to your records appear alongside your own. The `q` parameter searches the resource type, action, resource ID, and originating request ID.
This endpoint requires the permission: `audit_events:read`.
type CoreEmailLogGetParams ¶
type CoreEmailLogGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sent_by".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreEmailLogGetParams) URLQuery ¶
func (r CoreEmailLogGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreEmailLogGetParams's query parameters as `url.Values`.
type CoreEmailLogListParams ¶
type CoreEmailLogListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sent_by".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreEmailLogListParams) URLQuery ¶
func (r CoreEmailLogListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreEmailLogListParams's query parameters as `url.Values`.
type CoreEmailLogService ¶
type CoreEmailLogService struct {
// contains filtered or unexported fields
}
View email logs for accounts.
CoreEmailLogService contains methods and other services that help with interacting with the openmrp 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 NewCoreEmailLogService method instead.
func NewCoreEmailLogService ¶
func NewCoreEmailLogService(opts ...option.RequestOption) (r CoreEmailLogService)
NewCoreEmailLogService 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 (*CoreEmailLogService) Get ¶
func (r *CoreEmailLogService) Get(ctx context.Context, id string, query CoreEmailLogGetParams, opts ...option.RequestOption) (res *EmailLog, err error)
Returns an email log by ID.
This endpoint requires the permission: `email_logs:read`.
func (*CoreEmailLogService) List ¶
func (r *CoreEmailLogService) List(ctx context.Context, query CoreEmailLogListParams, opts ...option.RequestOption) (res *ListEmailLog, err error)
Returns a paginated list of email logs for the current account, most recently created first.
The `q` search term matches the subject line or any recipient address.
This endpoint requires the permission: `email_logs:read`.
type CoreGetSearchParams ¶
type CoreGetSearchParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Restrict the search to a single customer by their account ID.
//
// When set, only resource types that are safe to expose to a customer are searched
// (their sales orders, invoices, and shipments), and results are limited to
// records belonging to that customer. This is intended for composing
// customer-facing replies, so a reference can never point at a record the customer
// is not entitled to see.
Customer param.Opt[string] `query:"customer,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filter the search to specific resource types.
//
// Only a subset of resource types is searchable: `sales_order`, `purchase_order`,
// `invoice`, `customer`, `item`, `product`, `shipment`, `messaging_contact`, and
// `agent_definition`. Any other value is rejected. Types you lack read permission
// for are silently dropped rather than rejected, so narrowing to a type you cannot
// read simply returns no results. Omit to search every searchable type you can
// read.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
Types []string `query:"types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreGetSearchParams) URLQuery ¶
func (r CoreGetSearchParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreGetSearchParams's query parameters as `url.Values`.
type CoreJobCancelParams ¶
type CoreJobCancelParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreJobCancelParams) URLQuery ¶
func (r CoreJobCancelParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreJobCancelParams's query parameters as `url.Values`.
type CoreJobGetParams ¶
type CoreJobGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreJobGetParams) URLQuery ¶
func (r CoreJobGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreJobGetParams's query parameters as `url.Values`.
type CoreJobService ¶
type CoreJobService struct {
// contains filtered or unexported fields
}
View the jobs that track asynchronous work. Endpoints that answer 202 Accepted raise one and point at it with a Location header.
CoreJobService contains methods and other services that help with interacting with the openmrp 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 NewCoreJobService method instead.
func NewCoreJobService ¶
func NewCoreJobService(opts ...option.RequestOption) (r CoreJobService)
NewCoreJobService 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 (*CoreJobService) Cancel ¶
func (r *CoreJobService) Cancel(ctx context.Context, id string, body CoreJobCancelParams, opts ...option.RequestOption) (res *Job, err error)
Cancels a job and returns it carrying its `cancelled` status. Work in flight is not interrupted but can no longer settle, and a finished job cannot be cancelled.
This endpoint requires the permission: `jobs:delete`.
func (*CoreJobService) Get ¶
func (r *CoreJobService) Get(ctx context.Context, id string, query CoreJobGetParams, opts ...option.RequestOption) (res *Job, err error)
Returns a job by ID — poll the job named in a `202 Accepted` response's `Location` to observe its outcome. A completed export carries the link to its file on `export.url`.
This endpoint requires the permissions: `jobs:read`, `customers:read`, `suppliers:read`.
type CoreRequestLogGetParams ¶
type CoreRequestLogGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account", "actor", "actor.role", "actor.role.permissions",
// "query_params", "request_body", "response_body".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreRequestLogGetParams) URLQuery ¶
func (r CoreRequestLogGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreRequestLogGetParams's query parameters as `url.Values`.
type CoreRequestLogListParams ¶
type CoreRequestLogListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Restricts results to request logs on or before this timestamp.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Filter by the user-provided idempotency key.
IdempotencyKey param.Opt[string] `query:"idempotency_key,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Restricts results to requests that took at least this many microseconds.
MinLatencyUs param.Opt[int64] `query:"min_latency_us,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Restricts results to request logs on or after this timestamp.
//
// Defaults to 24 hours before `ends_at`, or before now when `ends_at` is also
// omitted. Pass an earlier timestamp to search further back.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter by the _acting_ account: the account the actor belongs to (the log's
// `account.id`).
//
// Results are always scoped to logs where your account is either the acting
// account or the target account; this narrows that set to specific acting
// accounts. For example, pass a customer's account ID to see only requests that
// customer's actors made against your account.
ActorAccountIDs []string `query:"actor_account_ids,omitzero" json:"-"`
// Filter by the actor identifier.
//
// Matches the log's `actor.id`: a user ID for `user` actors, an API key ID for
// `api_key` actors, or an agent ID for `agent` actors.
ActorIDs []string `query:"actor_ids,omitzero" json:"-"`
// Filter by the actor type.
//
// Requests are recorded for actors of type `user`, `api_key`, and `agent` — the
// last covering calls an OpenMRP agent made on your account's behalf.
//
// Any of "user", "api_key", "agent", "group".
ActorTypes []string `query:"actor_types,omitzero" json:"-"`
// Filter by API error code.
//
// Any of "expired_token", "api_key_expired", "api_key_revoked",
// "invalid_credentials", "insufficient_permissions", "payment_required",
// "agent_spending_cap_reached", "validation_failed", "missing_field",
// "invalid_format", "method_not_allowed", "resource_not_found", "resource_exists",
// "resource_conflict", "resource_gone", "idempotency_in_progress",
// "limit_exceeded", "registration_closed", "rate_limit_exceeded",
// "parameter_missing", "parameter_invalid", "parameter_unknown",
// "parameters_exclusive", "internal_error", "service_unavailable",
// "external_service_error", "timeout", "connection_error", "request_timeout",
// "client_closed_request", "api_version_required", "api_version_invalid",
// "api_version_too_old".
ErrorCodes []string `query:"error_codes,omitzero" json:"-"`
// Exclude request logs whose API error code is in this set.
//
// Applied as a negative filter after all other filters. Successful requests (which
// have no error code) are always kept. The OpenMRP dashboard uses this to hide
// routine `expired_token` 401s — the noise from short-lived access tokens expiring
// and clients silently refreshing — while still surfacing genuine auth failures
// like `invalid_credentials`.
//
// Any of "expired_token", "api_key_expired", "api_key_revoked",
// "invalid_credentials", "insufficient_permissions", "payment_required",
// "agent_spending_cap_reached", "validation_failed", "missing_field",
// "invalid_format", "method_not_allowed", "resource_not_found", "resource_exists",
// "resource_conflict", "resource_gone", "idempotency_in_progress",
// "limit_exceeded", "registration_closed", "rate_limit_exceeded",
// "parameter_missing", "parameter_invalid", "parameter_unknown",
// "parameters_exclusive", "internal_error", "service_unavailable",
// "external_service_error", "timeout", "connection_error", "request_timeout",
// "client_closed_request", "api_version_required", "api_version_invalid",
// "api_version_too_old".
ExcludeErrorCodes []string `query:"exclude_error_codes,omitzero" json:"-"`
// Filter by the request host.
//
// Typically `api.openmrp.ai`.
Hosts []string `query:"hosts,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account", "actor", "actor.role".
Include []string `query:"include,omitzero" json:"-"`
// Filter by the HTTP method.
//
// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS".
Methods []string `query:"methods,omitzero" json:"-"`
// Filter by the _normalized_ route template.
//
// For example `/v1/sales/customers/{id}` matches every request to that route
// regardless of the specific customer ID. Parameter names inside `{}` are ignored
// when matching, so `{customer_id}` and `{id}` are equivalent.
NormalizedRoutes []string `query:"normalized_routes,omitzero" json:"-"`
// Filter by the HTTP status class, expressed as the leading digit: `1`–`5` for
// 1xx–5xx.
//
// Combined with `status_codes` using OR — e.g. `status_codes=401` and
// `status_code_classes=5` matches 401 responses and any 5xx response.
StatusCodeClasses []int64 `query:"status_code_classes,omitzero" json:"-"`
// Filter by the HTTP status code.
StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
// Filter by the _target_ account: the account the request acted upon (the log's
// target account).
//
// Results are always scoped to logs where your account is either the acting
// account or the target account; this narrows that set to specific target
// accounts. For example, pass a supplier's account ID to see only requests your
// account made against that supplier.
TargetAccountIDs []string `query:"target_account_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreRequestLogListParams) URLQuery ¶
func (r CoreRequestLogListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreRequestLogListParams's query parameters as `url.Values`.
type CoreRequestLogService ¶
type CoreRequestLogService struct {
// contains filtered or unexported fields
}
List and retrieve request logs.
CoreRequestLogService contains methods and other services that help with interacting with the openmrp 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 NewCoreRequestLogService method instead.
func NewCoreRequestLogService ¶
func NewCoreRequestLogService(opts ...option.RequestOption) (r CoreRequestLogService)
NewCoreRequestLogService 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 (*CoreRequestLogService) Get ¶
func (r *CoreRequestLogService) Get(ctx context.Context, id string, query CoreRequestLogGetParams, opts ...option.RequestOption) (res *RequestLog, err error)
Returns a single API request log by ID.
The log is readable when your account is either the acting account or the account that was acted upon. This is also the only endpoint that can return the captured query parameters and request and response bodies, and the only way to read the high-traffic-endpoint logs that are withheld from the list endpoint.
This endpoint requires the permission: `request_logs:read`.
func (*CoreRequestLogService) List ¶
func (r *CoreRequestLogService) List(ctx context.Context, query CoreRequestLogListParams, opts ...option.RequestOption) (res *ListRequestLog, err error)
Returns a paginated list of API request logs, newest first.
Results cover every request where your account is either the acting account or the account that was acted upon, so requests a customer or supplier made against your data appear alongside your own. The `q` parameter matches a log ID exactly and otherwise searches the request path, the normalized route, and the error message.
Requests to a number of high-traffic endpoints — including these logging endpoints themselves — are recorded but withheld from this listing so they do not drown out the rest of your traffic. They can still be fetched individually by ID.
This endpoint requires the permission: `request_logs:read`.
type CoreSandboxDeleteResponse ¶
type CoreSandboxDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CoreSandboxDeleteResponse) RawJSON ¶
func (r CoreSandboxDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CoreSandboxDeleteResponse) UnmarshalJSON ¶
func (r *CoreSandboxDeleteResponse) UnmarshalJSON(data []byte) error
type CoreSandboxGetParams ¶
type CoreSandboxGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner_account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreSandboxGetParams) URLQuery ¶
func (r CoreSandboxGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreSandboxGetParams's query parameters as `url.Values`.
type CoreSandboxListParams ¶
type CoreSandboxListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner_account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreSandboxListParams) URLQuery ¶
func (r CoreSandboxListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreSandboxListParams's query parameters as `url.Values`.
type CoreSandboxNewParams ¶
type CoreSandboxNewParams struct {
// Request to create a sandbox.
CreateSandboxRequest CreateSandboxRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner_account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CoreSandboxNewParams) MarshalJSON ¶
func (r CoreSandboxNewParams) MarshalJSON() (data []byte, err error)
func (CoreSandboxNewParams) URLQuery ¶
func (r CoreSandboxNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CoreSandboxNewParams's query parameters as `url.Values`.
func (*CoreSandboxNewParams) UnmarshalJSON ¶
func (r *CoreSandboxNewParams) UnmarshalJSON(data []byte) error
type CoreSandboxService ¶
type CoreSandboxService struct {
// contains filtered or unexported fields
}
List and manage sandbox environments.
CoreSandboxService contains methods and other services that help with interacting with the openmrp 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 NewCoreSandboxService method instead.
func NewCoreSandboxService ¶
func NewCoreSandboxService(opts ...option.RequestOption) (r CoreSandboxService)
NewCoreSandboxService 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 (*CoreSandboxService) Delete ¶
func (r *CoreSandboxService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *CoreSandboxDeleteResponse, err error)
Deletes a sandbox account and everything inside it.
The sandbox becomes inaccessible as soon as this call returns, but its data is purged asynchronously and may persist briefly. Deletion is permanent: the sandbox cannot be restored, and deleting it again reports that it has already been deleted. Sandboxes cannot be deleted while acting in a sandbox.
This endpoint requires the permission: `sandboxes:delete`.
func (*CoreSandboxService) Get ¶
func (r *CoreSandboxService) Get(ctx context.Context, id string, query CoreSandboxGetParams, opts ...option.RequestOption) (res *Sandbox, err error)
Returns a single sandbox by ID.
Only sandboxes owned by your production account are visible; any other sandbox is reported as not found. Sandboxes cannot be retrieved while acting in a sandbox.
This endpoint requires the permission: `sandboxes:read`.
func (*CoreSandboxService) List ¶
func (r *CoreSandboxService) List(ctx context.Context, query CoreSandboxListParams, opts ...option.RequestOption) (res *ListSandbox, err error)
Returns a paginated list of the sandboxes owned by your production account, newest first.
The `q` search term matches the sandbox name. Sandboxes cannot be listed while acting in a sandbox.
This endpoint requires the permission: `sandboxes:read`.
func (*CoreSandboxService) New ¶
func (r *CoreSandboxService) New(ctx context.Context, params CoreSandboxNewParams, opts ...option.RequestOption) (res *Sandbox, err error)
Creates a sandbox account owned by your production account.
The creating user is added to the new sandbox as an administrator, so it can be switched into right away. When the owner's plan limits how many sandboxes it may have, the request fails once that limit is reached.
When `mode` is `seeded`, sample data is populated asynchronously and may not be available immediately after the sandbox is created. Sandboxes cannot be created while acting in a sandbox.
This endpoint requires the permission: `sandboxes:create`.
type CoreService ¶
type CoreService struct {
// List and manage sandbox environments.
Sandboxes CoreSandboxService
// List and retrieve request logs.
RequestLogs CoreRequestLogService
// List and retrieve audit events.
AuditEvents CoreAuditEventService
// Autocomplete, look up details, and validate addresses.
Addresses CoreAddressService
// View email logs for accounts.
EmailLogs CoreEmailLogService
// View the jobs that track asynchronous work. Endpoints that answer 202 Accepted
// raise one and point at it with a Location header.
Jobs CoreJobService
// Analyze sales, orders, manufacturing, materials, and other business metrics.
Analytics CoreAnalyticsService
// Utility action endpoints for checking duplicates and emailing records.
Actions CoreActionService
// contains filtered or unexported fields
}
Unified free-text search across resource types, returning lightweight entity references.
CoreService contains methods and other services that help with interacting with the openmrp 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 NewCoreService method instead.
func NewCoreService ¶
func NewCoreService(opts ...option.RequestOption) (r CoreService)
NewCoreService 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 (*CoreService) GetSearch ¶
func (r *CoreService) GetSearch(ctx context.Context, query CoreGetSearchParams, opts ...option.RequestOption) (res *ListEntity, err error)
Searches across multiple resource types at once and returns lightweight `entity` references to the matches.
Each result carries the matched record's ID, its resource type, and a display name and secondary handle, so it can be shown in a picker or turned into a link; fetch the record itself through its own endpoint for full detail.
`q` is required unless the search is narrowed with `types`; scoping to one or more types lets you omit `q` to browse that type's most recent records. Matches are drawn from every searchable type you can read, then interleaved so no single type crowds out the others, and the combined result set is capped at `limit`. Results are not paginated — `limit` is the total you get. If one resource type fails to respond, it contributes no results instead of failing the whole search.
This endpoint requires the permissions: `sales_orders:read`, `purchase_orders:read`, `invoices:read`, `customers:read`, `items:read`, `shipments:read`, `messaging:read`, `agents:read`.
type CreateAPIKeyRequestParam ¶
type CreateAPIKeyRequestParam struct {
// Human-readable name for the API key.
//
// Shown when listing keys and used to match keys when searching, so prefer
// something that identifies the integration using it.
Name string `json:"name" api:"required"`
// ID of the role to assign to the API key.
//
// The role determines what requests authenticated with the key are allowed to do.
// A key keeps its role for life — including through rotation — so issue a new key
// to use a different one, while changes to the role's own permissions take effect
// for existing keys immediately.
RoleID string `json:"role_id" api:"required"`
// When the key expires and stops authenticating requests.
//
// If omitted, the key keeps working until it is revoked or rotated.
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
Request to create an API key.
The properties Name, RoleID are required.
func (CreateAPIKeyRequestParam) MarshalJSON ¶
func (r CreateAPIKeyRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAPIKeyRequestParam) UnmarshalJSON ¶
func (r *CreateAPIKeyRequestParam) UnmarshalJSON(data []byte) error
type CreateAccountGroupRequestCommissionPolicy ¶
type CreateAccountGroupRequestCommissionPolicy string
How sales commission applies to accounts in this group.
- `commission_applied`: sales commission is calculated on orders from accounts in this group.
- `commission_exempt`: orders from accounts in this group are exempt from commission.
Leave this out and the group is created commission-exempt, so orders from its accounts earn no sales commission until you change it.
const ( CreateAccountGroupRequestCommissionPolicyCommissionApplied CreateAccountGroupRequestCommissionPolicy = "commission_applied" CreateAccountGroupRequestCommissionPolicyCommissionExempt CreateAccountGroupRequestCommissionPolicy = "commission_exempt" )
type CreateAccountGroupRequestFreightPolicy ¶
type CreateAccountGroupRequestFreightPolicy string
How freight charges apply to orders from accounts in this group.
- `free_freight`: customers within this group will not have to pay for freight.
- `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const ( CreateAccountGroupRequestFreightPolicyFreeFreight CreateAccountGroupRequestFreightPolicy = "free_freight" CreateAccountGroupRequestFreightPolicyBilledFreight CreateAccountGroupRequestFreightPolicy = "billed_freight" )
type CreateAccountGroupRequestParam ¶
type CreateAccountGroupRequestParam struct {
// Display name of the account group.
//
// Must be unique within your account.
Name string `json:"name" api:"required"`
// How this account group will be used.
//
// - `pricing_group`: used for pricing rules, such as a "Preferred" group that
// receives a special discount.
// - `type_group`: used to categorize accounts, such as "Consumers" or
// "Distributors".
//
// The type cannot be changed after creation.
//
// Any of "pricing_group", "type_group".
Type CreateAccountGroupRequestType `json:"type,omitzero" api:"required"`
// Calendar days between an order being issued and it being due to ship, inherited
// by every customer in this group that has not set its own.
DefaultLeadTimeDays param.Opt[int64] `json:"default_lead_time_days,omitzero"`
// Free-form description of the account group.
Description param.Opt[string] `json:"description,omitzero"`
// How sales commission applies to accounts in this group.
//
// - `commission_applied`: sales commission is calculated on orders from accounts
// in this group.
// - `commission_exempt`: orders from accounts in this group are exempt from
// commission.
//
// Leave this out and the group is created commission-exempt, so orders from its
// accounts earn no sales commission until you change it.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy CreateAccountGroupRequestCommissionPolicy `json:"commission_policy,omitzero"`
// How freight charges apply to orders from accounts in this group.
//
// - `free_freight`: customers within this group will not have to pay for freight.
// - `billed_freight`: freight will be applied to any order within this account
// group, unless overridden elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy CreateAccountGroupRequestFreightPolicy `json:"freight_policy,omitzero"`
// contains filtered or unexported fields
}
Request to create an account group.
The properties Name, Type are required.
func (CreateAccountGroupRequestParam) MarshalJSON ¶
func (r CreateAccountGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAccountGroupRequestParam) UnmarshalJSON ¶
func (r *CreateAccountGroupRequestParam) UnmarshalJSON(data []byte) error
type CreateAccountGroupRequestType ¶
type CreateAccountGroupRequestType string
How this account group will be used.
- `pricing_group`: used for pricing rules, such as a "Preferred" group that receives a special discount.
- `type_group`: used to categorize accounts, such as "Consumers" or "Distributors".
The type cannot be changed after creation.
const ( CreateAccountGroupRequestTypePricingGroup CreateAccountGroupRequestType = "pricing_group" CreateAccountGroupRequestTypeTypeGroup CreateAccountGroupRequestType = "type_group" )
type CreateAccountIntegrationRequestParam ¶
type CreateAccountIntegrationRequestParam struct {
// JSON string containing the provider's credentials.
//
// Required keys depend on the provider:
//
// - `stripe`: `private_key` (`sk_...`), `publishable_key` (`pk_...`), and
// `webhook_secret` (`whsec_...`).
// - `shippo`: `api_key` (`shippo_live_...` or `shippo_test_...`).
// - `hubspot`: `access_token` (`pat-...`).
//
// For Stripe and Shippo, sandbox accounts must supply test keys and production
// accounts must supply live keys; credentials that do not match are rejected.
// HubSpot tokens make no such distinction.
Credentials string `json:"credentials" api:"required"`
// Display name of the integration.
Name string `json:"name" api:"required"`
// Integration provider code.
//
// - `stripe`: Stripe payment processing.
// - `shippo`: Shippo shipping and label generation.
// - `hubspot`: HubSpot CRM.
//
// Any of "stripe", "shippo", "hubspot".
Provider CreateAccountIntegrationRequestProvider `json:"provider,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to create or upsert an account integration.
The properties Credentials, Name, Provider are required.
func (CreateAccountIntegrationRequestParam) MarshalJSON ¶
func (r CreateAccountIntegrationRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAccountIntegrationRequestParam) UnmarshalJSON ¶
func (r *CreateAccountIntegrationRequestParam) UnmarshalJSON(data []byte) error
type CreateAccountIntegrationRequestProvider ¶
type CreateAccountIntegrationRequestProvider string
Integration provider code.
- `stripe`: Stripe payment processing. - `shippo`: Shippo shipping and label generation. - `hubspot`: HubSpot CRM.
const ( CreateAccountIntegrationRequestProviderStripe CreateAccountIntegrationRequestProvider = "stripe" CreateAccountIntegrationRequestProviderShippo CreateAccountIntegrationRequestProvider = "shippo" CreateAccountIntegrationRequestProviderHubspot CreateAccountIntegrationRequestProvider = "hubspot" )
type CreateAccountPriceRequestParam ¶
type CreateAccountPriceRequestParam struct {
// ID of the product line whose products this price applies to.
ProductLineID string `json:"product_line_id" api:"required"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
Rate RateInputParam `json:"rate,omitzero" api:"required"`
// ID of the customer this price is offered to.
//
// A price recorded against a parent customer account also applies to orders placed
// by its child accounts.
RecipientAccountID string `json:"recipient_account_id" api:"required"`
// Attribute IDs to constrain this price to.
//
// When set, the price applies only to items that have every listed attribute.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// Item category IDs to record on this price.
//
// Order pricing matches an account price on its product line and attributes only,
// so categories recorded here do not narrow which products the price applies to.
CategoryIDs []string `json:"category_ids,omitzero"`
// contains filtered or unexported fields
}
Request to create an account price.
The properties ProductLineID, Rate, RecipientAccountID are required.
func (CreateAccountPriceRequestParam) MarshalJSON ¶
func (r CreateAccountPriceRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAccountPriceRequestParam) UnmarshalJSON ¶
func (r *CreateAccountPriceRequestParam) UnmarshalJSON(data []byte) error
type CreateAccountUserRequestParam ¶
type CreateAccountUserRequestParam struct {
// ID of the department to assign to the user.
//
// The department must already exist in the account you are acting in.
DepartmentID param.Opt[string] `json:"department_id,omitzero"`
// User email address.
//
// Either `email` or `username` must be provided. If a user with this email already
// exists, that user is added to the account instead of a new user being created,
// and the request fails with a conflict if they are already an active member of
// it.
Email param.Opt[string] `json:"email,omitzero"`
// Whether the user can be assigned as a sales representative on orders,
// territories, and targets.
//
// Defaults to false. Forced true for the `sales_rep` role type and rejected for
// scanner and agent roles.
IsCommissionEligible param.Opt[bool] `json:"is_commission_eligible,omitzero"`
// User display name.
Name param.Opt[string] `json:"name,omitzero"`
// Password for scanning station users.
//
// Required when creating a scanning station user (username without email) and
// rejected for all other users, who instead receive a generated password in their
// welcome email. Must be 8–72 characters and include an uppercase letter, a
// lowercase letter, a number, and a special character.
Password param.Opt[string] `json:"password,omitzero"`
// ID of the role to assign to the user.
//
// The role you supply can be overridden: users added to a customer account always
// receive the shared customer role so their portal capabilities stay
// permission-driven, and scanning station users in any other account receive the
// scanner role. Supplying a role whose type is `sales_rep` normalizes to the
// account's canonical sales-rep role.
RoleID param.Opt[string] `json:"role_id,omitzero"`
// Unique username.
//
// 3–255 characters; letters, numbers, underscores, and hyphens. Either `email` or
// `username` must be provided. Providing a username without an email creates a
// scanning station user.
Username param.Opt[string] `json:"username,omitzero"`
// Notification preference toggles for the new user.
//
// Only applies when creating a user in another account you manage (cross-account);
// ignored when creating a user in your own account.
Preferences []NotificationPreferenceItemParam `json:"preferences,omitzero"`
// contains filtered or unexported fields
}
Request to create an account user.
func (CreateAccountUserRequestParam) MarshalJSON ¶
func (r CreateAccountUserRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAccountUserRequestParam) UnmarshalJSON ¶
func (r *CreateAccountUserRequestParam) UnmarshalJSON(data []byte) error
type CreateAgentRequestParam ¶
type CreateAgentRequestParam struct {
// Category grouping for the agent (e.g. `order_processing`), used to organize
// agents in the UI.
CategoryCode string `json:"category_code" api:"required"`
// Agent-level configuration for creation/update requests.
Config ConfigInputParam `json:"config,omitzero" api:"required"`
// Human-readable name of the agent.
Name string `json:"name" api:"required"`
// URL-friendly identifier for the agent.
//
// Must be unique within your account.
Slug string `json:"slug" api:"required"`
// How runs of this agent are initiated.
//
// - `scheduled`: runs on a cron schedule; `config.trigger_config.cron_schedule` is
// required.
// - `event`: runs in response to platform events; at least one
// `config.trigger_config.event_filters` entry is required.
// - `manual`: runs only when explicitly invoked.
// - `chat`: runs when a user messages the agent in a conversation, and the agent's
// reply is posted back into that conversation.
//
// Whatever the trigger type, a run can always be started by hand with the Trigger
// Agent Run endpoint.
//
// Any of "scheduled", "manual", "event", "chat".
TriggerType CreateAgentRequestTriggerType `json:"trigger_type,omitzero" api:"required"`
// Description of what the agent does.
Description param.Opt[string] `json:"description,omitzero"`
// ID of the role that defines the permissions the agent operates with.
//
// Every API call the agent makes is authorized against this role, so it bounds
// what the agent can see and change. An agent created without a role cannot
// execute — its runs fail immediately — so attach one before triggering it.
RoleID param.Opt[string] `json:"role_id,omitzero"`
// Built-in tools to attach to the agent.
Tools []ToolInputParam `json:"tools,omitzero"`
// contains filtered or unexported fields
}
Request to create an agent definition.
The properties CategoryCode, Config, Name, Slug, TriggerType are required.
func (CreateAgentRequestParam) MarshalJSON ¶
func (r CreateAgentRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAgentRequestParam) UnmarshalJSON ¶
func (r *CreateAgentRequestParam) UnmarshalJSON(data []byte) error
type CreateAgentRequestTriggerType ¶
type CreateAgentRequestTriggerType string
How runs of this agent are initiated.
- `scheduled`: runs on a cron schedule; `config.trigger_config.cron_schedule` is required.
- `event`: runs in response to platform events; at least one `config.trigger_config.event_filters` entry is required.
- `manual`: runs only when explicitly invoked.
- `chat`: runs when a user messages the agent in a conversation, and the agent's reply is posted back into that conversation.
Whatever the trigger type, a run can always be started by hand with the Trigger Agent Run endpoint.
const ( CreateAgentRequestTriggerTypeScheduled CreateAgentRequestTriggerType = "scheduled" CreateAgentRequestTriggerTypeManual CreateAgentRequestTriggerType = "manual" CreateAgentRequestTriggerTypeEvent CreateAgentRequestTriggerType = "event" CreateAgentRequestTriggerTypeChat CreateAgentRequestTriggerType = "chat" )
type CreateAttachmentUploadURLRequestParam ¶
type CreateAttachmentUploadURLRequestParam struct {
// The original filename of the file to upload.
Filename string `json:"filename" api:"required"`
// The MIME content type of the file.
//
// The file must then be uploaded with this same content type, or object storage
// rejects it. It also decides how the attachment preview returned here is
// classified: `image/…` becomes an inline image, anything else a file.
ContentType param.Opt[string] `json:"content_type,omitzero"`
// contains filtered or unexported fields
}
Request to mint a presigned upload target for a chat attachment.
The property Filename is required.
func (CreateAttachmentUploadURLRequestParam) MarshalJSON ¶
func (r CreateAttachmentUploadURLRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAttachmentUploadURLRequestParam) UnmarshalJSON ¶
func (r *CreateAttachmentUploadURLRequestParam) UnmarshalJSON(data []byte) error
type CreateAttributeRequestColor ¶
type CreateAttributeRequestColor string
Swatch color used to display this attribute in the UI.
When omitted, one of the nine named colors (everything except `default`) is assigned at random.
const ( CreateAttributeRequestColorBlue CreateAttributeRequestColor = "blue" CreateAttributeRequestColorBrown CreateAttributeRequestColor = "brown" CreateAttributeRequestColorDefault CreateAttributeRequestColor = "default" CreateAttributeRequestColorGray CreateAttributeRequestColor = "gray" CreateAttributeRequestColorGreen CreateAttributeRequestColor = "green" CreateAttributeRequestColorOrange CreateAttributeRequestColor = "orange" CreateAttributeRequestColorPink CreateAttributeRequestColor = "pink" CreateAttributeRequestColorPurple CreateAttributeRequestColor = "purple" CreateAttributeRequestColorRed CreateAttributeRequestColor = "red" CreateAttributeRequestColorYellow CreateAttributeRequestColor = "yellow" )
type CreateAttributeRequestParam ¶
type CreateAttributeRequestParam struct {
// The selectable value this attribute represents, such as `Red`.
//
// Must be unique across all attributes in the account, not just within the
// property. Leading and trailing whitespace is trimmed.
Value string `json:"value" api:"required"`
// Position of the new attribute relative to its siblings within the property,
// starting at `1`.
//
// Must be at most the property's current attribute count plus one; siblings at or
// after this position are shifted one position later. Defaults to the last
// position if not provided.
SortOrder param.Opt[int64] `json:"sort_order,omitzero"`
// Swatch color used to display this attribute in the UI.
//
// When omitted, one of the nine named colors (everything except `default`) is
// assigned at random.
//
// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
// "red", "yellow".
Color CreateAttributeRequestColor `json:"color,omitzero"`
// contains filtered or unexported fields
}
Request to create an attribute.
The property Value is required.
func (CreateAttributeRequestParam) MarshalJSON ¶
func (r CreateAttributeRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateAttributeRequestParam) UnmarshalJSON ¶
func (r *CreateAttributeRequestParam) UnmarshalJSON(data []byte) error
type CreateCarrierRequestCode ¶
type CreateCarrierRequestCode string
Well-known carrier code.
Providing a Shippo-supported code (`fedex`, `ups`, `usps`) connects the carrier through Shippo and syncs its service levels; the other codes, such as `will_call` and `delivery`, simply describe a self-managed shipping method. Omit the code entirely when none of them fit. The code cannot be changed after the carrier is created.
const ( CreateCarrierRequestCodeFedex CreateCarrierRequestCode = "fedex" CreateCarrierRequestCodeUps CreateCarrierRequestCode = "ups" CreateCarrierRequestCodeUsps CreateCarrierRequestCode = "usps" CreateCarrierRequestCodeWillCall CreateCarrierRequestCode = "will_call" CreateCarrierRequestCodeDelivery CreateCarrierRequestCode = "delivery" CreateCarrierRequestCodeLtl CreateCarrierRequestCode = "ltl" CreateCarrierRequestCodeLtl1 CreateCarrierRequestCode = "ltl1" CreateCarrierRequestCodeFreightCollect CreateCarrierRequestCode = "freight_collect" )
type CreateCarrierRequestCustomerPortalVisibility ¶
type CreateCarrierRequestCustomerPortalVisibility string
Whether customers can see and select this carrier at checkout in the customer portal.
const ( CreateCarrierRequestCustomerPortalVisibilityVisible CreateCarrierRequestCustomerPortalVisibility = "visible" CreateCarrierRequestCustomerPortalVisibilityHidden CreateCarrierRequestCustomerPortalVisibility = "hidden" )
type CreateCarrierRequestParam ¶
type CreateCarrierRequestParam struct {
// Human-readable name for the carrier.
//
// Must not match another carrier already visible to your account, including the
// system-provided ones.
Name string `json:"name" api:"required"`
// Your account number with this carrier.
//
// Required when `code` is `ups` or `usps`, whose carrier accounts are connected to
// Shippo using this number; FedEx authorizes through OAuth instead, so no account
// number is needed.
AccountNumber param.Opt[string] `json:"account_number,omitzero"`
// Well-known carrier code.
//
// Providing a Shippo-supported code (`fedex`, `ups`, `usps`) connects the carrier
// through Shippo and syncs its service levels; the other codes, such as
// `will_call` and `delivery`, simply describe a self-managed shipping method. Omit
// the code entirely when none of them fit. The code cannot be changed after the
// carrier is created.
//
// Any of "fedex", "ups", "usps", "will_call", "delivery", "ltl", "ltl1",
// "freight_collect".
Code CreateCarrierRequestCode `json:"code,omitzero"`
// Whether customers can see and select this carrier at checkout in the customer
// portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility CreateCarrierRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to create a carrier.
The property Name is required.
func (CreateCarrierRequestParam) MarshalJSON ¶
func (r CreateCarrierRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateCarrierRequestParam) UnmarshalJSON ¶
func (r *CreateCarrierRequestParam) UnmarshalJSON(data []byte) error
type CreateConversationRequestParam ¶
type CreateConversationRequestParam struct {
// The other participants to add.
//
// For a direct message, exactly one account user. For a group, the members to seed
// — these can be omitted when `group_id` supplies a roster, or when the
// conversation is anchored to a topic resource, since a record discussion may
// start solo and pull people in later.
//
// The caller is always a participant and does not need to be listed; on a group
// they become its owner and every other member seeded at creation is notified.
ParticipantAccountUserIDs []string `json:"participant_account_user_ids,omitzero" api:"required"`
// The kind of conversation to create.
//
// - `direct_message`: a 1:1 thread with exactly one other user. Addressing
// yourself is allowed and gives you a private notes thread.
// - `group`: a named thread with any number of user and agent members.
//
// `system` channels are created by the platform and cannot be requested here.
//
// Any of "direct_message", "group", "system".
Type CreateConversationRequestType `json:"type,omitzero" api:"required"`
// Seed a group conversation from a reusable roster.
//
// The roster's current members are copied into this conversation (in addition to
// any `participant_account_user_ids`); the conversation is independent afterward.
// Ignored for direct messages.
GroupID param.Opt[string] `json:"group_id,omitzero"`
// Title for a group conversation.
//
// A direct message is identified by its participants rather than by a title.
Title param.Opt[string] `json:"title,omitzero"`
// The id of the business record to anchor this conversation to.
TopicResourceID param.Opt[string] `json:"topic_resource_id,omitzero"`
// The type of business record to anchor this conversation to.
//
// An anchored conversation is returned when conversations are listed for that
// record, which is how a discussion shows up on an order or invoice.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
TopicResourceType CreateConversationRequestTopicResourceType `json:"topic_resource_type,omitzero"`
// contains filtered or unexported fields
}
Request to create a conversation.
The properties ParticipantAccountUserIDs, Type are required.
func (CreateConversationRequestParam) MarshalJSON ¶
func (r CreateConversationRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateConversationRequestParam) UnmarshalJSON ¶
func (r *CreateConversationRequestParam) UnmarshalJSON(data []byte) error
type CreateConversationRequestTopicResourceType ¶
type CreateConversationRequestTopicResourceType string
The type of business record to anchor this conversation to.
An anchored conversation is returned when conversations are listed for that record, which is how a discussion shows up on an order or invoice.
const ( CreateConversationRequestTopicResourceTypeAccount CreateConversationRequestTopicResourceType = "account" CreateConversationRequestTopicResourceTypeActor CreateConversationRequestTopicResourceType = "actor" CreateConversationRequestTopicResourceTypeEntity CreateConversationRequestTopicResourceType = "entity" CreateConversationRequestTopicResourceTypeRecord CreateConversationRequestTopicResourceType = "record" CreateConversationRequestTopicResourceTypeFreight CreateConversationRequestTopicResourceType = "freight" CreateConversationRequestTopicResourceTypeCommitment CreateConversationRequestTopicResourceType = "commitment" CreateConversationRequestTopicResourceTypeSalesOrderTotals CreateConversationRequestTopicResourceType = "sales_order_totals" CreateConversationRequestTopicResourceTypeSalesOrderStageTotal CreateConversationRequestTopicResourceType = "sales_order_stage_total" CreateConversationRequestTopicResourceTypeSalesOrderRelated CreateConversationRequestTopicResourceType = "sales_order_related" CreateConversationRequestTopicResourceTypeOrderContact CreateConversationRequestTopicResourceType = "order_contact" CreateConversationRequestTopicResourceTypeUser CreateConversationRequestTopicResourceType = "user" CreateConversationRequestTopicResourceTypeAddress CreateConversationRequestTopicResourceType = "address" CreateConversationRequestTopicResourceTypeAPIKey CreateConversationRequestTopicResourceType = "api_key" CreateConversationRequestTopicResourceTypeCreatedAPIKey CreateConversationRequestTopicResourceType = "created_api_key" CreateConversationRequestTopicResourceTypeRefreshToken CreateConversationRequestTopicResourceType = "refresh_token" CreateConversationRequestTopicResourceTypeList CreateConversationRequestTopicResourceType = "list" CreateConversationRequestTopicResourceTypeSandbox CreateConversationRequestTopicResourceType = "sandbox" CreateConversationRequestTopicResourceTypeRegistrationSession CreateConversationRequestTopicResourceType = "registration_session" CreateConversationRequestTopicResourceTypePricingPlan CreateConversationRequestTopicResourceType = "pricing_plan" CreateConversationRequestTopicResourceTypeAccountPlan CreateConversationRequestTopicResourceType = "account_plan" CreateConversationRequestTopicResourceTypePlanChange CreateConversationRequestTopicResourceType = "plan_change" CreateConversationRequestTopicResourceTypeEnterpriseInquiry CreateConversationRequestTopicResourceType = "enterprise_inquiry" CreateConversationRequestTopicResourceTypeRequestLog CreateConversationRequestTopicResourceType = "request_log" CreateConversationRequestTopicResourceTypeAuditEvent CreateConversationRequestTopicResourceType = "audit_event" CreateConversationRequestTopicResourceTypeAuditFieldChange CreateConversationRequestTopicResourceType = "audit_field_change" CreateConversationRequestTopicResourceTypeRole CreateConversationRequestTopicResourceType = "role" CreateConversationRequestTopicResourceTypeUnit CreateConversationRequestTopicResourceType = "unit" CreateConversationRequestTopicResourceTypeAccountAffiliation CreateConversationRequestTopicResourceType = "account_affiliation" CreateConversationRequestTopicResourceTypeAgentDefinition CreateConversationRequestTopicResourceType = "agent_definition" CreateConversationRequestTopicResourceTypeAvailableTool CreateConversationRequestTopicResourceType = "available_tool" CreateConversationRequestTopicResourceTypeAgentDefinitionTool CreateConversationRequestTopicResourceType = "agent_definition_tool" CreateConversationRequestTopicResourceTypeAgentAccountStatus CreateConversationRequestTopicResourceType = "agent_account_status" CreateConversationRequestTopicResourceTypeAgentRun CreateConversationRequestTopicResourceType = "agent_run" CreateConversationRequestTopicResourceTypeAgentAction CreateConversationRequestTopicResourceType = "agent_action" CreateConversationRequestTopicResourceTypeAgentRunStep CreateConversationRequestTopicResourceType = "agent_run_step" CreateConversationRequestTopicResourceTypeAgentTokenUsage CreateConversationRequestTopicResourceType = "agent_token_usage" CreateConversationRequestTopicResourceTypeAgentMemory CreateConversationRequestTopicResourceType = "agent_memory" CreateConversationRequestTopicResourceTypeNotification CreateConversationRequestTopicResourceType = "notification" CreateConversationRequestTopicResourceTypeNotificationUnreadCount CreateConversationRequestTopicResourceType = "notification_unread_count" CreateConversationRequestTopicResourceTypeNotificationSendResult CreateConversationRequestTopicResourceType = "notification_send_result" CreateConversationRequestTopicResourceTypeNotificationUnreadSummary CreateConversationRequestTopicResourceType = "notification_unread_summary" CreateConversationRequestTopicResourceTypeAnnouncement CreateConversationRequestTopicResourceType = "announcement" CreateConversationRequestTopicResourceTypeConversation CreateConversationRequestTopicResourceType = "conversation" CreateConversationRequestTopicResourceTypeSupportCase CreateConversationRequestTopicResourceType = "support_case" CreateConversationRequestTopicResourceTypeConversationParticipant CreateConversationRequestTopicResourceType = "conversation_participant" CreateConversationRequestTopicResourceTypeReadCursor CreateConversationRequestTopicResourceType = "read_cursor" CreateConversationRequestTopicResourceTypeChatMessage CreateConversationRequestTopicResourceType = "chat_message" CreateConversationRequestTopicResourceTypeNotificationUnreadSummaryAccount CreateConversationRequestTopicResourceType = "notification_unread_summary_account" CreateConversationRequestTopicResourceTypeMessagingBlock CreateConversationRequestTopicResourceType = "messaging_block" CreateConversationRequestTopicResourceTypeNotificationPreference CreateConversationRequestTopicResourceType = "notification_preference" CreateConversationRequestTopicResourceTypeMessageAttachment CreateConversationRequestTopicResourceType = "message_attachment" CreateConversationRequestTopicResourceTypeAttachmentUploadTarget CreateConversationRequestTopicResourceType = "attachment_upload_target" CreateConversationRequestTopicResourceTypeScheduledMessage CreateConversationRequestTopicResourceType = "scheduled_message" CreateConversationRequestTopicResourceTypeMessagingContact CreateConversationRequestTopicResourceType = "messaging_contact" CreateConversationRequestTopicResourceTypeMessageReport CreateConversationRequestTopicResourceType = "message_report" CreateConversationRequestTopicResourceTypeToolGroup CreateConversationRequestTopicResourceType = "tool_group" CreateConversationRequestTopicResourceTypeModel CreateConversationRequestTopicResourceType = "model" CreateConversationRequestTopicResourceTypePaymentTerm CreateConversationRequestTopicResourceType = "payment_term" CreateConversationRequestTopicResourceTypeShippingTerm CreateConversationRequestTopicResourceType = "shipping_term" CreateConversationRequestTopicResourceTypeQuantity CreateConversationRequestTopicResourceType = "quantity" CreateConversationRequestTopicResourceTypeAccountGroup CreateConversationRequestTopicResourceType = "account_group" CreateConversationRequestTopicResourceTypeSupportRoute CreateConversationRequestTopicResourceType = "support_route" CreateConversationRequestTopicResourceTypeSupportAvailability CreateConversationRequestTopicResourceType = "support_availability" CreateConversationRequestTopicResourceTypeAccountStatus CreateConversationRequestTopicResourceType = "account_status" CreateConversationRequestTopicResourceTypeGeolocation CreateConversationRequestTopicResourceType = "geolocation" CreateConversationRequestTopicResourceTypeAccountUser CreateConversationRequestTopicResourceType = "account_user" CreateConversationRequestTopicResourceTypeDepartment CreateConversationRequestTopicResourceType = "department" CreateConversationRequestTopicResourceTypeAccountIntegration CreateConversationRequestTopicResourceType = "account_integration" CreateConversationRequestTopicResourceTypeAccountPrice CreateConversationRequestTopicResourceType = "account_price" CreateConversationRequestTopicResourceTypeProductLine CreateConversationRequestTopicResourceType = "product_line" CreateConversationRequestTopicResourceTypeItemCategory CreateConversationRequestTopicResourceType = "item_category" CreateConversationRequestTopicResourceTypeAttribute CreateConversationRequestTopicResourceType = "attribute" CreateConversationRequestTopicResourceTypeRate CreateConversationRequestTopicResourceType = "rate" CreateConversationRequestTopicResourceTypeAccountGroupProductLineAccess CreateConversationRequestTopicResourceType = "account_group_product_line_access" CreateConversationRequestTopicResourceTypeSalesTarget CreateConversationRequestTopicResourceType = "sales_target" CreateConversationRequestTopicResourceTypeAdjustmentType CreateConversationRequestTopicResourceType = "adjustment_type" CreateConversationRequestTopicResourceTypeAccountBranding CreateConversationRequestTopicResourceType = "account_branding" CreateConversationRequestTopicResourceTypeAccountPortal CreateConversationRequestTopicResourceType = "account_portal" CreateConversationRequestTopicResourceTypeAccountLogoURL CreateConversationRequestTopicResourceType = "account_logo_url" CreateConversationRequestTopicResourceTypeAccountFaviconURL CreateConversationRequestTopicResourceType = "account_favicon_url" CreateConversationRequestTopicResourceTypePublicAccount CreateConversationRequestTopicResourceType = "public_account" CreateConversationRequestTopicResourceTypeProperty CreateConversationRequestTopicResourceType = "property" CreateConversationRequestTopicResourceTypeCarrier CreateConversationRequestTopicResourceType = "carrier" CreateConversationRequestTopicResourceTypeServiceLevel CreateConversationRequestTopicResourceType = "service_level" CreateConversationRequestTopicResourceTypeItem CreateConversationRequestTopicResourceType = "item" CreateConversationRequestTopicResourceTypeItemLotDefault CreateConversationRequestTopicResourceType = "item_lot_default" CreateConversationRequestTopicResourceTypeItemInventory CreateConversationRequestTopicResourceType = "item_inventory" CreateConversationRequestTopicResourceTypeProduct CreateConversationRequestTopicResourceType = "product" CreateConversationRequestTopicResourceTypeBatch CreateConversationRequestTopicResourceType = "batch" CreateConversationRequestTopicResourceTypeBatchFlowNode CreateConversationRequestTopicResourceType = "batch_flow_node" CreateConversationRequestTopicResourceTypeScanningConsumption CreateConversationRequestTopicResourceType = "scanning_consumption" CreateConversationRequestTopicResourceTypeOpenBatchSummary CreateConversationRequestTopicResourceType = "open_batch_summary" CreateConversationRequestTopicResourceTypeScanningProductionStepInfo CreateConversationRequestTopicResourceType = "scanning_production_step_info" CreateConversationRequestTopicResourceTypeScanningStation CreateConversationRequestTopicResourceType = "scanning_station" CreateConversationRequestTopicResourceTypeProductionStep CreateConversationRequestTopicResourceType = "production_step" CreateConversationRequestTopicResourceTypeProductionRun CreateConversationRequestTopicResourceType = "production_run" CreateConversationRequestTopicResourceTypeMachine CreateConversationRequestTopicResourceType = "machine" CreateConversationRequestTopicResourceTypeMachineStatus CreateConversationRequestTopicResourceType = "machine_status" CreateConversationRequestTopicResourceTypeMachineDowntimeEvent CreateConversationRequestTopicResourceType = "machine_downtime_event" CreateConversationRequestTopicResourceTypeDemandOverride CreateConversationRequestTopicResourceType = "demand_override" CreateConversationRequestTopicResourceTypeDemandOverrideType CreateConversationRequestTopicResourceType = "demand_override_type" CreateConversationRequestTopicResourceTypeMachineDowntimeReason CreateConversationRequestTopicResourceType = "machine_downtime_reason" CreateConversationRequestTopicResourceTypeProductionSchedulePreview CreateConversationRequestTopicResourceType = "production_schedule_preview" CreateConversationRequestTopicResourceTypeProductionScheduleRegeneratePreview CreateConversationRequestTopicResourceType = "production_schedule_regenerate_preview" CreateConversationRequestTopicResourceTypeProductionSchedule CreateConversationRequestTopicResourceType = "production_schedule" CreateConversationRequestTopicResourceTypeProductionScheduleLine CreateConversationRequestTopicResourceType = "production_schedule_line" CreateConversationRequestTopicResourceTypeProductionScheduleDeviation CreateConversationRequestTopicResourceType = "production_schedule_deviation" CreateConversationRequestTopicResourceTypeProductionScheduleDerivedLine CreateConversationRequestTopicResourceType = "production_schedule_derived_line" CreateConversationRequestTopicResourceTypeProductionScheduleSettings CreateConversationRequestTopicResourceType = "production_schedule_settings" CreateConversationRequestTopicResourceTypeProductionScheduleResourceSetting CreateConversationRequestTopicResourceType = "production_schedule_resource_setting" CreateConversationRequestTopicResourceTypeProductionScheduleItemSetting CreateConversationRequestTopicResourceType = "production_schedule_item_setting" CreateConversationRequestTopicResourceTypeFulfillmentRecommendation CreateConversationRequestTopicResourceType = "fulfillment_recommendation" CreateConversationRequestTopicResourceTypeAnalyzeDeliveryPerformanceResponse CreateConversationRequestTopicResourceType = "analyze_delivery_performance_response" CreateConversationRequestTopicResourceTypeDeliveryPerformance CreateConversationRequestTopicResourceType = "delivery_performance" CreateConversationRequestTopicResourceTypeDeliveryBacklogBucket CreateConversationRequestTopicResourceType = "delivery_backlog_bucket" CreateConversationRequestTopicResourceTypeDeliveryLatenessBucket CreateConversationRequestTopicResourceType = "delivery_lateness_bucket" CreateConversationRequestTopicResourceTypeDeliveryBreakdown CreateConversationRequestTopicResourceType = "delivery_breakdown" CreateConversationRequestTopicResourceTypeAnalyzeSalesBreakdownResponse CreateConversationRequestTopicResourceType = "analyze_sales_breakdown_response" CreateConversationRequestTopicResourceTypeSalesTotals CreateConversationRequestTopicResourceType = "sales_totals" CreateConversationRequestTopicResourceTypeSalesBreakdown CreateConversationRequestTopicResourceType = "sales_breakdown" CreateConversationRequestTopicResourceTypeScheduleOrderCoverage CreateConversationRequestTopicResourceType = "schedule_order_coverage" CreateConversationRequestTopicResourceTypeScheduleOrderCoverageLine CreateConversationRequestTopicResourceType = "schedule_order_coverage_line" CreateConversationRequestTopicResourceTypeScheduleDeviationType CreateConversationRequestTopicResourceType = "schedule_deviation_type" CreateConversationRequestTopicResourceTypeScheduleAtRiskOrder CreateConversationRequestTopicResourceType = "schedule_at_risk_order" CreateConversationRequestTopicResourceTypeProductionScheduleFinishedPolicy CreateConversationRequestTopicResourceType = "production_schedule_finished_policy" CreateConversationRequestTopicResourceTypeProductionScheduleFinishingLine CreateConversationRequestTopicResourceType = "production_schedule_finishing_line" CreateConversationRequestTopicResourceTypeProductionScheduleWeekRelease CreateConversationRequestTopicResourceType = "production_schedule_week_release" CreateConversationRequestTopicResourceTypeProductionScheduleWeekReleasePreview CreateConversationRequestTopicResourceType = "production_schedule_week_release_preview" CreateConversationRequestTopicResourceTypeProductionScheduleItemPolicy CreateConversationRequestTopicResourceType = "production_schedule_item_policy" CreateConversationRequestTopicResourceTypeChildAccount CreateConversationRequestTopicResourceType = "child_account" CreateConversationRequestTopicResourceTypeUnitGroup CreateConversationRequestTopicResourceType = "unit_group" CreateConversationRequestTopicResourceTypeUnitGroupUnit CreateConversationRequestTopicResourceType = "unit_group_unit" CreateConversationRequestTopicResourceTypeConsumption CreateConversationRequestTopicResourceType = "consumption" CreateConversationRequestTopicResourceTypeCustomerProductLineAccess CreateConversationRequestTopicResourceType = "customer_product_line_access" CreateConversationRequestTopicResourceTypeCustomer CreateConversationRequestTopicResourceType = "customer" CreateConversationRequestTopicResourceTypeFrequentlyOrderedProduct CreateConversationRequestTopicResourceType = "frequently_ordered_product" CreateConversationRequestTopicResourceTypePriority CreateConversationRequestTopicResourceType = "priority" CreateConversationRequestTopicResourceTypeDelivery CreateConversationRequestTopicResourceType = "delivery" CreateConversationRequestTopicResourceTypeDeliveryLine CreateConversationRequestTopicResourceType = "delivery_line" CreateConversationRequestTopicResourceTypeDeliveryRelated CreateConversationRequestTopicResourceType = "delivery_related" CreateConversationRequestTopicResourceTypeSalesOrder CreateConversationRequestTopicResourceType = "sales_order" CreateConversationRequestTopicResourceTypeLocation CreateConversationRequestTopicResourceType = "location" CreateConversationRequestTopicResourceTypeLocationType CreateConversationRequestTopicResourceType = "location_type" CreateConversationRequestTopicResourceTypeLot CreateConversationRequestTopicResourceType = "lot" CreateConversationRequestTopicResourceTypeEmailLog CreateConversationRequestTopicResourceType = "email_log" CreateConversationRequestTopicResourceTypeEmailDomain CreateConversationRequestTopicResourceType = "email_domain" CreateConversationRequestTopicResourceTypeEmailInbox CreateConversationRequestTopicResourceType = "email_inbox" CreateConversationRequestTopicResourceTypeEmailSender CreateConversationRequestTopicResourceType = "email_sender" CreateConversationRequestTopicResourceTypePortalDomain CreateConversationRequestTopicResourceType = "portal_domain" CreateConversationRequestTopicResourceTypeDNSRecord CreateConversationRequestTopicResourceType = "dns_record" CreateConversationRequestTopicResourceTypeInventoryChangeLog CreateConversationRequestTopicResourceType = "inventory_change_log" CreateConversationRequestTopicResourceTypeInvoice CreateConversationRequestTopicResourceType = "invoice" CreateConversationRequestTopicResourceTypeInvoiceSummary CreateConversationRequestTopicResourceType = "invoice_summary" CreateConversationRequestTopicResourceTypeInvoiceLine CreateConversationRequestTopicResourceType = "invoice_line" CreateConversationRequestTopicResourceTypeInvoiceAllocation CreateConversationRequestTopicResourceType = "invoice_allocation" CreateConversationRequestTopicResourceTypeInvoiceForPayment CreateConversationRequestTopicResourceType = "invoice_for_payment" CreateConversationRequestTopicResourceTypeShipment CreateConversationRequestTopicResourceType = "shipment" CreateConversationRequestTopicResourceTypeShipmentSummary CreateConversationRequestTopicResourceType = "shipment_summary" CreateConversationRequestTopicResourceTypeShipmentLine CreateConversationRequestTopicResourceType = "shipment_line" CreateConversationRequestTopicResourceTypeShippingCase CreateConversationRequestTopicResourceType = "shipping_case" CreateConversationRequestTopicResourceTypeShippingCaseLabelURL CreateConversationRequestTopicResourceType = "shipping_case_label_url" CreateConversationRequestTopicResourceTypeSettlement CreateConversationRequestTopicResourceType = "settlement" CreateConversationRequestTopicResourceTypeSettlementSummary CreateConversationRequestTopicResourceType = "settlement_summary" CreateConversationRequestTopicResourceTypeRolePermission CreateConversationRequestTopicResourceType = "role_permission" CreateConversationRequestTopicResourceTypeRegistrationFlow CreateConversationRequestTopicResourceType = "registration_flow" CreateConversationRequestTopicResourceTypeRegistrationFlowOption CreateConversationRequestTopicResourceType = "registration_flow_option" CreateConversationRequestTopicResourceTypeTransaction CreateConversationRequestTopicResourceType = "transaction" CreateConversationRequestTopicResourceTypeTransactionSummary CreateConversationRequestTopicResourceType = "transaction_summary" CreateConversationRequestTopicResourceTypeTransactionMethod CreateConversationRequestTopicResourceType = "transaction_method" CreateConversationRequestTopicResourceTypeTransactionType CreateConversationRequestTopicResourceType = "transaction_type" CreateConversationRequestTopicResourceTypeTransactionAllocation CreateConversationRequestTopicResourceType = "transaction_allocation" CreateConversationRequestTopicResourceTypeUsageItem CreateConversationRequestTopicResourceType = "usage_item" CreateConversationRequestTopicResourceTypeAccountUsageResponse CreateConversationRequestTopicResourceType = "account_usage_response" CreateConversationRequestTopicResourceTypeSubscriptionInfo CreateConversationRequestTopicResourceType = "subscription_info" CreateConversationRequestTopicResourceTypeBillingPortalSessionResponse CreateConversationRequestTopicResourceType = "billing_portal_session_response" CreateConversationRequestTopicResourceTypeSwitchPlanResponse CreateConversationRequestTopicResourceType = "switch_plan_response" CreateConversationRequestTopicResourceTypeEnsureBillingCustomerResponse CreateConversationRequestTopicResourceType = "ensure_billing_customer_response" CreateConversationRequestTopicResourceTypeSpendingCapResponse CreateConversationRequestTopicResourceType = "spending_cap_response" CreateConversationRequestTopicResourceTypeAgentSpendInfo CreateConversationRequestTopicResourceType = "agent_spend_info" CreateConversationRequestTopicResourceTypeWebhookResponse CreateConversationRequestTopicResourceType = "webhook_response" CreateConversationRequestTopicResourceTypeAddressSuggestion CreateConversationRequestTopicResourceType = "address_suggestion" CreateConversationRequestTopicResourceTypeAddressComponents CreateConversationRequestTopicResourceType = "address_components" CreateConversationRequestTopicResourceTypeAddressDetailsResult CreateConversationRequestTopicResourceType = "address_details_result" CreateConversationRequestTopicResourceTypeValidatedAddress CreateConversationRequestTopicResourceType = "validated_address" CreateConversationRequestTopicResourceTypePlanLimit CreateConversationRequestTopicResourceType = "plan_limit" CreateConversationRequestTopicResourceTypePlanChangeProration CreateConversationRequestTopicResourceType = "plan_change_proration" CreateConversationRequestTopicResourceTypePlanChangeLineItem CreateConversationRequestTopicResourceType = "plan_change_line_item" CreateConversationRequestTopicResourceTypeSetupBillingResponse CreateConversationRequestTopicResourceType = "setup_billing_response" CreateConversationRequestTopicResourceTypeConfirmPaymentResponse CreateConversationRequestTopicResourceType = "confirm_payment_response" CreateConversationRequestTopicResourceTypeOAuthResponse CreateConversationRequestTopicResourceType = "oauth_response" CreateConversationRequestTopicResourceTypeOAuthStatusResponse CreateConversationRequestTopicResourceType = "oauth_status_response" CreateConversationRequestTopicResourceTypeStripePublishableKey CreateConversationRequestTopicResourceType = "stripe_publishable_key" CreateConversationRequestTopicResourceTypeStripeStatus CreateConversationRequestTopicResourceType = "stripe_status" CreateConversationRequestTopicResourceTypeHealthcheck CreateConversationRequestTopicResourceType = "healthcheck" CreateConversationRequestTopicResourceTypeAgentDefinitionConfig CreateConversationRequestTopicResourceType = "agent_definition_config" CreateConversationRequestTopicResourceTypeTriggerConfig CreateConversationRequestTopicResourceType = "trigger_config" CreateConversationRequestTopicResourceTypeCustomerContactInfo CreateConversationRequestTopicResourceType = "customer_contact_info" CreateConversationRequestTopicResourceTypeCustomerFreightPreferences CreateConversationRequestTopicResourceType = "customer_freight_preferences" CreateConversationRequestTopicResourceTypeCustomerDefaults CreateConversationRequestTopicResourceType = "customer_defaults" CreateConversationRequestTopicResourceTypeCustomerLeadTime CreateConversationRequestTopicResourceType = "customer_lead_time" CreateConversationRequestTopicResourceTypeCustomerNotificationPreferences CreateConversationRequestTopicResourceType = "customer_notification_preferences" CreateConversationRequestTopicResourceTypeOrderNotificationRecipient CreateConversationRequestTopicResourceType = "order_notification_recipient" CreateConversationRequestTopicResourceTypeOrderDiscount CreateConversationRequestTopicResourceType = "order_discount" CreateConversationRequestTopicResourceTypeSalesOrderLine CreateConversationRequestTopicResourceType = "sales_order_line" CreateConversationRequestTopicResourceTypeSalesOrderType CreateConversationRequestTopicResourceType = "sales_order_type" CreateConversationRequestTopicResourceTypeSalesOrderStatus CreateConversationRequestTopicResourceType = "sales_order_status" CreateConversationRequestTopicResourceTypeMaterial CreateConversationRequestTopicResourceType = "material" CreateConversationRequestTopicResourceTypeSupplierMaterial CreateConversationRequestTopicResourceType = "supplier_material" CreateConversationRequestTopicResourceTypePart CreateConversationRequestTopicResourceType = "part" CreateConversationRequestTopicResourceTypePermissionGroup CreateConversationRequestTopicResourceType = "permission_group" CreateConversationRequestTopicResourceTypePermission CreateConversationRequestTopicResourceType = "permission" CreateConversationRequestTopicResourceTypePick CreateConversationRequestTopicResourceType = "pick" CreateConversationRequestTopicResourceTypePickLine CreateConversationRequestTopicResourceType = "pick_line" CreateConversationRequestTopicResourceTypeProductType CreateConversationRequestTopicResourceType = "product_type" CreateConversationRequestTopicResourceTypeProduction CreateConversationRequestTopicResourceType = "production" CreateConversationRequestTopicResourceTypeProductionFlow CreateConversationRequestTopicResourceType = "production_flow" CreateConversationRequestTopicResourceTypeMap CreateConversationRequestTopicResourceType = "map" CreateConversationRequestTopicResourceTypePurchaseOrder CreateConversationRequestTopicResourceType = "purchase_order" CreateConversationRequestTopicResourceTypePurchaseOrderLine CreateConversationRequestTopicResourceType = "purchase_order_line" CreateConversationRequestTopicResourceTypePurchaseOrderRelated CreateConversationRequestTopicResourceType = "purchase_order_related" CreateConversationRequestTopicResourceTypeSupplier CreateConversationRequestTopicResourceType = "supplier" CreateConversationRequestTopicResourceTypeReceivableEntry CreateConversationRequestTopicResourceType = "receivable_entry" CreateConversationRequestTopicResourceTypeReceivingOrder CreateConversationRequestTopicResourceType = "receiving_order" CreateConversationRequestTopicResourceTypeReceivingOrderLine CreateConversationRequestTopicResourceType = "receiving_order_line" CreateConversationRequestTopicResourceTypeReceivingOrderTotals CreateConversationRequestTopicResourceType = "receiving_order_totals" CreateConversationRequestTopicResourceTypeReceivingOrderStageTotal CreateConversationRequestTopicResourceType = "receiving_order_stage_total" CreateConversationRequestTopicResourceTypeReceivingOrderRelated CreateConversationRequestTopicResourceType = "receiving_order_related" CreateConversationRequestTopicResourceTypeEmailContact CreateConversationRequestTopicResourceType = "email_contact" CreateConversationRequestTopicResourceTypeAllocationEntry CreateConversationRequestTopicResourceType = "allocation_entry" CreateConversationRequestTopicResourceTypeOpenCreditEntry CreateConversationRequestTopicResourceType = "open_credit_entry" CreateConversationRequestTopicResourceTypeVolumeDiscount CreateConversationRequestTopicResourceType = "volume_discount" CreateConversationRequestTopicResourceTypeVolumeDiscountTier CreateConversationRequestTopicResourceType = "volume_discount_tier" CreateConversationRequestTopicResourceTypeAnalyzeDeliveriesResponse CreateConversationRequestTopicResourceType = "analyze_deliveries_response" CreateConversationRequestTopicResourceTypeAnalyzeManufacturingResponse CreateConversationRequestTopicResourceType = "analyze_manufacturing_response" CreateConversationRequestTopicResourceTypeAnalyzeManufacturingBatchResponse CreateConversationRequestTopicResourceType = "analyze_manufacturing_batch_response" CreateConversationRequestTopicResourceTypeAnalyzeQuarterlyOrdersResponse CreateConversationRequestTopicResourceType = "analyze_quarterly_orders_response" CreateConversationRequestTopicResourceTypeAnalyzeNewCustomersResponse CreateConversationRequestTopicResourceType = "analyze_new_customers_response" CreateConversationRequestTopicResourceTypeAnalyzeDemandForecastResponse CreateConversationRequestTopicResourceType = "analyze_demand_forecast_response" CreateConversationRequestTopicResourceTypeAnalyzeOeeResponse CreateConversationRequestTopicResourceType = "analyze_oee_response" CreateConversationRequestTopicResourceTypeAnalyzeOeeTrendResponse CreateConversationRequestTopicResourceType = "analyze_oee_trend_response" CreateConversationRequestTopicResourceTypeAnalyzeScheduleAttainmentResponse CreateConversationRequestTopicResourceType = "analyze_schedule_attainment_response" CreateConversationRequestTopicResourceTypeCatalogProductLine CreateConversationRequestTopicResourceType = "catalog_product_line" CreateConversationRequestTopicResourceTypeCatalogCategory CreateConversationRequestTopicResourceType = "catalog_category" CreateConversationRequestTopicResourceTypeCatalogProduct CreateConversationRequestTopicResourceType = "catalog_product" CreateConversationRequestTopicResourceTypeCatalogProperty CreateConversationRequestTopicResourceType = "catalog_property" CreateConversationRequestTopicResourceTypeCatalogAttribute CreateConversationRequestTopicResourceType = "catalog_attribute" CreateConversationRequestTopicResourceTypeDcLocation CreateConversationRequestTopicResourceType = "dc_location" CreateConversationRequestTopicResourceTypeEdiRun CreateConversationRequestTopicResourceType = "edi_run" CreateConversationRequestTopicResourceTypeInventoryItem CreateConversationRequestTopicResourceType = "inventory_item" CreateConversationRequestTopicResourceTypeAnalyzeWeeksOfSalesResponse CreateConversationRequestTopicResourceType = "analyze_weeks_of_sales_response" CreateConversationRequestTopicResourceTypeBulkReconcileItemsResponse CreateConversationRequestTopicResourceType = "bulk_reconcile_items_response" CreateConversationRequestTopicResourceTypeSysProperty CreateConversationRequestTopicResourceType = "sys_property" CreateConversationRequestTopicResourceTypeSysPropertyType CreateConversationRequestTopicResourceType = "sys_property_type" CreateConversationRequestTopicResourceTypeSysPropertyValue CreateConversationRequestTopicResourceType = "sys_property_value" CreateConversationRequestTopicResourceTypeTerritory CreateConversationRequestTopicResourceType = "territory" CreateConversationRequestTopicResourceTypeTenancy CreateConversationRequestTopicResourceType = "tenancy" CreateConversationRequestTopicResourceTypeCheckoutSession CreateConversationRequestTopicResourceType = "checkout_session" CreateConversationRequestTopicResourceTypeEstimateRateResult CreateConversationRequestTopicResourceType = "estimate_rate_result" CreateConversationRequestTopicResourceTypeRateShopOption CreateConversationRequestTopicResourceType = "rate_shop_option" CreateConversationRequestTopicResourceTypeRateShopResult CreateConversationRequestTopicResourceType = "rate_shop_result" CreateConversationRequestTopicResourceTypeOwner CreateConversationRequestTopicResourceType = "owner" CreateConversationRequestTopicResourceTypeCreatedBy CreateConversationRequestTopicResourceType = "created_by" CreateConversationRequestTopicResourceTypeMessage CreateConversationRequestTopicResourceType = "message" CreateConversationRequestTopicResourceTypeAccountPhotoUploadResult CreateConversationRequestTopicResourceType = "account_photo_upload_result" CreateConversationRequestTopicResourceTypeUserPhotoUploadResult CreateConversationRequestTopicResourceType = "user_photo_upload_result" CreateConversationRequestTopicResourceTypeUserPhotoURL CreateConversationRequestTopicResourceType = "user_photo_url" CreateConversationRequestTopicResourceTypeBatchLot CreateConversationRequestTopicResourceType = "batch_lot" CreateConversationRequestTopicResourceTypeCheckDuplicateResult CreateConversationRequestTopicResourceType = "check_duplicate_result" CreateConversationRequestTopicResourceTypeItemCosts CreateConversationRequestTopicResourceType = "item_costs" CreateConversationRequestTopicResourceTypeItemTrends CreateConversationRequestTopicResourceType = "item_trends" CreateConversationRequestTopicResourceTypeReconciledItemResult CreateConversationRequestTopicResourceType = "reconciled_item_result" CreateConversationRequestTopicResourceTypeSkippedItemResult CreateConversationRequestTopicResourceType = "skipped_item_result" CreateConversationRequestTopicResourceTypeReconcileErrorResult CreateConversationRequestTopicResourceType = "reconcile_error_result" CreateConversationRequestTopicResourceTypeItemTrendPoint CreateConversationRequestTopicResourceType = "item_trend_point" CreateConversationRequestTopicResourceTypeTenancyPendingRegistration CreateConversationRequestTopicResourceType = "tenancy_pending_registration" CreateConversationRequestTopicResourceTypeInvoiceAllocationEntry CreateConversationRequestTopicResourceType = "invoice_allocation_entry" CreateConversationRequestTopicResourceTypeAllocationCustomer CreateConversationRequestTopicResourceType = "allocation_customer" CreateConversationRequestTopicResourceTypeCheckoutSalesOrder CreateConversationRequestTopicResourceType = "checkout_sales_order" CreateConversationRequestTopicResourceTypeSalesOrderPriceQuote CreateConversationRequestTopicResourceType = "sales_order_price_quote" CreateConversationRequestTopicResourceTypeSalesOrderFreightQuote CreateConversationRequestTopicResourceType = "sales_order_freight_quote" CreateConversationRequestTopicResourceTypeSalesOrderCommitmentQuote CreateConversationRequestTopicResourceType = "sales_order_commitment_quote" CreateConversationRequestTopicResourceTypeOperatingCalendar CreateConversationRequestTopicResourceType = "operating_calendar" CreateConversationRequestTopicResourceTypeOperatingCalendarClosure CreateConversationRequestTopicResourceType = "operating_calendar_closure" CreateConversationRequestTopicResourceTypeSalesOrderPriceQuoteLine CreateConversationRequestTopicResourceType = "sales_order_price_quote_line" CreateConversationRequestTopicResourceTypeHubspotSyncJob CreateConversationRequestTopicResourceType = "hubspot_sync_job" CreateConversationRequestTopicResourceTypeHubspotSyncReport CreateConversationRequestTopicResourceType = "hubspot_sync_report" CreateConversationRequestTopicResourceTypeHubspotCompanyReview CreateConversationRequestTopicResourceType = "hubspot_company_review" CreateConversationRequestTopicResourceTypeHubspotCompanyCandidate CreateConversationRequestTopicResourceType = "hubspot_company_candidate" CreateConversationRequestTopicResourceTypeHubspotSyncRecord CreateConversationRequestTopicResourceType = "hubspot_sync_record" CreateConversationRequestTopicResourceTypeContactMatch CreateConversationRequestTopicResourceType = "contact_match" CreateConversationRequestTopicResourceTypeReplyDraft CreateConversationRequestTopicResourceType = "reply_draft" CreateConversationRequestTopicResourceTypeConversationLink CreateConversationRequestTopicResourceType = "conversation_link" CreateConversationRequestTopicResourceTypeMessagingGroup CreateConversationRequestTopicResourceType = "messaging_group" CreateConversationRequestTopicResourceTypeMessagingGroupMember CreateConversationRequestTopicResourceType = "messaging_group_member" CreateConversationRequestTopicResourceTypePortalProfile CreateConversationRequestTopicResourceType = "portal_profile" CreateConversationRequestTopicResourceTypePortalRegistrationSession CreateConversationRequestTopicResourceType = "portal_registration_session" CreateConversationRequestTopicResourceTypePortalRegistrationSessionData CreateConversationRequestTopicResourceType = "portal_registration_session_data" CreateConversationRequestTopicResourceTypePackList CreateConversationRequestTopicResourceType = "pack_list" CreateConversationRequestTopicResourceTypePackListParty CreateConversationRequestTopicResourceType = "pack_list_party" CreateConversationRequestTopicResourceTypePackListLineItem CreateConversationRequestTopicResourceType = "pack_list_line_item" CreateConversationRequestTopicResourceTypePackListBackOrder CreateConversationRequestTopicResourceType = "pack_list_back_order" CreateConversationRequestTopicResourceTypePackListCase CreateConversationRequestTopicResourceType = "pack_list_case" CreateConversationRequestTopicResourceTypeJob CreateConversationRequestTopicResourceType = "job" CreateConversationRequestTopicResourceTypeJobResult CreateConversationRequestTopicResourceType = "job_result" CreateConversationRequestTopicResourceTypeJobExport CreateConversationRequestTopicResourceType = "job_export" CreateConversationRequestTopicResourceTypeAnalyzeCustomerPricingResponse CreateConversationRequestTopicResourceType = "analyze_customer_pricing_response" CreateConversationRequestTopicResourceTypeCustomerPricingFinding CreateConversationRequestTopicResourceType = "customer_pricing_finding" CreateConversationRequestTopicResourceTypeCustomerPricingSummary CreateConversationRequestTopicResourceType = "customer_pricing_summary" CreateConversationRequestTopicResourceTypeComputedRate CreateConversationRequestTopicResourceType = "computed_rate" CreateConversationRequestTopicResourceTypeComputedQuantity CreateConversationRequestTopicResourceType = "computed_quantity" CreateConversationRequestTopicResourceTypeAnalyzeRealizedMarginsResponse CreateConversationRequestTopicResourceType = "analyze_realized_margins_response" CreateConversationRequestTopicResourceTypeRealizedMarginFinding CreateConversationRequestTopicResourceType = "realized_margin_finding" CreateConversationRequestTopicResourceTypeRealizedMarginSummary CreateConversationRequestTopicResourceType = "realized_margin_summary" CreateConversationRequestTopicResourceTypeShipmentRelated CreateConversationRequestTopicResourceType = "shipment_related" CreateConversationRequestTopicResourceTypeInvoiceRelated CreateConversationRequestTopicResourceType = "invoice_related" CreateConversationRequestTopicResourceTypePickRelated CreateConversationRequestTopicResourceType = "pick_related" CreateConversationRequestTopicResourceTypePickTotals CreateConversationRequestTopicResourceType = "pick_totals" CreateConversationRequestTopicResourceTypePickStageTotal CreateConversationRequestTopicResourceType = "pick_stage_total" )
type CreateConversationRequestType ¶
type CreateConversationRequestType string
The kind of conversation to create.
- `direct_message`: a 1:1 thread with exactly one other user. Addressing yourself is allowed and gives you a private notes thread.
- `group`: a named thread with any number of user and agent members.
`system` channels are created by the platform and cannot be requested here.
const ( CreateConversationRequestTypeDirectMessage CreateConversationRequestType = "direct_message" CreateConversationRequestTypeGroup CreateConversationRequestType = "group" CreateConversationRequestTypeSystem CreateConversationRequestType = "system" )
type CreateCustomerRequestCarrierBillingType ¶
type CreateCustomerRequestCarrierBillingType string
Who pays the carrier for shipments.
- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `carrier_billing_account`.
const ( CreateCustomerRequestCarrierBillingTypeSender CreateCustomerRequestCarrierBillingType = "sender" CreateCustomerRequestCarrierBillingTypeThirdParty CreateCustomerRequestCarrierBillingType = "third_party" )
type CreateCustomerRequestCommissionPolicy ¶
type CreateCustomerRequestCommissionPolicy string
How sales commission applies to this customer's orders.
- `commission_exempt`: this customer's orders are exempt from sales commission.
- `commission_applied`: sales commission is calculated on this customer's orders.
const ( CreateCustomerRequestCommissionPolicyCommissionApplied CreateCustomerRequestCommissionPolicy = "commission_applied" CreateCustomerRequestCommissionPolicyCommissionExempt CreateCustomerRequestCommissionPolicy = "commission_exempt" )
type CreateCustomerRequestDefaultPriority ¶
type CreateCustomerRequestDefaultPriority string
Priority used to pre-fill new orders for this customer.
const ( CreateCustomerRequestDefaultPriorityLow CreateCustomerRequestDefaultPriority = "low" CreateCustomerRequestDefaultPriorityNormal CreateCustomerRequestDefaultPriority = "normal" CreateCustomerRequestDefaultPriorityHigh CreateCustomerRequestDefaultPriority = "high" )
type CreateCustomerRequestEdiStatus ¶
type CreateCustomerRequestEdiStatus string
Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
const ( CreateCustomerRequestEdiStatusEnabled CreateCustomerRequestEdiStatus = "enabled" CreateCustomerRequestEdiStatusDisabled CreateCustomerRequestEdiStatus = "disabled" )
type CreateCustomerRequestFreightPolicy ¶
type CreateCustomerRequestFreightPolicy string
Whether this customer is billed for freight on their orders.
- `free_freight`: the customer is not billed for freight. - `billed_freight`: freight is billed to the customer.
Freight is also waived when the customer's type group, one of its price groups, or a product line the ordered products belong to is `free_freight`.
const ( CreateCustomerRequestFreightPolicyFreeFreight CreateCustomerRequestFreightPolicy = "free_freight" CreateCustomerRequestFreightPolicyBilledFreight CreateCustomerRequestFreightPolicy = "billed_freight" )
type CreateCustomerRequestFulfillmentPolicy ¶ added in v0.19.0
type CreateCustomerRequestFulfillmentPolicy string
How this customer's orders are produced.
- `make_to_stock`: their order history feeds the production-schedule forecast, so stock is built ahead of their demand.
- `make_to_order`: their history is left out of the forecast; their orders are produced only once placed, and fit into the schedule on their own ship-by dates.
Leave unset to inherit the customer's account group policy, then the make-to-stock default.
const ( CreateCustomerRequestFulfillmentPolicyMakeToStock CreateCustomerRequestFulfillmentPolicy = "make_to_stock" CreateCustomerRequestFulfillmentPolicyMakeToOrder CreateCustomerRequestFulfillmentPolicy = "make_to_order" )
type CreateCustomerRequestParam ¶
type CreateCustomerRequestParam struct {
// Address details supplied when creating an address, either on its own or inline
// on another resource.
//
// A few requests, such as shipping rate estimates, take these same fields for a
// one-off address that is never saved to the account.
BillToAddress AddressInputParam `json:"bill_to_address,omitzero" api:"required"`
// ID of the account group of type `type_group` that categorizes this customer (for
// example "Distributors").
CustomerTypeGroupID string `json:"customer_type_group_id" api:"required"`
// ID of the carrier used on this customer's orders when the order does not specify
// one.
DefaultCarrierID string `json:"default_carrier_id" api:"required"`
// ID of the payment term used on this customer's orders when the order does not
// specify one.
DefaultPaymentTermID string `json:"default_payment_term_id" api:"required"`
// ID of the shipping term used on this customer's orders when the order does not
// specify one.
DefaultShippingTermID string `json:"default_shipping_term_id" api:"required"`
// The customer's business name, as shown throughout the app and on documents.
Name string `json:"name" api:"required"`
// Address details supplied when creating an address, either on its own or inline
// on another resource.
//
// A few requests, such as shipping rate estimates, take these same fields for a
// one-off address that is never saved to the account.
ShipToAddress AddressInputParam `json:"ship_to_address,omitzero" api:"required"`
// Carrier billing account number charged when `carrier_billing_type` is
// `third_party`.
CarrierBillingAccount param.Opt[string] `json:"carrier_billing_account,omitzero"`
// The ID of the account user to credit as the sales rep on this customer's orders.
//
// Must be an account user on your own account.
DefaultSalesRepID param.Opt[string] `json:"default_sales_rep_id,omitzero"`
// ID of the carrier service level used when an order takes its carrier from this
// customer's default.
DefaultServiceLevelID param.Opt[string] `json:"default_service_level_id,omitzero"`
// Email address.
Email param.Opt[string] `json:"email,omitzero"`
// Calendar days between an order being issued and it being due to ship.
//
// Sets each order's `ship_by_date` when it is issued. Leave unset to inherit the
// parent account's lead time, then the customer's account group lead time, then
// the account default.
LeadTimeDays param.Opt[int64] `json:"lead_time_days,omitzero"`
// Free-form note about the customer.
Note param.Opt[string] `json:"note,omitzero"`
// Human-readable customer number used to identify the account, distinct from the
// `id`.
//
// Must be unique within your account. If omitted, the next sequential number is
// assigned automatically.
Number param.Opt[string] `json:"number,omitzero"`
// Phone number.
Phone param.Opt[string] `json:"phone,omitzero"`
// The operating calendar naming the days this customer's dock accepts freight.
//
// Sits in the same chain as lead_time_days: leaving it unset falls through to the
// customer's group, then the account default, then Monday to Friday. A promised
// delivery date is never worked back from a day nobody is there to receive on.
ReceiveCalendarID param.Opt[string] `json:"receive_calendar_id,omitzero"`
// Website URL.
URL param.Opt[string] `json:"url,omitzero"`
// Who pays the carrier for shipments.
//
// - `sender`: the shipper (you) pays the carrier.
// - `third_party`: a third party is billed, using `carrier_billing_account`.
//
// Any of "sender", "third_party".
CarrierBillingType CreateCustomerRequestCarrierBillingType `json:"carrier_billing_type,omitzero"`
// How sales commission applies to this customer's orders.
//
// - `commission_exempt`: this customer's orders are exempt from sales commission.
// - `commission_applied`: sales commission is calculated on this customer's
// orders.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy CreateCustomerRequestCommissionPolicy `json:"commission_policy,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
CreditLimit QuantityInputParam `json:"credit_limit,omitzero"`
// IDs of the account groups of type `pricing_group` to assign to this customer,
// used to apply pricing rules.
CustomerPriceGroupIDs []string `json:"customer_price_group_ids,omitzero"`
// Priority used to pre-fill new orders for this customer.
//
// Any of "low", "normal", "high".
DefaultPriority CreateCustomerRequestDefaultPriority `json:"default_priority,omitzero"`
// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
// documents with this customer.
//
// Any of "enabled", "disabled".
EdiStatus CreateCustomerRequestEdiStatus `json:"edi_status,omitzero"`
// Whether this customer is billed for freight on their orders.
//
// - `free_freight`: the customer is not billed for freight.
// - `billed_freight`: freight is billed to the customer.
//
// Freight is also waived when the customer's type group, one of its price groups,
// or a product line the ordered products belong to is `free_freight`.
//
// Any of "free_freight", "billed_freight".
FreightPolicy CreateCustomerRequestFreightPolicy `json:"freight_policy,omitzero"`
// How this customer's orders are produced.
//
// - `make_to_stock`: their order history feeds the production-schedule forecast,
// so stock is built ahead of their demand.
// - `make_to_order`: their history is left out of the forecast; their orders are
// produced only once placed, and fit into the schedule on their own ship-by
// dates.
//
// Leave unset to inherit the customer's account group policy, then the
// make-to-stock default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy CreateCustomerRequestFulfillmentPolicy `json:"fulfillment_policy,omitzero"`
// The customer's account standing.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the customer's shipments should be held, typically over a
// credit problem, while orders can still be placed.
// - `hold_all`: all activity for the customer should be held.
//
// Any of "normal", "preferred", "hold_shipment", "hold_all".
Status CreateCustomerRequestStatus `json:"status,omitzero"`
// contains filtered or unexported fields
}
Request to create a customer.
The properties BillToAddress, CustomerTypeGroupID, DefaultCarrierID, DefaultPaymentTermID, DefaultShippingTermID, Name, ShipToAddress are required.
func (CreateCustomerRequestParam) MarshalJSON ¶
func (r CreateCustomerRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateCustomerRequestParam) UnmarshalJSON ¶
func (r *CreateCustomerRequestParam) UnmarshalJSON(data []byte) error
type CreateCustomerRequestStatus ¶
type CreateCustomerRequestStatus string
The customer's account standing.
- `normal`: standard account with no restrictions.
- `preferred`: account flagged for prioritized handling.
- `hold_shipment`: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
- `hold_all`: all activity for the customer should be held.
const ( CreateCustomerRequestStatusNormal CreateCustomerRequestStatus = "normal" CreateCustomerRequestStatusPreferred CreateCustomerRequestStatus = "preferred" CreateCustomerRequestStatusHoldShipment CreateCustomerRequestStatus = "hold_shipment" CreateCustomerRequestStatusHoldAll CreateCustomerRequestStatus = "hold_all" )
type CreateDemandOverrideRequestAdjustment ¶
type CreateDemandOverrideRequestAdjustment string
How the value adjusts the forecast.
- `absolute`: replaces the forecast for each month in the period. - `delta_units`: adds the value to each month in the period. - `delta_percent`: scales each month in the period by the value as a percentage.
When several overrides land on the same month they are applied in that order, so a percentage always acts on the already-adjusted number.
const ( CreateDemandOverrideRequestAdjustmentAbsolute CreateDemandOverrideRequestAdjustment = "absolute" CreateDemandOverrideRequestAdjustmentDeltaUnits CreateDemandOverrideRequestAdjustment = "delta_units" CreateDemandOverrideRequestAdjustmentDeltaPercent CreateDemandOverrideRequestAdjustment = "delta_percent" )
type CreateDemandOverrideRequestParam ¶
type CreateDemandOverrideRequestParam struct {
// How the value adjusts the forecast.
//
// - `absolute`: replaces the forecast for each month in the period.
// - `delta_units`: adds the value to each month in the period.
// - `delta_percent`: scales each month in the period by the value as a percentage.
//
// When several overrides land on the same month they are applied in that order, so
// a percentage always acts on the already-adjusted number.
//
// Any of "absolute", "delta_units", "delta_percent".
Adjustment CreateDemandOverrideRequestAdjustment `json:"adjustment,omitzero" api:"required"`
// Last day of the demand period the override applies to.
//
// Must fall on or after `period_starts_at`.
PeriodEndsAt time.Time `json:"period_ends_at" api:"required" format:"date-time"`
// First day of the demand period the override applies to.
//
// Overrides are applied month by month, so every calendar month the period touches
// is adjusted and any time of day is ignored.
PeriodStartsAt time.Time `json:"period_starts_at" api:"required" format:"date-time"`
// ID of the item or product line the override targets.
//
// Omit it for an `account`-wide override, which targets every planned item rather
// than one thing. The ID is checked against the account's items and product lines,
// so an override cannot be created against something that does not exist.
ScopeRefID string `json:"scope_ref_id" api:"required"`
// What the override targets.
//
// - `item`: a single item.
// - `product_line`: every item sold under one product line.
// - `account`: every item in the plan, which is how a blanket assumption such as
// "plan for double demand" is expressed.
//
// Any of "item", "product_line", "account".
ScopeType CreateDemandOverrideRequestScopeType `json:"scope_type,omitzero" api:"required"`
// The amount of the adjustment, interpreted according to `adjustment`.
//
// A `delta_percent` value is a number of percent, so `-25` plans a quarter less
// than the forecast; it cannot go below `-100`. An `absolute` value cannot be
// negative, while a `delta_units` value can, so that a cancelled program removes
// demand.
Value float64 `json:"value" api:"required"`
// Whether the override is taken into account when a schedule is generated.
//
// Send `false` to stage an adjustment that should not affect schedules yet; an
// override is otherwise created ready to apply.
Active param.Opt[bool] `json:"active,omitzero"`
// When the override starts being applied to newly generated schedules.
//
// When omitted, the override starts applying straight away.
EffectiveAt param.Opt[time.Time] `json:"effective_at,omitzero" format:"date-time"`
// When the override stops being applied to newly generated schedules.
//
// When omitted, the override keeps applying until it is deactivated or deleted.
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
// Free-form notes about the adjustment.
//
// This is the text the free-text search on the list endpoint matches against.
Note param.Opt[string] `json:"note,omitzero"`
// ID of the unit the value is expressed in.
//
// Recorded for context only: the value is applied to the planned demand without
// unit conversion, so a unit adjustment should be stated in the unit the item is
// planned in.
UnitID param.Opt[string] `json:"unit_id,omitzero"`
// Why the adjustment was made.
//
// The reason is carried into each schedule the override changes, so a plan can
// explain why a month departs from history.
//
// Any of "new_customer", "lost_account", "promotion", "seasonal_shift",
// "new_product", "discontinued", "market_intelligence", "other".
Reason CreateDemandOverrideRequestReason `json:"reason,omitzero"`
// contains filtered or unexported fields
}
Request to create a demand override.
The properties Adjustment, PeriodEndsAt, PeriodStartsAt, ScopeRefID, ScopeType, Value are required.
func (CreateDemandOverrideRequestParam) MarshalJSON ¶
func (r CreateDemandOverrideRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateDemandOverrideRequestParam) UnmarshalJSON ¶
func (r *CreateDemandOverrideRequestParam) UnmarshalJSON(data []byte) error
type CreateDemandOverrideRequestReason ¶
type CreateDemandOverrideRequestReason string
Why the adjustment was made.
The reason is carried into each schedule the override changes, so a plan can explain why a month departs from history.
const ( CreateDemandOverrideRequestReasonNewCustomer CreateDemandOverrideRequestReason = "new_customer" CreateDemandOverrideRequestReasonLostAccount CreateDemandOverrideRequestReason = "lost_account" CreateDemandOverrideRequestReasonPromotion CreateDemandOverrideRequestReason = "promotion" CreateDemandOverrideRequestReasonSeasonalShift CreateDemandOverrideRequestReason = "seasonal_shift" CreateDemandOverrideRequestReasonNewProduct CreateDemandOverrideRequestReason = "new_product" CreateDemandOverrideRequestReasonDiscontinued CreateDemandOverrideRequestReason = "discontinued" CreateDemandOverrideRequestReasonMarketIntelligence CreateDemandOverrideRequestReason = "market_intelligence" CreateDemandOverrideRequestReasonOther CreateDemandOverrideRequestReason = "other" )
type CreateDemandOverrideRequestScopeType ¶
type CreateDemandOverrideRequestScopeType string
What the override targets.
- `item`: a single item.
- `product_line`: every item sold under one product line.
- `account`: every item in the plan, which is how a blanket assumption such as "plan for double demand" is expressed.
const ( CreateDemandOverrideRequestScopeTypeItem CreateDemandOverrideRequestScopeType = "item" CreateDemandOverrideRequestScopeTypeProductLine CreateDemandOverrideRequestScopeType = "product_line" CreateDemandOverrideRequestScopeTypeAccount CreateDemandOverrideRequestScopeType = "account" )
type CreateDepartmentRequestParam ¶
type CreateDepartmentRequestParam struct {
// Display name of the department.
//
// Must be unique within your account; maximum 255 characters.
Name string `json:"name" api:"required"`
// ID of the location where this department operates.
LocationID param.Opt[string] `json:"location_id,omitzero"`
// Free-form notes about the department.
Notes param.Opt[string] `json:"notes,omitzero"`
// A rate, expressed as a value together with the units of its numerator and
// denominator (for example, `25.00` `$` per `hr`).
LaborRate DepartmentRateInputParam `json:"labor_rate,omitzero"`
// IDs of machines to assign to this department.
//
// A machine belongs to one department at a time, so listed machines are moved out
// of their current department.
MachineIDs []string `json:"machine_ids,omitzero"`
// IDs of scanning stations to assign to this department.
//
// A scanning station belongs to one department at a time, so listed stations are
// moved out of their current department.
ScanningStationIDs []string `json:"scanning_station_ids,omitzero"`
// contains filtered or unexported fields
}
Request to create a department.
The property Name is required.
func (CreateDepartmentRequestParam) MarshalJSON ¶
func (r CreateDepartmentRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateDepartmentRequestParam) UnmarshalJSON ¶
func (r *CreateDepartmentRequestParam) UnmarshalJSON(data []byte) error
type CreateEmailDomainRequestParam ¶
type CreateEmailDomainRequestParam struct {
// The fully-qualified domain name to register (e.g. `support.acme.com`).
//
// Supply a bare domain, not an email address; the value is lowercased before it is
// stored.
Domain string `json:"domain" api:"required"`
// contains filtered or unexported fields
}
Request to register a sending/receiving domain with the email bridge.
The property Domain is required.
func (CreateEmailDomainRequestParam) MarshalJSON ¶
func (r CreateEmailDomainRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateEmailDomainRequestParam) UnmarshalJSON ¶
func (r *CreateEmailDomainRequestParam) UnmarshalJSON(data []byte) error
type CreateEmailInboxRequestAgentTriggerPolicy ¶ added in v0.17.1
type CreateEmailInboxRequestAgentTriggerPolicy string
How the bound agent decides whether to run on incoming mail.
- `mention`: runs only when the agent is @mentioned, matched against the trigger keywords below.
- `keyword`: runs when the message contains any of the trigger keywords.
- `always`: runs on every incoming message.
Leaving this unset makes the agent run on every incoming message, since email has no reliable @mention convention.
const ( CreateEmailInboxRequestAgentTriggerPolicyMention CreateEmailInboxRequestAgentTriggerPolicy = "mention" CreateEmailInboxRequestAgentTriggerPolicyKeyword CreateEmailInboxRequestAgentTriggerPolicy = "keyword" CreateEmailInboxRequestAgentTriggerPolicyAlways CreateEmailInboxRequestAgentTriggerPolicy = "always" )
type CreateEmailInboxRequestParam ¶
type CreateEmailInboxRequestParam struct {
// The full inbox address (e.g. `support@acme.com`).
//
// Its domain part must match the selected domain, which must already be verified.
// The address is lowercased before it is stored, and it must not already be in use
// by another inbox.
Address string `json:"address" api:"required"`
// The verified domain this inbox belongs to.
EmailDomainID string `json:"email_domain_id" api:"required"`
// The agent to bind to this inbox to handle incoming mail.
//
// With no agent bound, mail is still threaded into a conversation for your team,
// but nothing runs on it automatically.
AgentConfigID param.Opt[string] `json:"agent_config_id,omitzero"`
// Display name for the `From` header of outbound mail.
FromName param.Opt[string] `json:"from_name,omitzero"`
// The messaging group (roster) whose members are seated on every conversation this
// inbox opens.
//
// Must name a group in your own account. Agents in the group are seated to run
// only when @mentioned, so they do not all fire alongside the inbox's own agent.
GroupID param.Opt[string] `json:"group_id,omitzero"`
// The keywords that decide whether the agent runs on an incoming message.
//
// Under the `keyword` policy a keyword matches anywhere in the message; under
// `mention` it only counts where it is prefixed with `@`.
AgentTriggerKeywords []string `json:"agent_trigger_keywords,omitzero"`
// How the bound agent decides whether to run on incoming mail.
//
// - `mention`: runs only when the agent is @mentioned, matched against the trigger
// keywords below.
// - `keyword`: runs when the message contains any of the trigger keywords.
// - `always`: runs on every incoming message.
//
// Leaving this unset makes the agent run on every incoming message, since email
// has no reliable @mention convention.
//
// Any of "mention", "keyword", "always".
AgentTriggerPolicy CreateEmailInboxRequestAgentTriggerPolicy `json:"agent_trigger_policy,omitzero"`
// contains filtered or unexported fields
}
Request to provision a routable inbox on a verified domain.
The properties Address, EmailDomainID are required.
func (CreateEmailInboxRequestParam) MarshalJSON ¶
func (r CreateEmailInboxRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateEmailInboxRequestParam) UnmarshalJSON ¶
func (r *CreateEmailInboxRequestParam) UnmarshalJSON(data []byte) error
type CreateItemCategoryRequestParam ¶
type CreateItemCategoryRequestParam struct {
// Display name of the item category.
Name string `json:"name" api:"required"`
// What kind of items this category groups.
//
// - `material_category`: groups raw materials and components (items of type
// `material`).
// - `product_category`: groups finished products and parts (items of type
// `product` or `part`).
//
// The type is fixed once the category is created.
//
// Any of "material_category", "product_category".
Type CreateItemCategoryRequestType `json:"type,omitzero" api:"required"`
// ID of the unit group that determines the units of measure available to items in
// this category.
//
// Must be one of your account's unit groups or a platform-provided one. After
// creation the unit group can only be replaced by another unit group of the same
// unit type, through the Change Item Category Unit Group endpoint.
UnitGroupID string `json:"unit_group_id" api:"required"`
// contains filtered or unexported fields
}
Request to create an item category.
The properties Name, Type, UnitGroupID are required.
func (CreateItemCategoryRequestParam) MarshalJSON ¶
func (r CreateItemCategoryRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateItemCategoryRequestParam) UnmarshalJSON ¶
func (r *CreateItemCategoryRequestParam) UnmarshalJSON(data []byte) error
type CreateItemCategoryRequestType ¶
type CreateItemCategoryRequestType string
What kind of items this category groups.
- `material_category`: groups raw materials and components (items of type `material`).
- `product_category`: groups finished products and parts (items of type `product` or `part`).
The type is fixed once the category is created.
const ( CreateItemCategoryRequestTypeMaterialCategory CreateItemCategoryRequestType = "material_category" CreateItemCategoryRequestTypeProductCategory CreateItemCategoryRequestType = "product_category" )
type CreateLocationRequestParam ¶
type CreateLocationRequestParam struct {
// Display name of the location.
//
// Maximum 255 characters.
Name string `json:"name" api:"required"`
// This location's level in the storage hierarchy.
//
// The levels run from largest to smallest: `building`, `section`, `aisle`, `rack`,
// `shelf`, `bin`. They are descriptive labels rather than a rule — the parent you
// choose is not required to be the next level up.
//
// Any of "building", "section", "aisle", "rack", "shelf", "bin".
Type LocationTypeCode `json:"type,omitzero" api:"required"`
// The location this one sits under in the storage hierarchy.
//
// Must be an existing location in your account. Omit to create a top-level
// location.
ParentID param.Opt[string] `json:"parent_id,omitzero"`
// Existing locations to attach beneath the new location.
//
// Each listed location is reparented onto the new location, detaching it from its
// current parent. Every ID must belong to your account.
ChildIDs []string `json:"child_ids,omitzero"`
// contains filtered or unexported fields
}
Request to create a location.
The properties Name, Type are required.
func (CreateLocationRequestParam) MarshalJSON ¶
func (r CreateLocationRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateLocationRequestParam) UnmarshalJSON ¶
func (r *CreateLocationRequestParam) UnmarshalJSON(data []byte) error
type CreateMachineDowntimeEventRequestParam ¶
type CreateMachineDowntimeEventRequestParam struct {
// ID of the machine that stopped.
MachineID string `json:"machine_id" api:"required"`
// Why the machine stopped.
//
// The reason decides which OEE term the stoppage charges, so it does more than
// label the event. Retrieve the available reasons and the term each one charges
// from the downtime reasons list.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Reason CreateMachineDowntimeEventRequestReason `json:"reason,omitzero" api:"required"`
// When the machine stopped.
//
// Cannot be in the future beyond a few minutes of clock skew, which is allowed so
// a shop-floor tablet running fast can still log "just now". The business day the
// stoppage counts against is taken from this timestamp.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// ID of the batch in progress when the machine stopped.
BatchID param.Opt[string] `json:"batch_id,omitzero"`
// When the machine started running again.
//
// Omit it while the machine is still down; that leaves the event open, and the
// duration is filled in once the event is closed. It must be later than
// `started_at`.
EndedAt param.Opt[time.Time] `json:"ended_at,omitzero" format:"date-time"`
// ID of the item the machine was running when it stopped.
ItemID param.Opt[string] `json:"item_id,omitzero"`
// Free-form notes about the stoppage.
//
// Searchable from the downtime events list. Maximum 2000 characters.
Note param.Opt[string] `json:"note,omitzero"`
// ID of the production run in progress when the machine stopped.
ProductionRunID param.Opt[string] `json:"production_run_id,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Duration QuantityInputParam `json:"duration,omitzero"`
// How the event was recorded.
//
// Records the stoppage as manually logged unless you say otherwise, so an
// integration or shop-floor station should send its own source to keep
// hand-entered downtime distinguishable.
//
// Any of "manual", "scanner", "inferred", "api".
Source CreateMachineDowntimeEventRequestSource `json:"source,omitzero"`
// contains filtered or unexported fields
}
Request to log a machine downtime event.
The properties MachineID, Reason, StartedAt are required.
func (CreateMachineDowntimeEventRequestParam) MarshalJSON ¶
func (r CreateMachineDowntimeEventRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateMachineDowntimeEventRequestParam) UnmarshalJSON ¶
func (r *CreateMachineDowntimeEventRequestParam) UnmarshalJSON(data []byte) error
type CreateMachineDowntimeEventRequestReason ¶
type CreateMachineDowntimeEventRequestReason string
Why the machine stopped.
The reason decides which OEE term the stoppage charges, so it does more than label the event. Retrieve the available reasons and the term each one charges from the downtime reasons list.
const ( CreateMachineDowntimeEventRequestReasonBreakdown CreateMachineDowntimeEventRequestReason = "breakdown" CreateMachineDowntimeEventRequestReasonChangeover CreateMachineDowntimeEventRequestReason = "changeover" CreateMachineDowntimeEventRequestReasonMaterialShortage CreateMachineDowntimeEventRequestReason = "material_shortage" CreateMachineDowntimeEventRequestReasonNoOperator CreateMachineDowntimeEventRequestReason = "no_operator" CreateMachineDowntimeEventRequestReasonPlannedMaintenance CreateMachineDowntimeEventRequestReason = "planned_maintenance" CreateMachineDowntimeEventRequestReasonMinorStop CreateMachineDowntimeEventRequestReason = "minor_stop" CreateMachineDowntimeEventRequestReasonQualityHold CreateMachineDowntimeEventRequestReason = "quality_hold" CreateMachineDowntimeEventRequestReasonNoSchedule CreateMachineDowntimeEventRequestReason = "no_schedule" )
type CreateMachineDowntimeEventRequestSource ¶
type CreateMachineDowntimeEventRequestSource string
How the event was recorded.
Records the stoppage as manually logged unless you say otherwise, so an integration or shop-floor station should send its own source to keep hand-entered downtime distinguishable.
const ( CreateMachineDowntimeEventRequestSourceManual CreateMachineDowntimeEventRequestSource = "manual" CreateMachineDowntimeEventRequestSourceScanner CreateMachineDowntimeEventRequestSource = "scanner" CreateMachineDowntimeEventRequestSourceInferred CreateMachineDowntimeEventRequestSource = "inferred" CreateMachineDowntimeEventRequestSourceAPI CreateMachineDowntimeEventRequestSource = "api" )
type CreateMachineRequestParam ¶
type CreateMachineRequestParam struct {
// ID of the department this machine belongs to.
//
// Must reference a department in your account.
DepartmentID string `json:"department_id" api:"required"`
// Display name of the machine.
//
// Must be unique within your account; maximum 255 characters.
Name string `json:"name" api:"required"`
// Serial number of the machine.
//
// Maximum 255 characters.
SerialNumber string `json:"serial_number" api:"required"`
// Free-form notes about the machine.
Notes param.Opt[string] `json:"notes,omitzero"`
// contains filtered or unexported fields
}
Request to create a machine.
The properties DepartmentID, Name, SerialNumber are required.
func (CreateMachineRequestParam) MarshalJSON ¶
func (r CreateMachineRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateMachineRequestParam) UnmarshalJSON ¶
func (r *CreateMachineRequestParam) UnmarshalJSON(data []byte) error
type CreateMaterialRequestParam ¶
type CreateMaterialRequestParam struct {
// ID of the item category to place the material in.
//
// The category's unit group determines the base unit used for the material's rates
// (`unit_value`, `unit_cost`, `burn_rate`).
CategoryID string `json:"category_id" api:"required"`
// Stock keeping unit code for the material.
//
// Must be unique within the account; creating a material with a SKU already used
// by another item fails with a conflict error.
SKU string `json:"sku" api:"required"`
// Free-form description of the material.
Description param.Opt[string] `json:"description,omitzero"`
// Free-form notes about the material.
Notes param.Opt[string] `json:"notes,omitzero"`
// IDs of existing attributes to link to the material at creation time.
//
// Each attribute's property must be one the material's category carries; an
// attribute from any other property fails the whole request.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
LeadTime QuantityInputRequestParam `json:"lead_time,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
OrderPoint QuantityInputRequestParam `json:"order_point,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to create a material.
The properties CategoryID, SKU are required.
func (CreateMaterialRequestParam) MarshalJSON ¶
func (r CreateMaterialRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateMaterialRequestParam) UnmarshalJSON ¶
func (r *CreateMaterialRequestParam) UnmarshalJSON(data []byte) error
type CreateMemoryRequestCategory ¶
type CreateMemoryRequestCategory string
The kind of information this memory holds, used to group related memories.
- `preference`: how someone likes things done, such as a customer who always wants express shipping.
- `fact`: a durable detail worth remembering about the account or one of its records, such as a customer's typical order size.
- `instruction`: standing guidance for agents to follow, such as always confirming freight before issuing an order.
const ( CreateMemoryRequestCategoryPreference CreateMemoryRequestCategory = "preference" CreateMemoryRequestCategoryFact CreateMemoryRequestCategory = "fact" CreateMemoryRequestCategoryInstruction CreateMemoryRequestCategory = "instruction" )
type CreateMemoryRequestParam ¶
type CreateMemoryRequestParam struct {
// The kind of information this memory holds, used to group related memories.
//
// - `preference`: how someone likes things done, such as a customer who always
// wants express shipping.
// - `fact`: a durable detail worth remembering about the account or one of its
// records, such as a customer's typical order size.
// - `instruction`: standing guidance for agents to follow, such as always
// confirming freight before issuing an order.
//
// Any of "preference", "fact", "instruction".
Category CreateMemoryRequestCategory `json:"category,omitzero" api:"required"`
// The information to remember, written as plain text for an agent to read.
Content string `json:"content" api:"required"`
// ID of the platform record this memory is scoped to.
//
// Provide together with `entity_type`.
EntityID param.Opt[string] `json:"entity_id,omitzero"`
// Type of platform record this memory is scoped to (e.g. `customer`, `product`).
//
// Provide together with `entity_id` to scope the memory to a specific record; omit
// both for a memory that is not tied to any particular record.
EntityType param.Opt[string] `json:"entity_type,omitzero"`
// When this memory should stop being used, as an ISO 8601 timestamp (e.g.
// `2026-01-02T15:04:05Z`).
//
// Past this time the memory is no longer recalled by agents and is omitted from
// list results, but it is not deleted. Omit it for a memory that should be used
// indefinitely.
ExpiresAt param.Opt[string] `json:"expires_at,omitzero"`
// Relative importance from `0` to `1` in increments of `0.1`, used to prioritize
// which memories the agent recalls.
//
// An agent takes in only a limited number of memories per run and recalls the
// highest-importance ones first, so a memory created without an importance is
// stored at `0` and is the first to be left out.
Importance param.Opt[float64] `json:"importance,omitzero"`
// Arbitrary metadata as JSON. Encoded as a JSON value (object, array, string,
// number, boolean, or null), not a JSON-encoded string.
Metadata any `json:"metadata,omitzero"`
// contains filtered or unexported fields
}
Request to create an agent memory.
The properties Category, Content are required.
func (CreateMemoryRequestParam) MarshalJSON ¶
func (r CreateMemoryRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateMemoryRequestParam) UnmarshalJSON ¶
func (r *CreateMemoryRequestParam) UnmarshalJSON(data []byte) error
type CreateMessagingGroupRequestParam ¶
type CreateMessagingGroupRequestParam struct {
// The roster's display name.
Name string `json:"name" api:"required"`
// The account users to include in the roster.
MemberAccountUserIDs []string `json:"member_account_user_ids,omitzero"`
// The agents to include in the roster.
MemberAgentConfigIDs []string `json:"member_agent_config_ids,omitzero"`
// contains filtered or unexported fields
}
Request to create a reusable roster.
The property Name is required.
func (CreateMessagingGroupRequestParam) MarshalJSON ¶
func (r CreateMessagingGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateMessagingGroupRequestParam) UnmarshalJSON ¶
func (r *CreateMessagingGroupRequestParam) UnmarshalJSON(data []byte) error
type CreateOperatingCalendarClosureRequestParam ¶
type CreateOperatingCalendarClosureRequestParam struct {
// The date nothing operates. Truncated to a day.
ClosedOn time.Time `json:"closed_on" api:"required" format:"date-time"`
// What the closure is, such as "Thanksgiving Day" or "Summer shutdown".
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
Request to close a calendar on a date.
The properties ClosedOn, Name are required.
func (CreateOperatingCalendarClosureRequestParam) MarshalJSON ¶
func (r CreateOperatingCalendarClosureRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateOperatingCalendarClosureRequestParam) UnmarshalJSON ¶
func (r *CreateOperatingCalendarClosureRequestParam) UnmarshalJSON(data []byte) error
type CreateOperatingCalendarRequestKind ¶
type CreateOperatingCalendarRequestKind string
Which side of a shipment this calendar describes.
const ( CreateOperatingCalendarRequestKindShip CreateOperatingCalendarRequestKind = "ship" CreateOperatingCalendarRequestKindReceive CreateOperatingCalendarRequestKind = "receive" )
type CreateOperatingCalendarRequestParam ¶
type CreateOperatingCalendarRequestParam struct {
// Short stable identifier, unique per account.
Code string `json:"code" api:"required"`
// Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
// Monday to Friday; "1111000" is a Monday-to-Thursday plant. At least one day must
// be open.
DaysOfWeek string `json:"days_of_week" api:"required"`
// Which side of a shipment this calendar describes.
//
// Any of "ship", "receive".
Kind CreateOperatingCalendarRequestKind `json:"kind,omitzero" api:"required"`
// Human-readable name.
Name string `json:"name" api:"required"`
// Local time freight has to be tendered by, as "15:00". Only a shipping calendar
// accepts one.
CutoffAt param.Opt[string] `json:"cutoff_at,omitzero"`
// Make this the calendar used when nothing more specific is linked. Setting it
// demotes whichever calendar of the same kind held the role.
IsDefault param.Opt[bool] `json:"is_default,omitzero"`
// IANA zone the cutoff is read in, such as "America/Chicago". On a receiving
// calendar, leave it unset to take the zone from the ship-to address.
Timezone param.Opt[string] `json:"timezone,omitzero"`
// contains filtered or unexported fields
}
Request to create an operating calendar.
The properties Code, DaysOfWeek, Kind, Name are required.
func (CreateOperatingCalendarRequestParam) MarshalJSON ¶
func (r CreateOperatingCalendarRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateOperatingCalendarRequestParam) UnmarshalJSON ¶
func (r *CreateOperatingCalendarRequestParam) UnmarshalJSON(data []byte) error
type CreateOrderDiscountRequestDiscountType ¶
type CreateOrderDiscountRequestDiscountType string
How the discount is calculated.
- `percentage`: the order total is reduced by the fraction in `percentage`. - `amount`: the order total is reduced by the flat amount in `amount`.
const ( CreateOrderDiscountRequestDiscountTypePercentage CreateOrderDiscountRequestDiscountType = "percentage" CreateOrderDiscountRequestDiscountTypeAmount CreateOrderDiscountRequestDiscountType = "amount" )
type CreateOrderDiscountRequestParam ¶
type CreateOrderDiscountRequestParam struct {
// The code a buyer enters to apply this discount to an order.
//
// Codes are unique within your account and are compared without regard to letter
// case, so `SAVE10` collides with `save10`.
Code string `json:"code" api:"required"`
// How the discount is calculated.
//
// - `percentage`: the order total is reduced by the fraction in `percentage`.
// - `amount`: the order total is reduced by the flat amount in `amount`.
//
// Any of "percentage", "amount".
DiscountType CreateOrderDiscountRequestDiscountType `json:"discount_type,omitzero" api:"required"`
// Display name of the discount.
Name string `json:"name" api:"required"`
// The flat amount to take off the order total, as a decimal string.
//
// Only read when `discount_type` is `amount`. Leaving it out stores `0`, which
// produces a discount that takes nothing off.
Amount param.Opt[string] `json:"amount,omitzero" format:"decimal"`
// The fraction of the order total to take off, as a decimal string.
//
// This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
// when `discount_type` is `percentage`. Leaving it out stores `0`, which produces
// a discount that takes nothing off.
Percentage param.Opt[string] `json:"percentage,omitzero" format:"decimal"`
// contains filtered or unexported fields
}
Request to create an order discount.
The properties Code, DiscountType, Name are required.
func (CreateOrderDiscountRequestParam) MarshalJSON ¶
func (r CreateOrderDiscountRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateOrderDiscountRequestParam) UnmarshalJSON ¶
func (r *CreateOrderDiscountRequestParam) UnmarshalJSON(data []byte) error
type CreatePartRequestParam ¶
type CreatePartRequestParam struct {
// ID of the item category to place the part in.
//
// The category's unit group determines the base unit used for the part's rates
// (`unit_value`, `unit_cost`, `burn_rate`).
CategoryID string `json:"category_id" api:"required"`
// Stock keeping unit code for the part.
//
// Must be unique within the account; creating a part with a SKU already used by
// another item fails with a conflict error.
SKU string `json:"sku" api:"required"`
// Free-form description of the part.
Description param.Opt[string] `json:"description,omitzero"`
// Free-form notes about the part.
Notes param.Opt[string] `json:"notes,omitzero"`
// IDs of existing attributes to link to the part at creation time.
//
// Each attribute's property must be one the part's category carries; an attribute
// from any other property fails the whole request.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to create a part.
The properties CategoryID, SKU are required.
func (CreatePartRequestParam) MarshalJSON ¶
func (r CreatePartRequestParam) MarshalJSON() (data []byte, err error)
func (*CreatePartRequestParam) UnmarshalJSON ¶
func (r *CreatePartRequestParam) UnmarshalJSON(data []byte) error
type CreatePaymentTermRequestParam ¶
type CreatePaymentTermRequestParam struct {
// Display name (e.g. `Net 30`).
//
// Must be unique among the payment terms visible to your account, including system
// defaults.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
Request to create a payment term.
The property Name is required.
func (CreatePaymentTermRequestParam) MarshalJSON ¶
func (r CreatePaymentTermRequestParam) MarshalJSON() (data []byte, err error)
func (*CreatePaymentTermRequestParam) UnmarshalJSON ¶
func (r *CreatePaymentTermRequestParam) UnmarshalJSON(data []byte) error
type CreatePortalDomainRequestParam ¶
type CreatePortalDomainRequestParam struct {
// The fully-qualified domain name to connect (e.g. `shop.acme.com`).
//
// A subdomain such as `shop.acme.com` is routed with a CNAME record and an apex
// domain such as `acme.com` with an A record; either way the records to publish
// come back on the response. The value is lowercased and any trailing dot is
// stripped before it is stored, and OpenMRP-owned hostnames are rejected.
Domain string `json:"domain" api:"required"`
// contains filtered or unexported fields
}
Request to connect a custom domain to the account's customer portal.
The property Domain is required.
func (CreatePortalDomainRequestParam) MarshalJSON ¶
func (r CreatePortalDomainRequestParam) MarshalJSON() (data []byte, err error)
func (*CreatePortalDomainRequestParam) UnmarshalJSON ¶
func (r *CreatePortalDomainRequestParam) UnmarshalJSON(data []byte) error
type CreateProductLineRequestCommissionPolicy ¶
type CreateProductLineRequestCommissionPolicy string
Default commission policy for products in this product line.
- `commission_exempt`: no commission applies to these products.
- `commission_applied`: commission applies to these products, unless overridden elsewhere.
const ( CreateProductLineRequestCommissionPolicyCommissionApplied CreateProductLineRequestCommissionPolicy = "commission_applied" CreateProductLineRequestCommissionPolicyCommissionExempt CreateProductLineRequestCommissionPolicy = "commission_exempt" )
type CreateProductLineRequestFreightPolicy ¶
type CreateProductLineRequestFreightPolicy string
Default freight policy for products in this product line.
- `free_freight`: these products do not incur a freight charge.
- `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const ( CreateProductLineRequestFreightPolicyFreeFreight CreateProductLineRequestFreightPolicy = "free_freight" CreateProductLineRequestFreightPolicyBilledFreight CreateProductLineRequestFreightPolicy = "billed_freight" )
type CreateProductLineRequestFulfillmentPolicy ¶
type CreateProductLineRequestFulfillmentPolicy string
How products in this line are produced when they do not say for themselves.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
const ( CreateProductLineRequestFulfillmentPolicyMakeToStock CreateProductLineRequestFulfillmentPolicy = "make_to_stock" CreateProductLineRequestFulfillmentPolicyMakeToOrder CreateProductLineRequestFulfillmentPolicy = "make_to_order" )
type CreateProductLineRequestParam ¶
type CreateProductLineRequestParam struct {
// Default commission policy for products in this product line.
//
// - `commission_exempt`: no commission applies to these products.
// - `commission_applied`: commission applies to these products, unless overridden
// elsewhere.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy CreateProductLineRequestCommissionPolicy `json:"commission_policy,omitzero" api:"required"`
// Default freight policy for products in this product line.
//
// - `free_freight`: these products do not incur a freight charge.
// - `billed_freight`: freight is billed for these products, unless overridden
// elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy CreateProductLineRequestFreightPolicy `json:"freight_policy,omitzero" api:"required"`
// Display name of the product line.
//
// Must be unique among the product lines visible to your account, including the
// shared system lines; a duplicate name returns a conflict error.
Name string `json:"name" api:"required"`
// ID of the unit group to associate with this product line.
//
// The unit group determines the set of units available to products in this product
// line. It must be a unit group your account owns or one of the shared system unit
// groups.
UnitGroupID string `json:"unit_group_id" api:"required"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
DefaultLot QuantityInputParam `json:"default_lot,omitzero"`
// How products in this line are produced when they do not say for themselves.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy CreateProductLineRequestFulfillmentPolicy `json:"fulfillment_policy,omitzero"`
// contains filtered or unexported fields
}
Request to create a product line.
The properties CommissionPolicy, FreightPolicy, Name, UnitGroupID are required.
func (CreateProductLineRequestParam) MarshalJSON ¶
func (r CreateProductLineRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateProductLineRequestParam) UnmarshalJSON ¶
func (r *CreateProductLineRequestParam) UnmarshalJSON(data []byte) error
type CreateProductRequestParam ¶
type CreateProductRequestParam struct {
// ID of the item category for the product's item.
//
// The category's unit group determines the default units used for the product's
// pricing rates and inventory tracking.
CategoryID string `json:"category_id" api:"required"`
// Stock keeping unit code for the product's item.
//
// Must be unique within the account; creation fails with a conflict error if
// another item already uses it.
SKU string `json:"sku" api:"required"`
// Product type code, which determines how the product behaves on orders and
// invoices.
//
// - `sale`: a standard sellable product.
// - `service`: a non-physical service line, such as labor or installation.
// - `shipping`: a shipping charge applied to an order.
// - `credit`: a credit applied against an order or invoice.
// - `return`: a returned product (RMA).
// - `tax`: a tax line.
//
// Any of "sale", "service", "shipping", "credit", "return", "tax".
Type CreateProductRequestType `json:"type,omitzero" api:"required"`
// Free-form description of the product.
Description param.Opt[string] `json:"description,omitzero"`
// Free-form notes about the product.
Notes param.Opt[string] `json:"notes,omitzero"`
// ID of the product line to assign the product to.
//
// The product line must be one your account owns or a shared system line; anything
// else fails as not found. Buyers are granted access to whole product lines, so a
// product created without one never appears in the customer portal, whatever its
// `portal_visibility`.
ProductLineID param.Opt[string] `json:"product_line_id,omitzero"`
// Attribute IDs to link to the product's item at creation time.
//
// Every ID must already exist in your account, and each attribute's property must
// be one the item's category carries; an ID that fails either check fails the
// whole request rather than being skipped.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// Whether the product is shown to buyers in the customer portal.
//
// - `visible`: buyers can see and order the product in the portal.
// - `hidden`: the product is concealed from the portal but remains usable
// internally.
//
// When omitted, the product is created hidden, so it must be set to `visible`
// before buyers can see it.
//
// Any of "visible", "hidden".
PortalVisibility CreateProductRequestPortalVisibility `json:"portal_visibility,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to create a product.
The properties CategoryID, SKU, Type are required.
func (CreateProductRequestParam) MarshalJSON ¶
func (r CreateProductRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateProductRequestParam) UnmarshalJSON ¶
func (r *CreateProductRequestParam) UnmarshalJSON(data []byte) error
type CreateProductRequestPortalVisibility ¶
type CreateProductRequestPortalVisibility string
Whether the product is shown to buyers in the customer portal.
- `visible`: buyers can see and order the product in the portal.
- `hidden`: the product is concealed from the portal but remains usable internally.
When omitted, the product is created hidden, so it must be set to `visible` before buyers can see it.
const ( CreateProductRequestPortalVisibilityVisible CreateProductRequestPortalVisibility = "visible" CreateProductRequestPortalVisibilityHidden CreateProductRequestPortalVisibility = "hidden" )
type CreateProductRequestType ¶
type CreateProductRequestType string
Product type code, which determines how the product behaves on orders and invoices.
- `sale`: a standard sellable product. - `service`: a non-physical service line, such as labor or installation. - `shipping`: a shipping charge applied to an order. - `credit`: a credit applied against an order or invoice. - `return`: a returned product (RMA). - `tax`: a tax line.
const ( CreateProductRequestTypeSale CreateProductRequestType = "sale" CreateProductRequestTypeService CreateProductRequestType = "service" CreateProductRequestTypeShipping CreateProductRequestType = "shipping" CreateProductRequestTypeCredit CreateProductRequestType = "credit" CreateProductRequestTypeReturn CreateProductRequestType = "return" CreateProductRequestTypeTax CreateProductRequestType = "tax" )
type CreateProductionScheduleLineRequestParam ¶
type CreateProductionScheduleLineRequestParam struct {
// ID of the item to build.
ItemID string `json:"item_id" api:"required"`
// ID of the machine that will run the campaign.
//
// The machine's production step and department are copied onto the campaign, which
// is what department-level attainment rolls it up by. The schedule's derived
// department work is not re-exploded for a hand-added campaign; it is rebuilt the
// next time the version is regenerated.
MachineID string `json:"machine_id" api:"required"`
// Units to build over the campaign.
Quantity float64 `json:"quantity" api:"required"`
// Horizon week to plan the campaign in, zero-based.
//
// Week 0 is the week the schedule's horizon starts in. The week must fall inside
// the horizon this version was planned over.
WeekIndex int64 `json:"week_index" api:"required"`
// How many lots the quantity is built in.
//
// Left unset, it is derived from the quantity and the account's default lot size.
// The lot size itself is taken from that account default and is not settable per
// campaign, so this is a record of the lot count rather than what a release splits
// batches by.
Lots param.Opt[int64] `json:"lots,omitzero"`
// Free-form explanation of the change.
ReasonNote param.Opt[string] `json:"reason_note,omitzero"`
// Machine hours the campaign will take.
//
// Left unset, it is estimated from the rate this version was solved with for this
// item, so the week's utilization still reflects the added work. An item the
// version holds no policy for estimates to zero.
RunHours param.Opt[float64] `json:"run_hours,omitzero"`
// Why the campaign was added.
//
// Required when the campaign lands inside a frozen week, since that is a
// commitment being changed.
//
// Any of "machine_down", "material_shortage", "rush_order", "quality_hold",
// "over_run", "under_run", "capacity_change", "other".
Reason CreateProductionScheduleLineRequestReason `json:"reason,omitzero"`
// contains filtered or unexported fields
}
Request to add a campaign to a schedule by hand.
The properties ItemID, MachineID, Quantity, WeekIndex are required.
func (CreateProductionScheduleLineRequestParam) MarshalJSON ¶
func (r CreateProductionScheduleLineRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateProductionScheduleLineRequestParam) UnmarshalJSON ¶
func (r *CreateProductionScheduleLineRequestParam) UnmarshalJSON(data []byte) error
type CreateProductionScheduleLineRequestReason ¶
type CreateProductionScheduleLineRequestReason string
Why the campaign was added.
Required when the campaign lands inside a frozen week, since that is a commitment being changed.
const ( CreateProductionScheduleLineRequestReasonMachineDown CreateProductionScheduleLineRequestReason = "machine_down" CreateProductionScheduleLineRequestReasonMaterialShortage CreateProductionScheduleLineRequestReason = "material_shortage" CreateProductionScheduleLineRequestReasonRushOrder CreateProductionScheduleLineRequestReason = "rush_order" CreateProductionScheduleLineRequestReasonQualityHold CreateProductionScheduleLineRequestReason = "quality_hold" CreateProductionScheduleLineRequestReasonOverRun CreateProductionScheduleLineRequestReason = "over_run" CreateProductionScheduleLineRequestReasonUnderRun CreateProductionScheduleLineRequestReason = "under_run" CreateProductionScheduleLineRequestReasonCapacityChange CreateProductionScheduleLineRequestReason = "capacity_change" CreateProductionScheduleLineRequestReasonOther CreateProductionScheduleLineRequestReason = "other" )
type CreatePropertyRequestParam ¶
type CreatePropertyRequestParam struct {
// Display name of the property, such as `Color` or `Size`.
//
// Must be unique within your account.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
Request to create a property.
The property Name is required.
func (CreatePropertyRequestParam) MarshalJSON ¶
func (r CreatePropertyRequestParam) MarshalJSON() (data []byte, err error)
func (*CreatePropertyRequestParam) UnmarshalJSON ¶
func (r *CreatePropertyRequestParam) UnmarshalJSON(data []byte) error
type CreateRoleRequestParam ¶
type CreateRoleRequestParam struct {
// Display name for the role, such as "Warehouse Manager".
//
// Must be unique within your account.
Name string `json:"name" api:"required"`
// Permissions to grant, in `{permission}:{action}` format, such as
// `customers:read`.
//
// The first half is a permission code such as `customers` or `sales_orders`, and
// the action must be one of `create`, `read`, `update`, or `delete`. List each
// action separately to grant more than one action on the same permission. A role
// created without any permissions grants no access until permissions are added.
Permissions []string `json:"permissions,omitzero"`
// contains filtered or unexported fields
}
Request to create a role.
The property Name is required.
func (CreateRoleRequestParam) MarshalJSON ¶
func (r CreateRoleRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateRoleRequestParam) UnmarshalJSON ¶
func (r *CreateRoleRequestParam) UnmarshalJSON(data []byte) error
type CreateSalesOrderLineInputParam ¶
type CreateSalesOrderLineInputParam struct {
// ID of the product being ordered.
ProductID string `json:"product_id" api:"required"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Quantity QuantityInputParam `json:"quantity,omitzero" api:"required"`
// Description recorded on the line.
//
// Defaults to the product's description when omitted.
ProductDescription param.Opt[string] `json:"product_description,omitzero"`
// SKU recorded on the line.
//
// Defaults to the product's SKU when omitted.
ProductSKU param.Opt[string] `json:"product_sku,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Line item input for a create sales order request.
The item, unit cost, and (unless an internal user supplies a `unit_price` override) the unit price are resolved server-side from the product. The quantity unit must belong to the product's unit group.
The properties ProductID, Quantity are required.
func (CreateSalesOrderLineInputParam) MarshalJSON ¶
func (r CreateSalesOrderLineInputParam) MarshalJSON() (data []byte, err error)
func (*CreateSalesOrderLineInputParam) UnmarshalJSON ¶
func (r *CreateSalesOrderLineInputParam) UnmarshalJSON(data []byte) error
type CreateSalesOrderLineRequestParam ¶
type CreateSalesOrderLineRequestParam struct {
// ID of the product being ordered.
ProductID string `json:"product_id" api:"required"`
// The product SKU recorded on the line.
ProductSKU string `json:"product_sku" api:"required"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Quantity QuantityInputParam `json:"quantity,omitzero" api:"required"`
// The product description recorded on the line.
ProductDescription param.Opt[string] `json:"product_description,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to create a line on a sales order.
The properties ProductID, ProductSKU, Quantity are required.
func (CreateSalesOrderLineRequestParam) MarshalJSON ¶
func (r CreateSalesOrderLineRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateSalesOrderLineRequestParam) UnmarshalJSON ¶
func (r *CreateSalesOrderLineRequestParam) UnmarshalJSON(data []byte) error
type CreateSalesOrderRequestCarrierBillingType ¶
type CreateSalesOrderRequestCarrierBillingType string
Who is billed for freight.
- `sender`: the sender pays for shipping.
- `third_party`: a third party pays for shipping, using the carrier billing account number.
const ( CreateSalesOrderRequestCarrierBillingTypeSender CreateSalesOrderRequestCarrierBillingType = "sender" CreateSalesOrderRequestCarrierBillingTypeThirdParty CreateSalesOrderRequestCarrierBillingType = "third_party" )
type CreateSalesOrderRequestParam ¶
type CreateSalesOrderRequestParam struct {
// Bill-to address ID.
//
// Must reference an existing address on the order's owner or buyer account.
BillToAddressID string `json:"bill_to_address_id" api:"required"`
// ID of the customer account the order is for.
BuyerAccountID string `json:"buyer_account_id" api:"required"`
// The line items to put on the order.
//
// The freight line, and the discount line when `order_discount_id` is supplied,
// are added on top of these automatically.
Lines []CreateSalesOrderLineInputParam `json:"lines,omitzero" api:"required"`
// Fulfillment priority used to rank the order on the shop floor.
//
// Any of "low", "normal", "high".
PriorityCode CreateSalesOrderRequestPriorityCode `json:"priority_code,omitzero" api:"required"`
// Ship-to address ID.
//
// Must reference an existing address on the order's owner or buyer account.
ShipToAddressID string `json:"ship_to_address_id" api:"required"`
// Carrier billing account number charged when `carrier_billing_type` is
// `third_party`.
CarrierBillingAccountNumber param.Opt[string] `json:"carrier_billing_account_number,omitzero"`
// ID of the carrier that will ship the order.
//
// Falls back to the customer's default carrier; the order is rejected when neither
// is available.
CarrierID param.Opt[string] `json:"carrier_id,omitzero"`
// The customer's own purchase order number, for cross-referencing.
//
// Must be unique among your orders for this customer.
CustomerPurchaseOrderNumber param.Opt[string] `json:"customer_purchase_order_number,omitzero"`
// Days between this order being issued and it being due to ship, replacing the
// customer's standing lead time for this order alone.
//
// Already a ship lead time, so no carrier transit is subtracted from it. Mutually
// exclusive with promised_at and ship_by_override_date.
LeadTimeOverrideDays param.Opt[int64] `json:"lead_time_override_days,omitzero"`
// Free-form note about the order.
Note param.Opt[string] `json:"note,omitzero"`
// The order-level discount to apply, given as either its ID or its unique code.
//
// The discount is realized as an extra negative-priced line on the order rather
// than as a separate total.
OrderDiscountID param.Opt[string] `json:"order_discount_id,omitzero"`
// ID of the payment terms for the order.
//
// Falls back to the customer's default payment term; the order is rejected when
// neither is available.
PaymentTermID param.Opt[string] `json:"payment_term_id,omitzero"`
// Date delivery is promised to the customer.
//
// The order's ship-by date is worked back from this: the goods have to reach the
// customer on a day they receive, so transit and both operating calendars are
// subtracted from it. Mutually exclusive with lead_time_override_days and
// ship_by_override_date.
PromisedAt param.Opt[time.Time] `json:"promised_at,omitzero" format:"date-time"`
// ID of the account user to credit as the order's sales rep.
//
// When omitted, a rep is assigned automatically: the customer's default sales rep
// first, then the sales territory matching the ship-to postal code, then the
// ship-to state. No rep is assigned when the customer is commission-exempt or
// every ordered product belongs to a commission-exempt product line.
SalesRepID param.Opt[string] `json:"sales_rep_id,omitzero"`
// ID of the carrier service level the order ships on.
//
// Falls back to the customer's default service level, but only when `carrier_id`
// is also omitted — supplying a carrier without a service level leaves the service
// level unset.
ServiceLevelID param.Opt[string] `json:"service_level_id,omitzero"`
// The exact date the order is due to ship, bypassing transit and the customer's
// receiving days.
//
// Still moved back to the nearest earlier day the plant ships on, since a date
// nobody can ship on is not a deadline. Mutually exclusive with promised_at and
// lead_time_override_days.
ShipByOverrideDate param.Opt[time.Time] `json:"ship_by_override_date,omitzero" format:"date-time"`
// ID of the shipping terms for the order.
//
// Falls back to the customer's default shipping term; the order is rejected when
// neither is available.
ShippingTermID param.Opt[string] `json:"shipping_term_id,omitzero"`
// Users who should receive order acknowledgement emails for this order.
//
// Each must be a user on the customer's account.
AcknowledgementEmailContacts []SalesOrderEmailContactInputParam `json:"acknowledgement_email_contacts,omitzero"`
// Who is billed for freight.
//
// - `sender`: the sender pays for shipping.
// - `third_party`: a third party pays for shipping, using the carrier billing
// account number.
//
// Any of "sender", "third_party".
CarrierBillingType CreateSalesOrderRequestCarrierBillingType `json:"carrier_billing_type,omitzero"`
// Users who should receive invoice emails for this order.
//
// Each must be a user on the customer's account.
InvoiceEmailContacts []SalesOrderEmailContactInputParam `json:"invoice_email_contacts,omitzero"`
// contains filtered or unexported fields
}
Request to create a sales order.
The properties BillToAddressID, BuyerAccountID, Lines, PriorityCode, ShipToAddressID are required.
func (CreateSalesOrderRequestParam) MarshalJSON ¶
func (r CreateSalesOrderRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateSalesOrderRequestParam) UnmarshalJSON ¶
func (r *CreateSalesOrderRequestParam) UnmarshalJSON(data []byte) error
type CreateSalesOrderRequestPriorityCode ¶ added in v0.17.1
type CreateSalesOrderRequestPriorityCode string
Fulfillment priority used to rank the order on the shop floor.
const ( CreateSalesOrderRequestPriorityCodeLow CreateSalesOrderRequestPriorityCode = "low" CreateSalesOrderRequestPriorityCodeNormal CreateSalesOrderRequestPriorityCode = "normal" CreateSalesOrderRequestPriorityCodeHigh CreateSalesOrderRequestPriorityCode = "high" )
type CreateSalesTargetRequestParam ¶
type CreateSalesTargetRequestParam struct {
// The unit the goal is denominated in, typically a currency unit.
AmountUnitID string `json:"amount_unit_id" api:"required"`
// The revenue goal for the period, as a decimal string (e.g. `50000.00`).
AmountValue string `json:"amount_value" api:"required"`
// End of the period the target applies to.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// Start of the period the target applies to (inclusive).
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// contains filtered or unexported fields
}
Request to create a sales target.
The properties AmountUnitID, AmountValue, EndsAt, StartsAt are required.
func (CreateSalesTargetRequestParam) MarshalJSON ¶
func (r CreateSalesTargetRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateSalesTargetRequestParam) UnmarshalJSON ¶
func (r *CreateSalesTargetRequestParam) UnmarshalJSON(data []byte) error
type CreateSandboxRequestMode ¶
type CreateSandboxRequestMode string
Controls how the sandbox is initialized.
- `blank`: starts empty, with no pre-populated data.
- `seeded`: starts with sample data, populated asynchronously after the sandbox is created.
const ( CreateSandboxRequestModeBlank CreateSandboxRequestMode = "blank" CreateSandboxRequestModeSeeded CreateSandboxRequestMode = "seeded" )
type CreateSandboxRequestParam ¶
type CreateSandboxRequestParam struct {
// Display name of the sandbox.
Name string `json:"name" api:"required"`
// Controls how the sandbox is initialized.
//
// - `blank`: starts empty, with no pre-populated data.
// - `seeded`: starts with sample data, populated asynchronously after the sandbox
// is created.
//
// Any of "blank", "seeded".
Mode CreateSandboxRequestMode `json:"mode,omitzero"`
// contains filtered or unexported fields
}
Request to create a sandbox.
The property Name is required.
func (CreateSandboxRequestParam) MarshalJSON ¶
func (r CreateSandboxRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateSandboxRequestParam) UnmarshalJSON ¶
func (r *CreateSandboxRequestParam) UnmarshalJSON(data []byte) error
type CreateScanningStationRequestLabelSize ¶
type CreateScanningStationRequestLabelSize string
Size of the labels printed at this station, given as width-by-height (for example, `1x1`).
const ( CreateScanningStationRequestLabelSize1x1 CreateScanningStationRequestLabelSize = "1x1" CreateScanningStationRequestLabelSize1x3 CreateScanningStationRequestLabelSize = "1x3" CreateScanningStationRequestLabelSize1x4 CreateScanningStationRequestLabelSize = "1x4" CreateScanningStationRequestLabelSize2x4 CreateScanningStationRequestLabelSize = "2x4" )
type CreateScanningStationRequestLabelType ¶
type CreateScanningStationRequestLabelType string
Type of label printed at this station.
- `tag`: a label attached to the physical product.
- `traveler`: a routing sheet that accompanies the batch through every production step.
const ( CreateScanningStationRequestLabelTypeTag CreateScanningStationRequestLabelType = "tag" CreateScanningStationRequestLabelTypeTraveler CreateScanningStationRequestLabelType = "traveler" )
type CreateScanningStationRequestOperatorRequirement ¶
type CreateScanningStationRequestOperatorRequirement string
Whether operators must perform a material check at this station.
- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.
const ( CreateScanningStationRequestOperatorRequirementNone CreateScanningStationRequestOperatorRequirement = "none" CreateScanningStationRequestOperatorRequirementMaterialCheck CreateScanningStationRequestOperatorRequirement = "material_check" )
type CreateScanningStationRequestParam ¶
type CreateScanningStationRequestParam struct {
// ID of the department this station belongs to.
//
// Must be a department in your account, and cannot be changed after creation.
DepartmentID string `json:"department_id" api:"required"`
// Display name of the scanning station.
//
// Must be unique within your account; maximum 255 characters.
Name string `json:"name" api:"required"`
// Whether operators must perform a material check at this station.
//
// - `none`: no additional operator check is required.
// - `material_check`: a material check is expected before the operation.
//
// Any of "none", "material_check".
OperatorRequirement CreateScanningStationRequestOperatorRequirement `json:"operator_requirement,omitzero" api:"required"`
// Scanning station type, determining which batch operation an operator performs
// when they scan here.
//
// - `init_batch`: starts a new batch at the beginning of a production flow.
// - `merge_batch`: combines several scanned batches into one.
// - `move_batch`: advances a batch through a production step connected to this
// station.
// - `split_batch`: divides a batch into several batches.
//
// The type cannot be changed after creation.
//
// Any of "init_batch", "merge_batch", "move_batch", "split_batch".
Type CreateScanningStationRequestType `json:"type,omitzero" api:"required"`
// Free-form notes about the scanning station.
Notes param.Opt[string] `json:"notes,omitzero"`
// Size of the labels printed at this station, given as width-by-height (for
// example, `1x1`).
//
// Any of "1x1", "1x3", "1x4", "2x4".
LabelSize CreateScanningStationRequestLabelSize `json:"label_size,omitzero"`
// Type of label printed at this station.
//
// - `tag`: a label attached to the physical product.
// - `traveler`: a routing sheet that accompanies the batch through every
// production step.
//
// Any of "tag", "traveler".
LabelType CreateScanningStationRequestLabelType `json:"label_type,omitzero"`
// contains filtered or unexported fields
}
Request to create a scanning station.
The properties DepartmentID, Name, OperatorRequirement, Type are required.
func (CreateScanningStationRequestParam) MarshalJSON ¶
func (r CreateScanningStationRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateScanningStationRequestParam) UnmarshalJSON ¶
func (r *CreateScanningStationRequestParam) UnmarshalJSON(data []byte) error
type CreateScanningStationRequestType ¶
type CreateScanningStationRequestType string
Scanning station type, determining which batch operation an operator performs when they scan here.
- `init_batch`: starts a new batch at the beginning of a production flow.
- `merge_batch`: combines several scanned batches into one.
- `move_batch`: advances a batch through a production step connected to this station.
- `split_batch`: divides a batch into several batches.
The type cannot be changed after creation.
const ( CreateScanningStationRequestTypeInitBatch CreateScanningStationRequestType = "init_batch" CreateScanningStationRequestTypeMergeBatch CreateScanningStationRequestType = "merge_batch" CreateScanningStationRequestTypeMoveBatch CreateScanningStationRequestType = "move_batch" CreateScanningStationRequestTypeSplitBatch CreateScanningStationRequestType = "split_batch" )
type CreateServiceLevelRequestCustomerPortalVisibility ¶
type CreateServiceLevelRequestCustomerPortalVisibility string
Whether customers can see and select this service level at checkout in the customer portal.
const ( CreateServiceLevelRequestCustomerPortalVisibilityVisible CreateServiceLevelRequestCustomerPortalVisibility = "visible" CreateServiceLevelRequestCustomerPortalVisibilityHidden CreateServiceLevelRequestCustomerPortalVisibility = "hidden" )
type CreateServiceLevelRequestParam ¶
type CreateServiceLevelRequestParam struct {
// Carrier-specific code identifying this service level (e.g. `fedex_ground`).
//
// Must be unique among the carrier's service levels, and is returned as the
// service level's `service_level_token`.
Code string `json:"code" api:"required"`
// Whether this becomes the carrier's default service level, pre-selected when the
// carrier is chosen.
//
// Each carrier has at most one default; setting this to `true` clears the
// carrier's existing default.
IsDefault bool `json:"is_default" api:"required"`
// Human-readable name for the service level, shown to customers at checkout when
// the service level is visible.
Name string `json:"name" api:"required"`
// Business days this service typically takes in transit, used to work an order's
// ship-by date back from a promised delivery date.
//
// A fallback: when a carrier can rate the lane, the transit it quotes is used
// instead. Leave unset for carriers that can be rated, and set it for those that
// cannot (freight, will-call), where it is the only transit the system will have.
DefaultTransitDays param.Opt[int64] `json:"default_transit_days,omitzero"`
// Whether customers can see and select this service level at checkout in the
// customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility CreateServiceLevelRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to create a service level.
The properties Code, IsDefault, Name are required.
func (CreateServiceLevelRequestParam) MarshalJSON ¶
func (r CreateServiceLevelRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateServiceLevelRequestParam) UnmarshalJSON ¶
func (r *CreateServiceLevelRequestParam) UnmarshalJSON(data []byte) error
type CreateShippingTermRequestParam ¶
type CreateShippingTermRequestParam struct {
// Human-readable name for the shipping term, used to identify it when assigning
// shipping terms to customers and orders.
Name string `json:"name" api:"required"`
// Freight pricing model applied by this shipping term.
//
// - `free_freight`: the buyer is never charged for shipping.
// - `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`,
// regardless of what the carrier would have charged.
// - `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for
// the order's carrier and service level.
//
// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
Type CreateShippingTermRequestType `json:"type,omitzero" api:"required"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
FlatRate QuantityInputParam `json:"flat_rate,omitzero"`
// IDs of the service levels that ship for free once an order exceeds
// `minimum_order_value`.
//
// Leave this empty to let every service level ship free above the threshold. The
// request is rejected if any ID is not a service level available to your account.
FreeShippingServiceLevelIDs []string `json:"free_shipping_service_level_ids,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
MinimumOrderValue QuantityInputParam `json:"minimum_order_value,omitzero"`
// contains filtered or unexported fields
}
Request to create a shipping term.
The properties Name, Type are required.
func (CreateShippingTermRequestParam) MarshalJSON ¶
func (r CreateShippingTermRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateShippingTermRequestParam) UnmarshalJSON ¶
func (r *CreateShippingTermRequestParam) UnmarshalJSON(data []byte) error
type CreateShippingTermRequestType ¶
type CreateShippingTermRequestType string
Freight pricing model applied by this shipping term.
- `free_freight`: the buyer is never charged for shipping.
- `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`, regardless of what the carrier would have charged.
- `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for the order's carrier and service level.
const ( CreateShippingTermRequestTypeFreeFreight CreateShippingTermRequestType = "free_freight" CreateShippingTermRequestTypeFlatRateFreight CreateShippingTermRequestType = "flat_rate_freight" CreateShippingTermRequestTypeCarrierRateFreight CreateShippingTermRequestType = "carrier_rate_freight" )
type CreateUnitGroupRequestParam ¶
type CreateUnitGroupRequestParam struct {
// ID of the unit to designate as the group's reference unit.
//
// Must be a unit of the group's `type`.
BaseUnitID string `json:"base_unit_id" api:"required"`
// Display name of the unit group.
//
// Must be unique within the account.
Name string `json:"name" api:"required"`
// The dimension shared by every unit in this group, such as mass, volume, or
// currency.
//
// The base unit and all associated units must be of this dimension, and the
// dimension cannot be changed after the group is created.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type CreateUnitGroupRequestType `json:"type,omitzero" api:"required"`
// Free-form notes about the unit group.
Notes param.Opt[string] `json:"notes,omitzero"`
// Units to associate with the group, each with its own discount and customer
// portal visibility.
AssociatedUnits []CreateUnitGroupUnitParam `json:"associated_units,omitzero"`
// contains filtered or unexported fields
}
Request to create a unit group.
The properties BaseUnitID, Name, Type are required.
func (CreateUnitGroupRequestParam) MarshalJSON ¶
func (r CreateUnitGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateUnitGroupRequestParam) UnmarshalJSON ¶
func (r *CreateUnitGroupRequestParam) UnmarshalJSON(data []byte) error
type CreateUnitGroupRequestType ¶
type CreateUnitGroupRequestType string
The dimension shared by every unit in this group, such as mass, volume, or currency.
The base unit and all associated units must be of this dimension, and the dimension cannot be changed after the group is created.
const ( CreateUnitGroupRequestTypeCurrency CreateUnitGroupRequestType = "currency" CreateUnitGroupRequestTypeQuantity CreateUnitGroupRequestType = "quantity" CreateUnitGroupRequestTypeTime CreateUnitGroupRequestType = "time" CreateUnitGroupRequestTypeMass CreateUnitGroupRequestType = "mass" CreateUnitGroupRequestTypeVolume CreateUnitGroupRequestType = "volume" CreateUnitGroupRequestTypeLength CreateUnitGroupRequestType = "length" CreateUnitGroupRequestTypeTemperature CreateUnitGroupRequestType = "temperature" CreateUnitGroupRequestTypeArea CreateUnitGroupRequestType = "area" )
type CreateUnitGroupUnitParam ¶
type CreateUnitGroupUnitParam struct {
// ID of the unit to associate with the group.
//
// The unit's dimension must match the group's `type`.
UnitID string `json:"unit_id" api:"required"`
// Flat amount subtracted from the unit's price when an order is placed in this
// unit.
//
// Subtracted before `discount_percentage` is applied.
DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
// Share of the unit's price removed when an order is placed in this unit.
//
// Expressed as a decimal fraction rather than a whole number, so `0.1` is a 10%
// discount. Send `0` explicitly for no discount — omitting the field stores a
// discount of `1`, which removes the entire price.
DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
// Whether the unit is shown to customers in the customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility CreateUnitGroupUnitParamCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Parameters for associating a unit with a unit group.
The property UnitID is required.
func (CreateUnitGroupUnitParam) MarshalJSON ¶
func (r CreateUnitGroupUnitParam) MarshalJSON() (data []byte, err error)
func (*CreateUnitGroupUnitParam) UnmarshalJSON ¶
func (r *CreateUnitGroupUnitParam) UnmarshalJSON(data []byte) error
type CreateUnitGroupUnitParamCustomerPortalVisibility ¶
type CreateUnitGroupUnitParamCustomerPortalVisibility string
Whether the unit is shown to customers in the customer portal.
const ( CreateUnitGroupUnitParamCustomerPortalVisibilityVisible CreateUnitGroupUnitParamCustomerPortalVisibility = "visible" CreateUnitGroupUnitParamCustomerPortalVisibilityHidden CreateUnitGroupUnitParamCustomerPortalVisibility = "hidden" )
type CreateUnitGroupUnitRequestCustomerPortalVisibility ¶
type CreateUnitGroupUnitRequestCustomerPortalVisibility string
Whether the unit is shown to customers in the customer portal.
const ( CreateUnitGroupUnitRequestCustomerPortalVisibilityVisible CreateUnitGroupUnitRequestCustomerPortalVisibility = "visible" CreateUnitGroupUnitRequestCustomerPortalVisibilityHidden CreateUnitGroupUnitRequestCustomerPortalVisibility = "hidden" )
type CreateUnitGroupUnitRequestParam ¶
type CreateUnitGroupUnitRequestParam struct {
// ID of the unit to associate with the group.
//
// The unit's dimension must match the group's `type`.
UnitID string `json:"unit_id" api:"required"`
// Flat amount subtracted from the unit's price when an order is placed in this
// unit.
//
// Subtracted before `discount_percentage` is applied.
DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
// Share of the unit's price removed when an order is placed in this unit.
//
// Expressed as a decimal fraction rather than a whole number, so `0.1` is a 10%
// discount. Send `0` explicitly for no discount — omitting the field stores a
// discount of `1`, which removes the entire price.
DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
// Whether the unit is shown to customers in the customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility CreateUnitGroupUnitRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to add a unit to a unit group.
The property UnitID is required.
func (CreateUnitGroupUnitRequestParam) MarshalJSON ¶
func (r CreateUnitGroupUnitRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateUnitGroupUnitRequestParam) UnmarshalJSON ¶
func (r *CreateUnitGroupUnitRequestParam) UnmarshalJSON(data []byte) error
type CreateUnitRequestParam ¶
type CreateUnitRequestParam struct {
// Short abbreviation for the unit (e.g. "g").
//
// Must be unique within the account.
Abbreviation string `json:"abbreviation" api:"required"`
// Display name of the unit (e.g. "Gram").
//
// Must be unique within the account.
Name string `json:"name" api:"required"`
// Denominator of the conversion offset.
//
// Must not be zero, so send `1` when the unit has no offset.
OffsetDenominator string `json:"offset_denominator" api:"required" format:"decimal"`
// Numerator of the conversion offset, applied after the ratio for scales that do
// not share a zero point, such as temperature.
//
// Send `0` for units that convert by ratio alone.
OffsetNumerator string `json:"offset_numerator" api:"required" format:"decimal"`
// Denominator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// Must not be zero.
RatioDenominator string `json:"ratio_denominator" api:"required" format:"decimal"`
// Numerator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// A quantity is converted with
// `value × (ratio_numerator / ratio_denominator) + (offset_numerator / offset_denominator)`,
// so a kilogram in a gram-based dimension has a numerator of `1000` and a
// denominator of `1`.
RatioNumerator string `json:"ratio_numerator" api:"required" format:"decimal"`
// The dimension this unit measures, such as mass, volume, or currency.
//
// Units can only be converted to other units of the same dimension, and the
// dimension cannot be changed after the unit is created.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type CreateUnitRequestType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to create a unit.
The properties Abbreviation, Name, OffsetDenominator, OffsetNumerator, RatioDenominator, RatioNumerator, Type are required.
func (CreateUnitRequestParam) MarshalJSON ¶
func (r CreateUnitRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateUnitRequestParam) UnmarshalJSON ¶
func (r *CreateUnitRequestParam) UnmarshalJSON(data []byte) error
type CreateUnitRequestType ¶
type CreateUnitRequestType string
The dimension this unit measures, such as mass, volume, or currency.
Units can only be converted to other units of the same dimension, and the dimension cannot be changed after the unit is created.
const ( CreateUnitRequestTypeCurrency CreateUnitRequestType = "currency" CreateUnitRequestTypeQuantity CreateUnitRequestType = "quantity" CreateUnitRequestTypeTime CreateUnitRequestType = "time" CreateUnitRequestTypeMass CreateUnitRequestType = "mass" CreateUnitRequestTypeVolume CreateUnitRequestType = "volume" CreateUnitRequestTypeLength CreateUnitRequestType = "length" CreateUnitRequestTypeTemperature CreateUnitRequestType = "temperature" CreateUnitRequestTypeArea CreateUnitRequestType = "area" )
type CreateVolumeDiscountRequestParam ¶
type CreateVolumeDiscountRequestParam struct {
// Display name of the volume discount.
//
// Must be unique within the account.
Name string `json:"name" api:"required"`
// Tiers for this volume discount.
Tiers []CreateVolumeDiscountTierInputParam `json:"tiers,omitzero" api:"required"`
// Attribute IDs to scope the discount to.
//
// When set, an item qualifies only if it has every listed attribute.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// Item category IDs to scope the discount to.
//
// When empty, all categories qualify.
CategoryIDs []string `json:"category_ids,omitzero"`
// Account group IDs to scope the discount to specific customer groups.
//
// When empty, all customers qualify. A discount scoped to a group the buyer
// belongs to is preferred over an unscoped one when both could apply to the same
// order line.
CustomerGroupIDs []string `json:"customer_group_ids,omitzero"`
// Product line IDs to scope the discount to.
//
// When empty, all product lines qualify.
ProductLineIDs []string `json:"product_line_ids,omitzero"`
// IDs of the units that ordered quantities are measured in when evaluating tier
// thresholds.
//
// Quantities ordered in other units are converted into one of these before being
// compared against a threshold. Leaving this empty makes the discount inert: the
// quantity always evaluates to zero, so no threshold above zero is ever reached.
UnitIDs []string `json:"unit_ids,omitzero"`
// contains filtered or unexported fields
}
Request to create a volume discount.
The properties Name, Tiers are required.
func (CreateVolumeDiscountRequestParam) MarshalJSON ¶
func (r CreateVolumeDiscountRequestParam) MarshalJSON() (data []byte, err error)
func (*CreateVolumeDiscountRequestParam) UnmarshalJSON ¶
func (r *CreateVolumeDiscountRequestParam) UnmarshalJSON(data []byte) error
type CreateVolumeDiscountTierInputParam ¶
type CreateVolumeDiscountTierInputParam struct {
// Fraction of the price taken off once the threshold is met, as a decimal string.
//
// This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
// meets several tiers of the same discount, their reductions compound.
DiscountPercentage string `json:"discount_percentage" api:"required" format:"decimal"`
// Display name of the tier.
Name string `json:"name" api:"required"`
// Minimum ordered quantity at which this tier's discount begins to apply, as a
// decimal string.
//
// The quantity compared against the threshold is the total across every line on
// the order that falls within the discount's scope, converted into one of the
// discount's units.
Threshold string `json:"threshold" api:"required" format:"decimal"`
// ID of another tier that this tier follows.
//
// Tier IDs are assigned when the discount is created, so a tier created in this
// same request cannot be referenced here. The link is stored with the tier but
// does not affect pricing: every tier whose threshold is met applies, regardless
// of any parent.
ParentTierID param.Opt[string] `json:"parent_tier_id,omitzero"`
// contains filtered or unexported fields
}
Volume discount tier to create.
The properties DiscountPercentage, Name, Threshold are required.
func (CreateVolumeDiscountTierInputParam) MarshalJSON ¶
func (r CreateVolumeDiscountTierInputParam) MarshalJSON() (data []byte, err error)
func (*CreateVolumeDiscountTierInputParam) UnmarshalJSON ¶
func (r *CreateVolumeDiscountTierInputParam) UnmarshalJSON(data []byte) error
type CreatedAPIKey ¶
type CreatedAPIKey struct {
// An API key used to authenticate requests to the OpenMRP API.
//
// A key always acts on behalf of the account it was created under, with the
// permissions of the role assigned to it.
APIKeyInfo APIKey `json:"api_key_info" api:"required"`
// The secret used to authenticate requests, sent as a bearer token in the
// `Authorization` header.
//
// This is the only response that ever contains the secret; if it is lost, rotate
// the key to issue a new one. Learn more about
// [managing your API keys](https://docs.openmrp.ai/api/managing-api-keys).
APIKeySecret string `json:"api_key_secret" api:"required"`
// Resource type identifier.
//
// Any of "created_api_key".
Object CreatedAPIKeyObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APIKeyInfo respjson.Field
APIKeySecret respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A newly issued API key together with its secret value, returned when a key is created or rotated.
func (CreatedAPIKey) RawJSON ¶
func (r CreatedAPIKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreatedAPIKey) UnmarshalJSON ¶
func (r *CreatedAPIKey) UnmarshalJSON(data []byte) error
type CreatedAPIKeyObject ¶
type CreatedAPIKeyObject string
Resource type identifier.
const (
CreatedAPIKeyObjectCreatedAPIKey CreatedAPIKeyObject = "created_api_key"
)
type CreatedBy ¶
type CreatedBy struct {
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// Resource type identifier.
//
// Any of "created_by".
Object CreatedByObject `json:"object" api:"required"`
// The creator's relationship to the account that owns the resource.
//
// - `internal`: created by a user of the owning account.
// - `customer`: created by a customer of the owning account.
// - `system`: created automatically with no human actor (e.g. an EDI import).
//
// Any of "internal", "customer", "system".
Relation CreatedByRelation `json:"relation" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Actor respjson.Field
Object respjson.Field
Relation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
CreatedBy describes who created a resource and their relationship to the account that owns it.
It is resolved from the resource's create audit event.
func (*CreatedBy) UnmarshalJSON ¶
type CreatedByObject ¶
type CreatedByObject string
Resource type identifier.
const (
CreatedByObjectCreatedBy CreatedByObject = "created_by"
)
type CreatedByRelation ¶
type CreatedByRelation string
The creator's relationship to the account that owns the resource.
- `internal`: created by a user of the owning account. - `customer`: created by a customer of the owning account. - `system`: created automatically with no human actor (e.g. an EDI import).
const ( CreatedByRelationInternal CreatedByRelation = "internal" CreatedByRelationCustomer CreatedByRelation = "customer" CreatedByRelationSystem CreatedByRelation = "system" )
type Customer ¶
type Customer struct {
// Customer ID.
ID string `json:"id" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
BillToAddress Address `json:"bill_to_address" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ChildAccounts *ListCustomer `json:"child_accounts" api:"required"`
// How sales commission applies to this customer's orders.
//
// - `commission_exempt`: this customer's orders are exempt from sales commission.
// - `commission_applied`: sales commission is calculated on this customer's
// orders.
//
// The customer counts as exempt if this field, its `type` group, or any of its
// `price_groups` is `commission_exempt`. Exempt customers never have a sales rep
// assigned automatically when an order is created without one.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy CustomerCommissionPolicy `json:"commission_policy" api:"required"`
// Customer contact information.
ContactInfo CustomerContactInfo `json:"contact_info" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
CreditLimit Quantity `json:"credit_limit" api:"required"`
// Values used to fill in a new sales order for this customer when the order does
// not supply its own.
Defaults CustomerDefaults `json:"defaults" api:"required"`
// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
// documents with this customer.
//
// Any of "enabled", "disabled".
EdiStatus CustomerEdiStatus `json:"edi_status" api:"required"`
// Customer freight and carrier settings.
FreightPreferences CustomerFreightPreferences `json:"freight_preferences" api:"required"`
// The customer's business name, as shown throughout the app and on documents.
Name string `json:"name" api:"required"`
// Free-form note about the customer.
Note string `json:"note" api:"required"`
// Customer notification settings.
NotificationPreferences CustomerNotificationPreferences `json:"notification_preferences" api:"required"`
// Human-readable customer number used to identify the account, distinct from the
// `id`.
//
// Unique within your account.
Number string `json:"number" api:"required"`
// Resource type identifier.
//
// Any of "customer".
Object CustomerObject `json:"object" api:"required"`
// A business you sell to, with its contact details, default fulfillment settings,
// and order policies.
ParentAccount *Customer `json:"parent_account" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
PriceGroups ListAccountGroup `json:"price_groups" api:"required"`
// The customer's position in the account hierarchy.
//
// - `standalone`: no parent or child accounts.
// - `parent`: has one or more child accounts (see `child_accounts`).
// - `child`: belongs to a parent account (see `parent_account`).
//
// Any of "standalone", "parent", "child".
RelationshipType CustomerRelationshipType `json:"relationship_type" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
ShipToAddress Address `json:"ship_to_address" api:"required"`
// The customer's account standing.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the customer's shipments should be held, typically over a
// credit problem, while orders can still be placed.
// - `hold_all`: all activity for the customer should be held.
//
// The hold statuses are advisory: OpenMRP flags the customer's orders as being on
// credit hold, but requests to create orders or shipments for the customer are not
// rejected.
//
// Any of "normal", "preferred", "hold_shipment", "hold_all".
Status CustomerStatus `json:"status" api:"required"`
// A named grouping of customer accounts, used for pricing rules or to categorize
// accounts.
//
// A customer carries at most one group of type `type_group` as its customer type,
// plus any number of groups of type `pricing_group`. Membership of either kind can
// scope a volume discount to the customer and open up product lines for it to
// order from.
Type AccountGroup `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BillToAddress respjson.Field
ChildAccounts respjson.Field
CommissionPolicy respjson.Field
ContactInfo respjson.Field
CreatedAt respjson.Field
CreditLimit respjson.Field
Defaults respjson.Field
EdiStatus respjson.Field
FreightPreferences respjson.Field
Name respjson.Field
Note respjson.Field
NotificationPreferences respjson.Field
Number respjson.Field
Object respjson.Field
ParentAccount respjson.Field
PriceGroups respjson.Field
RelationshipType respjson.Field
ShipToAddress respjson.Field
Status respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A business you sell to, with its contact details, default fulfillment settings, and order policies.
func (*Customer) UnmarshalJSON ¶
type CustomerCommissionPolicy ¶
type CustomerCommissionPolicy string
How sales commission applies to this customer's orders.
- `commission_exempt`: this customer's orders are exempt from sales commission.
- `commission_applied`: sales commission is calculated on this customer's orders.
The customer counts as exempt if this field, its `type` group, or any of its `price_groups` is `commission_exempt`. Exempt customers never have a sales rep assigned automatically when an order is created without one.
const ( CustomerCommissionPolicyCommissionApplied CustomerCommissionPolicy = "commission_applied" CustomerCommissionPolicyCommissionExempt CustomerCommissionPolicy = "commission_exempt" )
type CustomerContactInfo ¶
type CustomerContactInfo struct {
// Email address.
Email string `json:"email" api:"required"`
// Resource type identifier.
//
// Any of "customer_contact_info".
Object CustomerContactInfoObject `json:"object" api:"required"`
// Phone number.
Phone string `json:"phone" api:"required"`
// Website URL.
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Email respjson.Field
Object respjson.Field
Phone respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Customer contact information.
func (CustomerContactInfo) RawJSON ¶
func (r CustomerContactInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerContactInfo) UnmarshalJSON ¶
func (r *CustomerContactInfo) UnmarshalJSON(data []byte) error
type CustomerContactInfoObject ¶
type CustomerContactInfoObject string
Resource type identifier.
const (
CustomerContactInfoObjectCustomerContactInfo CustomerContactInfoObject = "customer_contact_info"
)
type CustomerDefaults ¶
type CustomerDefaults struct {
// How this customer's orders are produced.
//
// - `make_to_stock`: their order history feeds the production-schedule forecast,
// so stock is built ahead of their demand.
// - `make_to_order`: their history is left out of the forecast; their orders are
// produced only once placed, and fit into the schedule on their own ship-by
// dates.
//
// With none set here the customer inherits its account group's policy, then falls
// back to make-to-stock.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy CustomerDefaultsFulfillmentPolicy `json:"fulfillment_policy" api:"required"`
// Calendar days between an order being issued and it being due to ship.
//
// Sets each order's `ship_by_date` when it is issued. With none set here the
// customer inherits its parent account's lead time, then its account group's, then
// the account default.
LeadTimeDays int64 `json:"lead_time_days" api:"required"`
// Resource type identifier.
//
// Any of "customer_defaults".
Object CustomerDefaultsObject `json:"object" api:"required"`
// A payment term describing when payment is due (e.g. `Net 30`), assignable to
// customers, sales orders, purchase orders, and invoices.
PaymentTerm PaymentTerm `json:"payment_term" api:"required"`
// Priority level used to order work on sales orders, purchase orders, and picks.
//
// The levels are platform-provided and the same for every account, so they cannot
// be created, renamed, or removed. A customer can carry a default priority that
// pre-fills new orders for them.
Priority Priority `json:"priority" api:"required"`
// The operating calendar naming the days this customer's dock accepts freight.
//
// A promised delivery date is worked back from a day the customer can actually
// receive on. With none set here the customer inherits its account group's
// calendar, then the account default, then Monday to Friday.
ReceiveCalendarID string `json:"receive_calendar_id" api:"required"`
// A user's membership in an account, carrying the account-specific status, role,
// and department.
//
// Profile fields (name, email, username, image URL) live on the `user`
// sub-resource, which is shared across every account the user belongs to.
SalesRep AccountUser `json:"sales_rep" api:"required"`
// A named freight pricing rule that decides what a buyer pays for shipping.
//
// A customer's default shipping term is evaluated whenever freight is quoted for
// one of their orders. Freight exemptions on the customer, its type group, or any
// of its price groups are checked first and zero the freight charge before the
// shipping term is considered.
ShippingTerm ShippingTerm `json:"shipping_term" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FulfillmentPolicy respjson.Field
LeadTimeDays respjson.Field
Object respjson.Field
PaymentTerm respjson.Field
Priority respjson.Field
ReceiveCalendarID respjson.Field
SalesRep respjson.Field
ShippingTerm respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Values used to fill in a new sales order for this customer when the order does not supply its own.
func (CustomerDefaults) RawJSON ¶
func (r CustomerDefaults) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerDefaults) UnmarshalJSON ¶
func (r *CustomerDefaults) UnmarshalJSON(data []byte) error
type CustomerDefaultsFulfillmentPolicy ¶ added in v0.19.0
type CustomerDefaultsFulfillmentPolicy string
How this customer's orders are produced.
- `make_to_stock`: their order history feeds the production-schedule forecast, so stock is built ahead of their demand.
- `make_to_order`: their history is left out of the forecast; their orders are produced only once placed, and fit into the schedule on their own ship-by dates.
With none set here the customer inherits its account group's policy, then falls back to make-to-stock.
const ( CustomerDefaultsFulfillmentPolicyMakeToStock CustomerDefaultsFulfillmentPolicy = "make_to_stock" CustomerDefaultsFulfillmentPolicyMakeToOrder CustomerDefaultsFulfillmentPolicy = "make_to_order" )
type CustomerDefaultsObject ¶
type CustomerDefaultsObject string
Resource type identifier.
const (
CustomerDefaultsObjectCustomerDefaults CustomerDefaultsObject = "customer_defaults"
)
type CustomerEdiStatus ¶
type CustomerEdiStatus string
Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
const ( CustomerEdiStatusEnabled CustomerEdiStatus = "enabled" CustomerEdiStatusDisabled CustomerEdiStatus = "disabled" )
type CustomerFreightPreferences ¶
type CustomerFreightPreferences struct {
// Carrier billing account number charged when `billing_type` is `third_party`.
BillingAccount string `json:"billing_account" api:"required"`
// Who pays the carrier for shipments.
//
// - `sender`: the shipper (you) pays the carrier.
// - `third_party`: a third party is billed, using `billing_account`.
//
// Any of "sender", "third_party".
BillingType CustomerFreightPreferencesBillingType `json:"billing_type" api:"required"`
// A shipping carrier configured for fulfilling orders.
//
// Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
// through Shippo for live rating and label purchase; other carriers represent
// self-managed shipping methods such as will call or local delivery.
Carrier Carrier `json:"carrier" api:"required"`
// Resource type identifier.
//
// Any of "customer_freight_preferences".
Object CustomerFreightPreferencesObject `json:"object" api:"required"`
// A shipping speed or method offered by a carrier, such as ground or overnight.
//
// Carriers connected through Shippo have their service levels synced from the
// carrier itself; any carrier can also have service levels you create by hand.
ServiceLevel ServiceLevel `json:"service_level" api:"required"`
// Freight policy applied to this customer's orders.
//
// - `free_freight`: the customer is not billed for freight.
// - `billed_freight`: freight is billed to the customer.
//
// Freight is waived when this field, the customer's `type` group, any of its
// `price_groups`, or any product line the ordered products belong to is
// `free_freight`, so a shipment can come back freight-exempt even while this field
// is `billed_freight`.
//
// Any of "free_freight", "billed_freight".
Status CustomerFreightPreferencesStatus `json:"status" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BillingAccount respjson.Field
BillingType respjson.Field
Carrier respjson.Field
Object respjson.Field
ServiceLevel respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Customer freight and carrier settings.
func (CustomerFreightPreferences) RawJSON ¶
func (r CustomerFreightPreferences) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerFreightPreferences) UnmarshalJSON ¶
func (r *CustomerFreightPreferences) UnmarshalJSON(data []byte) error
type CustomerFreightPreferencesBillingType ¶
type CustomerFreightPreferencesBillingType string
Who pays the carrier for shipments.
- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `billing_account`.
const ( CustomerFreightPreferencesBillingTypeSender CustomerFreightPreferencesBillingType = "sender" CustomerFreightPreferencesBillingTypeThirdParty CustomerFreightPreferencesBillingType = "third_party" )
type CustomerFreightPreferencesObject ¶
type CustomerFreightPreferencesObject string
Resource type identifier.
const (
CustomerFreightPreferencesObjectCustomerFreightPreferences CustomerFreightPreferencesObject = "customer_freight_preferences"
)
type CustomerFreightPreferencesStatus ¶
type CustomerFreightPreferencesStatus string
Freight policy applied to this customer's orders.
- `free_freight`: the customer is not billed for freight. - `billed_freight`: freight is billed to the customer.
Freight is waived when this field, the customer's `type` group, any of its `price_groups`, or any product line the ordered products belong to is `free_freight`, so a shipment can come back freight-exempt even while this field is `billed_freight`.
const ( CustomerFreightPreferencesStatusFreeFreight CustomerFreightPreferencesStatus = "free_freight" CustomerFreightPreferencesStatusBilledFreight CustomerFreightPreferencesStatus = "billed_freight" )
type CustomerLeadTime ¶
type CustomerLeadTime struct {
// A named grouping of customer accounts, used for pricing rules or to categorize
// accounts.
//
// A customer carries at most one group of type `type_group` as its customer type,
// plus any number of groups of type `pricing_group`. Membership of either kind can
// scope a volume discount to the customer and open up product lines for it to
// order from.
AccountGroup AccountGroup `json:"account_group" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Customer Entity `json:"customer" api:"required"`
// Calendar days between an order being issued and it being due to ship.
//
// `0` means same-day: an order issued today would be due to ship today.
Days int64 `json:"days" api:"required"`
// Resource type identifier.
//
// Any of "customer_lead_time".
Object CustomerLeadTimeObject `json:"object" api:"required"`
// A business you sell to, with its contact details, default fulfillment settings,
// and order policies.
ParentCustomer Customer `json:"parent_customer" api:"required"`
// Which rule in the chain produced this lead time.
//
// - `customer`: a lead time set on the customer itself.
// - `parent_customer`: inherited from the customer's parent account.
// - `account_group`: inherited from the customer's account group.
// - `account`: the account-wide fallback.
//
// The shared `manual` value cannot appear here: it means a promised date was set
// on one specific order, which is a fact about that order rather than about the
// customer.
//
// Any of "customer", "parent_customer", "account_group", "account", "manual",
// "order_lead_time", "order_ship_by".
Source CustomerLeadTimeSource `json:"source" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccountGroup respjson.Field
Customer respjson.Field
Days respjson.Field
Object respjson.Field
ParentCustomer respjson.Field
Source respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The ship-by lead time a new order for this customer would be committed to.
func (CustomerLeadTime) RawJSON ¶
func (r CustomerLeadTime) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerLeadTime) UnmarshalJSON ¶
func (r *CustomerLeadTime) UnmarshalJSON(data []byte) error
type CustomerLeadTimeObject ¶
type CustomerLeadTimeObject string
Resource type identifier.
const (
CustomerLeadTimeObjectCustomerLeadTime CustomerLeadTimeObject = "customer_lead_time"
)
type CustomerLeadTimeSource ¶
type CustomerLeadTimeSource string
Which rule in the chain produced this lead time.
- `customer`: a lead time set on the customer itself. - `parent_customer`: inherited from the customer's parent account. - `account_group`: inherited from the customer's account group. - `account`: the account-wide fallback.
The shared `manual` value cannot appear here: it means a promised date was set on one specific order, which is a fact about that order rather than about the customer.
const ( CustomerLeadTimeSourceCustomer CustomerLeadTimeSource = "customer" CustomerLeadTimeSourceParentCustomer CustomerLeadTimeSource = "parent_customer" CustomerLeadTimeSourceAccountGroup CustomerLeadTimeSource = "account_group" CustomerLeadTimeSourceAccount CustomerLeadTimeSource = "account" CustomerLeadTimeSourceManual CustomerLeadTimeSource = "manual" CustomerLeadTimeSourceOrderLeadTime CustomerLeadTimeSource = "order_lead_time" CustomerLeadTimeSourceOrderShipBy CustomerLeadTimeSource = "order_ship_by" )
type CustomerNotificationPreferences ¶
type CustomerNotificationPreferences struct {
// Whether anyone is set up to receive invoice emails for this customer.
//
// Derived from the customer's notification recipients: true when at least one of
// them is configured for invoice notifications.
AcceptsInvoiceEmails bool `json:"accepts_invoice_emails" api:"required"`
// Resource type identifier.
//
// Any of "customer_notification_preferences".
Object CustomerNotificationPreferencesObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AcceptsInvoiceEmails respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Customer notification settings.
func (CustomerNotificationPreferences) RawJSON ¶
func (r CustomerNotificationPreferences) RawJSON() string
Returns the unmodified JSON received from the API
func (*CustomerNotificationPreferences) UnmarshalJSON ¶
func (r *CustomerNotificationPreferences) UnmarshalJSON(data []byte) error
type CustomerNotificationPreferencesObject ¶
type CustomerNotificationPreferencesObject string
Resource type identifier.
const (
CustomerNotificationPreferencesObjectCustomerNotificationPreferences CustomerNotificationPreferencesObject = "customer_notification_preferences"
)
type CustomerObject ¶
type CustomerObject string
Resource type identifier.
const (
CustomerObjectCustomer CustomerObject = "customer"
)
type CustomerRelationshipType ¶
type CustomerRelationshipType string
The customer's position in the account hierarchy.
- `standalone`: no parent or child accounts. - `parent`: has one or more child accounts (see `child_accounts`). - `child`: belongs to a parent account (see `parent_account`).
const ( CustomerRelationshipTypeStandalone CustomerRelationshipType = "standalone" CustomerRelationshipTypeParent CustomerRelationshipType = "parent" CustomerRelationshipTypeChild CustomerRelationshipType = "child" )
type CustomerStatus ¶
type CustomerStatus string
The customer's account standing.
- `normal`: standard account with no restrictions.
- `preferred`: account flagged for prioritized handling.
- `hold_shipment`: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
- `hold_all`: all activity for the customer should be held.
The hold statuses are advisory: OpenMRP flags the customer's orders as being on credit hold, but requests to create orders or shipments for the customer are not rejected.
const ( CustomerStatusNormal CustomerStatus = "normal" CustomerStatusPreferred CustomerStatus = "preferred" CustomerStatusHoldShipment CustomerStatus = "hold_shipment" CustomerStatusHoldAll CustomerStatus = "hold_all" )
type DNSRecord ¶
type DNSRecord struct {
// Record name (host) to publish.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "dns_record".
Object DNSRecordObject `json:"object" api:"required"`
// Why the record must be published.
//
// - `routing`: the record points traffic at the portal's serving infrastructure.
// - `ownership`: the record proves control of a domain that is already claimed
// elsewhere.
//
// Any of "routing", "ownership".
Reason DNSRecordReason `json:"reason" api:"required"`
// The kind of DNS record to publish.
//
// - `CNAME`: points a subdomain at the portal's serving infrastructure.
// - `A`: points an apex domain at the portal's serving infrastructure.
// - `TXT`: carries an ownership-verification challenge.
//
// Any of "CNAME", "A", "TXT".
Type DNSRecordType `json:"type" api:"required"`
// Record value to publish.
Value string `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Object respjson.Field
Reason respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A DNS record that must be published at your DNS provider before a portal domain can be verified and serve traffic.
func (*DNSRecord) UnmarshalJSON ¶
type DNSRecordObject ¶
type DNSRecordObject string
Resource type identifier.
const (
DNSRecordObjectDNSRecord DNSRecordObject = "dns_record"
)
type DNSRecordReason ¶
type DNSRecordReason string
Why the record must be published.
- `routing`: the record points traffic at the portal's serving infrastructure.
- `ownership`: the record proves control of a domain that is already claimed elsewhere.
const ( DNSRecordReasonRouting DNSRecordReason = "routing" DNSRecordReasonOwnership DNSRecordReason = "ownership" )
type DNSRecordType ¶
type DNSRecordType string
The kind of DNS record to publish.
- `CNAME`: points a subdomain at the portal's serving infrastructure. - `A`: points an apex domain at the portal's serving infrastructure. - `TXT`: carries an ownership-verification challenge.
const ( DNSRecordTypeCname DNSRecordType = "CNAME" DNSRecordTypeA DNSRecordType = "A" DNSRecordTypeTxt DNSRecordType = "TXT" )
type DeliveryBacklogBucket ¶
type DeliveryBacklogBucket struct {
// Name of the band.
Label string `json:"label" api:"required"`
// Upper bound in days late; `0` means unbounded.
MaxDaysLate int64 `json:"max_days_late" api:"required"`
// Lower bound of the band in days late.
MinDaysLate int64 `json:"min_days_late" api:"required"`
// Resource type identifier.
//
// Any of "delivery_backlog_bucket".
Object DeliveryBacklogBucketObject `json:"object" api:"required"`
// Orders in the band.
OrderCount int64 `json:"order_count" api:"required"`
// Quantity still owed across them, which is what remains unpacked rather than what
// was ordered.
Units float64 `json:"units" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Label respjson.Field
MaxDaysLate respjson.Field
MinDaysLate respjson.Field
Object respjson.Field
OrderCount respjson.Field
Units respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One age band of orders past their promise and still unshipped.
func (DeliveryBacklogBucket) RawJSON ¶
func (r DeliveryBacklogBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeliveryBacklogBucket) UnmarshalJSON ¶
func (r *DeliveryBacklogBucket) UnmarshalJSON(data []byte) error
type DeliveryBacklogBucketObject ¶
type DeliveryBacklogBucketObject string
Resource type identifier.
const (
DeliveryBacklogBucketObjectDeliveryBacklogBucket DeliveryBacklogBucketObject = "delivery_backlog_bucket"
)
type DeliveryBreakdown ¶
type DeliveryBreakdown struct {
// Identifier of the slice — a customer, customer group, product line, or
// commitment source. Empty when the dimension is unset on the orders in it.
Key string `json:"key" api:"required"`
// Display name for the slice.
Label string `json:"label" api:"required"`
// Resource type identifier.
//
// Any of "delivery_breakdown".
Object DeliveryBreakdownObject `json:"object" api:"required"`
// Delivery reliability for one period, or for a whole window.
Performance DeliveryPerformance `json:"performance" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Label respjson.Field
Object respjson.Field
Performance respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Delivery performance for one slice of the order book.
func (DeliveryBreakdown) RawJSON ¶
func (r DeliveryBreakdown) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeliveryBreakdown) UnmarshalJSON ¶
func (r *DeliveryBreakdown) UnmarshalJSON(data []byte) error
type DeliveryBreakdownObject ¶
type DeliveryBreakdownObject string
Resource type identifier.
const (
DeliveryBreakdownObjectDeliveryBreakdown DeliveryBreakdownObject = "delivery_breakdown"
)
type DeliveryLatenessBucket ¶
type DeliveryLatenessBucket struct {
// Name of the band.
Label string `json:"label" api:"required"`
// Upper bound in days late; `0` means unbounded.
MaxDaysLate int64 `json:"max_days_late" api:"required"`
// Lower bound of the band in days late.
MinDaysLate int64 `json:"min_days_late" api:"required"`
// Resource type identifier.
//
// Any of "delivery_lateness_bucket".
Object DeliveryLatenessBucketObject `json:"object" api:"required"`
// Orders in the band, shipped and unshipped.
OrderCount int64 `json:"order_count" api:"required"`
// How many of them have since shipped. The remainder are still owed, and are the
// same orders `backlog` counts.
ShippedCount int64 `json:"shipped_count" api:"required"`
// Quantity still unpacked across the band's orders.
Units float64 `json:"units" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Label respjson.Field
MaxDaysLate respjson.Field
MinDaysLate respjson.Field
Object respjson.Field
OrderCount respjson.Field
ShippedCount respjson.Field
Units respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One band of how far the window's misses missed by.
func (DeliveryLatenessBucket) RawJSON ¶
func (r DeliveryLatenessBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeliveryLatenessBucket) UnmarshalJSON ¶
func (r *DeliveryLatenessBucket) UnmarshalJSON(data []byte) error
type DeliveryLatenessBucketObject ¶
type DeliveryLatenessBucketObject string
Resource type identifier.
const (
DeliveryLatenessBucketObjectDeliveryLatenessBucket DeliveryLatenessBucketObject = "delivery_lateness_bucket"
)
type DeliveryPerformance ¶
type DeliveryPerformance struct {
// Average lead time these orders were promised.
//
// The gap between this and `average_lead_time_days` is what a lead time is
// renegotiated on.
AverageCommittedLeadTimeDays float64 `json:"average_committed_lead_time_days" api:"required"`
// Average days late, over late orders only.
//
// Averaging over every order would dilute a real problem into a number that looks
// fine.
AverageDaysLate float64 `json:"average_days_late" api:"required"`
// Average days from issue to first shipment, over orders that have shipped.
AverageLeadTimeDays float64 `json:"average_lead_time_days" api:"required"`
// Orders whose promised ship date fell in this period.
//
// This is the denominator for both rates below — orders that were due, not orders
// that shipped. Measuring against shipments only would let unshipped late orders
// disappear from the score.
CommittedOrderCount int64 `json:"committed_order_count" api:"required"`
// How many shipped late, plus those already past their date and still unshipped.
LateOrderCount int64 `json:"late_order_count" api:"required"`
// How many due in this period have not shipped at all.
//
// These count against on-time: a promise not yet met is not a promise kept.
NotYetShippedCount int64 `json:"not_yet_shipped_count" api:"required"`
// Resource type identifier.
//
// Any of "delivery_performance".
Object DeliveryPerformanceObject `json:"object" api:"required"`
// How many shipped on time and complete.
OnTimeInFullCount int64 `json:"on_time_in_full_count" api:"required"`
// Share of due orders that shipped on time and complete, as a percentage.
OnTimeInFullPct float64 `json:"on_time_in_full_pct" api:"required"`
// How many shipped on or before the promised date.
OnTimeOrderCount int64 `json:"on_time_order_count" api:"required"`
// Share of due orders that shipped on time, as a percentage.
//
// Null rather than zero when nothing was due, so a quiet week does not render as
// total failure.
OnTimePct float64 `json:"on_time_pct" api:"required"`
// First day of the period; absent on the overall figure.
PeriodStart time.Time `json:"period_start" api:"required" format:"date-time"`
// How many of them have shipped at all.
ShippedOrderCount int64 `json:"shipped_order_count" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AverageCommittedLeadTimeDays respjson.Field
AverageDaysLate respjson.Field
AverageLeadTimeDays respjson.Field
CommittedOrderCount respjson.Field
LateOrderCount respjson.Field
NotYetShippedCount respjson.Field
Object respjson.Field
OnTimeInFullCount respjson.Field
OnTimeInFullPct respjson.Field
OnTimeOrderCount respjson.Field
OnTimePct respjson.Field
PeriodStart respjson.Field
ShippedOrderCount respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Delivery reliability for one period, or for a whole window.
func (DeliveryPerformance) RawJSON ¶
func (r DeliveryPerformance) RawJSON() string
Returns the unmodified JSON received from the API
func (*DeliveryPerformance) UnmarshalJSON ¶
func (r *DeliveryPerformance) UnmarshalJSON(data []byte) error
type DeliveryPerformanceObject ¶
type DeliveryPerformanceObject string
Resource type identifier.
const (
DeliveryPerformanceObjectDeliveryPerformance DeliveryPerformanceObject = "delivery_performance"
)
type DemandOverride ¶
type DemandOverride struct {
// Demand override ID.
ID string `json:"id" api:"required"`
// How the value adjusts the forecast.
//
// - `absolute`: replaces the forecast for each month in the period.
// - `delta_units`: adds the value to each month in the period.
// - `delta_percent`: scales each month in the period by the value as a percentage.
//
// When several overrides land on the same month they are applied in that order, so
// a percentage always acts on the already-adjusted number. An adjusted month is
// never taken below zero.
//
// Any of "absolute", "delta_units", "delta_percent".
Adjustment DemandOverrideAdjustment `json:"adjustment" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
CreatedBy Actor `json:"created_by" api:"required"`
// When the override starts being applied to newly generated schedules.
EffectiveAt time.Time `json:"effective_at" api:"required" format:"date-time"`
// When the override stops being applied to newly generated schedules.
//
// An override with no expiry keeps applying until it is deactivated or deleted.
ExpiresAt time.Time `json:"expires_at" api:"required" format:"date-time"`
// Free-form notes about the adjustment.
Note string `json:"note" api:"required"`
// Resource type identifier.
//
// Any of "demand_override".
Object DemandOverrideObject `json:"object" api:"required"`
// Last day of the demand period the override applies to.
PeriodEndsAt time.Time `json:"period_ends_at" api:"required" format:"date-time"`
// First day of the demand period the override applies to.
//
// Overrides are applied month by month, so every calendar month the period touches
// is adjusted and any time of day is ignored.
PeriodStartsAt time.Time `json:"period_starts_at" api:"required" format:"date-time"`
// Why the adjustment was made.
//
// The reason is carried into each schedule the override changes, so a plan can
// explain why a month departs from history.
//
// Any of "new_customer", "lost_account", "promotion", "seasonal_shift",
// "new_product", "discontinued", "market_intelligence", "other".
Reason DemandOverrideReason `json:"reason" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Scope Entity `json:"scope" api:"required"`
// What the override targets.
//
// - `item`: a single item.
// - `product_line`: every item sold under one product line.
// - `account`: every item in the plan, which is how a blanket assumption such as
// "plan for double demand" is expressed.
//
// Any of "item", "product_line", "account".
ScopeType DemandOverrideScopeType `json:"scope_type" api:"required"`
// Whether the override is taken into account when a schedule is generated.
//
// An inactive override is skipped whatever its effective window says, which is how
// a prepared adjustment is parked without losing it.
//
// Any of "active", "inactive".
Status DemandOverrideStatus `json:"status" api:"required"`
// Unit of measurement used for conversions and product quantities.
Unit Unit `json:"unit" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// The amount of the adjustment, interpreted according to `adjustment`.
//
// A `delta_percent` value is a number of percent, so `-25` plans a quarter less
// than the forecast.
Value float64 `json:"value" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Adjustment respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
EffectiveAt respjson.Field
ExpiresAt respjson.Field
Note respjson.Field
Object respjson.Field
PeriodEndsAt respjson.Field
PeriodStartsAt respjson.Field
Reason respjson.Field
Scope respjson.Field
ScopeType respjson.Field
Status respjson.Field
Unit respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An adjustment to the demand a production schedule is planned against.
Sales history cannot see a large customer that is about to order, a promotion, or a line that is being discontinued. An override is how management tells the planner about it. The period names the months the demand will occur in, and only months of the coming planning year are adjusted — a period entirely in the past changes nothing, because the plan covers the year ahead. `effective_at` and `expires_at` answer a different question: how long the override is consulted at all, so an adjustment can be retired on a date without deleting it.
func (DemandOverride) RawJSON ¶
func (r DemandOverride) RawJSON() string
Returns the unmodified JSON received from the API
func (*DemandOverride) UnmarshalJSON ¶
func (r *DemandOverride) UnmarshalJSON(data []byte) error
type DemandOverrideAdjustment ¶
type DemandOverrideAdjustment string
How the value adjusts the forecast.
- `absolute`: replaces the forecast for each month in the period. - `delta_units`: adds the value to each month in the period. - `delta_percent`: scales each month in the period by the value as a percentage.
When several overrides land on the same month they are applied in that order, so a percentage always acts on the already-adjusted number. An adjusted month is never taken below zero.
const ( DemandOverrideAdjustmentAbsolute DemandOverrideAdjustment = "absolute" DemandOverrideAdjustmentDeltaUnits DemandOverrideAdjustment = "delta_units" DemandOverrideAdjustmentDeltaPercent DemandOverrideAdjustment = "delta_percent" )
type DemandOverrideObject ¶
type DemandOverrideObject string
Resource type identifier.
const (
DemandOverrideObjectDemandOverride DemandOverrideObject = "demand_override"
)
type DemandOverrideReason ¶
type DemandOverrideReason string
Why the adjustment was made.
The reason is carried into each schedule the override changes, so a plan can explain why a month departs from history.
const ( DemandOverrideReasonNewCustomer DemandOverrideReason = "new_customer" DemandOverrideReasonLostAccount DemandOverrideReason = "lost_account" DemandOverrideReasonPromotion DemandOverrideReason = "promotion" DemandOverrideReasonSeasonalShift DemandOverrideReason = "seasonal_shift" DemandOverrideReasonNewProduct DemandOverrideReason = "new_product" DemandOverrideReasonDiscontinued DemandOverrideReason = "discontinued" DemandOverrideReasonMarketIntelligence DemandOverrideReason = "market_intelligence" DemandOverrideReasonOther DemandOverrideReason = "other" )
type DemandOverrideScopeType ¶
type DemandOverrideScopeType string
What the override targets.
- `item`: a single item.
- `product_line`: every item sold under one product line.
- `account`: every item in the plan, which is how a blanket assumption such as "plan for double demand" is expressed.
const ( DemandOverrideScopeTypeItem DemandOverrideScopeType = "item" DemandOverrideScopeTypeProductLine DemandOverrideScopeType = "product_line" DemandOverrideScopeTypeAccount DemandOverrideScopeType = "account" )
type DemandOverrideStatus ¶
type DemandOverrideStatus string
Whether the override is taken into account when a schedule is generated.
An inactive override is skipped whatever its effective window says, which is how a prepared adjustment is parked without losing it.
const ( DemandOverrideStatusActive DemandOverrideStatus = "active" DemandOverrideStatusInactive DemandOverrideStatus = "inactive" )
type DemandOverrideType ¶
type DemandOverrideType struct {
// Override type ID.
ID string `json:"id" api:"required"`
// The value to send as an override's `adjustment`.
//
// Any of "absolute", "delta_units", "delta_percent".
Code DemandOverrideTypeCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the type.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "demand_override_type".
Object DemandOverrideTypeObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A way of adjusting planned demand.
`absolute` replaces the forecast for each month an override covers, `delta_units` adds to it, and `delta_percent` scales it. When several overrides land on the same month they are applied in that order.
func (DemandOverrideType) RawJSON ¶
func (r DemandOverrideType) RawJSON() string
Returns the unmodified JSON received from the API
func (*DemandOverrideType) UnmarshalJSON ¶
func (r *DemandOverrideType) UnmarshalJSON(data []byte) error
type DemandOverrideTypeCode ¶
type DemandOverrideTypeCode string
The value to send as an override's `adjustment`.
const ( DemandOverrideTypeCodeAbsolute DemandOverrideTypeCode = "absolute" DemandOverrideTypeCodeDeltaUnits DemandOverrideTypeCode = "delta_units" DemandOverrideTypeCodeDeltaPercent DemandOverrideTypeCode = "delta_percent" )
type DemandOverrideTypeObject ¶
type DemandOverrideTypeObject string
Resource type identifier.
const (
DemandOverrideTypeObjectDemandOverrideType DemandOverrideTypeObject = "demand_override_type"
)
type Department ¶
type Department struct {
// Department ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
LaborRate Rate `json:"labor_rate" api:"required"`
// A physical storage location, such as a warehouse, aisle, or bin, arranged in a
// parent-child hierarchy.
Location Location `json:"location" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Machines *ListMachine `json:"machines" api:"required"`
// Display name of the department.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Free-form notes about the department.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "department".
Object DepartmentObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ScanningStations *ListScanningStation `json:"scanning_stations" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
LaborRate respjson.Field
Location respjson.Field
Machines respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
ScanningStations respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A functional area of a production operation, such as fabrication or packaging, that groups scanning stations and machines.
func (Department) RawJSON ¶
func (r Department) RawJSON() string
Returns the unmodified JSON received from the API
func (*Department) UnmarshalJSON ¶
func (r *Department) UnmarshalJSON(data []byte) error
type DepartmentObject ¶
type DepartmentObject string
Resource type identifier.
const (
DepartmentObjectDepartment DepartmentObject = "department"
)
type DepartmentRateInputParam ¶
type DepartmentRateInputParam struct {
// ID of the unit in the rate's denominator (e.g. hours).
DenominatorUnitID string `json:"denominator_unit_id" api:"required"`
// ID of the unit in the rate's numerator (a currency, e.g. dollars).
NumeratorUnitID string `json:"numerator_unit_id" api:"required"`
// Decimal value of the rate.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
A rate, expressed as a value together with the units of its numerator and denominator (for example, `25.00` `$` per `hr`).
The properties DenominatorUnitID, NumeratorUnitID, Value are required.
func (DepartmentRateInputParam) MarshalJSON ¶
func (r DepartmentRateInputParam) MarshalJSON() (data []byte, err error)
func (*DepartmentRateInputParam) UnmarshalJSON ¶
func (r *DepartmentRateInputParam) UnmarshalJSON(data []byte) error
type EmailDomain ¶
type EmailDomain struct {
// Email domain ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// The DKIM tokens that must be published in your DNS before the domain can be
// verified.
//
// Publish each token as a CNAME record on the domain, then call the verify action
// to confirm them.
DkimTokens []string `json:"dkim_tokens" api:"required"`
// The fully-qualified domain name (e.g. `support.acme.com`).
Domain string `json:"domain" api:"required"`
// The subdomain used as the envelope return path for mail sent from this domain.
//
// Publishing the two records below makes the return path match the sender address.
// Until you do, mail clients show your mail as coming from your address "via
// amazonses.com".
MailFromDomain string `json:"mail_from_domain" api:"required"`
// The MX record to publish on `mail_from_domain`, for delivery of bounces and
// complaints.
MailFromMxRecord string `json:"mail_from_mx_record" api:"required"`
// The SPF record to publish as a TXT record on `mail_from_domain`.
MailFromSpfRecord string `json:"mail_from_spf_record" api:"required"`
// Resource type identifier.
//
// Any of "email_domain".
Object EmailDomainObject `json:"object" api:"required"`
// Verification status.
//
// - `pending`: registered and awaiting DKIM confirmation.
// - `verified`: DKIM confirmed; the domain can send mail.
// - `failed`: verification could not be completed.
//
// Inboxes can only be created on a `verified` domain.
//
// Any of "pending", "verified", "failed".
Status EmailDomainStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// When the domain's DKIM verification was confirmed.
VerifiedAt time.Time `json:"verified_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DkimTokens respjson.Field
Domain respjson.Field
MailFromDomain respjson.Field
MailFromMxRecord respjson.Field
MailFromSpfRecord respjson.Field
Object respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A domain registered with the email bridge for sending and receiving mail.
After registration the domain starts in `pending`; publish the returned DKIM records, then poll the verify action until it flips to `verified`.
func (EmailDomain) RawJSON ¶
func (r EmailDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmailDomain) UnmarshalJSON ¶
func (r *EmailDomain) UnmarshalJSON(data []byte) error
type EmailDomainObject ¶
type EmailDomainObject string
Resource type identifier.
const (
EmailDomainObjectEmailDomain EmailDomainObject = "email_domain"
)
type EmailDomainStatus ¶ added in v0.17.1
type EmailDomainStatus string
Verification status.
- `pending`: registered and awaiting DKIM confirmation. - `verified`: DKIM confirmed; the domain can send mail. - `failed`: verification could not be completed.
Inboxes can only be created on a `verified` domain.
const ( EmailDomainStatusPending EmailDomainStatus = "pending" EmailDomainStatusVerified EmailDomainStatus = "verified" EmailDomainStatusFailed EmailDomainStatus = "failed" )
type EmailInbox ¶
type EmailInbox struct {
// Email inbox ID.
ID string `json:"id" api:"required"`
// The full inbox address (e.g. `support@acme.com`).
Address string `json:"address" api:"required"`
// An AI agent available to the account.
//
// The definition describes what the agent does, how its runs are triggered, the
// tools it can use, and whether it is currently enabled for the account.
AgentConfig AgentDefinition `json:"agent_config" api:"required"`
// The keywords that decide whether the agent runs on an incoming message.
//
// Under the `keyword` policy a keyword matches anywhere in the message; under
// `mention` it only counts where it is prefixed with `@`.
AgentTriggerKeywords []string `json:"agent_trigger_keywords" api:"required"`
// When the bound agent runs on incoming mail.
//
// - `mention`: only when the agent is @mentioned, matched against its trigger
// keywords.
// - `keyword`: when the mail contains any of the configured trigger keywords.
// - `always`: on every incoming message.
//
// When no policy is set the agent runs on every incoming message, since email has
// no reliable @mention convention.
//
// Any of "mention", "keyword", "always".
AgentTriggerPolicy EmailInboxAgentTriggerPolicy `json:"agent_trigger_policy" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A domain registered with the email bridge for sending and receiving mail.
//
// After registration the domain starts in `pending`; publish the returned DKIM
// records, then poll the verify action until it flips to `verified`.
EmailDomain EmailDomain `json:"email_domain" api:"required"`
// A forwarding address on an OpenMRP-owned domain that also routes to this inbox.
//
// Use this when your domain's mail is hosted elsewhere (e.g. Google Workspace,
// Microsoft 365) and you cannot point its MX records at OpenMRP: forward mail from
// `address` to this address instead, and it will still be threaded into a
// conversation.
ForwardingAddress string `json:"forwarding_address" api:"required"`
// The display name used in the `From` header of outbound mail.
FromName string `json:"from_name" api:"required"`
// The messaging group (roster) whose members are added to every conversation this
// inbox opens.
//
// Its members join each new email thread so the team can read, edit, and approve
// replies alongside the bound agent. Membership is captured when the thread opens,
// so later edits to the group only affect conversations opened after the change.
GroupID string `json:"group_id" api:"required"`
// Resource type identifier.
//
// Any of "email_inbox".
Object EmailInboxObject `json:"object" api:"required"`
// Whether the inbox is currently accepting mail.
//
// - `active`: inbound mail is threaded into a conversation.
// - `disabled`: the inbox stays provisioned and keeps its history, but inbound
// mail is dropped without being threaded.
//
// Any of "active", "disabled".
Status EmailInboxStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
AgentConfig respjson.Field
AgentTriggerKeywords respjson.Field
AgentTriggerPolicy respjson.Field
CreatedAt respjson.Field
EmailDomain respjson.Field
ForwardingAddress respjson.Field
FromName respjson.Field
GroupID respjson.Field
Object respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A routable email inbox on a verified domain.
Mail sent to this address is threaded into a conversation: the first message of a thread opens a new customer case, and later messages in the same thread join the conversation it already created. Replies to the customer go back out from this address, and the bound agent — if there is one — can draft or send them.
func (EmailInbox) RawJSON ¶
func (r EmailInbox) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmailInbox) UnmarshalJSON ¶
func (r *EmailInbox) UnmarshalJSON(data []byte) error
type EmailInboxAgentTriggerPolicy ¶ added in v0.17.1
type EmailInboxAgentTriggerPolicy string
When the bound agent runs on incoming mail.
- `mention`: only when the agent is @mentioned, matched against its trigger keywords.
- `keyword`: when the mail contains any of the configured trigger keywords.
- `always`: on every incoming message.
When no policy is set the agent runs on every incoming message, since email has no reliable @mention convention.
const ( EmailInboxAgentTriggerPolicyMention EmailInboxAgentTriggerPolicy = "mention" EmailInboxAgentTriggerPolicyKeyword EmailInboxAgentTriggerPolicy = "keyword" EmailInboxAgentTriggerPolicyAlways EmailInboxAgentTriggerPolicy = "always" )
type EmailInboxObject ¶
type EmailInboxObject string
Resource type identifier.
const (
EmailInboxObjectEmailInbox EmailInboxObject = "email_inbox"
)
type EmailInboxStatus ¶ added in v0.17.1
type EmailInboxStatus string
Whether the inbox is currently accepting mail.
- `active`: inbound mail is threaded into a conversation.
- `disabled`: the inbox stays provisioned and keeps its history, but inbound mail is dropped without being threaded.
const ( EmailInboxStatusActive EmailInboxStatus = "active" EmailInboxStatusDisabled EmailInboxStatus = "disabled" )
type EmailLog ¶
type EmailLog struct {
// Email log ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Filename of the document attached to the email.
Filename string `json:"filename" api:"required"`
// Resource type identifier.
//
// Any of "email_log".
Object EmailLogObject `json:"object" api:"required"`
// Recipient email addresses.
Recipients []string `json:"recipients" api:"required"`
// Whether the email was handed off to the delivery provider.
//
// - `sent`: the provider accepted the email for delivery. It does not confirm that
// the recipient's mail server accepted it.
// - `pending`: the email was never handed off — the send attempt failed, or it was
// suppressed because the account is in sandbox mode.
//
// Any of "sent", "pending".
SendStatus EmailLogSendStatus `json:"send_status" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
SentBy Actor `json:"sent_by" api:"required"`
// Email subject line.
Subject string `json:"subject" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Filename respjson.Field
Object respjson.Field
Recipients respjson.Field
SendStatus respjson.Field
SentBy respjson.Field
Subject respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A record of an email the platform sent on the account's behalf, such as an order acknowledgement or a user invitation.
An email that never reached the delivery provider is recorded here too, rather than disappearing.
func (*EmailLog) UnmarshalJSON ¶
type EmailLogObject ¶
type EmailLogObject string
Resource type identifier.
const (
EmailLogObjectEmailLog EmailLogObject = "email_log"
)
type EmailLogSendStatus ¶
type EmailLogSendStatus string
Whether the email was handed off to the delivery provider.
- `sent`: the provider accepted the email for delivery. It does not confirm that the recipient's mail server accepted it.
- `pending`: the email was never handed off — the send attempt failed, or it was suppressed because the account is in sandbox mode.
const ( EmailLogSendStatusSent EmailLogSendStatus = "sent" EmailLogSendStatusPending EmailLogSendStatus = "pending" )
type EmailRecordRequestParam ¶
type EmailRecordRequestParam struct {
// ID of the record to email.
ID string `json:"id" api:"required"`
// The type of record to email.
//
// - `invoice`: emails the invoice to the contacts on its sales order that are set
// to receive invoice emails.
// - `sales_order`: sends an order acknowledgement to the order's acknowledgement
// recipients.
// - `purchase_order`: sends the purchase order submission to the order's
// submission recipients.
//
// Any of "invoice", "sales_order", "purchase_order".
Type EmailRecordRequestType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to email a record to its configured recipients.
The properties ID, Type are required.
func (EmailRecordRequestParam) MarshalJSON ¶
func (r EmailRecordRequestParam) MarshalJSON() (data []byte, err error)
func (*EmailRecordRequestParam) UnmarshalJSON ¶
func (r *EmailRecordRequestParam) UnmarshalJSON(data []byte) error
type EmailRecordRequestType ¶
type EmailRecordRequestType string
The type of record to email.
- `invoice`: emails the invoice to the contacts on its sales order that are set to receive invoice emails.
- `sales_order`: sends an order acknowledgement to the order's acknowledgement recipients.
- `purchase_order`: sends the purchase order submission to the order's submission recipients.
const ( EmailRecordRequestTypeInvoice EmailRecordRequestType = "invoice" EmailRecordRequestTypeSalesOrder EmailRecordRequestType = "sales_order" EmailRecordRequestTypePurchaseOrder EmailRecordRequestType = "purchase_order" )
type EmailSender ¶ added in v0.22.0
type EmailSender struct {
// Email sender ID.
ID string `json:"id" api:"required"`
// The full sending address.
Address string `json:"address" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// The domain name the address sends from.
Domain string `json:"domain" api:"required"`
// Verification status of the underlying domain.
//
// Any of "pending", "verified", "failed".
DomainStatus EmailSenderDomainStatus `json:"domain_status" api:"required"`
// The verified email domain this address belongs to.
EmailDomainID string `json:"email_domain_id" api:"required"`
// The name shown in a mail client's sender column. When unset, mail shows the bare
// address.
FromName string `json:"from_name" api:"required"`
// The mailbox name before the `@`.
LocalPart string `json:"local_part" api:"required"`
// Resource type identifier.
//
// Any of "email_sender".
Object EmailSenderObject `json:"object" api:"required"`
// Where customer replies are delivered. When unset, replies go to the sending
// address.
ReplyTo string `json:"reply_to" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
CreatedAt respjson.Field
Domain respjson.Field
DomainStatus respjson.Field
EmailDomainID respjson.Field
FromName respjson.Field
LocalPart respjson.Field
Object respjson.Field
ReplyTo respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The address your order, invoice, and statement emails are sent from.
Configure one on a verified email domain and your customers see mail from your own address instead of the platform's. Emails about someone's OpenMRP account — password resets, verification, plan changes — always send from the platform address regardless of this setting.
Mail only sends from this address while the underlying domain stays verified; if verification lapses it falls back to the platform address rather than failing to send.
func (EmailSender) RawJSON ¶ added in v0.22.0
func (r EmailSender) RawJSON() string
Returns the unmodified JSON received from the API
func (*EmailSender) UnmarshalJSON ¶ added in v0.22.0
func (r *EmailSender) UnmarshalJSON(data []byte) error
type EmailSenderDomainStatus ¶ added in v0.22.0
type EmailSenderDomainStatus string
Verification status of the underlying domain.
const ( EmailSenderDomainStatusPending EmailSenderDomainStatus = "pending" EmailSenderDomainStatusVerified EmailSenderDomainStatus = "verified" EmailSenderDomainStatusFailed EmailSenderDomainStatus = "failed" )
type EmailSenderObject ¶ added in v0.22.0
type EmailSenderObject string
Resource type identifier.
const (
EmailSenderObjectEmailSender EmailSenderObject = "email_sender"
)
type Entity ¶
type Entity struct {
// Unique identifier for the entity.
ID string `json:"id" api:"required"`
// Secondary human-readable identifier (e.g. email address, username, redacted API
// key value).
Handle string `json:"handle" api:"required"`
// Human-readable display name for the entity (e.g. a user's full name, a sales
// order number).
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "entity".
Object EntityObject `json:"object" api:"required"`
// The resource kind that this entity references, as an object-type value (e.g.
// `user`, `account`).
//
// Unlike `object` — which is always `entity` — this names the underlying resource
// the `id` points to.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
Type EntityType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Handle respjson.Field
Name respjson.Field
Object respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Entity is a polymorphic reference to any resource in the system.
func (*Entity) UnmarshalJSON ¶
type EntityObject ¶
type EntityObject string
Resource type identifier.
const (
EntityObjectEntity EntityObject = "entity"
)
type EntityType ¶
type EntityType string
The resource kind that this entity references, as an object-type value (e.g. `user`, `account`).
Unlike `object` — which is always `entity` — this names the underlying resource the `id` points to.
const ( EntityTypeAccount EntityType = "account" EntityTypeActor EntityType = "actor" EntityTypeEntity EntityType = "entity" EntityTypeRecord EntityType = "record" EntityTypeFreight EntityType = "freight" EntityTypeCommitment EntityType = "commitment" EntityTypeSalesOrderTotals EntityType = "sales_order_totals" EntityTypeSalesOrderStageTotal EntityType = "sales_order_stage_total" EntityTypeSalesOrderRelated EntityType = "sales_order_related" EntityTypeOrderContact EntityType = "order_contact" EntityTypeUser EntityType = "user" EntityTypeAddress EntityType = "address" EntityTypeAPIKey EntityType = "api_key" EntityTypeCreatedAPIKey EntityType = "created_api_key" EntityTypeRefreshToken EntityType = "refresh_token" EntityTypeList EntityType = "list" EntityTypeSandbox EntityType = "sandbox" EntityTypeRegistrationSession EntityType = "registration_session" EntityTypePricingPlan EntityType = "pricing_plan" EntityTypeAccountPlan EntityType = "account_plan" EntityTypePlanChange EntityType = "plan_change" EntityTypeEnterpriseInquiry EntityType = "enterprise_inquiry" EntityTypeRequestLog EntityType = "request_log" EntityTypeAuditEvent EntityType = "audit_event" EntityTypeAuditFieldChange EntityType = "audit_field_change" EntityTypeRole EntityType = "role" EntityTypeUnit EntityType = "unit" EntityTypeAccountAffiliation EntityType = "account_affiliation" EntityTypeAgentDefinition EntityType = "agent_definition" EntityTypeAvailableTool EntityType = "available_tool" EntityTypeAgentDefinitionTool EntityType = "agent_definition_tool" EntityTypeAgentAccountStatus EntityType = "agent_account_status" EntityTypeAgentRun EntityType = "agent_run" EntityTypeAgentAction EntityType = "agent_action" EntityTypeAgentRunStep EntityType = "agent_run_step" EntityTypeAgentTokenUsage EntityType = "agent_token_usage" EntityTypeAgentMemory EntityType = "agent_memory" EntityTypeNotification EntityType = "notification" EntityTypeNotificationUnreadCount EntityType = "notification_unread_count" EntityTypeNotificationSendResult EntityType = "notification_send_result" EntityTypeNotificationUnreadSummary EntityType = "notification_unread_summary" EntityTypeAnnouncement EntityType = "announcement" EntityTypeConversation EntityType = "conversation" EntityTypeSupportCase EntityType = "support_case" EntityTypeConversationParticipant EntityType = "conversation_participant" EntityTypeReadCursor EntityType = "read_cursor" EntityTypeChatMessage EntityType = "chat_message" EntityTypeNotificationUnreadSummaryAccount EntityType = "notification_unread_summary_account" EntityTypeMessagingBlock EntityType = "messaging_block" EntityTypeNotificationPreference EntityType = "notification_preference" EntityTypeMessageAttachment EntityType = "message_attachment" EntityTypeAttachmentUploadTarget EntityType = "attachment_upload_target" EntityTypeScheduledMessage EntityType = "scheduled_message" EntityTypeMessagingContact EntityType = "messaging_contact" EntityTypeMessageReport EntityType = "message_report" EntityTypeToolGroup EntityType = "tool_group" EntityTypeModel EntityType = "model" EntityTypePaymentTerm EntityType = "payment_term" EntityTypeShippingTerm EntityType = "shipping_term" EntityTypeQuantity EntityType = "quantity" EntityTypeAccountGroup EntityType = "account_group" EntityTypeSupportRoute EntityType = "support_route" EntityTypeSupportAvailability EntityType = "support_availability" EntityTypeAccountStatus EntityType = "account_status" EntityTypeGeolocation EntityType = "geolocation" EntityTypeAccountUser EntityType = "account_user" EntityTypeDepartment EntityType = "department" EntityTypeAccountIntegration EntityType = "account_integration" EntityTypeAccountPrice EntityType = "account_price" EntityTypeProductLine EntityType = "product_line" EntityTypeItemCategory EntityType = "item_category" EntityTypeAttribute EntityType = "attribute" EntityTypeRate EntityType = "rate" EntityTypeAccountGroupProductLineAccess EntityType = "account_group_product_line_access" EntityTypeSalesTarget EntityType = "sales_target" EntityTypeAdjustmentType EntityType = "adjustment_type" EntityTypeAccountBranding EntityType = "account_branding" EntityTypeAccountPortal EntityType = "account_portal" EntityTypeAccountLogoURL EntityType = "account_logo_url" EntityTypeAccountFaviconURL EntityType = "account_favicon_url" EntityTypePublicAccount EntityType = "public_account" EntityTypeProperty EntityType = "property" EntityTypeCarrier EntityType = "carrier" EntityTypeServiceLevel EntityType = "service_level" EntityTypeItem EntityType = "item" EntityTypeItemLotDefault EntityType = "item_lot_default" EntityTypeItemInventory EntityType = "item_inventory" EntityTypeProduct EntityType = "product" EntityTypeBatch EntityType = "batch" EntityTypeBatchFlowNode EntityType = "batch_flow_node" EntityTypeScanningConsumption EntityType = "scanning_consumption" EntityTypeOpenBatchSummary EntityType = "open_batch_summary" EntityTypeScanningProductionStepInfo EntityType = "scanning_production_step_info" EntityTypeScanningStation EntityType = "scanning_station" EntityTypeProductionStep EntityType = "production_step" EntityTypeProductionRun EntityType = "production_run" EntityTypeMachine EntityType = "machine" EntityTypeMachineStatus EntityType = "machine_status" EntityTypeMachineDowntimeEvent EntityType = "machine_downtime_event" EntityTypeDemandOverride EntityType = "demand_override" EntityTypeDemandOverrideType EntityType = "demand_override_type" EntityTypeMachineDowntimeReason EntityType = "machine_downtime_reason" EntityTypeProductionSchedulePreview EntityType = "production_schedule_preview" EntityTypeProductionScheduleRegeneratePreview EntityType = "production_schedule_regenerate_preview" EntityTypeProductionSchedule EntityType = "production_schedule" EntityTypeProductionScheduleLine EntityType = "production_schedule_line" EntityTypeProductionScheduleDeviation EntityType = "production_schedule_deviation" EntityTypeProductionScheduleDerivedLine EntityType = "production_schedule_derived_line" EntityTypeProductionScheduleSettings EntityType = "production_schedule_settings" EntityTypeProductionScheduleResourceSetting EntityType = "production_schedule_resource_setting" EntityTypeProductionScheduleItemSetting EntityType = "production_schedule_item_setting" EntityTypeFulfillmentRecommendation EntityType = "fulfillment_recommendation" EntityTypeAnalyzeDeliveryPerformanceResponse EntityType = "analyze_delivery_performance_response" EntityTypeDeliveryPerformance EntityType = "delivery_performance" EntityTypeDeliveryBacklogBucket EntityType = "delivery_backlog_bucket" EntityTypeDeliveryLatenessBucket EntityType = "delivery_lateness_bucket" EntityTypeDeliveryBreakdown EntityType = "delivery_breakdown" EntityTypeAnalyzeSalesBreakdownResponse EntityType = "analyze_sales_breakdown_response" EntityTypeSalesTotals EntityType = "sales_totals" EntityTypeSalesBreakdown EntityType = "sales_breakdown" EntityTypeScheduleOrderCoverage EntityType = "schedule_order_coverage" EntityTypeScheduleOrderCoverageLine EntityType = "schedule_order_coverage_line" EntityTypeScheduleDeviationType EntityType = "schedule_deviation_type" EntityTypeScheduleAtRiskOrder EntityType = "schedule_at_risk_order" EntityTypeProductionScheduleFinishedPolicy EntityType = "production_schedule_finished_policy" EntityTypeProductionScheduleFinishingLine EntityType = "production_schedule_finishing_line" EntityTypeProductionScheduleWeekRelease EntityType = "production_schedule_week_release" EntityTypeProductionScheduleWeekReleasePreview EntityType = "production_schedule_week_release_preview" EntityTypeProductionScheduleItemPolicy EntityType = "production_schedule_item_policy" EntityTypeChildAccount EntityType = "child_account" EntityTypeUnitGroup EntityType = "unit_group" EntityTypeUnitGroupUnit EntityType = "unit_group_unit" EntityTypeConsumption EntityType = "consumption" EntityTypeCustomerProductLineAccess EntityType = "customer_product_line_access" EntityTypeCustomer EntityType = "customer" EntityTypeFrequentlyOrderedProduct EntityType = "frequently_ordered_product" EntityTypePriority EntityType = "priority" EntityTypeDelivery EntityType = "delivery" EntityTypeDeliveryLine EntityType = "delivery_line" EntityTypeDeliveryRelated EntityType = "delivery_related" EntityTypeSalesOrder EntityType = "sales_order" EntityTypeLocation EntityType = "location" EntityTypeLocationType EntityType = "location_type" EntityTypeLot EntityType = "lot" EntityTypeEmailLog EntityType = "email_log" EntityTypeEmailDomain EntityType = "email_domain" EntityTypeEmailInbox EntityType = "email_inbox" EntityTypeEmailSender EntityType = "email_sender" EntityTypePortalDomain EntityType = "portal_domain" EntityTypeDNSRecord EntityType = "dns_record" EntityTypeInventoryChangeLog EntityType = "inventory_change_log" EntityTypeInvoice EntityType = "invoice" EntityTypeInvoiceSummary EntityType = "invoice_summary" EntityTypeInvoiceLine EntityType = "invoice_line" EntityTypeInvoiceAllocation EntityType = "invoice_allocation" EntityTypeInvoiceForPayment EntityType = "invoice_for_payment" EntityTypeShipment EntityType = "shipment" EntityTypeShipmentSummary EntityType = "shipment_summary" EntityTypeShipmentLine EntityType = "shipment_line" EntityTypeShippingCase EntityType = "shipping_case" EntityTypeShippingCaseLabelURL EntityType = "shipping_case_label_url" EntityTypeSettlement EntityType = "settlement" EntityTypeSettlementSummary EntityType = "settlement_summary" EntityTypeRolePermission EntityType = "role_permission" EntityTypeRegistrationFlow EntityType = "registration_flow" EntityTypeRegistrationFlowOption EntityType = "registration_flow_option" EntityTypeTransaction EntityType = "transaction" EntityTypeTransactionSummary EntityType = "transaction_summary" EntityTypeTransactionMethod EntityType = "transaction_method" EntityTypeTransactionType EntityType = "transaction_type" EntityTypeTransactionAllocation EntityType = "transaction_allocation" EntityTypeUsageItem EntityType = "usage_item" EntityTypeAccountUsageResponse EntityType = "account_usage_response" EntityTypeSubscriptionInfo EntityType = "subscription_info" EntityTypeBillingPortalSessionResponse EntityType = "billing_portal_session_response" EntityTypeSwitchPlanResponse EntityType = "switch_plan_response" EntityTypeEnsureBillingCustomerResponse EntityType = "ensure_billing_customer_response" EntityTypeSpendingCapResponse EntityType = "spending_cap_response" EntityTypeAgentSpendInfo EntityType = "agent_spend_info" EntityTypeWebhookResponse EntityType = "webhook_response" EntityTypeAddressSuggestion EntityType = "address_suggestion" EntityTypeAddressComponents EntityType = "address_components" EntityTypeAddressDetailsResult EntityType = "address_details_result" EntityTypeValidatedAddress EntityType = "validated_address" EntityTypePlanLimit EntityType = "plan_limit" EntityTypePlanChangeProration EntityType = "plan_change_proration" EntityTypePlanChangeLineItem EntityType = "plan_change_line_item" EntityTypeSetupBillingResponse EntityType = "setup_billing_response" EntityTypeConfirmPaymentResponse EntityType = "confirm_payment_response" EntityTypeOAuthResponse EntityType = "oauth_response" EntityTypeOAuthStatusResponse EntityType = "oauth_status_response" EntityTypeStripePublishableKey EntityType = "stripe_publishable_key" EntityTypeStripeStatus EntityType = "stripe_status" EntityTypeHealthcheck EntityType = "healthcheck" EntityTypeAgentDefinitionConfig EntityType = "agent_definition_config" EntityTypeTriggerConfig EntityType = "trigger_config" EntityTypeCustomerContactInfo EntityType = "customer_contact_info" EntityTypeCustomerFreightPreferences EntityType = "customer_freight_preferences" EntityTypeCustomerDefaults EntityType = "customer_defaults" EntityTypeCustomerLeadTime EntityType = "customer_lead_time" EntityTypeCustomerNotificationPreferences EntityType = "customer_notification_preferences" EntityTypeOrderNotificationRecipient EntityType = "order_notification_recipient" EntityTypeOrderDiscount EntityType = "order_discount" EntityTypeSalesOrderLine EntityType = "sales_order_line" EntityTypeSalesOrderType EntityType = "sales_order_type" EntityTypeSalesOrderStatus EntityType = "sales_order_status" EntityTypeMaterial EntityType = "material" EntityTypeSupplierMaterial EntityType = "supplier_material" EntityTypePart EntityType = "part" EntityTypePermissionGroup EntityType = "permission_group" EntityTypePermission EntityType = "permission" EntityTypePick EntityType = "pick" EntityTypePickLine EntityType = "pick_line" EntityTypeProductType EntityType = "product_type" EntityTypeProduction EntityType = "production" EntityTypeProductionFlow EntityType = "production_flow" EntityTypeMap EntityType = "map" EntityTypePurchaseOrder EntityType = "purchase_order" EntityTypePurchaseOrderLine EntityType = "purchase_order_line" EntityTypePurchaseOrderRelated EntityType = "purchase_order_related" EntityTypeSupplier EntityType = "supplier" EntityTypeReceivableEntry EntityType = "receivable_entry" EntityTypeReceivingOrder EntityType = "receiving_order" EntityTypeReceivingOrderLine EntityType = "receiving_order_line" EntityTypeReceivingOrderTotals EntityType = "receiving_order_totals" EntityTypeReceivingOrderStageTotal EntityType = "receiving_order_stage_total" EntityTypeReceivingOrderRelated EntityType = "receiving_order_related" EntityTypeEmailContact EntityType = "email_contact" EntityTypeAllocationEntry EntityType = "allocation_entry" EntityTypeOpenCreditEntry EntityType = "open_credit_entry" EntityTypeVolumeDiscount EntityType = "volume_discount" EntityTypeVolumeDiscountTier EntityType = "volume_discount_tier" EntityTypeAnalyzeDeliveriesResponse EntityType = "analyze_deliveries_response" EntityTypeAnalyzeManufacturingResponse EntityType = "analyze_manufacturing_response" EntityTypeAnalyzeManufacturingBatchResponse EntityType = "analyze_manufacturing_batch_response" EntityTypeAnalyzeQuarterlyOrdersResponse EntityType = "analyze_quarterly_orders_response" EntityTypeAnalyzeNewCustomersResponse EntityType = "analyze_new_customers_response" EntityTypeAnalyzeDemandForecastResponse EntityType = "analyze_demand_forecast_response" EntityTypeAnalyzeOeeResponse EntityType = "analyze_oee_response" EntityTypeAnalyzeOeeTrendResponse EntityType = "analyze_oee_trend_response" EntityTypeAnalyzeScheduleAttainmentResponse EntityType = "analyze_schedule_attainment_response" EntityTypeCatalogProductLine EntityType = "catalog_product_line" EntityTypeCatalogCategory EntityType = "catalog_category" EntityTypeCatalogProduct EntityType = "catalog_product" EntityTypeCatalogProperty EntityType = "catalog_property" EntityTypeCatalogAttribute EntityType = "catalog_attribute" EntityTypeDcLocation EntityType = "dc_location" EntityTypeEdiRun EntityType = "edi_run" EntityTypeInventoryItem EntityType = "inventory_item" EntityTypeAnalyzeWeeksOfSalesResponse EntityType = "analyze_weeks_of_sales_response" EntityTypeBulkReconcileItemsResponse EntityType = "bulk_reconcile_items_response" EntityTypeSysProperty EntityType = "sys_property" EntityTypeSysPropertyType EntityType = "sys_property_type" EntityTypeSysPropertyValue EntityType = "sys_property_value" EntityTypeTerritory EntityType = "territory" EntityTypeTenancy EntityType = "tenancy" EntityTypeCheckoutSession EntityType = "checkout_session" EntityTypeEstimateRateResult EntityType = "estimate_rate_result" EntityTypeRateShopOption EntityType = "rate_shop_option" EntityTypeRateShopResult EntityType = "rate_shop_result" EntityTypeOwner EntityType = "owner" EntityTypeCreatedBy EntityType = "created_by" EntityTypeMessage EntityType = "message" EntityTypeAccountPhotoUploadResult EntityType = "account_photo_upload_result" EntityTypeUserPhotoUploadResult EntityType = "user_photo_upload_result" EntityTypeUserPhotoURL EntityType = "user_photo_url" EntityTypeBatchLot EntityType = "batch_lot" EntityTypeCheckDuplicateResult EntityType = "check_duplicate_result" EntityTypeItemCosts EntityType = "item_costs" EntityTypeItemTrends EntityType = "item_trends" EntityTypeReconciledItemResult EntityType = "reconciled_item_result" EntityTypeSkippedItemResult EntityType = "skipped_item_result" EntityTypeReconcileErrorResult EntityType = "reconcile_error_result" EntityTypeItemTrendPoint EntityType = "item_trend_point" EntityTypeTenancyPendingRegistration EntityType = "tenancy_pending_registration" EntityTypeInvoiceAllocationEntry EntityType = "invoice_allocation_entry" EntityTypeAllocationCustomer EntityType = "allocation_customer" EntityTypeCheckoutSalesOrder EntityType = "checkout_sales_order" EntityTypeSalesOrderPriceQuote EntityType = "sales_order_price_quote" EntityTypeSalesOrderFreightQuote EntityType = "sales_order_freight_quote" EntityTypeSalesOrderCommitmentQuote EntityType = "sales_order_commitment_quote" EntityTypeOperatingCalendar EntityType = "operating_calendar" EntityTypeOperatingCalendarClosure EntityType = "operating_calendar_closure" EntityTypeSalesOrderPriceQuoteLine EntityType = "sales_order_price_quote_line" EntityTypeHubspotSyncJob EntityType = "hubspot_sync_job" EntityTypeHubspotSyncReport EntityType = "hubspot_sync_report" EntityTypeHubspotCompanyReview EntityType = "hubspot_company_review" EntityTypeHubspotCompanyCandidate EntityType = "hubspot_company_candidate" EntityTypeHubspotSyncRecord EntityType = "hubspot_sync_record" EntityTypeContactMatch EntityType = "contact_match" EntityTypeReplyDraft EntityType = "reply_draft" EntityTypeConversationLink EntityType = "conversation_link" EntityTypeMessagingGroup EntityType = "messaging_group" EntityTypeMessagingGroupMember EntityType = "messaging_group_member" EntityTypePortalProfile EntityType = "portal_profile" EntityTypePortalRegistrationSession EntityType = "portal_registration_session" EntityTypePortalRegistrationSessionData EntityType = "portal_registration_session_data" EntityTypePackList EntityType = "pack_list" EntityTypePackListParty EntityType = "pack_list_party" EntityTypePackListLineItem EntityType = "pack_list_line_item" EntityTypePackListBackOrder EntityType = "pack_list_back_order" EntityTypePackListCase EntityType = "pack_list_case" EntityTypeJob EntityType = "job" EntityTypeJobResult EntityType = "job_result" EntityTypeJobExport EntityType = "job_export" EntityTypeAnalyzeCustomerPricingResponse EntityType = "analyze_customer_pricing_response" EntityTypeCustomerPricingFinding EntityType = "customer_pricing_finding" EntityTypeCustomerPricingSummary EntityType = "customer_pricing_summary" EntityTypeComputedRate EntityType = "computed_rate" EntityTypeComputedQuantity EntityType = "computed_quantity" EntityTypeAnalyzeRealizedMarginsResponse EntityType = "analyze_realized_margins_response" EntityTypeRealizedMarginFinding EntityType = "realized_margin_finding" EntityTypeRealizedMarginSummary EntityType = "realized_margin_summary" EntityTypeShipmentRelated EntityType = "shipment_related" EntityTypeInvoiceRelated EntityType = "invoice_related" EntityTypePickRelated EntityType = "pick_related" EntityTypePickTotals EntityType = "pick_totals" EntityTypePickStageTotal EntityType = "pick_stage_total" )
type ExportPriceListRequestParam ¶
type ExportPriceListRequestParam struct {
// ID of the customer whose prices are listed.
CustomerID string `json:"customer_id" api:"required"`
// contains filtered or unexported fields
}
Request to export a customer's price list.
The property CustomerID is required.
func (ExportPriceListRequestParam) MarshalJSON ¶
func (r ExportPriceListRequestParam) MarshalJSON() (data []byte, err error)
func (*ExportPriceListRequestParam) UnmarshalJSON ¶
func (r *ExportPriceListRequestParam) UnmarshalJSON(data []byte) error
type FileDownload ¶ added in v0.20.0
type FileDownload struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
FileDownload is a response type for endpoints that return a file (e.g. Excel export). When the service returns \*FileDownload, the handler writes the body with Content-Type and Content-Disposition.
func (FileDownload) RawJSON ¶ added in v0.20.0
func (r FileDownload) RawJSON() string
Returns the unmodified JSON received from the API
func (*FileDownload) UnmarshalJSON ¶ added in v0.20.0
func (r *FileDownload) UnmarshalJSON(data []byte) error
type FinanceGetAdjustmentTypesParams ¶
type FinanceGetAdjustmentTypesParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinanceGetAdjustmentTypesParams) URLQuery ¶
func (r FinanceGetAdjustmentTypesParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinanceGetAdjustmentTypesParams's query parameters as `url.Values`.
type FinanceGetTransactionMethodsParams ¶
type FinanceGetTransactionMethodsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinanceGetTransactionMethodsParams) URLQuery ¶
func (r FinanceGetTransactionMethodsParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinanceGetTransactionMethodsParams's query parameters as `url.Values`.
type FinanceGetTransactionTypesParams ¶
type FinanceGetTransactionTypesParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinanceGetTransactionTypesParams) URLQuery ¶
func (r FinanceGetTransactionTypesParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinanceGetTransactionTypesParams's query parameters as `url.Values`.
type FinancePaymentTermDeleteResponse ¶
type FinancePaymentTermDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (FinancePaymentTermDeleteResponse) RawJSON ¶
func (r FinancePaymentTermDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*FinancePaymentTermDeleteResponse) UnmarshalJSON ¶
func (r *FinancePaymentTermDeleteResponse) UnmarshalJSON(data []byte) error
type FinancePaymentTermGetParams ¶
type FinancePaymentTermGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinancePaymentTermGetParams) URLQuery ¶
func (r FinancePaymentTermGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinancePaymentTermGetParams's query parameters as `url.Values`.
type FinancePaymentTermListParams ¶
type FinancePaymentTermListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinancePaymentTermListParams) URLQuery ¶
func (r FinancePaymentTermListParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinancePaymentTermListParams's query parameters as `url.Values`.
type FinancePaymentTermNewParams ¶
type FinancePaymentTermNewParams struct {
// Request to create a payment term.
CreatePaymentTermRequest CreatePaymentTermRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (FinancePaymentTermNewParams) MarshalJSON ¶
func (r FinancePaymentTermNewParams) MarshalJSON() (data []byte, err error)
func (FinancePaymentTermNewParams) URLQuery ¶
func (r FinancePaymentTermNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinancePaymentTermNewParams's query parameters as `url.Values`.
func (*FinancePaymentTermNewParams) UnmarshalJSON ¶
func (r *FinancePaymentTermNewParams) UnmarshalJSON(data []byte) error
type FinancePaymentTermService ¶
type FinancePaymentTermService struct {
// contains filtered or unexported fields
}
List and manage payment terms.
FinancePaymentTermService contains methods and other services that help with interacting with the openmrp 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 NewFinancePaymentTermService method instead.
func NewFinancePaymentTermService ¶
func NewFinancePaymentTermService(opts ...option.RequestOption) (r FinancePaymentTermService)
NewFinancePaymentTermService 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 (*FinancePaymentTermService) Delete ¶
func (r *FinancePaymentTermService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *FinancePaymentTermDeleteResponse, err error)
Deletes a payment term.
Only payment terms created by your account can be deleted; system-owned default terms cannot be.
This endpoint requires the permission: `payment_terms:delete`.
func (*FinancePaymentTermService) Get ¶
func (r *FinancePaymentTermService) Get(ctx context.Context, id string, query FinancePaymentTermGetParams, opts ...option.RequestOption) (res *PaymentTerm, err error)
Returns a payment term by ID.
Both payment terms created by your account and OpenMRP-provided system defaults can be retrieved.
This endpoint requires the permission: `payment_terms:read`.
func (*FinancePaymentTermService) List ¶
func (r *FinancePaymentTermService) List(ctx context.Context, query FinancePaymentTermListParams, opts ...option.RequestOption) (res *ListPaymentTerm, err error)
Returns a paginated list of payment terms.
The list includes both payment terms created by your account and OpenMRP-provided system defaults.
This endpoint requires the permission: `payment_terms:read`.
func (*FinancePaymentTermService) New ¶
func (r *FinancePaymentTermService) New(ctx context.Context, params FinancePaymentTermNewParams, opts ...option.RequestOption) (res *PaymentTerm, err error)
Creates a payment term.
The new term is owned by your account and starts with status `active`.
This endpoint requires the permission: `payment_terms:create`.
func (*FinancePaymentTermService) Update ¶
func (r *FinancePaymentTermService) Update(ctx context.Context, id string, params FinancePaymentTermUpdateParams, opts ...option.RequestOption) (res *PaymentTerm, err error)
Partially updates a payment term.
Only payment terms created by your account can be updated; system-owned default terms cannot be.
This endpoint requires the permission: `payment_terms:update`.
type FinancePaymentTermUpdateParams ¶
type FinancePaymentTermUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a payment term.
UpdatePaymentTermRequest UpdatePaymentTermRequestParam
// contains filtered or unexported fields
}
func (FinancePaymentTermUpdateParams) MarshalJSON ¶
func (r FinancePaymentTermUpdateParams) MarshalJSON() (data []byte, err error)
func (FinancePaymentTermUpdateParams) URLQuery ¶
func (r FinancePaymentTermUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes FinancePaymentTermUpdateParams's query parameters as `url.Values`.
func (*FinancePaymentTermUpdateParams) UnmarshalJSON ¶
func (r *FinancePaymentTermUpdateParams) UnmarshalJSON(data []byte) error
type FinanceService ¶
type FinanceService struct {
// List and manage payment terms.
PaymentTerms FinancePaymentTermService
// contains filtered or unexported fields
}
Create, view, update, and delete transactions.
FinanceService contains methods and other services that help with interacting with the openmrp 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 NewFinanceService method instead.
func NewFinanceService ¶
func NewFinanceService(opts ...option.RequestOption) (r FinanceService)
NewFinanceService 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 (*FinanceService) GetAdjustmentTypes ¶
func (r *FinanceService) GetAdjustmentTypes(ctx context.Context, query FinanceGetAdjustmentTypesParams, opts ...option.RequestOption) (res *ListAdjustmentType, err error)
Returns a paginated list of the adjustment categories that can be recorded on an adjustment transaction, such as discounts, fees, and write-offs.
Adjustment types are platform-provided and identical for every account. Free-text search matches the display name.
func (*FinanceService) GetTransactionMethods ¶
func (r *FinanceService) GetTransactionMethods(ctx context.Context, query FinanceGetTransactionMethodsParams, opts ...option.RequestOption) (res *ListTransactionMethod, err error)
Returns the payment methods that can be recorded on a transaction, such as cash, check, and ACH.
The set is fixed by the platform and identical for every account, so the results come back in one page; supplying a pagination cursor returns a validation error. Free-text search matches the display name.
func (*FinanceService) GetTransactionTypes ¶
func (r *FinanceService) GetTransactionTypes(ctx context.Context, query FinanceGetTransactionTypesParams, opts ...option.RequestOption) (res *ListTransactionType, err error)
Returns the transaction types that can be recorded against a customer: payments, credit memos, adjustments, and rebates.
The set is fixed by the platform and identical for every account, so the results come back in one page; supplying a pagination cursor returns a validation error. Free-text search matches the display name.
type FindContactByEmailRequestParam ¶
type FindContactByEmailRequestParam struct {
// The email address to look up.
Email string `json:"email" api:"required"`
// contains filtered or unexported fields
}
Request to find contacts by email.
The property Email is required.
func (FindContactByEmailRequestParam) MarshalJSON ¶
func (r FindContactByEmailRequestParam) MarshalJSON() (data []byte, err error)
func (*FindContactByEmailRequestParam) UnmarshalJSON ¶
func (r *FindContactByEmailRequestParam) UnmarshalJSON(data []byte) error
type FindOrderDiscountByCodeRequestParam ¶
type FindOrderDiscountByCodeRequestParam struct {
// The discount code to look up, as the buyer typed it.
//
// Matching ignores letter case, so `save10` finds a discount stored as `SAVE10`.
Code string `json:"code" api:"required"`
// The buyer account to check for prior use of this code.
//
// When set, the lookup returns a not-found error if that buyer has already
// redeemed the discount on another order, so a one-use-per-customer code can be
// rejected before it is attached to a new one. Customer callers cannot set this —
// their own account is always used.
BuyerAccountID param.Opt[string] `json:"buyer_account_id,omitzero"`
// Sales order ID to exclude from the prior-usage check.
//
// Set this when re-validating a code on an existing order so the order's own usage
// does not count against the buyer.
SalesOrderID param.Opt[string] `json:"sales_order_id,omitzero"`
// contains filtered or unexported fields
}
Request to find an order discount by code.
The property Code is required.
func (FindOrderDiscountByCodeRequestParam) MarshalJSON ¶
func (r FindOrderDiscountByCodeRequestParam) MarshalJSON() (data []byte, err error)
func (*FindOrderDiscountByCodeRequestParam) UnmarshalJSON ¶
func (r *FindOrderDiscountByCodeRequestParam) UnmarshalJSON(data []byte) error
type Freight ¶
type Freight struct {
// Carrier account number to bill, used when `billing_type` is `third_party`.
BillingAccountNumber string `json:"billing_account_number" api:"required"`
// Which party the carrier bills for the shipment.
//
// - `sender`: the shipper (your account) is billed.
// - `third_party`: a third party is billed via `billing_account_number`.
//
// Any of "sender", "third_party".
BillingType FreightBillingType `json:"billing_type" api:"required"`
// A shipping carrier configured for fulfilling orders.
//
// Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
// through Shippo for live rating and label purchase; other carriers represent
// self-managed shipping methods such as will call or local delivery.
Carrier Carrier `json:"carrier" api:"required"`
// Resource type identifier.
//
// Any of "freight".
Object FreightObject `json:"object" api:"required"`
// How freight is arranged and billed for the record.
//
// - `free_freight`: no shipping cost to the buyer.
// - `billed_freight`: freight is billed to the buyer.
//
// Sales orders, purchase orders, and shipments do not carry a policy of their own.
// Freight on those records is waived when the customer's freight preferences, the
// customer's type group, any of its pricing groups, the customer's shipping term,
// or any product line on the order is `free_freight`.
//
// Any of "free_freight", "billed_freight".
Policy FreightPolicy `json:"policy" api:"required"`
// A shipping speed or method offered by a carrier, such as ground or overnight.
//
// Carriers connected through Shippo have their service levels synced from the
// carrier itself; any carrier can also have service levels you create by hand.
ServiceLevel ServiceLevel `json:"service_level" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BillingAccountNumber respjson.Field
BillingType respjson.Field
Carrier respjson.Field
Object respjson.Field
Policy respjson.Field
ServiceLevel respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Freight describes the carrier selection and freight billing for a record.
It is a generic, reusable sub-resource shared by anything that carries shipping configuration — a sales order, a purchase order, or a shipment.
func (*Freight) UnmarshalJSON ¶
type FreightBillingType ¶
type FreightBillingType string
Which party the carrier bills for the shipment.
- `sender`: the shipper (your account) is billed. - `third_party`: a third party is billed via `billing_account_number`.
const ( FreightBillingTypeSender FreightBillingType = "sender" FreightBillingTypeThirdParty FreightBillingType = "third_party" )
type FreightObject ¶
type FreightObject string
Resource type identifier.
const (
FreightObjectFreight FreightObject = "freight"
)
type FreightPolicy ¶
type FreightPolicy string
How freight is arranged and billed for the record.
- `free_freight`: no shipping cost to the buyer. - `billed_freight`: freight is billed to the buyer.
Sales orders, purchase orders, and shipments do not carry a policy of their own. Freight on those records is waived when the customer's freight preferences, the customer's type group, any of its pricing groups, the customer's shipping term, or any product line on the order is `free_freight`.
const ( FreightPolicyFreeFreight FreightPolicy = "free_freight" FreightPolicyBilledFreight FreightPolicy = "billed_freight" )
type FrozenAdherence ¶
type FrozenAdherence struct {
// Total absolute unit change across frozen-week deviations.
AbsDeltaUnits float64 `json:"abs_delta_units" api:"required"`
// Campaigns added into the frozen window after publish.
AddedLines int64 `json:"added_lines" api:"required"`
// Frozen campaigns that were changed after publish.
DeviatedLines int64 `json:"deviated_lines" api:"required"`
// Campaigns frozen at publish.
FrozenLineCount int64 `json:"frozen_line_count" api:"required"`
// Units frozen at publish.
FrozenPlannedQuantity float64 `json:"frozen_planned_quantity" api:"required"`
// Last day of the frozen window.
FrozenThroughAt time.Time `json:"frozen_through_at" api:"required" format:"date-time"`
// Share of frozen campaigns that survived untouched. Null when nothing was frozen.
LineAdherencePct float64 `json:"line_adherence_pct" api:"required"`
// Campaigns the floor ran inside the frozen window that the frozen plan never
// called for, counted per machine-week-SKU.
//
// Working around a commitment breaks it as surely as editing it does, so this
// scores alongside the hand edits rather than beside them.
OffPlanLines int64 `json:"off_plan_lines" api:"required"`
// Units behind those off-plan campaigns.
OffPlanQuantity float64 `json:"off_plan_quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Schedule Entity `json:"schedule" api:"required"`
// Share of frozen units that survived untouched. Null when nothing was frozen.
UnitsAdherencePct float64 `json:"units_adherence_pct" api:"required"`
// Version number of that schedule.
Version int64 `json:"version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AbsDeltaUnits respjson.Field
AddedLines respjson.Field
DeviatedLines respjson.Field
FrozenLineCount respjson.Field
FrozenPlannedQuantity respjson.Field
FrozenThroughAt respjson.Field
LineAdherencePct respjson.Field
OffPlanLines respjson.Field
OffPlanQuantity respjson.Field
Schedule respjson.Field
UnitsAdherencePct respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
How well a published commitment survived the week it covered.
func (FrozenAdherence) RawJSON ¶
func (r FrozenAdherence) RawJSON() string
Returns the unmodified JSON received from the API
func (*FrozenAdherence) UnmarshalJSON ¶
func (r *FrozenAdherence) UnmarshalJSON(data []byte) error
type FulfillmentRecommendation ¶
type FulfillmentRecommendation struct {
// Annual cost of goods for this item: demand times unit cost.
AnnualCogs float64 `json:"annual_cogs" api:"required"`
// Months observed divided by months with demand: 1 means it sells every month, 3
// means once a quarter on average.
//
// Measured on monthly buckets, which cannot distinguish two orders in one month
// from one.
AverageDemandInterval float64 `json:"average_demand_interval" api:"required"`
// Whether adopting the recommendation would change anything.
Changes bool `json:"changes" api:"required"`
// Squared coefficient of variation over the months that had demand, measuring how
// uneven the quantities are.
CoefficientOfVariation float64 `json:"coefficient_of_variation" api:"required"`
// How the item is planned today.
//
// Any of "make_to_stock", "make_to_order".
CurrentPolicy FulfillmentRecommendationCurrentPolicy `json:"current_policy" api:"required"`
// Calendar days customers are promised on average, weighted by how much each buys.
DemandWeightedLeadTimeDays float64 `json:"demand_weighted_lead_time_days" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// recommendation.
//
// A policy is resolved per SKU, so an item sold to both a stocking distributor and
// a contract customer gets one answer either way. A high share here is the signal
// that the single answer is uncomfortable.
MixedStreamSharePct float64 `json:"mixed_stream_share_pct" api:"required"`
// Months since anything last sold, capped at the observation window.
MonthsSinceLastSale int64 `json:"months_since_last_sale" api:"required"`
// Resource type identifier.
//
// Any of "fulfillment_recommendation".
Object FulfillmentRecommendationObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductLine Entity `json:"product_line" api:"required"`
// The rule that decided.
//
// - `lead_time_infeasible`: customers are promised less time than production
// needs, so the stock has to exist before the order does. Checked first, because
// producing to order is not possible rather than not preferred.
// - `no_recent_demand`: nothing has sold for long enough that a buffer is dead
// stock.
// - `single_customer`: effectively one customer buys it, and that customer is
// served to order.
// - `lumpy_demand`: demand arrives rarely and in wildly different sizes, which is
// the shape a safety stock sizes worst.
// - `slow_moving_high_value`: expensive units, few sold — the buffer costs more
// than the service it buys.
// - `steady_demand`: regular enough to forecast, which is what stocking is for.
//
// Any of "lead_time_infeasible", "no_recent_demand", "single_customer",
// "lumpy_demand", "slow_moving_high_value", "steady_demand".
Reason FulfillmentRecommendationReason `json:"reason" api:"required"`
// How the engine thinks it should be planned.
//
// Any of "make_to_stock", "make_to_order".
RecommendedPolicy FulfillmentRecommendationRecommendedPolicy `json:"recommended_policy" api:"required"`
// SKU of that item.
SKU string `json:"sku" api:"required"`
// Name of that customer.
TopCustomerName string `json:"top_customer_name" api:"required"`
TopCustomerSharePct float64 `json:"top_customer_share_pct" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AnnualCogs respjson.Field
AverageDemandInterval respjson.Field
Changes respjson.Field
CoefficientOfVariation respjson.Field
CurrentPolicy respjson.Field
DemandWeightedLeadTimeDays respjson.Field
Item respjson.Field
MixedStreamSharePct respjson.Field
MonthsSinceLastSale respjson.Field
Object respjson.Field
ProductLine respjson.Field
Reason respjson.Field
RecommendedPolicy respjson.Field
SKU respjson.Field
TopCustomerName respjson.Field
TopCustomerSharePct respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The engine's advice on how one SKU should be produced, with the measurements behind it.
func (FulfillmentRecommendation) RawJSON ¶
func (r FulfillmentRecommendation) RawJSON() string
Returns the unmodified JSON received from the API
func (*FulfillmentRecommendation) UnmarshalJSON ¶
func (r *FulfillmentRecommendation) UnmarshalJSON(data []byte) error
type FulfillmentRecommendationCurrentPolicy ¶
type FulfillmentRecommendationCurrentPolicy string
How the item is planned today.
const ( FulfillmentRecommendationCurrentPolicyMakeToStock FulfillmentRecommendationCurrentPolicy = "make_to_stock" FulfillmentRecommendationCurrentPolicyMakeToOrder FulfillmentRecommendationCurrentPolicy = "make_to_order" )
type FulfillmentRecommendationObject ¶
type FulfillmentRecommendationObject string
Resource type identifier.
const (
FulfillmentRecommendationObjectFulfillmentRecommendation FulfillmentRecommendationObject = "fulfillment_recommendation"
)
type FulfillmentRecommendationReason ¶
type FulfillmentRecommendationReason string
The rule that decided.
- `lead_time_infeasible`: customers are promised less time than production needs, so the stock has to exist before the order does. Checked first, because producing to order is not possible rather than not preferred.
- `no_recent_demand`: nothing has sold for long enough that a buffer is dead stock.
- `single_customer`: effectively one customer buys it, and that customer is served to order.
- `lumpy_demand`: demand arrives rarely and in wildly different sizes, which is the shape a safety stock sizes worst.
- `slow_moving_high_value`: expensive units, few sold — the buffer costs more than the service it buys.
- `steady_demand`: regular enough to forecast, which is what stocking is for.
const ( FulfillmentRecommendationReasonLeadTimeInfeasible FulfillmentRecommendationReason = "lead_time_infeasible" FulfillmentRecommendationReasonNoRecentDemand FulfillmentRecommendationReason = "no_recent_demand" FulfillmentRecommendationReasonSingleCustomer FulfillmentRecommendationReason = "single_customer" FulfillmentRecommendationReasonLumpyDemand FulfillmentRecommendationReason = "lumpy_demand" FulfillmentRecommendationReasonSlowMovingHighValue FulfillmentRecommendationReason = "slow_moving_high_value" FulfillmentRecommendationReasonSteadyDemand FulfillmentRecommendationReason = "steady_demand" )
type FulfillmentRecommendationRecommendedPolicy ¶
type FulfillmentRecommendationRecommendedPolicy string
How the engine thinks it should be planned.
const ( FulfillmentRecommendationRecommendedPolicyMakeToStock FulfillmentRecommendationRecommendedPolicy = "make_to_stock" FulfillmentRecommendationRecommendedPolicyMakeToOrder FulfillmentRecommendationRecommendedPolicy = "make_to_order" )
type GenerateProductionScheduleRequestDemandBasis ¶
type GenerateProductionScheduleRequestDemandBasis string
How future demand is derived, overriding the account's configured basis for this version only.
- `trailing_12`: demand is the trailing twelve months of orders.
- `seasonal_ema`: demand is a seasonal exponential moving average, which follows a season arriving early or late rather than flattening it.
const ( GenerateProductionScheduleRequestDemandBasisTrailing12 GenerateProductionScheduleRequestDemandBasis = "trailing_12" GenerateProductionScheduleRequestDemandBasisSeasonalEma GenerateProductionScheduleRequestDemandBasis = "seasonal_ema" )
type GenerateProductionScheduleRequestParam ¶
type GenerateProductionScheduleRequestParam struct {
// Number of weeks the plan should cover, overriding the account's configured
// horizon for this version only.
HorizonWeeks param.Opt[int64] `json:"horizon_weeks,omitzero"`
// Human-readable label for the version, such as the week it was cut for.
//
// Purely for recognizing the version in a list; versions are numbered
// automatically and the number is what identifies them.
Name param.Opt[string] `json:"name,omitzero"`
// The instant to plan against, which is what stock, demand history and active
// demand overrides are read as of.
//
// Left unset, the plan is solved against the moment the request arrives. The
// horizon starts on the account's configured week-start day on or before this
// instant, so backdating this shifts the whole week grid.
PlanningAsOf param.Opt[time.Time] `json:"planning_as_of,omitzero" format:"date-time"`
// How future demand is derived, overriding the account's configured basis for this
// version only.
//
// - `trailing_12`: demand is the trailing twelve months of orders.
// - `seasonal_ema`: demand is a seasonal exponential moving average, which follows
// a season arriving early or late rather than flattening it.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis GenerateProductionScheduleRequestDemandBasis `json:"demand_basis,omitzero"`
// contains filtered or unexported fields
}
Request to generate a production schedule.
func (GenerateProductionScheduleRequestParam) MarshalJSON ¶
func (r GenerateProductionScheduleRequestParam) MarshalJSON() (data []byte, err error)
func (*GenerateProductionScheduleRequestParam) UnmarshalJSON ¶
func (r *GenerateProductionScheduleRequestParam) UnmarshalJSON(data []byte) error
type Geolocation ¶
type Geolocation struct {
// Geolocation ID.
ID string `json:"id" api:"required"`
// Two-letter country code.
Country string `json:"country" api:"required"`
// City or locality.
Locality string `json:"locality" api:"required"`
// Resource type identifier.
//
// Any of "geolocation".
Object GeolocationObject `json:"object" api:"required"`
// Postal or ZIP code.
PostalCode string `json:"postal_code" api:"required"`
// State or administrative area.
State string `json:"state" api:"required"`
// First line of the street address.
StreetLine1 string `json:"street_line_1" api:"required"`
// Second line of the street address.
StreetLine2 string `json:"street_line_2" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Country respjson.Field
Locality respjson.Field
Object respjson.Field
PostalCode respjson.Field
State respjson.Field
StreetLine1 respjson.Field
StreetLine2 respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The street-level location details of an address.
func (Geolocation) RawJSON ¶
func (r Geolocation) RawJSON() string
Returns the unmodified JSON received from the API
func (*Geolocation) UnmarshalJSON ¶
func (r *Geolocation) UnmarshalJSON(data []byte) error
type GeolocationObject ¶
type GeolocationObject string
Resource type identifier.
const (
GeolocationObjectGeolocation GeolocationObject = "geolocation"
)
type IdentityAccountService ¶
type IdentityAccountService struct {
// contains filtered or unexported fields
}
Manage account details, branding, portal, logo, and favicon.
IdentityAccountService contains methods and other services that help with interacting with the openmrp 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 NewIdentityAccountService method instead.
func NewIdentityAccountService ¶
func NewIdentityAccountService(opts ...option.RequestOption) (r IdentityAccountService)
NewIdentityAccountService 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 (*IdentityAccountService) UpdateFavicon ¶
func (r *IdentityAccountService) UpdateFavicon(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUpdateFaviconResponse, err error)
Uploads a customer-portal favicon.
Send the image as the raw request body, not as multipart form data. Use a small square PNG (e.g. 32x32 or 64x64) for the best result in browser tabs. The uploaded image replaces any existing favicon and is shown on the account's customer portal. You can only upload a favicon for the account you are acting in.
This endpoint requires the permission: `self:update`.
type IdentityAccountUpdateFaviconResponse ¶
type IdentityAccountUpdateFaviconResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityAccountUpdateFaviconResponse) RawJSON ¶
func (r IdentityAccountUpdateFaviconResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IdentityAccountUpdateFaviconResponse) UnmarshalJSON ¶
func (r *IdentityAccountUpdateFaviconResponse) UnmarshalJSON(data []byte) error
type IdentityAccountUserActionActivateResponse ¶
type IdentityAccountUserActionActivateResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityAccountUserActionActivateResponse) RawJSON ¶
func (r IdentityAccountUserActionActivateResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IdentityAccountUserActionActivateResponse) UnmarshalJSON ¶
func (r *IdentityAccountUserActionActivateResponse) UnmarshalJSON(data []byte) error
type IdentityAccountUserActionDisableResponse ¶
type IdentityAccountUserActionDisableResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityAccountUserActionDisableResponse) RawJSON ¶
func (r IdentityAccountUserActionDisableResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IdentityAccountUserActionDisableResponse) UnmarshalJSON ¶
func (r *IdentityAccountUserActionDisableResponse) UnmarshalJSON(data []byte) error
type IdentityAccountUserActionRemoveResponse ¶
type IdentityAccountUserActionRemoveResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityAccountUserActionRemoveResponse) RawJSON ¶
func (r IdentityAccountUserActionRemoveResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IdentityAccountUserActionRemoveResponse) UnmarshalJSON ¶
func (r *IdentityAccountUserActionRemoveResponse) UnmarshalJSON(data []byte) error
type IdentityAccountUserActionService ¶
type IdentityAccountUserActionService struct {
// contains filtered or unexported fields
}
List and manage account users.
IdentityAccountUserActionService contains methods and other services that help with interacting with the openmrp 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 NewIdentityAccountUserActionService method instead.
func NewIdentityAccountUserActionService ¶
func NewIdentityAccountUserActionService(opts ...option.RequestOption) (r IdentityAccountUserActionService)
NewIdentityAccountUserActionService 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 (*IdentityAccountUserActionService) Activate ¶
func (r *IdentityAccountUserActionService) Activate(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionActivateResponse, err error)
Activates a disabled or removed account user, restoring their access to the account you are acting in.
Reactivation consumes a seat, so the request fails if the account is at its seat limit. Activating an already-active user is a no-op.
This endpoint requires the permissions: `team:update`, `customers:update`, `suppliers:update`.
func (*IdentityAccountUserActionService) Disable ¶
func (r *IdentityAccountUserActionService) Disable(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionDisableResponse, err error)
Disables (locks) an account user.
Disabled users cannot access the account and their active sessions are revoked, but the membership and its role assignment are kept so access can be restored with the activate action. Disabling frees the seat the user occupied. Admin users cannot be disabled, you cannot disable yourself, and removed users must be activated before they can be disabled. Disabling an already-disabled user is a no-op.
This endpoint requires the permissions: `team:update`, `customers:update`, `suppliers:update`.
func (*IdentityAccountUserActionService) Remove ¶
func (r *IdentityAccountUserActionService) Remove(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityAccountUserActionRemoveResponse, err error)
Removes a user from the account you are acting in.
Removal is a soft delete: removed users are excluded from listings unless requested via `removed_scope`, they free the seat they occupied, and they can be restored with the activate action. Removing an already-removed user is a no-op. The user's profile itself is untouched, so their access to any other account they belong to is unaffected.
This endpoint requires the permissions: `team:delete`, `customers:update`, `suppliers:update`.
type IdentityAccountUserGetParams ¶
type IdentityAccountUserGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "user", "role", "department".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityAccountUserGetParams) URLQuery ¶
func (r IdentityAccountUserGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityAccountUserGetParams's query parameters as `url.Values`.
type IdentityAccountUserListParams ¶
type IdentityAccountUserListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Filter by commission eligibility.
//
// Exact match on the column. Pass `true` to list users who can be assigned as
// sales representatives, including dedicated `sales_rep` users.
IsCommissionEligible param.Opt[bool] `query:"is_commission_eligible,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "user", "role", "department".
Include []string `query:"include,omitzero" json:"-"`
// Controls whether removed (soft-deleted) account users appear in the list.
//
// Removed users are left out unless you pass `included`, so a user removed with
// the remove action disappears from the default listing.
//
// Any of "excluded", "included".
RemovedScope IdentityAccountUserListParamsRemovedScope `query:"removed_scope,omitzero" json:"-"`
// Filter by role type.
//
// - `admin`: account administrators.
// - `user`: users with a custom role.
// - `scanner`: scanning station users.
// - `sales_rep`: sales representatives.
// - `agent`: automated agents.
//
// Any of "admin", "user", "scanner", "sales_rep", "agent".
RoleType IdentityAccountUserListParamsRoleType `query:"role_type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityAccountUserListParams) URLQuery ¶
func (r IdentityAccountUserListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityAccountUserListParams's query parameters as `url.Values`.
type IdentityAccountUserListParamsRemovedScope ¶
type IdentityAccountUserListParamsRemovedScope string
Controls whether removed (soft-deleted) account users appear in the list.
Removed users are left out unless you pass `included`, so a user removed with the remove action disappears from the default listing.
const ( IdentityAccountUserListParamsRemovedScopeExcluded IdentityAccountUserListParamsRemovedScope = "excluded" IdentityAccountUserListParamsRemovedScopeIncluded IdentityAccountUserListParamsRemovedScope = "included" )
type IdentityAccountUserListParamsRoleType ¶
type IdentityAccountUserListParamsRoleType string
Filter by role type.
- `admin`: account administrators. - `user`: users with a custom role. - `scanner`: scanning station users. - `sales_rep`: sales representatives. - `agent`: automated agents.
const ( IdentityAccountUserListParamsRoleTypeAdmin IdentityAccountUserListParamsRoleType = "admin" IdentityAccountUserListParamsRoleTypeUser IdentityAccountUserListParamsRoleType = "user" IdentityAccountUserListParamsRoleTypeScanner IdentityAccountUserListParamsRoleType = "scanner" IdentityAccountUserListParamsRoleTypeSalesRep IdentityAccountUserListParamsRoleType = "sales_rep" IdentityAccountUserListParamsRoleTypeAgent IdentityAccountUserListParamsRoleType = "agent" )
type IdentityAccountUserNewParams ¶
type IdentityAccountUserNewParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "user", "role", "department".
Include []string `query:"include,omitzero" json:"-"`
// Request to create an account user.
CreateAccountUserRequest CreateAccountUserRequestParam
// contains filtered or unexported fields
}
func (IdentityAccountUserNewParams) MarshalJSON ¶
func (r IdentityAccountUserNewParams) MarshalJSON() (data []byte, err error)
func (IdentityAccountUserNewParams) URLQuery ¶
func (r IdentityAccountUserNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityAccountUserNewParams's query parameters as `url.Values`.
func (*IdentityAccountUserNewParams) UnmarshalJSON ¶
func (r *IdentityAccountUserNewParams) UnmarshalJSON(data []byte) error
type IdentityAccountUserService ¶
type IdentityAccountUserService struct {
// List and manage account users.
Actions IdentityAccountUserActionService
// contains filtered or unexported fields
}
List and manage account users.
IdentityAccountUserService contains methods and other services that help with interacting with the openmrp 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 NewIdentityAccountUserService method instead.
func NewIdentityAccountUserService ¶
func NewIdentityAccountUserService(opts ...option.RequestOption) (r IdentityAccountUserService)
NewIdentityAccountUserService 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 (*IdentityAccountUserService) Get ¶
func (r *IdentityAccountUserService) Get(ctx context.Context, id string, query IdentityAccountUserGetParams, opts ...option.RequestOption) (res *AccountUser, err error)
Returns an account user by ID.
The lookup is scoped to the account you are acting in, so an ID belonging to another account is reported as not found.
This endpoint requires the permissions: `team:read`, `customers:read`, `suppliers:read`.
func (*IdentityAccountUserService) List ¶
func (r *IdentityAccountUserService) List(ctx context.Context, query IdentityAccountUserListParams, opts ...option.RequestOption) (res *ListAccountUser, err error)
Returns a paginated list of the users who belong to the account you are acting in.
When the account you are acting in is a customer or supplier account you manage, this lists that account's users rather than your own team.
This endpoint requires the permissions: `team:read`, `customers:read`, `suppliers:read`.
func (*IdentityAccountUserService) New ¶
func (r *IdentityAccountUserService) New(ctx context.Context, params IdentityAccountUserNewParams, opts ...option.RequestOption) (res *AccountUser, err error)
Adds a user to the account you are acting in.
If no user with the given email or username exists, a new user is created; a user created with an email address is sent a welcome email containing a generated password, unless they are being added to a supplier account, since suppliers have no portal to sign in to. If a matching user already exists, that user is added to the account instead, and a user you previously removed is restored rather than duplicated. Adding a user to your own account consumes a seat and is rejected once your plan's seat limit is reached.
When you add a user to a customer or supplier account that has its own OpenMRP subscription, the membership is created disabled and has to be activated before that user can sign in.
This endpoint requires the permissions: `team:create`, `customers:update`, `suppliers:update`.
func (*IdentityAccountUserService) Update ¶
func (r *IdentityAccountUserService) Update(ctx context.Context, id string, params IdentityAccountUserUpdateParams, opts ...option.RequestOption) (res *AccountUser, err error)
Partially updates an account user.
Omitted fields are left unchanged. Profile fields (`name`, `email`, `username`) update the underlying user, which is shared across every account the user belongs to, so the change is visible everywhere that person works.
This endpoint requires the permissions: `team:update`, `customers:update`, `suppliers:update`.
type IdentityAccountUserUpdateParams ¶
type IdentityAccountUserUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "user", "role", "department".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update an account user.
UpdateAccountUserRequest UpdateAccountUserRequestParam
// contains filtered or unexported fields
}
func (IdentityAccountUserUpdateParams) MarshalJSON ¶
func (r IdentityAccountUserUpdateParams) MarshalJSON() (data []byte, err error)
func (IdentityAccountUserUpdateParams) URLQuery ¶
func (r IdentityAccountUserUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityAccountUserUpdateParams's query parameters as `url.Values`.
func (*IdentityAccountUserUpdateParams) UnmarshalJSON ¶
func (r *IdentityAccountUserUpdateParams) UnmarshalJSON(data []byte) error
type IdentityGetPermissionGroupsParams ¶
type IdentityGetPermissionGroupsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityGetPermissionGroupsParams) URLQuery ¶
func (r IdentityGetPermissionGroupsParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityGetPermissionGroupsParams's query parameters as `url.Values`.
type IdentityRoleDeleteResponse ¶
type IdentityRoleDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (IdentityRoleDeleteResponse) RawJSON ¶
func (r IdentityRoleDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*IdentityRoleDeleteResponse) UnmarshalJSON ¶
func (r *IdentityRoleDeleteResponse) UnmarshalJSON(data []byte) error
type IdentityRoleGetParams ¶
type IdentityRoleGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityRoleGetParams) URLQuery ¶
func (r IdentityRoleGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityRoleGetParams's query parameters as `url.Values`.
type IdentityRoleListParams ¶
type IdentityRoleListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "permissions".
Include []string `query:"include,omitzero" json:"-"`
// Filter results to roles whose type matches any of the given values.
//
// Any of "admin", "user", "scanner", "sales_rep", "agent".
Types []string `query:"types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityRoleListParams) URLQuery ¶
func (r IdentityRoleListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityRoleListParams's query parameters as `url.Values`.
type IdentityRoleNewParams ¶
type IdentityRoleNewParams struct {
// Request to create a role.
CreateRoleRequest CreateRoleRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "permissions".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IdentityRoleNewParams) MarshalJSON ¶
func (r IdentityRoleNewParams) MarshalJSON() (data []byte, err error)
func (IdentityRoleNewParams) URLQuery ¶
func (r IdentityRoleNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityRoleNewParams's query parameters as `url.Values`.
func (*IdentityRoleNewParams) UnmarshalJSON ¶
func (r *IdentityRoleNewParams) UnmarshalJSON(data []byte) error
type IdentityRoleService ¶
type IdentityRoleService struct {
// contains filtered or unexported fields
}
List and manage roles.
IdentityRoleService contains methods and other services that help with interacting with the openmrp 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 NewIdentityRoleService method instead.
func NewIdentityRoleService ¶
func NewIdentityRoleService(opts ...option.RequestOption) (r IdentityRoleService)
NewIdentityRoleService 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 (*IdentityRoleService) Delete ¶
func (r *IdentityRoleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *IdentityRoleDeleteResponse, err error)
Deletes a role along with the permissions granted through it.
Only roles owned by your account can be deleted; the system-owned roles shared across all accounts cannot. A role that is still assigned to at least one user is rejected, so move those users to another role first.
This endpoint requires the permission: `roles:delete`.
func (*IdentityRoleService) Get ¶
func (r *IdentityRoleService) Get(ctx context.Context, id string, query IdentityRoleGetParams, opts ...option.RequestOption) (res *Role, err error)
Retrieves a single role by ID.
Both the roles your account owns and the system-owned roles shared by every account can be retrieved.
This endpoint requires the permission: `roles:read`.
func (*IdentityRoleService) List ¶
func (r *IdentityRoleService) List(ctx context.Context, query IdentityRoleListParams, opts ...option.RequestOption) (res *ListRole, err error)
Lists the roles that can be assigned to users in your account, newest first.
Results combine the roles your account owns with the system-owned roles shared by every account. Text search matches the role name.
This endpoint requires the permission: `roles:read`.
func (*IdentityRoleService) New ¶
func (r *IdentityRoleService) New(ctx context.Context, params IdentityRoleNewParams, opts ...option.RequestOption) (res *Role, err error)
Creates a custom role that can then be assigned to users in your account.
Roles created through the API are always owned by your account and have the type `user`. Returns a conflict error if a role with the same name already exists.
This endpoint requires the permission: `roles:create`.
func (*IdentityRoleService) Update ¶
func (r *IdentityRoleService) Update(ctx context.Context, id string, params IdentityRoleUpdateParams, opts ...option.RequestOption) (res *Role, err error)
Updates a role's name or the set of permissions it grants.
Only roles owned by your account can be updated; the system-owned roles shared across all accounts are rejected. Permission changes apply to every user already assigned the role, starting with their next request.
This endpoint requires the permission: `roles:update`.
type IdentityRoleUpdateParams ¶
type IdentityRoleUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "permissions".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a role.
UpdateRoleRequest UpdateRoleRequestParam
// contains filtered or unexported fields
}
func (IdentityRoleUpdateParams) MarshalJSON ¶
func (r IdentityRoleUpdateParams) MarshalJSON() (data []byte, err error)
func (IdentityRoleUpdateParams) URLQuery ¶
func (r IdentityRoleUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes IdentityRoleUpdateParams's query parameters as `url.Values`.
func (*IdentityRoleUpdateParams) UnmarshalJSON ¶
func (r *IdentityRoleUpdateParams) UnmarshalJSON(data []byte) error
type IdentityService ¶
type IdentityService struct {
// List and manage account users.
AccountUsers IdentityAccountUserService
// Manage account details, branding, portal, logo, and favicon.
Accounts IdentityAccountService
// List and manage roles.
Roles IdentityRoleService
// contains filtered or unexported fields
}
List permission groups and their permissions.
IdentityService contains methods and other services that help with interacting with the openmrp 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 NewIdentityService method instead.
func NewIdentityService ¶
func NewIdentityService(opts ...option.RequestOption) (r IdentityService)
NewIdentityService 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 (*IdentityService) GetPermissionGroups ¶
func (r *IdentityService) GetPermissionGroups(ctx context.Context, query IdentityGetPermissionGroupsParams, opts ...option.RequestOption) (res *ListPermissionGroup, err error)
Lists the permission catalog, organized into groups of related permissions.
Each group carries the individual permissions it covers; pair a permission's code with an action (`create`, `read`, `update`, or `delete`) to build the permission strings accepted when creating or updating a role. The catalog is platform-defined and identical for every account.
This endpoint requires the permission: `permissions:read`.
type InventoryChangeLog ¶ added in v0.20.0
type InventoryChangeLog struct {
// Inventory change log ID.
ID string `json:"id" api:"required"`
// Action that produced this inventory change.
//
// - `scan`: change driven by a scan, typically a production step.
// - `user_action`: change made manually by a user.
// - `system_action`: change made automatically by the system.
// - `user_correction`: manual adjustment a user made to correct an inventory
// discrepancy.
//
// Any of "scan", "user_action", "system_action", "user_correction".
ActionType InventoryChangeLogActionType `json:"action_type" api:"required"`
// Timestamp when this change was recorded.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "inventory_change_log".
Object InventoryChangeLogObject `json:"object" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
Quantity Quantity `json:"quantity" api:"required"`
// A station on the production floor where operators scan batches to perform a
// batch operation, such as initializing or moving a batch.
ResponsibleScanningStation ScanningStation `json:"responsible_scanning_station" api:"required"`
// A user's global profile, shared across every account they belong to.
//
// Account-specific settings (status, role, department) live on the account user
// resource that links the user to each account.
ResponsibleUser User `json:"responsible_user" api:"required"`
// Timestamp when this record was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ActionType respjson.Field
CreatedAt respjson.Field
Item respjson.Field
Object respjson.Field
Quantity respjson.Field
ResponsibleScanningStation respjson.Field
ResponsibleUser respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A record of a single change to an item's on-hand inventory.
Every inventory movement — production scans, manual user adjustments, and automatic system actions — produces one entry, forming an audit trail of how on-hand quantities changed over time.
func (InventoryChangeLog) RawJSON ¶ added in v0.20.0
func (r InventoryChangeLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*InventoryChangeLog) UnmarshalJSON ¶ added in v0.20.0
func (r *InventoryChangeLog) UnmarshalJSON(data []byte) error
type InventoryChangeLogActionType ¶ added in v0.20.0
type InventoryChangeLogActionType string
Action that produced this inventory change.
- `scan`: change driven by a scan, typically a production step.
- `user_action`: change made manually by a user.
- `system_action`: change made automatically by the system.
- `user_correction`: manual adjustment a user made to correct an inventory discrepancy.
const ( InventoryChangeLogActionTypeScan InventoryChangeLogActionType = "scan" InventoryChangeLogActionTypeUserAction InventoryChangeLogActionType = "user_action" InventoryChangeLogActionTypeSystemAction InventoryChangeLogActionType = "system_action" InventoryChangeLogActionTypeUserCorrection InventoryChangeLogActionType = "user_correction" )
type InventoryChangeLogObject ¶ added in v0.20.0
type InventoryChangeLogObject string
Resource type identifier.
const (
InventoryChangeLogObjectInventoryChangeLog InventoryChangeLogObject = "inventory_change_log"
)
type IssueSalesOrderRequestParam ¶
type IssueSalesOrderRequestParam struct {
// Whether to notify the customer.
//
// When `true`, an order acknowledgement email with a PDF of the order is sent to
// the acknowledgement contacts on the order and the order's
// `acknowledgment_status` becomes `sent`. An order with no acknowledgement
// contacts sends nothing and leaves its `acknowledgment_status` unchanged.
NotifyCustomer bool `json:"notify_customer" api:"required"`
// contains filtered or unexported fields
}
Request to issue a sales order.
The property NotifyCustomer is required.
func (IssueSalesOrderRequestParam) MarshalJSON ¶
func (r IssueSalesOrderRequestParam) MarshalJSON() (data []byte, err error)
func (*IssueSalesOrderRequestParam) UnmarshalJSON ¶
func (r *IssueSalesOrderRequestParam) UnmarshalJSON(data []byte) error
type Item ¶
type Item struct {
// Item ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Attributes ListAttribute `json:"attributes" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
BurnRate Rate `json:"burn_rate" api:"required"`
// A grouping of related catalog items that defines the unit group and properties
// available to the items within it.
Category ItemCategory `json:"category" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Item description.
Description string `json:"description" api:"required"`
// Free-form notes about the item.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "item".
Object ItemObject `json:"object" api:"required"`
// Stock keeping unit code, unique within the account.
SKU string `json:"sku" api:"required"`
// What kind of item this is.
//
// - `product`: a finished product.
// - `material`: a raw material or component consumed in production.
// - `part`: a part used in production.
//
// Any of "product", "material", "part".
Type ItemType `json:"type" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
UnitCost Rate `json:"unit_cost" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
UnitValue Rate `json:"unit_value" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Attributes respjson.Field
BurnRate respjson.Field
Category respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Notes respjson.Field
Object respjson.Field
SKU respjson.Field
Type respjson.Field
UnitCost respjson.Field
UnitValue respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An entry in your catalog: something you sell, consume, or build with.
func (*Item) UnmarshalJSON ¶
type ItemCategory ¶
type ItemCategory struct {
// Item category ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the item category.
Name string `json:"name" api:"required"`
// Free-form notes about the item category.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "item_category".
Object ItemCategoryObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Properties ListProperty `json:"properties" api:"required"`
// What kind of items this category groups.
//
// - `material_category`: groups raw materials and components (items of type
// `material`).
// - `product_category`: groups finished products and parts (items of type
// `product` or `part`).
//
// An item can only be assigned to a category whose type matches the item's `type`,
// and the category's type is fixed at creation.
//
// Any of "material_category", "product_category".
Type ItemCategoryType `json:"type" api:"required"`
// A named collection of units that share one dimension, defining which units a
// product can be ordered in.
//
// Each associated unit carries its own discount and customer portal visibility,
// applied when an order line is priced in that unit. A product takes its unit
// group from its product line, falling back to its item category.
UnitGroup UnitGroup `json:"unit_group" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
Owner respjson.Field
Properties respjson.Field
Type respjson.Field
UnitGroup respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A grouping of related catalog items that defines the unit group and properties available to the items within it.
func (ItemCategory) RawJSON ¶
func (r ItemCategory) RawJSON() string
Returns the unmodified JSON received from the API
func (*ItemCategory) UnmarshalJSON ¶
func (r *ItemCategory) UnmarshalJSON(data []byte) error
type ItemCategoryObject ¶
type ItemCategoryObject string
Resource type identifier.
const (
ItemCategoryObjectItemCategory ItemCategoryObject = "item_category"
)
type ItemCategoryType ¶
type ItemCategoryType string
What kind of items this category groups.
- `material_category`: groups raw materials and components (items of type `material`).
- `product_category`: groups finished products and parts (items of type `product` or `part`).
An item can only be assigned to a category whose type matches the item's `type`, and the category's type is fixed at creation.
const ( ItemCategoryTypeMaterialCategory ItemCategoryType = "material_category" ItemCategoryTypeProductCategory ItemCategoryType = "product_category" )
type ItemInventory ¶
type ItemInventory struct {
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
AvailableToPromise ComputedQuantity `json:"available_to_promise" api:"required"`
// Resource type identifier.
//
// Any of "item_inventory".
Object ItemInventoryObject `json:"object" api:"required"`
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
OnHand ComputedQuantity `json:"on_hand" api:"required"`
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
Reserved ComputedQuantity `json:"reserved" api:"required"`
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
Short ComputedQuantity `json:"short" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvailableToPromise respjson.Field
Object respjson.Field
OnHand respjson.Field
Reserved respjson.Field
Short respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The stock position for an item: what is in stock, what is already committed, and what is still free to sell.
All four quantities are reported in the same unit — the base unit of the item's category. Derived figures, not stored rows: each is netted out of the ledger at read time, so none of them carries a quantity id.
func (ItemInventory) RawJSON ¶
func (r ItemInventory) RawJSON() string
Returns the unmodified JSON received from the API
func (*ItemInventory) UnmarshalJSON ¶
func (r *ItemInventory) UnmarshalJSON(data []byte) error
type ItemInventoryObject ¶
type ItemInventoryObject string
Resource type identifier.
const (
ItemInventoryObjectItemInventory ItemInventoryObject = "item_inventory"
)
type ItemLotDefault ¶
type ItemLotDefault struct {
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "item_lot_default".
Object ItemLotDefaultObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductLine Entity `json:"product_line" api:"required"`
// Units in one lot.
//
// `0` means the item has no lot convention, not that its lot is zero.
Quantity float64 `json:"quantity" api:"required"`
// Which rule in the chain produced this lot.
//
// - `item_override`: a lot size set on the item itself.
// - `product_line`: the convention of the line the item sells under.
// - `downstream_product_line`: inherited from the finished goods this item
// becomes, for intermediates that are not themselves sold.
// - `account_default`: the account-wide fallback.
//
// Empty when no rule in the chain supplies a lot, which is the same case
// `quantity` reports as `0`.
//
// Any of "item_override", "product_line", "downstream_product_line",
// "account_default", "".
Source ItemLotDefaultSource `json:"source" api:"required"`
// Unit of measurement used for conversions and product quantities.
Unit Unit `json:"unit" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Item respjson.Field
Object respjson.Field
ProductLine respjson.Field
Quantity respjson.Field
Source respjson.Field
Unit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The lot an item is made in — how many, counted in what.
A lot is the quantity production is issued in: a doff, a pallet, a batch. The unit is what makes it meaningful, since 60 pairs and 60 eaches are different lots.
func (ItemLotDefault) RawJSON ¶
func (r ItemLotDefault) RawJSON() string
Returns the unmodified JSON received from the API
func (*ItemLotDefault) UnmarshalJSON ¶
func (r *ItemLotDefault) UnmarshalJSON(data []byte) error
type ItemLotDefaultObject ¶
type ItemLotDefaultObject string
Resource type identifier.
const (
ItemLotDefaultObjectItemLotDefault ItemLotDefaultObject = "item_lot_default"
)
type ItemLotDefaultSource ¶
type ItemLotDefaultSource string
Which rule in the chain produced this lot.
- `item_override`: a lot size set on the item itself.
- `product_line`: the convention of the line the item sells under.
- `downstream_product_line`: inherited from the finished goods this item becomes, for intermediates that are not themselves sold.
- `account_default`: the account-wide fallback.
Empty when no rule in the chain supplies a lot, which is the same case `quantity` reports as `0`.
const ( ItemLotDefaultSourceItemOverride ItemLotDefaultSource = "item_override" ItemLotDefaultSourceProductLine ItemLotDefaultSource = "product_line" ItemLotDefaultSourceDownstreamProductLine ItemLotDefaultSource = "downstream_product_line" ItemLotDefaultSourceAccountDefault ItemLotDefaultSource = "account_default" ItemLotDefaultSourceEmpty ItemLotDefaultSource = "" )
type ItemObject ¶
type ItemObject string
Resource type identifier.
const (
ItemObjectItem ItemObject = "item"
)
type ItemType ¶
type ItemType string
What kind of item this is.
- `product`: a finished product. - `material`: a raw material or component consumed in production. - `part`: a part used in production.
type Job ¶
type Job struct {
// Job ID.
ID string `json:"id" api:"required"`
// When the job was cancelled.
CancelledAt time.Time `json:"cancelled_at" api:"required" format:"date-time"`
// When the job finished processing, whether or not every row succeeded.
CompletedAt time.Time `json:"completed_at" api:"required" format:"date-time"`
// When the job was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
CreatedBy Actor `json:"created_by" api:"required"`
// ResponseError is the JSON-serializable error body returned to API clients. It
// contains only public information. This struct is used by the OpenAPI schema
// generator to produce documentation.
Error ResponseError `json:"error" api:"required"`
// Points a completed export job at the file it produced.
Export JobExport `json:"export" api:"required"`
// When the most recent attempt failed. A retry that succeeds leaves this alongside
// `completed_at`.
FailedAt time.Time `json:"failed_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "job".
Object JobObject `json:"object" api:"required"`
// The kind of resource the job operates on, as an object-type value (e.g.
// `product`).
//
// `type` names the verb — what the job does — and this names the subject, so a job
// that produced no results still says what it was for.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
ResourceType JobResourceType `json:"resource_type" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Results ListJobResult `json:"results" api:"required"`
// When the job began executing.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// How far the job has got.
//
// `completed` means the work was processed, not that every row succeeded — read
// each entry's own `status` in `results`.
//
// Any of "created", "started", "completed", "failed", "cancelled".
Status JobStatus `json:"status" api:"required"`
// The kind of work the job carries out.
//
// Any of "bulk_create", "bulk_upsert", "export", "pack_pick".
Type JobType `json:"type" api:"required"`
// When the job was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CancelledAt respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Error respjson.Field
Export respjson.Field
FailedAt respjson.Field
Object respjson.Field
ResourceType respjson.Field
Results respjson.Field
StartedAt respjson.Field
Status respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Records a piece of work the API accepted and carries out asynchronously. Endpoints answering `202 Accepted` point at one with a `Location` header; poll it for the outcome.
func (*Job) UnmarshalJSON ¶
type JobExport ¶
type JobExport struct {
// Resource type identifier.
//
// Any of "job_export".
Object JobExportObject `json:"object" api:"required"`
// Presigned link to the file, valid for five minutes.
//
// If the link has expired, read the job again for a fresh one.
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Points a completed export job at the file it produced.
func (*JobExport) UnmarshalJSON ¶
type JobExportObject ¶
type JobExportObject string
Resource type identifier.
const (
JobExportObjectJobExport JobExportObject = "job_export"
)
type JobObject ¶
type JobObject string
Resource type identifier.
const (
JobObjectJob JobObject = "job"
)
type JobResourceType ¶
type JobResourceType string
The kind of resource the job operates on, as an object-type value (e.g. `product`).
`type` names the verb — what the job does — and this names the subject, so a job that produced no results still says what it was for.
const ( JobResourceTypeAccount JobResourceType = "account" JobResourceTypeActor JobResourceType = "actor" JobResourceTypeEntity JobResourceType = "entity" JobResourceTypeRecord JobResourceType = "record" JobResourceTypeFreight JobResourceType = "freight" JobResourceTypeCommitment JobResourceType = "commitment" JobResourceTypeSalesOrderTotals JobResourceType = "sales_order_totals" JobResourceTypeSalesOrderStageTotal JobResourceType = "sales_order_stage_total" JobResourceTypeSalesOrderRelated JobResourceType = "sales_order_related" JobResourceTypeOrderContact JobResourceType = "order_contact" JobResourceTypeUser JobResourceType = "user" JobResourceTypeAddress JobResourceType = "address" JobResourceTypeAPIKey JobResourceType = "api_key" JobResourceTypeCreatedAPIKey JobResourceType = "created_api_key" JobResourceTypeRefreshToken JobResourceType = "refresh_token" JobResourceTypeList JobResourceType = "list" JobResourceTypeSandbox JobResourceType = "sandbox" JobResourceTypeRegistrationSession JobResourceType = "registration_session" JobResourceTypePricingPlan JobResourceType = "pricing_plan" JobResourceTypeAccountPlan JobResourceType = "account_plan" JobResourceTypePlanChange JobResourceType = "plan_change" JobResourceTypeEnterpriseInquiry JobResourceType = "enterprise_inquiry" JobResourceTypeRequestLog JobResourceType = "request_log" JobResourceTypeAuditEvent JobResourceType = "audit_event" JobResourceTypeAuditFieldChange JobResourceType = "audit_field_change" JobResourceTypeRole JobResourceType = "role" JobResourceTypeUnit JobResourceType = "unit" JobResourceTypeAccountAffiliation JobResourceType = "account_affiliation" JobResourceTypeAgentDefinition JobResourceType = "agent_definition" JobResourceTypeAvailableTool JobResourceType = "available_tool" JobResourceTypeAgentDefinitionTool JobResourceType = "agent_definition_tool" JobResourceTypeAgentAccountStatus JobResourceType = "agent_account_status" JobResourceTypeAgentRun JobResourceType = "agent_run" JobResourceTypeAgentAction JobResourceType = "agent_action" JobResourceTypeAgentRunStep JobResourceType = "agent_run_step" JobResourceTypeAgentTokenUsage JobResourceType = "agent_token_usage" JobResourceTypeAgentMemory JobResourceType = "agent_memory" JobResourceTypeNotification JobResourceType = "notification" JobResourceTypeNotificationUnreadCount JobResourceType = "notification_unread_count" JobResourceTypeNotificationSendResult JobResourceType = "notification_send_result" JobResourceTypeNotificationUnreadSummary JobResourceType = "notification_unread_summary" JobResourceTypeAnnouncement JobResourceType = "announcement" JobResourceTypeConversation JobResourceType = "conversation" JobResourceTypeSupportCase JobResourceType = "support_case" JobResourceTypeConversationParticipant JobResourceType = "conversation_participant" JobResourceTypeReadCursor JobResourceType = "read_cursor" JobResourceTypeChatMessage JobResourceType = "chat_message" JobResourceTypeNotificationUnreadSummaryAccount JobResourceType = "notification_unread_summary_account" JobResourceTypeMessagingBlock JobResourceType = "messaging_block" JobResourceTypeNotificationPreference JobResourceType = "notification_preference" JobResourceTypeMessageAttachment JobResourceType = "message_attachment" JobResourceTypeAttachmentUploadTarget JobResourceType = "attachment_upload_target" JobResourceTypeScheduledMessage JobResourceType = "scheduled_message" JobResourceTypeMessagingContact JobResourceType = "messaging_contact" JobResourceTypeMessageReport JobResourceType = "message_report" JobResourceTypeToolGroup JobResourceType = "tool_group" JobResourceTypeModel JobResourceType = "model" JobResourceTypePaymentTerm JobResourceType = "payment_term" JobResourceTypeShippingTerm JobResourceType = "shipping_term" JobResourceTypeQuantity JobResourceType = "quantity" JobResourceTypeAccountGroup JobResourceType = "account_group" JobResourceTypeSupportRoute JobResourceType = "support_route" JobResourceTypeSupportAvailability JobResourceType = "support_availability" JobResourceTypeAccountStatus JobResourceType = "account_status" JobResourceTypeGeolocation JobResourceType = "geolocation" JobResourceTypeAccountUser JobResourceType = "account_user" JobResourceTypeDepartment JobResourceType = "department" JobResourceTypeAccountIntegration JobResourceType = "account_integration" JobResourceTypeAccountPrice JobResourceType = "account_price" JobResourceTypeProductLine JobResourceType = "product_line" JobResourceTypeItemCategory JobResourceType = "item_category" JobResourceTypeAttribute JobResourceType = "attribute" JobResourceTypeRate JobResourceType = "rate" JobResourceTypeAccountGroupProductLineAccess JobResourceType = "account_group_product_line_access" JobResourceTypeSalesTarget JobResourceType = "sales_target" JobResourceTypeAdjustmentType JobResourceType = "adjustment_type" JobResourceTypeAccountBranding JobResourceType = "account_branding" JobResourceTypeAccountPortal JobResourceType = "account_portal" JobResourceTypeAccountLogoURL JobResourceType = "account_logo_url" JobResourceTypeAccountFaviconURL JobResourceType = "account_favicon_url" JobResourceTypePublicAccount JobResourceType = "public_account" JobResourceTypeProperty JobResourceType = "property" JobResourceTypeCarrier JobResourceType = "carrier" JobResourceTypeServiceLevel JobResourceType = "service_level" JobResourceTypeItem JobResourceType = "item" JobResourceTypeItemLotDefault JobResourceType = "item_lot_default" JobResourceTypeItemInventory JobResourceType = "item_inventory" JobResourceTypeProduct JobResourceType = "product" JobResourceTypeBatch JobResourceType = "batch" JobResourceTypeBatchFlowNode JobResourceType = "batch_flow_node" JobResourceTypeScanningConsumption JobResourceType = "scanning_consumption" JobResourceTypeOpenBatchSummary JobResourceType = "open_batch_summary" JobResourceTypeScanningProductionStepInfo JobResourceType = "scanning_production_step_info" JobResourceTypeScanningStation JobResourceType = "scanning_station" JobResourceTypeProductionStep JobResourceType = "production_step" JobResourceTypeProductionRun JobResourceType = "production_run" JobResourceTypeMachine JobResourceType = "machine" JobResourceTypeMachineStatus JobResourceType = "machine_status" JobResourceTypeMachineDowntimeEvent JobResourceType = "machine_downtime_event" JobResourceTypeDemandOverride JobResourceType = "demand_override" JobResourceTypeDemandOverrideType JobResourceType = "demand_override_type" JobResourceTypeMachineDowntimeReason JobResourceType = "machine_downtime_reason" JobResourceTypeProductionSchedulePreview JobResourceType = "production_schedule_preview" JobResourceTypeProductionScheduleRegeneratePreview JobResourceType = "production_schedule_regenerate_preview" JobResourceTypeProductionSchedule JobResourceType = "production_schedule" JobResourceTypeProductionScheduleLine JobResourceType = "production_schedule_line" JobResourceTypeProductionScheduleDeviation JobResourceType = "production_schedule_deviation" JobResourceTypeProductionScheduleDerivedLine JobResourceType = "production_schedule_derived_line" JobResourceTypeProductionScheduleSettings JobResourceType = "production_schedule_settings" JobResourceTypeProductionScheduleResourceSetting JobResourceType = "production_schedule_resource_setting" JobResourceTypeProductionScheduleItemSetting JobResourceType = "production_schedule_item_setting" JobResourceTypeFulfillmentRecommendation JobResourceType = "fulfillment_recommendation" JobResourceTypeAnalyzeDeliveryPerformanceResponse JobResourceType = "analyze_delivery_performance_response" JobResourceTypeDeliveryPerformance JobResourceType = "delivery_performance" JobResourceTypeDeliveryBacklogBucket JobResourceType = "delivery_backlog_bucket" JobResourceTypeDeliveryLatenessBucket JobResourceType = "delivery_lateness_bucket" JobResourceTypeDeliveryBreakdown JobResourceType = "delivery_breakdown" JobResourceTypeAnalyzeSalesBreakdownResponse JobResourceType = "analyze_sales_breakdown_response" JobResourceTypeSalesTotals JobResourceType = "sales_totals" JobResourceTypeSalesBreakdown JobResourceType = "sales_breakdown" JobResourceTypeScheduleOrderCoverage JobResourceType = "schedule_order_coverage" JobResourceTypeScheduleOrderCoverageLine JobResourceType = "schedule_order_coverage_line" JobResourceTypeScheduleDeviationType JobResourceType = "schedule_deviation_type" JobResourceTypeScheduleAtRiskOrder JobResourceType = "schedule_at_risk_order" JobResourceTypeProductionScheduleFinishedPolicy JobResourceType = "production_schedule_finished_policy" JobResourceTypeProductionScheduleFinishingLine JobResourceType = "production_schedule_finishing_line" JobResourceTypeProductionScheduleWeekRelease JobResourceType = "production_schedule_week_release" JobResourceTypeProductionScheduleWeekReleasePreview JobResourceType = "production_schedule_week_release_preview" JobResourceTypeProductionScheduleItemPolicy JobResourceType = "production_schedule_item_policy" JobResourceTypeChildAccount JobResourceType = "child_account" JobResourceTypeUnitGroup JobResourceType = "unit_group" JobResourceTypeUnitGroupUnit JobResourceType = "unit_group_unit" JobResourceTypeConsumption JobResourceType = "consumption" JobResourceTypeCustomerProductLineAccess JobResourceType = "customer_product_line_access" JobResourceTypeCustomer JobResourceType = "customer" JobResourceTypeFrequentlyOrderedProduct JobResourceType = "frequently_ordered_product" JobResourceTypePriority JobResourceType = "priority" JobResourceTypeDelivery JobResourceType = "delivery" JobResourceTypeDeliveryLine JobResourceType = "delivery_line" JobResourceTypeDeliveryRelated JobResourceType = "delivery_related" JobResourceTypeSalesOrder JobResourceType = "sales_order" JobResourceTypeLocation JobResourceType = "location" JobResourceTypeLocationType JobResourceType = "location_type" JobResourceTypeLot JobResourceType = "lot" JobResourceTypeEmailLog JobResourceType = "email_log" JobResourceTypeEmailDomain JobResourceType = "email_domain" JobResourceTypeEmailInbox JobResourceType = "email_inbox" JobResourceTypeEmailSender JobResourceType = "email_sender" JobResourceTypePortalDomain JobResourceType = "portal_domain" JobResourceTypeDNSRecord JobResourceType = "dns_record" JobResourceTypeInventoryChangeLog JobResourceType = "inventory_change_log" JobResourceTypeInvoice JobResourceType = "invoice" JobResourceTypeInvoiceSummary JobResourceType = "invoice_summary" JobResourceTypeInvoiceLine JobResourceType = "invoice_line" JobResourceTypeInvoiceAllocation JobResourceType = "invoice_allocation" JobResourceTypeInvoiceForPayment JobResourceType = "invoice_for_payment" JobResourceTypeShipment JobResourceType = "shipment" JobResourceTypeShipmentSummary JobResourceType = "shipment_summary" JobResourceTypeShipmentLine JobResourceType = "shipment_line" JobResourceTypeShippingCase JobResourceType = "shipping_case" JobResourceTypeShippingCaseLabelURL JobResourceType = "shipping_case_label_url" JobResourceTypeSettlement JobResourceType = "settlement" JobResourceTypeSettlementSummary JobResourceType = "settlement_summary" JobResourceTypeRolePermission JobResourceType = "role_permission" JobResourceTypeRegistrationFlow JobResourceType = "registration_flow" JobResourceTypeRegistrationFlowOption JobResourceType = "registration_flow_option" JobResourceTypeTransaction JobResourceType = "transaction" JobResourceTypeTransactionSummary JobResourceType = "transaction_summary" JobResourceTypeTransactionMethod JobResourceType = "transaction_method" JobResourceTypeTransactionType JobResourceType = "transaction_type" JobResourceTypeTransactionAllocation JobResourceType = "transaction_allocation" JobResourceTypeUsageItem JobResourceType = "usage_item" JobResourceTypeAccountUsageResponse JobResourceType = "account_usage_response" JobResourceTypeSubscriptionInfo JobResourceType = "subscription_info" JobResourceTypeBillingPortalSessionResponse JobResourceType = "billing_portal_session_response" JobResourceTypeSwitchPlanResponse JobResourceType = "switch_plan_response" JobResourceTypeEnsureBillingCustomerResponse JobResourceType = "ensure_billing_customer_response" JobResourceTypeSpendingCapResponse JobResourceType = "spending_cap_response" JobResourceTypeAgentSpendInfo JobResourceType = "agent_spend_info" JobResourceTypeWebhookResponse JobResourceType = "webhook_response" JobResourceTypeAddressSuggestion JobResourceType = "address_suggestion" JobResourceTypeAddressComponents JobResourceType = "address_components" JobResourceTypeAddressDetailsResult JobResourceType = "address_details_result" JobResourceTypeValidatedAddress JobResourceType = "validated_address" JobResourceTypePlanLimit JobResourceType = "plan_limit" JobResourceTypePlanChangeProration JobResourceType = "plan_change_proration" JobResourceTypePlanChangeLineItem JobResourceType = "plan_change_line_item" JobResourceTypeSetupBillingResponse JobResourceType = "setup_billing_response" JobResourceTypeConfirmPaymentResponse JobResourceType = "confirm_payment_response" JobResourceTypeOAuthResponse JobResourceType = "oauth_response" JobResourceTypeOAuthStatusResponse JobResourceType = "oauth_status_response" JobResourceTypeStripePublishableKey JobResourceType = "stripe_publishable_key" JobResourceTypeStripeStatus JobResourceType = "stripe_status" JobResourceTypeHealthcheck JobResourceType = "healthcheck" JobResourceTypeAgentDefinitionConfig JobResourceType = "agent_definition_config" JobResourceTypeTriggerConfig JobResourceType = "trigger_config" JobResourceTypeCustomerContactInfo JobResourceType = "customer_contact_info" JobResourceTypeCustomerFreightPreferences JobResourceType = "customer_freight_preferences" JobResourceTypeCustomerDefaults JobResourceType = "customer_defaults" JobResourceTypeCustomerLeadTime JobResourceType = "customer_lead_time" JobResourceTypeCustomerNotificationPreferences JobResourceType = "customer_notification_preferences" JobResourceTypeOrderNotificationRecipient JobResourceType = "order_notification_recipient" JobResourceTypeOrderDiscount JobResourceType = "order_discount" JobResourceTypeSalesOrderLine JobResourceType = "sales_order_line" JobResourceTypeSalesOrderType JobResourceType = "sales_order_type" JobResourceTypeSalesOrderStatus JobResourceType = "sales_order_status" JobResourceTypeMaterial JobResourceType = "material" JobResourceTypeSupplierMaterial JobResourceType = "supplier_material" JobResourceTypePart JobResourceType = "part" JobResourceTypePermissionGroup JobResourceType = "permission_group" JobResourceTypePermission JobResourceType = "permission" JobResourceTypePick JobResourceType = "pick" JobResourceTypePickLine JobResourceType = "pick_line" JobResourceTypeProductType JobResourceType = "product_type" JobResourceTypeProduction JobResourceType = "production" JobResourceTypeProductionFlow JobResourceType = "production_flow" JobResourceTypeMap JobResourceType = "map" JobResourceTypePurchaseOrder JobResourceType = "purchase_order" JobResourceTypePurchaseOrderLine JobResourceType = "purchase_order_line" JobResourceTypePurchaseOrderRelated JobResourceType = "purchase_order_related" JobResourceTypeSupplier JobResourceType = "supplier" JobResourceTypeReceivableEntry JobResourceType = "receivable_entry" JobResourceTypeReceivingOrder JobResourceType = "receiving_order" JobResourceTypeReceivingOrderLine JobResourceType = "receiving_order_line" JobResourceTypeReceivingOrderTotals JobResourceType = "receiving_order_totals" JobResourceTypeReceivingOrderStageTotal JobResourceType = "receiving_order_stage_total" JobResourceTypeReceivingOrderRelated JobResourceType = "receiving_order_related" JobResourceTypeEmailContact JobResourceType = "email_contact" JobResourceTypeAllocationEntry JobResourceType = "allocation_entry" JobResourceTypeOpenCreditEntry JobResourceType = "open_credit_entry" JobResourceTypeVolumeDiscount JobResourceType = "volume_discount" JobResourceTypeVolumeDiscountTier JobResourceType = "volume_discount_tier" JobResourceTypeAnalyzeDeliveriesResponse JobResourceType = "analyze_deliveries_response" JobResourceTypeAnalyzeManufacturingResponse JobResourceType = "analyze_manufacturing_response" JobResourceTypeAnalyzeManufacturingBatchResponse JobResourceType = "analyze_manufacturing_batch_response" JobResourceTypeAnalyzeQuarterlyOrdersResponse JobResourceType = "analyze_quarterly_orders_response" JobResourceTypeAnalyzeNewCustomersResponse JobResourceType = "analyze_new_customers_response" JobResourceTypeAnalyzeDemandForecastResponse JobResourceType = "analyze_demand_forecast_response" JobResourceTypeAnalyzeOeeResponse JobResourceType = "analyze_oee_response" JobResourceTypeAnalyzeOeeTrendResponse JobResourceType = "analyze_oee_trend_response" JobResourceTypeAnalyzeScheduleAttainmentResponse JobResourceType = "analyze_schedule_attainment_response" JobResourceTypeCatalogProductLine JobResourceType = "catalog_product_line" JobResourceTypeCatalogCategory JobResourceType = "catalog_category" JobResourceTypeCatalogProduct JobResourceType = "catalog_product" JobResourceTypeCatalogProperty JobResourceType = "catalog_property" JobResourceTypeCatalogAttribute JobResourceType = "catalog_attribute" JobResourceTypeDcLocation JobResourceType = "dc_location" JobResourceTypeEdiRun JobResourceType = "edi_run" JobResourceTypeInventoryItem JobResourceType = "inventory_item" JobResourceTypeAnalyzeWeeksOfSalesResponse JobResourceType = "analyze_weeks_of_sales_response" JobResourceTypeBulkReconcileItemsResponse JobResourceType = "bulk_reconcile_items_response" JobResourceTypeSysProperty JobResourceType = "sys_property" JobResourceTypeSysPropertyType JobResourceType = "sys_property_type" JobResourceTypeSysPropertyValue JobResourceType = "sys_property_value" JobResourceTypeTerritory JobResourceType = "territory" JobResourceTypeTenancy JobResourceType = "tenancy" JobResourceTypeCheckoutSession JobResourceType = "checkout_session" JobResourceTypeEstimateRateResult JobResourceType = "estimate_rate_result" JobResourceTypeRateShopOption JobResourceType = "rate_shop_option" JobResourceTypeRateShopResult JobResourceType = "rate_shop_result" JobResourceTypeOwner JobResourceType = "owner" JobResourceTypeCreatedBy JobResourceType = "created_by" JobResourceTypeMessage JobResourceType = "message" JobResourceTypeAccountPhotoUploadResult JobResourceType = "account_photo_upload_result" JobResourceTypeUserPhotoUploadResult JobResourceType = "user_photo_upload_result" JobResourceTypeUserPhotoURL JobResourceType = "user_photo_url" JobResourceTypeBatchLot JobResourceType = "batch_lot" JobResourceTypeCheckDuplicateResult JobResourceType = "check_duplicate_result" JobResourceTypeItemCosts JobResourceType = "item_costs" JobResourceTypeItemTrends JobResourceType = "item_trends" JobResourceTypeReconciledItemResult JobResourceType = "reconciled_item_result" JobResourceTypeSkippedItemResult JobResourceType = "skipped_item_result" JobResourceTypeReconcileErrorResult JobResourceType = "reconcile_error_result" JobResourceTypeItemTrendPoint JobResourceType = "item_trend_point" JobResourceTypeTenancyPendingRegistration JobResourceType = "tenancy_pending_registration" JobResourceTypeInvoiceAllocationEntry JobResourceType = "invoice_allocation_entry" JobResourceTypeAllocationCustomer JobResourceType = "allocation_customer" JobResourceTypeCheckoutSalesOrder JobResourceType = "checkout_sales_order" JobResourceTypeSalesOrderPriceQuote JobResourceType = "sales_order_price_quote" JobResourceTypeSalesOrderFreightQuote JobResourceType = "sales_order_freight_quote" JobResourceTypeSalesOrderCommitmentQuote JobResourceType = "sales_order_commitment_quote" JobResourceTypeOperatingCalendar JobResourceType = "operating_calendar" JobResourceTypeOperatingCalendarClosure JobResourceType = "operating_calendar_closure" JobResourceTypeSalesOrderPriceQuoteLine JobResourceType = "sales_order_price_quote_line" JobResourceTypeHubspotSyncJob JobResourceType = "hubspot_sync_job" JobResourceTypeHubspotSyncReport JobResourceType = "hubspot_sync_report" JobResourceTypeHubspotCompanyReview JobResourceType = "hubspot_company_review" JobResourceTypeHubspotCompanyCandidate JobResourceType = "hubspot_company_candidate" JobResourceTypeHubspotSyncRecord JobResourceType = "hubspot_sync_record" JobResourceTypeContactMatch JobResourceType = "contact_match" JobResourceTypeReplyDraft JobResourceType = "reply_draft" JobResourceTypeConversationLink JobResourceType = "conversation_link" JobResourceTypeMessagingGroup JobResourceType = "messaging_group" JobResourceTypeMessagingGroupMember JobResourceType = "messaging_group_member" JobResourceTypePortalProfile JobResourceType = "portal_profile" JobResourceTypePortalRegistrationSession JobResourceType = "portal_registration_session" JobResourceTypePortalRegistrationSessionData JobResourceType = "portal_registration_session_data" JobResourceTypePackList JobResourceType = "pack_list" JobResourceTypePackListParty JobResourceType = "pack_list_party" JobResourceTypePackListLineItem JobResourceType = "pack_list_line_item" JobResourceTypePackListBackOrder JobResourceType = "pack_list_back_order" JobResourceTypePackListCase JobResourceType = "pack_list_case" JobResourceTypeJob JobResourceType = "job" JobResourceTypeJobResult JobResourceType = "job_result" JobResourceTypeJobExport JobResourceType = "job_export" JobResourceTypeAnalyzeCustomerPricingResponse JobResourceType = "analyze_customer_pricing_response" JobResourceTypeCustomerPricingFinding JobResourceType = "customer_pricing_finding" JobResourceTypeCustomerPricingSummary JobResourceType = "customer_pricing_summary" JobResourceTypeComputedRate JobResourceType = "computed_rate" JobResourceTypeComputedQuantity JobResourceType = "computed_quantity" JobResourceTypeAnalyzeRealizedMarginsResponse JobResourceType = "analyze_realized_margins_response" JobResourceTypeRealizedMarginFinding JobResourceType = "realized_margin_finding" JobResourceTypeRealizedMarginSummary JobResourceType = "realized_margin_summary" JobResourceTypeShipmentRelated JobResourceType = "shipment_related" JobResourceTypeInvoiceRelated JobResourceType = "invoice_related" JobResourceTypePickRelated JobResourceType = "pick_related" JobResourceTypePickTotals JobResourceType = "pick_totals" JobResourceTypePickStageTotal JobResourceType = "pick_stage_total" )
type JobResult ¶
type JobResult struct {
// ResponseError is the JSON-serializable error body returned to API clients. It
// contains only public information. This struct is used by the OpenAPI schema
// generator to produce documentation.
Error ResponseError `json:"error" api:"required"`
// Zero-based row of the request this result names.
Index int64 `json:"index" api:"required"`
// Resource type identifier.
//
// Any of "job_result".
Object JobResultObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// What became of the row.
//
// - `created`: the row produced a new resource.
// - `updated`: the row updated an existing resource.
// - `failed`: the row was rejected and wrote nothing.
//
// Any of "created", "updated", "failed".
Status JobResultStatus `json:"status" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
SubResources ListEntity `json:"sub_resources" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
Index respjson.Field
Object respjson.Field
Resource respjson.Field
Status respjson.Field
SubResources respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Accounts for one row of the request: the resource it produced, or the error it was rejected with. Every submitted row lands in exactly one of these once the job completes.
func (*JobResult) UnmarshalJSON ¶
type JobResultObject ¶
type JobResultObject string
Resource type identifier.
const (
JobResultObjectJobResult JobResultObject = "job_result"
)
type JobResultStatus ¶
type JobResultStatus string
What became of the row.
- `created`: the row produced a new resource. - `updated`: the row updated an existing resource. - `failed`: the row was rejected and wrote nothing.
const ( JobResultStatusCreated JobResultStatus = "created" JobResultStatusUpdated JobResultStatus = "updated" JobResultStatusFailed JobResultStatus = "failed" )
type JobStatus ¶
type JobStatus string
How far the job has got.
`completed` means the work was processed, not that every row succeeded — read each entry's own `status` in `results`.
type ListAPIKey ¶
type ListAPIKey struct {
// Resources in this page.
Data []APIKey `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAPIKeyObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAPIKey) RawJSON ¶
func (r ListAPIKey) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAPIKey) UnmarshalJSON ¶
func (r *ListAPIKey) UnmarshalJSON(data []byte) error
type ListAPIKeyObject ¶
type ListAPIKeyObject string
Resource type identifier.
const (
ListAPIKeyObjectList ListAPIKeyObject = "list"
)
type ListAccountGroup ¶
type ListAccountGroup struct {
// Resources in this page.
Data []AccountGroup `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAccountGroupObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAccountGroup) RawJSON ¶
func (r ListAccountGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAccountGroup) UnmarshalJSON ¶
func (r *ListAccountGroup) UnmarshalJSON(data []byte) error
type ListAccountGroupObject ¶
type ListAccountGroupObject string
Resource type identifier.
const (
ListAccountGroupObjectList ListAccountGroupObject = "list"
)
type ListAccountIntegration ¶
type ListAccountIntegration struct {
// Resources in this page.
Data []AccountIntegration `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAccountIntegrationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAccountIntegration) RawJSON ¶
func (r ListAccountIntegration) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAccountIntegration) UnmarshalJSON ¶
func (r *ListAccountIntegration) UnmarshalJSON(data []byte) error
type ListAccountIntegrationObject ¶
type ListAccountIntegrationObject string
Resource type identifier.
const (
ListAccountIntegrationObjectList ListAccountIntegrationObject = "list"
)
type ListAccountPrice ¶
type ListAccountPrice struct {
// Resources in this page.
Data []AccountPrice `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAccountPriceObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAccountPrice) RawJSON ¶
func (r ListAccountPrice) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAccountPrice) UnmarshalJSON ¶
func (r *ListAccountPrice) UnmarshalJSON(data []byte) error
type ListAccountPriceObject ¶
type ListAccountPriceObject string
Resource type identifier.
const (
ListAccountPriceObjectList ListAccountPriceObject = "list"
)
type ListAccountStatus ¶
type ListAccountStatus struct {
// Resources in this page.
Data []AccountStatus `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAccountStatusObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAccountStatus) RawJSON ¶
func (r ListAccountStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAccountStatus) UnmarshalJSON ¶
func (r *ListAccountStatus) UnmarshalJSON(data []byte) error
type ListAccountStatusObject ¶
type ListAccountStatusObject string
Resource type identifier.
const (
ListAccountStatusObjectList ListAccountStatusObject = "list"
)
type ListAccountUser ¶
type ListAccountUser struct {
// Resources in this page.
Data []AccountUser `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAccountUserObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAccountUser) RawJSON ¶
func (r ListAccountUser) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAccountUser) UnmarshalJSON ¶
func (r *ListAccountUser) UnmarshalJSON(data []byte) error
type ListAccountUserObject ¶
type ListAccountUserObject string
Resource type identifier.
const (
ListAccountUserObjectList ListAccountUserObject = "list"
)
type ListActor ¶
type ListActor struct {
// Resources in this page.
Data []Actor `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListActorObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListActor) UnmarshalJSON ¶
type ListActorObject ¶
type ListActorObject string
Resource type identifier.
const (
ListActorObjectList ListActorObject = "list"
)
type ListAddress ¶
type ListAddress struct {
// Resources in this page.
Data []Address `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAddressObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAddress) RawJSON ¶
func (r ListAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAddress) UnmarshalJSON ¶
func (r *ListAddress) UnmarshalJSON(data []byte) error
type ListAddressObject ¶
type ListAddressObject string
Resource type identifier.
const (
ListAddressObjectList ListAddressObject = "list"
)
type ListAddressSuggestion ¶
type ListAddressSuggestion struct {
// Resources in this page.
Data []AddressSuggestion `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAddressSuggestionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAddressSuggestion) RawJSON ¶
func (r ListAddressSuggestion) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAddressSuggestion) UnmarshalJSON ¶
func (r *ListAddressSuggestion) UnmarshalJSON(data []byte) error
type ListAddressSuggestionObject ¶
type ListAddressSuggestionObject string
Resource type identifier.
const (
ListAddressSuggestionObjectList ListAddressSuggestionObject = "list"
)
type ListAdjustmentType ¶
type ListAdjustmentType struct {
// Resources in this page.
Data []AdjustmentType `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAdjustmentTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAdjustmentType) RawJSON ¶
func (r ListAdjustmentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAdjustmentType) UnmarshalJSON ¶
func (r *ListAdjustmentType) UnmarshalJSON(data []byte) error
type ListAdjustmentTypeObject ¶
type ListAdjustmentTypeObject string
Resource type identifier.
const (
ListAdjustmentTypeObjectList ListAdjustmentTypeObject = "list"
)
type ListAgentAction ¶
type ListAgentAction struct {
// Resources in this page.
Data []AgentAction `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentActionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentAction) RawJSON ¶
func (r ListAgentAction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentAction) UnmarshalJSON ¶
func (r *ListAgentAction) UnmarshalJSON(data []byte) error
type ListAgentActionObject ¶
type ListAgentActionObject string
Resource type identifier.
const (
ListAgentActionObjectList ListAgentActionObject = "list"
)
type ListAgentDefinition ¶
type ListAgentDefinition struct {
// Resources in this page.
Data []AgentDefinition `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentDefinitionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentDefinition) RawJSON ¶
func (r ListAgentDefinition) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentDefinition) UnmarshalJSON ¶
func (r *ListAgentDefinition) UnmarshalJSON(data []byte) error
type ListAgentDefinitionObject ¶
type ListAgentDefinitionObject string
Resource type identifier.
const (
ListAgentDefinitionObjectList ListAgentDefinitionObject = "list"
)
type ListAgentDefinitionTool ¶
type ListAgentDefinitionTool struct {
// Resources in this page.
Data []AgentDefinitionTool `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentDefinitionToolObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentDefinitionTool) RawJSON ¶
func (r ListAgentDefinitionTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentDefinitionTool) UnmarshalJSON ¶
func (r *ListAgentDefinitionTool) UnmarshalJSON(data []byte) error
type ListAgentDefinitionToolObject ¶
type ListAgentDefinitionToolObject string
Resource type identifier.
const (
ListAgentDefinitionToolObjectList ListAgentDefinitionToolObject = "list"
)
type ListAgentMemory ¶
type ListAgentMemory struct {
// Resources in this page.
Data []AgentMemory `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentMemoryObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentMemory) RawJSON ¶
func (r ListAgentMemory) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentMemory) UnmarshalJSON ¶
func (r *ListAgentMemory) UnmarshalJSON(data []byte) error
type ListAgentMemoryObject ¶
type ListAgentMemoryObject string
Resource type identifier.
const (
ListAgentMemoryObjectList ListAgentMemoryObject = "list"
)
type ListAgentRun ¶
type ListAgentRun struct {
// Resources in this page.
Data []AgentRun `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentRunObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentRun) RawJSON ¶
func (r ListAgentRun) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentRun) UnmarshalJSON ¶
func (r *ListAgentRun) UnmarshalJSON(data []byte) error
type ListAgentRunObject ¶
type ListAgentRunObject string
Resource type identifier.
const (
ListAgentRunObjectList ListAgentRunObject = "list"
)
type ListAgentRunStep ¶
type ListAgentRunStep struct {
// Resources in this page.
Data []AgentRunStep `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAgentRunStepObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAgentRunStep) RawJSON ¶
func (r ListAgentRunStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAgentRunStep) UnmarshalJSON ¶
func (r *ListAgentRunStep) UnmarshalJSON(data []byte) error
type ListAgentRunStepObject ¶
type ListAgentRunStepObject string
Resource type identifier.
const (
ListAgentRunStepObjectList ListAgentRunStepObject = "list"
)
type ListAnnouncement ¶
type ListAnnouncement struct {
// Resources in this page.
Data []Announcement `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAnnouncementObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAnnouncement) RawJSON ¶
func (r ListAnnouncement) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAnnouncement) UnmarshalJSON ¶
func (r *ListAnnouncement) UnmarshalJSON(data []byte) error
type ListAnnouncementObject ¶
type ListAnnouncementObject string
Resource type identifier.
const (
ListAnnouncementObjectList ListAnnouncementObject = "list"
)
type ListAttainmentBucket ¶
type ListAttainmentBucket struct {
// Resources in this page.
Data []AttainmentBucket `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAttainmentBucketObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAttainmentBucket) RawJSON ¶
func (r ListAttainmentBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAttainmentBucket) UnmarshalJSON ¶
func (r *ListAttainmentBucket) UnmarshalJSON(data []byte) error
type ListAttainmentBucketObject ¶
type ListAttainmentBucketObject string
Resource type identifier.
const (
ListAttainmentBucketObjectList ListAttainmentBucketObject = "list"
)
type ListAttribute ¶
type ListAttribute struct {
// Resources in this page.
Data []Attribute `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAttributeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAttribute) RawJSON ¶
func (r ListAttribute) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAttribute) UnmarshalJSON ¶
func (r *ListAttribute) UnmarshalJSON(data []byte) error
type ListAttributeObject ¶
type ListAttributeObject string
Resource type identifier.
const (
ListAttributeObjectList ListAttributeObject = "list"
)
type ListAuditEvent ¶
type ListAuditEvent struct {
// Resources in this page.
Data []AuditEvent `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAuditEventObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAuditEvent) RawJSON ¶
func (r ListAuditEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAuditEvent) UnmarshalJSON ¶
func (r *ListAuditEvent) UnmarshalJSON(data []byte) error
type ListAuditEventObject ¶
type ListAuditEventObject string
Resource type identifier.
const (
ListAuditEventObjectList ListAuditEventObject = "list"
)
type ListAuditFieldChange ¶
type ListAuditFieldChange struct {
// Resources in this page.
Data []AuditFieldChange `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAuditFieldChangeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAuditFieldChange) RawJSON ¶
func (r ListAuditFieldChange) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAuditFieldChange) UnmarshalJSON ¶
func (r *ListAuditFieldChange) UnmarshalJSON(data []byte) error
type ListAuditFieldChangeObject ¶
type ListAuditFieldChangeObject string
Resource type identifier.
const (
ListAuditFieldChangeObjectList ListAuditFieldChangeObject = "list"
)
type ListAvailableTool ¶
type ListAvailableTool struct {
// Resources in this page.
Data []AvailableTool `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListAvailableToolObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListAvailableTool) RawJSON ¶
func (r ListAvailableTool) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListAvailableTool) UnmarshalJSON ¶
func (r *ListAvailableTool) UnmarshalJSON(data []byte) error
type ListAvailableToolObject ¶
type ListAvailableToolObject string
Resource type identifier.
const (
ListAvailableToolObjectList ListAvailableToolObject = "list"
)
type ListCarrier ¶
type ListCarrier struct {
// Resources in this page.
Data []Carrier `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListCarrierObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListCarrier) RawJSON ¶
func (r ListCarrier) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCarrier) UnmarshalJSON ¶
func (r *ListCarrier) UnmarshalJSON(data []byte) error
type ListCarrierObject ¶
type ListCarrierObject string
Resource type identifier.
const (
ListCarrierObjectList ListCarrierObject = "list"
)
type ListConsumption ¶
type ListConsumption struct {
// Resources in this page.
Data []Consumption `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListConsumptionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListConsumption) RawJSON ¶
func (r ListConsumption) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListConsumption) UnmarshalJSON ¶
func (r *ListConsumption) UnmarshalJSON(data []byte) error
type ListConsumptionObject ¶
type ListConsumptionObject string
Resource type identifier.
const (
ListConsumptionObjectList ListConsumptionObject = "list"
)
type ListContactMatch ¶
type ListContactMatch struct {
// Resources in this page.
Data []ContactMatch `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListContactMatchObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListContactMatch) RawJSON ¶
func (r ListContactMatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListContactMatch) UnmarshalJSON ¶
func (r *ListContactMatch) UnmarshalJSON(data []byte) error
type ListContactMatchObject ¶
type ListContactMatchObject string
Resource type identifier.
const (
ListContactMatchObjectList ListContactMatchObject = "list"
)
type ListConversation ¶
type ListConversation struct {
// Resources in this page.
Data []Conversation `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListConversationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListConversation) RawJSON ¶
func (r ListConversation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListConversation) UnmarshalJSON ¶
func (r *ListConversation) UnmarshalJSON(data []byte) error
type ListConversationLink ¶
type ListConversationLink struct {
// Resources in this page.
Data []ConversationLink `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListConversationLinkObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListConversationLink) RawJSON ¶
func (r ListConversationLink) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListConversationLink) UnmarshalJSON ¶
func (r *ListConversationLink) UnmarshalJSON(data []byte) error
type ListConversationLinkObject ¶
type ListConversationLinkObject string
Resource type identifier.
const (
ListConversationLinkObjectList ListConversationLinkObject = "list"
)
type ListConversationObject ¶
type ListConversationObject string
Resource type identifier.
const (
ListConversationObjectList ListConversationObject = "list"
)
type ListConversationParticipant ¶
type ListConversationParticipant struct {
// Resources in this page.
Data []ConversationParticipant `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListConversationParticipantObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListConversationParticipant) RawJSON ¶
func (r ListConversationParticipant) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListConversationParticipant) UnmarshalJSON ¶
func (r *ListConversationParticipant) UnmarshalJSON(data []byte) error
type ListConversationParticipantObject ¶
type ListConversationParticipantObject string
Resource type identifier.
const (
ListConversationParticipantObjectList ListConversationParticipantObject = "list"
)
type ListCustomer ¶
type ListCustomer struct {
// Resources in this page.
Data []Customer `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListCustomerObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListCustomer) RawJSON ¶
func (r ListCustomer) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListCustomer) UnmarshalJSON ¶
func (r *ListCustomer) UnmarshalJSON(data []byte) error
type ListCustomerObject ¶
type ListCustomerObject string
Resource type identifier.
const (
ListCustomerObjectList ListCustomerObject = "list"
)
type ListDNSRecord ¶
type ListDNSRecord struct {
// Resources in this page.
Data []DNSRecord `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDNSRecordObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDNSRecord) RawJSON ¶
func (r ListDNSRecord) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDNSRecord) UnmarshalJSON ¶
func (r *ListDNSRecord) UnmarshalJSON(data []byte) error
type ListDNSRecordObject ¶
type ListDNSRecordObject string
Resource type identifier.
const (
ListDNSRecordObjectList ListDNSRecordObject = "list"
)
type ListDeliveryBacklogBucket ¶
type ListDeliveryBacklogBucket struct {
// Resources in this page.
Data []DeliveryBacklogBucket `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDeliveryBacklogBucketObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDeliveryBacklogBucket) RawJSON ¶
func (r ListDeliveryBacklogBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDeliveryBacklogBucket) UnmarshalJSON ¶
func (r *ListDeliveryBacklogBucket) UnmarshalJSON(data []byte) error
type ListDeliveryBacklogBucketObject ¶
type ListDeliveryBacklogBucketObject string
Resource type identifier.
const (
ListDeliveryBacklogBucketObjectList ListDeliveryBacklogBucketObject = "list"
)
type ListDeliveryBreakdown ¶
type ListDeliveryBreakdown struct {
// Resources in this page.
Data []DeliveryBreakdown `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDeliveryBreakdownObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDeliveryBreakdown) RawJSON ¶
func (r ListDeliveryBreakdown) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDeliveryBreakdown) UnmarshalJSON ¶
func (r *ListDeliveryBreakdown) UnmarshalJSON(data []byte) error
type ListDeliveryBreakdownObject ¶
type ListDeliveryBreakdownObject string
Resource type identifier.
const (
ListDeliveryBreakdownObjectList ListDeliveryBreakdownObject = "list"
)
type ListDeliveryLatenessBucket ¶
type ListDeliveryLatenessBucket struct {
// Resources in this page.
Data []DeliveryLatenessBucket `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDeliveryLatenessBucketObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDeliveryLatenessBucket) RawJSON ¶
func (r ListDeliveryLatenessBucket) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDeliveryLatenessBucket) UnmarshalJSON ¶
func (r *ListDeliveryLatenessBucket) UnmarshalJSON(data []byte) error
type ListDeliveryLatenessBucketObject ¶
type ListDeliveryLatenessBucketObject string
Resource type identifier.
const (
ListDeliveryLatenessBucketObjectList ListDeliveryLatenessBucketObject = "list"
)
type ListDeliveryPerformance ¶
type ListDeliveryPerformance struct {
// Resources in this page.
Data []DeliveryPerformance `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDeliveryPerformanceObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDeliveryPerformance) RawJSON ¶
func (r ListDeliveryPerformance) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDeliveryPerformance) UnmarshalJSON ¶
func (r *ListDeliveryPerformance) UnmarshalJSON(data []byte) error
type ListDeliveryPerformanceObject ¶
type ListDeliveryPerformanceObject string
Resource type identifier.
const (
ListDeliveryPerformanceObjectList ListDeliveryPerformanceObject = "list"
)
type ListDemandOverride ¶
type ListDemandOverride struct {
// Resources in this page.
Data []DemandOverride `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDemandOverrideObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDemandOverride) RawJSON ¶
func (r ListDemandOverride) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDemandOverride) UnmarshalJSON ¶
func (r *ListDemandOverride) UnmarshalJSON(data []byte) error
type ListDemandOverrideObject ¶
type ListDemandOverrideObject string
Resource type identifier.
const (
ListDemandOverrideObjectList ListDemandOverrideObject = "list"
)
type ListDemandOverrideType ¶
type ListDemandOverrideType struct {
// Resources in this page.
Data []DemandOverrideType `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDemandOverrideTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDemandOverrideType) RawJSON ¶
func (r ListDemandOverrideType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDemandOverrideType) UnmarshalJSON ¶
func (r *ListDemandOverrideType) UnmarshalJSON(data []byte) error
type ListDemandOverrideTypeObject ¶
type ListDemandOverrideTypeObject string
Resource type identifier.
const (
ListDemandOverrideTypeObjectList ListDemandOverrideTypeObject = "list"
)
type ListDepartment ¶
type ListDepartment struct {
// Resources in this page.
Data []Department `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListDepartmentObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListDepartment) RawJSON ¶
func (r ListDepartment) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListDepartment) UnmarshalJSON ¶
func (r *ListDepartment) UnmarshalJSON(data []byte) error
type ListDepartmentObject ¶
type ListDepartmentObject string
Resource type identifier.
const (
ListDepartmentObjectList ListDepartmentObject = "list"
)
type ListEmailDomain ¶
type ListEmailDomain struct {
// Resources in this page.
Data []EmailDomain `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListEmailDomainObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListEmailDomain) RawJSON ¶
func (r ListEmailDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListEmailDomain) UnmarshalJSON ¶
func (r *ListEmailDomain) UnmarshalJSON(data []byte) error
type ListEmailDomainObject ¶
type ListEmailDomainObject string
Resource type identifier.
const (
ListEmailDomainObjectList ListEmailDomainObject = "list"
)
type ListEmailInbox ¶
type ListEmailInbox struct {
// Resources in this page.
Data []EmailInbox `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListEmailInboxObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListEmailInbox) RawJSON ¶
func (r ListEmailInbox) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListEmailInbox) UnmarshalJSON ¶
func (r *ListEmailInbox) UnmarshalJSON(data []byte) error
type ListEmailInboxObject ¶
type ListEmailInboxObject string
Resource type identifier.
const (
ListEmailInboxObjectList ListEmailInboxObject = "list"
)
type ListEmailLog ¶
type ListEmailLog struct {
// Resources in this page.
Data []EmailLog `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListEmailLogObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListEmailLog) RawJSON ¶
func (r ListEmailLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListEmailLog) UnmarshalJSON ¶
func (r *ListEmailLog) UnmarshalJSON(data []byte) error
type ListEmailLogObject ¶
type ListEmailLogObject string
Resource type identifier.
const (
ListEmailLogObjectList ListEmailLogObject = "list"
)
type ListEntity ¶
type ListEntity struct {
// Resources in this page.
Data []Entity `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListEntityObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListEntity) RawJSON ¶
func (r ListEntity) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListEntity) UnmarshalJSON ¶
func (r *ListEntity) UnmarshalJSON(data []byte) error
type ListEntityObject ¶
type ListEntityObject string
Resource type identifier.
const (
ListEntityObjectList ListEntityObject = "list"
)
type ListFrozenAdherence ¶
type ListFrozenAdherence struct {
// Resources in this page.
Data []FrozenAdherence `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListFrozenAdherenceObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListFrozenAdherence) RawJSON ¶
func (r ListFrozenAdherence) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListFrozenAdherence) UnmarshalJSON ¶
func (r *ListFrozenAdherence) UnmarshalJSON(data []byte) error
type ListFrozenAdherenceObject ¶
type ListFrozenAdherenceObject string
Resource type identifier.
const (
ListFrozenAdherenceObjectList ListFrozenAdherenceObject = "list"
)
type ListFulfillmentRecommendation ¶
type ListFulfillmentRecommendation struct {
// Resources in this page.
Data []FulfillmentRecommendation `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListFulfillmentRecommendationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListFulfillmentRecommendation) RawJSON ¶
func (r ListFulfillmentRecommendation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListFulfillmentRecommendation) UnmarshalJSON ¶
func (r *ListFulfillmentRecommendation) UnmarshalJSON(data []byte) error
type ListFulfillmentRecommendationObject ¶
type ListFulfillmentRecommendationObject string
Resource type identifier.
const (
ListFulfillmentRecommendationObjectList ListFulfillmentRecommendationObject = "list"
)
type ListInventoryChangeLog ¶ added in v0.20.0
type ListInventoryChangeLog struct {
// Resources in this page.
Data []InventoryChangeLog `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListInventoryChangeLogObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListInventoryChangeLog) RawJSON ¶ added in v0.20.0
func (r ListInventoryChangeLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListInventoryChangeLog) UnmarshalJSON ¶ added in v0.20.0
func (r *ListInventoryChangeLog) UnmarshalJSON(data []byte) error
type ListInventoryChangeLogObject ¶ added in v0.20.0
type ListInventoryChangeLogObject string
Resource type identifier.
const (
ListInventoryChangeLogObjectList ListInventoryChangeLogObject = "list"
)
type ListItem ¶
type ListItem struct {
// Resources in this page.
Data []Item `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListItemObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListItem) UnmarshalJSON ¶
type ListItemCategory ¶
type ListItemCategory struct {
// Resources in this page.
Data []ItemCategory `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListItemCategoryObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListItemCategory) RawJSON ¶
func (r ListItemCategory) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListItemCategory) UnmarshalJSON ¶
func (r *ListItemCategory) UnmarshalJSON(data []byte) error
type ListItemCategoryObject ¶
type ListItemCategoryObject string
Resource type identifier.
const (
ListItemCategoryObjectList ListItemCategoryObject = "list"
)
type ListItemObject ¶
type ListItemObject string
Resource type identifier.
const (
ListItemObjectList ListItemObject = "list"
)
type ListJobResult ¶
type ListJobResult struct {
// Resources in this page.
Data []JobResult `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListJobResultObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListJobResult) RawJSON ¶
func (r ListJobResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListJobResult) UnmarshalJSON ¶
func (r *ListJobResult) UnmarshalJSON(data []byte) error
type ListJobResultObject ¶
type ListJobResultObject string
Resource type identifier.
const (
ListJobResultObjectList ListJobResultObject = "list"
)
type ListLocation ¶
type ListLocation struct {
// Resources in this page.
Data []Location `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListLocationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListLocation) RawJSON ¶
func (r ListLocation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListLocation) UnmarshalJSON ¶
func (r *ListLocation) UnmarshalJSON(data []byte) error
type ListLocationObject ¶
type ListLocationObject string
Resource type identifier.
const (
ListLocationObjectList ListLocationObject = "list"
)
type ListLocationType ¶
type ListLocationType struct {
// Resources in this page.
Data []LocationType `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListLocationTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListLocationType) RawJSON ¶
func (r ListLocationType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListLocationType) UnmarshalJSON ¶
func (r *ListLocationType) UnmarshalJSON(data []byte) error
type ListLocationTypeObject ¶
type ListLocationTypeObject string
Resource type identifier.
const (
ListLocationTypeObjectList ListLocationTypeObject = "list"
)
type ListMachine ¶
type ListMachine struct {
// Resources in this page.
Data []Machine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMachineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMachine) RawJSON ¶
func (r ListMachine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMachine) UnmarshalJSON ¶
func (r *ListMachine) UnmarshalJSON(data []byte) error
type ListMachineDowntimeEvent ¶
type ListMachineDowntimeEvent struct {
// Resources in this page.
Data []MachineDowntimeEvent `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMachineDowntimeEventObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMachineDowntimeEvent) RawJSON ¶
func (r ListMachineDowntimeEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMachineDowntimeEvent) UnmarshalJSON ¶
func (r *ListMachineDowntimeEvent) UnmarshalJSON(data []byte) error
type ListMachineDowntimeEventObject ¶
type ListMachineDowntimeEventObject string
Resource type identifier.
const (
ListMachineDowntimeEventObjectList ListMachineDowntimeEventObject = "list"
)
type ListMachineDowntimeReason ¶
type ListMachineDowntimeReason struct {
// Resources in this page.
Data []MachineDowntimeReason `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMachineDowntimeReasonObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMachineDowntimeReason) RawJSON ¶
func (r ListMachineDowntimeReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMachineDowntimeReason) UnmarshalJSON ¶
func (r *ListMachineDowntimeReason) UnmarshalJSON(data []byte) error
type ListMachineDowntimeReasonObject ¶
type ListMachineDowntimeReasonObject string
Resource type identifier.
const (
ListMachineDowntimeReasonObjectList ListMachineDowntimeReasonObject = "list"
)
type ListMachineObject ¶
type ListMachineObject string
Resource type identifier.
const (
ListMachineObjectList ListMachineObject = "list"
)
type ListMachineStatus ¶
type ListMachineStatus struct {
// Resources in this page.
Data []MachineStatus `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMachineStatusObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMachineStatus) RawJSON ¶
func (r ListMachineStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMachineStatus) UnmarshalJSON ¶
func (r *ListMachineStatus) UnmarshalJSON(data []byte) error
type ListMachineStatusObject ¶
type ListMachineStatusObject string
Resource type identifier.
const (
ListMachineStatusObjectList ListMachineStatusObject = "list"
)
type ListMaterial ¶
type ListMaterial struct {
// Resources in this page.
Data []Material `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMaterialObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMaterial) RawJSON ¶
func (r ListMaterial) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMaterial) UnmarshalJSON ¶
func (r *ListMaterial) UnmarshalJSON(data []byte) error
type ListMaterialObject ¶
type ListMaterialObject string
Resource type identifier.
const (
ListMaterialObjectList ListMaterialObject = "list"
)
type ListMessage ¶
type ListMessage struct {
// Resources in this page.
Data []Message `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMessageObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMessage) RawJSON ¶
func (r ListMessage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMessage) UnmarshalJSON ¶
func (r *ListMessage) UnmarshalJSON(data []byte) error
type ListMessageAttachment ¶
type ListMessageAttachment struct {
// Resources in this page.
Data []MessageAttachment `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMessageAttachmentObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMessageAttachment) RawJSON ¶
func (r ListMessageAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMessageAttachment) UnmarshalJSON ¶
func (r *ListMessageAttachment) UnmarshalJSON(data []byte) error
type ListMessageAttachmentObject ¶
type ListMessageAttachmentObject string
Resource type identifier.
const (
ListMessageAttachmentObjectList ListMessageAttachmentObject = "list"
)
type ListMessageObject ¶
type ListMessageObject string
Resource type identifier.
const (
ListMessageObjectList ListMessageObject = "list"
)
type ListMessagingBlock ¶
type ListMessagingBlock struct {
// Resources in this page.
Data []MessagingBlock `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMessagingBlockObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMessagingBlock) RawJSON ¶
func (r ListMessagingBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMessagingBlock) UnmarshalJSON ¶
func (r *ListMessagingBlock) UnmarshalJSON(data []byte) error
type ListMessagingBlockObject ¶
type ListMessagingBlockObject string
Resource type identifier.
const (
ListMessagingBlockObjectList ListMessagingBlockObject = "list"
)
type ListMessagingGroup ¶
type ListMessagingGroup struct {
// Resources in this page.
Data []MessagingGroup `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMessagingGroupObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMessagingGroup) RawJSON ¶
func (r ListMessagingGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMessagingGroup) UnmarshalJSON ¶
func (r *ListMessagingGroup) UnmarshalJSON(data []byte) error
type ListMessagingGroupMember ¶
type ListMessagingGroupMember struct {
// Resources in this page.
Data []MessagingGroupMember `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListMessagingGroupMemberObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListMessagingGroupMember) RawJSON ¶
func (r ListMessagingGroupMember) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListMessagingGroupMember) UnmarshalJSON ¶
func (r *ListMessagingGroupMember) UnmarshalJSON(data []byte) error
type ListMessagingGroupMemberObject ¶
type ListMessagingGroupMemberObject string
Resource type identifier.
const (
ListMessagingGroupMemberObjectList ListMessagingGroupMemberObject = "list"
)
type ListMessagingGroupObject ¶
type ListMessagingGroupObject string
Resource type identifier.
const (
ListMessagingGroupObjectList ListMessagingGroupObject = "list"
)
type ListNotification ¶
type ListNotification struct {
// Resources in this page.
Data []Notification `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListNotificationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListNotification) RawJSON ¶
func (r ListNotification) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListNotification) UnmarshalJSON ¶
func (r *ListNotification) UnmarshalJSON(data []byte) error
type ListNotificationObject ¶
type ListNotificationObject string
Resource type identifier.
const (
ListNotificationObjectList ListNotificationObject = "list"
)
type ListNotificationPreference ¶
type ListNotificationPreference struct {
// Resources in this page.
Data []NotificationPreference `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListNotificationPreferenceObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListNotificationPreference) RawJSON ¶
func (r ListNotificationPreference) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListNotificationPreference) UnmarshalJSON ¶
func (r *ListNotificationPreference) UnmarshalJSON(data []byte) error
type ListNotificationPreferenceObject ¶
type ListNotificationPreferenceObject string
Resource type identifier.
const (
ListNotificationPreferenceObjectList ListNotificationPreferenceObject = "list"
)
type ListNotificationUnreadSummaryAccount ¶
type ListNotificationUnreadSummaryAccount struct {
// Resources in this page.
Data []NotificationUnreadSummaryAccount `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListNotificationUnreadSummaryAccountObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListNotificationUnreadSummaryAccount) RawJSON ¶
func (r ListNotificationUnreadSummaryAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListNotificationUnreadSummaryAccount) UnmarshalJSON ¶
func (r *ListNotificationUnreadSummaryAccount) UnmarshalJSON(data []byte) error
type ListNotificationUnreadSummaryAccountObject ¶
type ListNotificationUnreadSummaryAccountObject string
Resource type identifier.
const (
ListNotificationUnreadSummaryAccountObjectList ListNotificationUnreadSummaryAccountObject = "list"
)
type ListObjectType ¶
type ListObjectType struct {
// Resources in this page.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
Data []string `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListObjectTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListObjectType) RawJSON ¶
func (r ListObjectType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListObjectType) UnmarshalJSON ¶
func (r *ListObjectType) UnmarshalJSON(data []byte) error
type ListObjectTypeObject ¶
type ListObjectTypeObject string
Resource type identifier.
const (
ListObjectTypeObjectList ListObjectTypeObject = "list"
)
type ListOeeDepartment ¶
type ListOeeDepartment struct {
// Resources in this page.
Data []OeeDepartment `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOeeDepartmentObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOeeDepartment) RawJSON ¶
func (r ListOeeDepartment) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOeeDepartment) UnmarshalJSON ¶
func (r *ListOeeDepartment) UnmarshalJSON(data []byte) error
type ListOeeDepartmentObject ¶
type ListOeeDepartmentObject string
Resource type identifier.
const (
ListOeeDepartmentObjectList ListOeeDepartmentObject = "list"
)
type ListOeeDowntimeReason ¶
type ListOeeDowntimeReason struct {
// Resources in this page.
Data []OeeDowntimeReason `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOeeDowntimeReasonObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOeeDowntimeReason) RawJSON ¶
func (r ListOeeDowntimeReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOeeDowntimeReason) UnmarshalJSON ¶
func (r *ListOeeDowntimeReason) UnmarshalJSON(data []byte) error
type ListOeeDowntimeReasonObject ¶
type ListOeeDowntimeReasonObject string
Resource type identifier.
const (
ListOeeDowntimeReasonObjectList ListOeeDowntimeReasonObject = "list"
)
type ListOeeTrendPeriod ¶
type ListOeeTrendPeriod struct {
// Resources in this page.
Data []OeeTrendPeriod `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOeeTrendPeriodObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOeeTrendPeriod) RawJSON ¶
func (r ListOeeTrendPeriod) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOeeTrendPeriod) UnmarshalJSON ¶
func (r *ListOeeTrendPeriod) UnmarshalJSON(data []byte) error
type ListOeeTrendPeriodObject ¶
type ListOeeTrendPeriodObject string
Resource type identifier.
const (
ListOeeTrendPeriodObjectList ListOeeTrendPeriodObject = "list"
)
type ListOperatingCalendar ¶
type ListOperatingCalendar struct {
// Resources in this page.
Data []OperatingCalendar `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOperatingCalendarObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOperatingCalendar) RawJSON ¶
func (r ListOperatingCalendar) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOperatingCalendar) UnmarshalJSON ¶
func (r *ListOperatingCalendar) UnmarshalJSON(data []byte) error
type ListOperatingCalendarClosure ¶
type ListOperatingCalendarClosure struct {
// Resources in this page.
Data []OperatingCalendarClosure `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOperatingCalendarClosureObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOperatingCalendarClosure) RawJSON ¶
func (r ListOperatingCalendarClosure) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOperatingCalendarClosure) UnmarshalJSON ¶
func (r *ListOperatingCalendarClosure) UnmarshalJSON(data []byte) error
type ListOperatingCalendarClosureObject ¶
type ListOperatingCalendarClosureObject string
Resource type identifier.
const (
ListOperatingCalendarClosureObjectList ListOperatingCalendarClosureObject = "list"
)
type ListOperatingCalendarObject ¶
type ListOperatingCalendarObject string
Resource type identifier.
const (
ListOperatingCalendarObjectList ListOperatingCalendarObject = "list"
)
type ListOrderDiscount ¶
type ListOrderDiscount struct {
// Resources in this page.
Data []OrderDiscount `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListOrderDiscountObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListOrderDiscount) RawJSON ¶
func (r ListOrderDiscount) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListOrderDiscount) UnmarshalJSON ¶
func (r *ListOrderDiscount) UnmarshalJSON(data []byte) error
type ListOrderDiscountObject ¶
type ListOrderDiscountObject string
Resource type identifier.
const (
ListOrderDiscountObjectList ListOrderDiscountObject = "list"
)
type ListPart ¶
type ListPart struct {
// Resources in this page.
Data []Part `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPartObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListPart) UnmarshalJSON ¶
type ListPartObject ¶
type ListPartObject string
Resource type identifier.
const (
ListPartObjectList ListPartObject = "list"
)
type ListPaymentTerm ¶
type ListPaymentTerm struct {
// Resources in this page.
Data []PaymentTerm `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPaymentTermObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPaymentTerm) RawJSON ¶
func (r ListPaymentTerm) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPaymentTerm) UnmarshalJSON ¶
func (r *ListPaymentTerm) UnmarshalJSON(data []byte) error
type ListPaymentTermObject ¶
type ListPaymentTermObject string
Resource type identifier.
const (
ListPaymentTermObjectList ListPaymentTermObject = "list"
)
type ListPermission ¶
type ListPermission struct {
// Resources in this page.
Data []Permission `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPermissionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPermission) RawJSON ¶
func (r ListPermission) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPermission) UnmarshalJSON ¶
func (r *ListPermission) UnmarshalJSON(data []byte) error
type ListPermissionGroup ¶
type ListPermissionGroup struct {
// Resources in this page.
Data []PermissionGroup `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPermissionGroupObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPermissionGroup) RawJSON ¶
func (r ListPermissionGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPermissionGroup) UnmarshalJSON ¶
func (r *ListPermissionGroup) UnmarshalJSON(data []byte) error
type ListPermissionGroupObject ¶
type ListPermissionGroupObject string
Resource type identifier.
const (
ListPermissionGroupObjectList ListPermissionGroupObject = "list"
)
type ListPermissionObject ¶
type ListPermissionObject string
Resource type identifier.
const (
ListPermissionObjectList ListPermissionObject = "list"
)
type ListPick ¶ added in v0.20.0
type ListPick struct {
// Resources in this page.
Data []Pick `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPickObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListPick) UnmarshalJSON ¶ added in v0.20.0
type ListPickLine ¶ added in v0.20.0
type ListPickLine struct {
// Resources in this page.
Data []PickLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPickLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPickLine) RawJSON ¶ added in v0.20.0
func (r ListPickLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPickLine) UnmarshalJSON ¶ added in v0.20.0
func (r *ListPickLine) UnmarshalJSON(data []byte) error
type ListPickLineObject ¶ added in v0.20.0
type ListPickLineObject string
Resource type identifier.
const (
ListPickLineObjectList ListPickLineObject = "list"
)
type ListPickObject ¶ added in v0.20.0
type ListPickObject string
Resource type identifier.
const (
ListPickObjectList ListPickObject = "list"
)
type ListPortalDomain ¶
type ListPortalDomain struct {
// Resources in this page.
Data []PortalDomain `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPortalDomainObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPortalDomain) RawJSON ¶
func (r ListPortalDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPortalDomain) UnmarshalJSON ¶
func (r *ListPortalDomain) UnmarshalJSON(data []byte) error
type ListPortalDomainObject ¶
type ListPortalDomainObject string
Resource type identifier.
const (
ListPortalDomainObjectList ListPortalDomainObject = "list"
)
type ListPriority ¶
type ListPriority struct {
// Resources in this page.
Data []Priority `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPriorityObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListPriority) RawJSON ¶
func (r ListPriority) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListPriority) UnmarshalJSON ¶
func (r *ListPriority) UnmarshalJSON(data []byte) error
type ListPriorityObject ¶
type ListPriorityObject string
Resource type identifier.
const (
ListPriorityObjectList ListPriorityObject = "list"
)
type ListProduct ¶
type ListProduct struct {
// Resources in this page.
Data []Product `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProduct) RawJSON ¶
func (r ListProduct) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProduct) UnmarshalJSON ¶
func (r *ListProduct) UnmarshalJSON(data []byte) error
type ListProductLine ¶
type ListProductLine struct {
// Resources in this page.
Data []ProductLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductLine) RawJSON ¶
func (r ListProductLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductLine) UnmarshalJSON ¶
func (r *ListProductLine) UnmarshalJSON(data []byte) error
type ListProductLineObject ¶
type ListProductLineObject string
Resource type identifier.
const (
ListProductLineObjectList ListProductLineObject = "list"
)
type ListProductObject ¶
type ListProductObject string
Resource type identifier.
const (
ListProductObjectList ListProductObject = "list"
)
type ListProductionSchedule ¶
type ListProductionSchedule struct {
// Resources in this page.
Data []ProductionSchedule `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionSchedule) RawJSON ¶
func (r ListProductionSchedule) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionSchedule) UnmarshalJSON ¶
func (r *ListProductionSchedule) UnmarshalJSON(data []byte) error
type ListProductionScheduleDerivedLine ¶
type ListProductionScheduleDerivedLine struct {
// Resources in this page.
Data []ProductionScheduleDerivedLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleDerivedLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleDerivedLine) RawJSON ¶
func (r ListProductionScheduleDerivedLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleDerivedLine) UnmarshalJSON ¶
func (r *ListProductionScheduleDerivedLine) UnmarshalJSON(data []byte) error
type ListProductionScheduleDerivedLineObject ¶
type ListProductionScheduleDerivedLineObject string
Resource type identifier.
const (
ListProductionScheduleDerivedLineObjectList ListProductionScheduleDerivedLineObject = "list"
)
type ListProductionScheduleDeviation ¶
type ListProductionScheduleDeviation struct {
// Resources in this page.
Data []ProductionScheduleDeviation `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleDeviationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleDeviation) RawJSON ¶
func (r ListProductionScheduleDeviation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleDeviation) UnmarshalJSON ¶
func (r *ListProductionScheduleDeviation) UnmarshalJSON(data []byte) error
type ListProductionScheduleDeviationObject ¶
type ListProductionScheduleDeviationObject string
Resource type identifier.
const (
ListProductionScheduleDeviationObjectList ListProductionScheduleDeviationObject = "list"
)
type ListProductionScheduleFinishedPolicy ¶
type ListProductionScheduleFinishedPolicy struct {
// Resources in this page.
Data []ProductionScheduleFinishedPolicy `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleFinishedPolicyObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleFinishedPolicy) RawJSON ¶
func (r ListProductionScheduleFinishedPolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleFinishedPolicy) UnmarshalJSON ¶
func (r *ListProductionScheduleFinishedPolicy) UnmarshalJSON(data []byte) error
type ListProductionScheduleFinishedPolicyObject ¶
type ListProductionScheduleFinishedPolicyObject string
Resource type identifier.
const (
ListProductionScheduleFinishedPolicyObjectList ListProductionScheduleFinishedPolicyObject = "list"
)
type ListProductionScheduleFinishingLine ¶
type ListProductionScheduleFinishingLine struct {
// Resources in this page.
Data []ProductionScheduleFinishingLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleFinishingLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleFinishingLine) RawJSON ¶
func (r ListProductionScheduleFinishingLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleFinishingLine) UnmarshalJSON ¶
func (r *ListProductionScheduleFinishingLine) UnmarshalJSON(data []byte) error
type ListProductionScheduleFinishingLineObject ¶
type ListProductionScheduleFinishingLineObject string
Resource type identifier.
const (
ListProductionScheduleFinishingLineObjectList ListProductionScheduleFinishingLineObject = "list"
)
type ListProductionScheduleItemPolicy ¶
type ListProductionScheduleItemPolicy struct {
// Resources in this page.
Data []ProductionScheduleItemPolicy `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleItemPolicyObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleItemPolicy) RawJSON ¶
func (r ListProductionScheduleItemPolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleItemPolicy) UnmarshalJSON ¶
func (r *ListProductionScheduleItemPolicy) UnmarshalJSON(data []byte) error
type ListProductionScheduleItemPolicyObject ¶
type ListProductionScheduleItemPolicyObject string
Resource type identifier.
const (
ListProductionScheduleItemPolicyObjectList ListProductionScheduleItemPolicyObject = "list"
)
type ListProductionScheduleItemSetting ¶
type ListProductionScheduleItemSetting struct {
// Resources in this page.
Data []ProductionScheduleItemSetting `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleItemSettingObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleItemSetting) RawJSON ¶
func (r ListProductionScheduleItemSetting) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleItemSetting) UnmarshalJSON ¶
func (r *ListProductionScheduleItemSetting) UnmarshalJSON(data []byte) error
type ListProductionScheduleItemSettingObject ¶
type ListProductionScheduleItemSettingObject string
Resource type identifier.
const (
ListProductionScheduleItemSettingObjectList ListProductionScheduleItemSettingObject = "list"
)
type ListProductionScheduleLine ¶
type ListProductionScheduleLine struct {
// Resources in this page.
Data []ProductionScheduleLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleLine) RawJSON ¶
func (r ListProductionScheduleLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleLine) UnmarshalJSON ¶
func (r *ListProductionScheduleLine) UnmarshalJSON(data []byte) error
type ListProductionScheduleLineObject ¶
type ListProductionScheduleLineObject string
Resource type identifier.
const (
ListProductionScheduleLineObjectList ListProductionScheduleLineObject = "list"
)
type ListProductionScheduleObject ¶
type ListProductionScheduleObject string
Resource type identifier.
const (
ListProductionScheduleObjectList ListProductionScheduleObject = "list"
)
type ListProductionScheduleResourceSetting ¶
type ListProductionScheduleResourceSetting struct {
// Resources in this page.
Data []ProductionScheduleResourceSetting `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionScheduleResourceSettingObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionScheduleResourceSetting) RawJSON ¶
func (r ListProductionScheduleResourceSetting) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionScheduleResourceSetting) UnmarshalJSON ¶
func (r *ListProductionScheduleResourceSetting) UnmarshalJSON(data []byte) error
type ListProductionScheduleResourceSettingObject ¶
type ListProductionScheduleResourceSettingObject string
Resource type identifier.
const (
ListProductionScheduleResourceSettingObjectList ListProductionScheduleResourceSettingObject = "list"
)
type ListProductionStep ¶
type ListProductionStep struct {
// Resources in this page.
Data []ProductionStep `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListProductionStepObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProductionStep) RawJSON ¶
func (r ListProductionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProductionStep) UnmarshalJSON ¶
func (r *ListProductionStep) UnmarshalJSON(data []byte) error
type ListProductionStepObject ¶
type ListProductionStepObject string
Resource type identifier.
const (
ListProductionStepObjectList ListProductionStepObject = "list"
)
type ListProperty ¶
type ListProperty struct {
// Resources in this page.
Data []Property `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListPropertyObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListProperty) RawJSON ¶
func (r ListProperty) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListProperty) UnmarshalJSON ¶
func (r *ListProperty) UnmarshalJSON(data []byte) error
type ListPropertyObject ¶
type ListPropertyObject string
Resource type identifier.
const (
ListPropertyObjectList ListPropertyObject = "list"
)
type ListQuotedSalesOrderLine ¶
type ListQuotedSalesOrderLine struct {
// Resources in this page.
Data []QuotedSalesOrderLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListQuotedSalesOrderLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListQuotedSalesOrderLine) RawJSON ¶
func (r ListQuotedSalesOrderLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListQuotedSalesOrderLine) UnmarshalJSON ¶
func (r *ListQuotedSalesOrderLine) UnmarshalJSON(data []byte) error
type ListQuotedSalesOrderLineObject ¶
type ListQuotedSalesOrderLineObject string
Resource type identifier.
const (
ListQuotedSalesOrderLineObjectList ListQuotedSalesOrderLineObject = "list"
)
type ListRateShopOption ¶
type ListRateShopOption struct {
// Resources in this page.
Data []RateShopOption `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListRateShopOptionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListRateShopOption) RawJSON ¶
func (r ListRateShopOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRateShopOption) UnmarshalJSON ¶
func (r *ListRateShopOption) UnmarshalJSON(data []byte) error
type ListRateShopOptionObject ¶
type ListRateShopOptionObject string
Resource type identifier.
const (
ListRateShopOptionObjectList ListRateShopOptionObject = "list"
)
type ListReconcileErrorResult ¶
type ListReconcileErrorResult struct {
// Resources in this page.
Data []ReconcileErrorResult `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListReconcileErrorResultObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListReconcileErrorResult) RawJSON ¶
func (r ListReconcileErrorResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListReconcileErrorResult) UnmarshalJSON ¶
func (r *ListReconcileErrorResult) UnmarshalJSON(data []byte) error
type ListReconcileErrorResultObject ¶
type ListReconcileErrorResultObject string
Resource type identifier.
const (
ListReconcileErrorResultObjectList ListReconcileErrorResultObject = "list"
)
type ListReconciledItemResult ¶
type ListReconciledItemResult struct {
// Resources in this page.
Data []ReconciledItemResult `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListReconciledItemResultObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListReconciledItemResult) RawJSON ¶
func (r ListReconciledItemResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListReconciledItemResult) UnmarshalJSON ¶
func (r *ListReconciledItemResult) UnmarshalJSON(data []byte) error
type ListReconciledItemResultObject ¶
type ListReconciledItemResultObject string
Resource type identifier.
const (
ListReconciledItemResultObjectList ListReconciledItemResultObject = "list"
)
type ListRecord ¶
type ListRecord struct {
// Resources in this page.
Data []Record `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListRecordObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListRecord) RawJSON ¶
func (r ListRecord) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRecord) UnmarshalJSON ¶
func (r *ListRecord) UnmarshalJSON(data []byte) error
type ListRecordObject ¶
type ListRecordObject string
Resource type identifier.
const (
ListRecordObjectList ListRecordObject = "list"
)
type ListReleaseScheduleBatch ¶
type ListReleaseScheduleBatch struct {
// Resources in this page.
Data []ReleaseScheduleBatch `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListReleaseScheduleBatchObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListReleaseScheduleBatch) RawJSON ¶
func (r ListReleaseScheduleBatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListReleaseScheduleBatch) UnmarshalJSON ¶
func (r *ListReleaseScheduleBatch) UnmarshalJSON(data []byte) error
type ListReleaseScheduleBatchObject ¶
type ListReleaseScheduleBatchObject string
Resource type identifier.
const (
ListReleaseScheduleBatchObjectList ListReleaseScheduleBatchObject = "list"
)
type ListReleasedScheduleLine ¶
type ListReleasedScheduleLine struct {
// Resources in this page.
Data []ReleasedScheduleLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListReleasedScheduleLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListReleasedScheduleLine) RawJSON ¶
func (r ListReleasedScheduleLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListReleasedScheduleLine) UnmarshalJSON ¶
func (r *ListReleasedScheduleLine) UnmarshalJSON(data []byte) error
type ListReleasedScheduleLineObject ¶
type ListReleasedScheduleLineObject string
Resource type identifier.
const (
ListReleasedScheduleLineObjectList ListReleasedScheduleLineObject = "list"
)
type ListRequestLog ¶
type ListRequestLog struct {
// Resources in this page.
Data []RequestLog `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListRequestLogObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListRequestLog) RawJSON ¶
func (r ListRequestLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListRequestLog) UnmarshalJSON ¶
func (r *ListRequestLog) UnmarshalJSON(data []byte) error
type ListRequestLogObject ¶
type ListRequestLogObject string
Resource type identifier.
const (
ListRequestLogObjectList ListRequestLogObject = "list"
)
type ListRole ¶
type ListRole struct {
// Resources in this page.
Data []Role `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListRoleObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListRole) UnmarshalJSON ¶
type ListRoleObject ¶
type ListRoleObject string
Resource type identifier.
const (
ListRoleObjectList ListRoleObject = "list"
)
type ListSalesOrder ¶
type ListSalesOrder struct {
// Resources in this page.
Data []SalesOrder `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSalesOrderObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSalesOrder) RawJSON ¶
func (r ListSalesOrder) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSalesOrder) UnmarshalJSON ¶
func (r *ListSalesOrder) UnmarshalJSON(data []byte) error
type ListSalesOrderLine ¶
type ListSalesOrderLine struct {
// Resources in this page.
Data []SalesOrderLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSalesOrderLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSalesOrderLine) RawJSON ¶
func (r ListSalesOrderLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSalesOrderLine) UnmarshalJSON ¶
func (r *ListSalesOrderLine) UnmarshalJSON(data []byte) error
type ListSalesOrderLineObject ¶
type ListSalesOrderLineObject string
Resource type identifier.
const (
ListSalesOrderLineObjectList ListSalesOrderLineObject = "list"
)
type ListSalesOrderObject ¶
type ListSalesOrderObject string
Resource type identifier.
const (
ListSalesOrderObjectList ListSalesOrderObject = "list"
)
type ListSalesOrderStatus ¶
type ListSalesOrderStatus struct {
// Resources in this page.
Data []SalesOrderStatus `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSalesOrderStatusObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSalesOrderStatus) RawJSON ¶
func (r ListSalesOrderStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSalesOrderStatus) UnmarshalJSON ¶
func (r *ListSalesOrderStatus) UnmarshalJSON(data []byte) error
type ListSalesOrderStatusObject ¶
type ListSalesOrderStatusObject string
Resource type identifier.
const (
ListSalesOrderStatusObjectList ListSalesOrderStatusObject = "list"
)
type ListSalesTarget ¶
type ListSalesTarget struct {
// Resources in this page.
Data []SalesTarget `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSalesTargetObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSalesTarget) RawJSON ¶
func (r ListSalesTarget) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSalesTarget) UnmarshalJSON ¶
func (r *ListSalesTarget) UnmarshalJSON(data []byte) error
type ListSalesTargetObject ¶
type ListSalesTargetObject string
Resource type identifier.
const (
ListSalesTargetObjectList ListSalesTargetObject = "list"
)
type ListSandbox ¶
type ListSandbox struct {
// Resources in this page.
Data []Sandbox `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSandboxObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSandbox) RawJSON ¶
func (r ListSandbox) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSandbox) UnmarshalJSON ¶
func (r *ListSandbox) UnmarshalJSON(data []byte) error
type ListSandboxObject ¶
type ListSandboxObject string
Resource type identifier.
const (
ListSandboxObjectList ListSandboxObject = "list"
)
type ListScanningStation ¶
type ListScanningStation struct {
// Resources in this page.
Data []ScanningStation `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScanningStationObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScanningStation) RawJSON ¶
func (r ListScanningStation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScanningStation) UnmarshalJSON ¶
func (r *ListScanningStation) UnmarshalJSON(data []byte) error
type ListScanningStationObject ¶
type ListScanningStationObject string
Resource type identifier.
const (
ListScanningStationObjectList ListScanningStationObject = "list"
)
type ListScheduleAppliedOverride ¶
type ListScheduleAppliedOverride struct {
// Resources in this page.
Data []ScheduleAppliedOverride `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleAppliedOverrideObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleAppliedOverride) RawJSON ¶
func (r ListScheduleAppliedOverride) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleAppliedOverride) UnmarshalJSON ¶
func (r *ListScheduleAppliedOverride) UnmarshalJSON(data []byte) error
type ListScheduleAppliedOverrideObject ¶
type ListScheduleAppliedOverrideObject string
Resource type identifier.
const (
ListScheduleAppliedOverrideObjectList ListScheduleAppliedOverrideObject = "list"
)
type ListScheduleAtRiskOrder ¶
type ListScheduleAtRiskOrder struct {
// Resources in this page.
Data []ScheduleAtRiskOrder `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleAtRiskOrderObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleAtRiskOrder) RawJSON ¶
func (r ListScheduleAtRiskOrder) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleAtRiskOrder) UnmarshalJSON ¶
func (r *ListScheduleAtRiskOrder) UnmarshalJSON(data []byte) error
type ListScheduleAtRiskOrderObject ¶
type ListScheduleAtRiskOrderObject string
Resource type identifier.
const (
ListScheduleAtRiskOrderObjectList ListScheduleAtRiskOrderObject = "list"
)
type ListScheduleCampaign ¶
type ListScheduleCampaign struct {
// Resources in this page.
Data []ScheduleCampaign `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleCampaignObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleCampaign) RawJSON ¶
func (r ListScheduleCampaign) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleCampaign) UnmarshalJSON ¶
func (r *ListScheduleCampaign) UnmarshalJSON(data []byte) error
type ListScheduleCampaignObject ¶
type ListScheduleCampaignObject string
Resource type identifier.
const (
ListScheduleCampaignObjectList ListScheduleCampaignObject = "list"
)
type ListScheduleDeviationType ¶
type ListScheduleDeviationType struct {
// Resources in this page.
Data []ScheduleDeviationType `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleDeviationTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleDeviationType) RawJSON ¶
func (r ListScheduleDeviationType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleDeviationType) UnmarshalJSON ¶
func (r *ListScheduleDeviationType) UnmarshalJSON(data []byte) error
type ListScheduleDeviationTypeObject ¶
type ListScheduleDeviationTypeObject string
Resource type identifier.
const (
ListScheduleDeviationTypeObjectList ListScheduleDeviationTypeObject = "list"
)
type ListScheduleDiffLine ¶
type ListScheduleDiffLine struct {
// Resources in this page.
Data []ScheduleDiffLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleDiffLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleDiffLine) RawJSON ¶
func (r ListScheduleDiffLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleDiffLine) UnmarshalJSON ¶
func (r *ListScheduleDiffLine) UnmarshalJSON(data []byte) error
type ListScheduleDiffLineObject ¶
type ListScheduleDiffLineObject string
Resource type identifier.
const (
ListScheduleDiffLineObjectList ListScheduleDiffLineObject = "list"
)
type ListScheduleOrderCoverage ¶
type ListScheduleOrderCoverage struct {
// Resources in this page.
Data []ScheduleOrderCoverage `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleOrderCoverageObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleOrderCoverage) RawJSON ¶
func (r ListScheduleOrderCoverage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleOrderCoverage) UnmarshalJSON ¶
func (r *ListScheduleOrderCoverage) UnmarshalJSON(data []byte) error
type ListScheduleOrderCoverageLine ¶
type ListScheduleOrderCoverageLine struct {
// Resources in this page.
Data []ScheduleOrderCoverageLine `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleOrderCoverageLineObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleOrderCoverageLine) RawJSON ¶
func (r ListScheduleOrderCoverageLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleOrderCoverageLine) UnmarshalJSON ¶
func (r *ListScheduleOrderCoverageLine) UnmarshalJSON(data []byte) error
type ListScheduleOrderCoverageLineObject ¶
type ListScheduleOrderCoverageLineObject string
Resource type identifier.
const (
ListScheduleOrderCoverageLineObjectList ListScheduleOrderCoverageLineObject = "list"
)
type ListScheduleOrderCoverageObject ¶
type ListScheduleOrderCoverageObject string
Resource type identifier.
const (
ListScheduleOrderCoverageObjectList ListScheduleOrderCoverageObject = "list"
)
type ListSchedulePolicy ¶
type ListSchedulePolicy struct {
// Resources in this page.
Data []SchedulePolicy `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSchedulePolicyObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSchedulePolicy) RawJSON ¶
func (r ListSchedulePolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSchedulePolicy) UnmarshalJSON ¶
func (r *ListSchedulePolicy) UnmarshalJSON(data []byte) error
type ListSchedulePolicyObject ¶
type ListSchedulePolicyObject string
Resource type identifier.
const (
ListSchedulePolicyObjectList ListSchedulePolicyObject = "list"
)
type ListScheduleProjection ¶
type ListScheduleProjection struct {
// Resources in this page.
Data []ScheduleProjection `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListScheduleProjectionObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListScheduleProjection) RawJSON ¶
func (r ListScheduleProjection) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListScheduleProjection) UnmarshalJSON ¶
func (r *ListScheduleProjection) UnmarshalJSON(data []byte) error
type ListScheduleProjectionObject ¶
type ListScheduleProjectionObject string
Resource type identifier.
const (
ListScheduleProjectionObjectList ListScheduleProjectionObject = "list"
)
type ListServiceLevel ¶
type ListServiceLevel struct {
// Resources in this page.
Data []ServiceLevel `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListServiceLevelObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListServiceLevel) RawJSON ¶
func (r ListServiceLevel) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListServiceLevel) UnmarshalJSON ¶
func (r *ListServiceLevel) UnmarshalJSON(data []byte) error
type ListServiceLevelObject ¶
type ListServiceLevelObject string
Resource type identifier.
const (
ListServiceLevelObjectList ListServiceLevelObject = "list"
)
type ListShippingTerm ¶
type ListShippingTerm struct {
// Resources in this page.
Data []ShippingTerm `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListShippingTermObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListShippingTerm) RawJSON ¶
func (r ListShippingTerm) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListShippingTerm) UnmarshalJSON ¶
func (r *ListShippingTerm) UnmarshalJSON(data []byte) error
type ListShippingTermObject ¶
type ListShippingTermObject string
Resource type identifier.
const (
ListShippingTermObjectList ListShippingTermObject = "list"
)
type ListSkippedItemResult ¶
type ListSkippedItemResult struct {
// Resources in this page.
Data []SkippedItemResult `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListSkippedItemResultObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListSkippedItemResult) RawJSON ¶
func (r ListSkippedItemResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListSkippedItemResult) UnmarshalJSON ¶
func (r *ListSkippedItemResult) UnmarshalJSON(data []byte) error
type ListSkippedItemResultObject ¶
type ListSkippedItemResultObject string
Resource type identifier.
const (
ListSkippedItemResultObjectList ListSkippedItemResultObject = "list"
)
type ListToolGroup ¶
type ListToolGroup struct {
// Resources in this page.
Data []ToolGroup `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListToolGroupObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListToolGroup) RawJSON ¶
func (r ListToolGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListToolGroup) UnmarshalJSON ¶
func (r *ListToolGroup) UnmarshalJSON(data []byte) error
type ListToolGroupObject ¶
type ListToolGroupObject string
Resource type identifier.
const (
ListToolGroupObjectList ListToolGroupObject = "list"
)
type ListTransactionMethod ¶
type ListTransactionMethod struct {
// Resources in this page.
Data []TransactionMethod `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListTransactionMethodObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListTransactionMethod) RawJSON ¶
func (r ListTransactionMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListTransactionMethod) UnmarshalJSON ¶
func (r *ListTransactionMethod) UnmarshalJSON(data []byte) error
type ListTransactionMethodObject ¶
type ListTransactionMethodObject string
Resource type identifier.
const (
ListTransactionMethodObjectList ListTransactionMethodObject = "list"
)
type ListTransactionType ¶
type ListTransactionType struct {
// Resources in this page.
Data []TransactionType `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListTransactionTypeObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListTransactionType) RawJSON ¶
func (r ListTransactionType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListTransactionType) UnmarshalJSON ¶
func (r *ListTransactionType) UnmarshalJSON(data []byte) error
type ListTransactionTypeObject ¶
type ListTransactionTypeObject string
Resource type identifier.
const (
ListTransactionTypeObjectList ListTransactionTypeObject = "list"
)
type ListUnit ¶
type ListUnit struct {
// Resources in this page.
Data []Unit `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListUnitObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (*ListUnit) UnmarshalJSON ¶
type ListUnitGroup ¶
type ListUnitGroup struct {
// Resources in this page.
Data []UnitGroup `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListUnitGroupObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListUnitGroup) RawJSON ¶
func (r ListUnitGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUnitGroup) UnmarshalJSON ¶
func (r *ListUnitGroup) UnmarshalJSON(data []byte) error
type ListUnitGroupObject ¶
type ListUnitGroupObject string
Resource type identifier.
const (
ListUnitGroupObjectList ListUnitGroupObject = "list"
)
type ListUnitGroupUnit ¶
type ListUnitGroupUnit struct {
// Resources in this page.
Data []UnitGroupUnit `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListUnitGroupUnitObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListUnitGroupUnit) RawJSON ¶
func (r ListUnitGroupUnit) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListUnitGroupUnit) UnmarshalJSON ¶
func (r *ListUnitGroupUnit) UnmarshalJSON(data []byte) error
type ListUnitGroupUnitObject ¶
type ListUnitGroupUnitObject string
Resource type identifier.
const (
ListUnitGroupUnitObjectList ListUnitGroupUnitObject = "list"
)
type ListUnitObject ¶
type ListUnitObject string
Resource type identifier.
const (
ListUnitObjectList ListUnitObject = "list"
)
type ListVolumeDiscount ¶
type ListVolumeDiscount struct {
// Resources in this page.
Data []VolumeDiscount `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListVolumeDiscountObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListVolumeDiscount) RawJSON ¶
func (r ListVolumeDiscount) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListVolumeDiscount) UnmarshalJSON ¶
func (r *ListVolumeDiscount) UnmarshalJSON(data []byte) error
type ListVolumeDiscountObject ¶
type ListVolumeDiscountObject string
Resource type identifier.
const (
ListVolumeDiscountObjectList ListVolumeDiscountObject = "list"
)
type ListVolumeDiscountTier ¶
type ListVolumeDiscountTier struct {
// Resources in this page.
Data []VolumeDiscountTier `json:"data" api:"required"`
// Resource type identifier.
//
// Any of "list".
Object ListVolumeDiscountTierObject `json:"object" api:"required"`
// PageInfo describes where the current page sits within a paginated result set and
// how to move to the adjacent pages.
//
// Page a list by following the URLs below rather than assembling cursors yourself.
// For a top-level list endpoint the URL repeats the original request's query
// string with only the cursor swapped, so following it preserves the same filters,
// search term, and page size.
PageInfo PageInfo `json:"page_info" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Object respjson.Field
PageInfo respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single page of resources, together with the metadata needed to page through the rest of the result set.
func (ListVolumeDiscountTier) RawJSON ¶
func (r ListVolumeDiscountTier) RawJSON() string
Returns the unmodified JSON received from the API
func (*ListVolumeDiscountTier) UnmarshalJSON ¶
func (r *ListVolumeDiscountTier) UnmarshalJSON(data []byte) error
type ListVolumeDiscountTierObject ¶
type ListVolumeDiscountTierObject string
Resource type identifier.
const (
ListVolumeDiscountTierObjectList ListVolumeDiscountTierObject = "list"
)
type Location ¶
type Location struct {
// Location ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Children *ListLocation `json:"children" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the location.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "location".
Object LocationObject `json:"object" api:"required"`
// A physical storage location, such as a warehouse, aisle, or bin, arranged in a
// parent-child hierarchy.
Parent *Location `json:"parent" api:"required"`
// This location's level in the storage hierarchy.
//
// The levels run from largest to smallest: `building`, `section`, `aisle`, `rack`,
// `shelf`, `bin`. They are descriptive labels rather than a rule — a location's
// parent is not required to be the next level up.
//
// Any of "building", "section", "aisle", "rack", "shelf", "bin".
Type LocationTypeCode `json:"type" api:"required"`
// Last-updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Children respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Parent respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A physical storage location, such as a warehouse, aisle, or bin, arranged in a parent-child hierarchy.
func (*Location) UnmarshalJSON ¶
type LocationObject ¶
type LocationObject string
Resource type identifier.
const (
LocationObjectLocation LocationObject = "location"
)
type LocationType ¶
type LocationType struct {
// Location type ID.
ID string `json:"id" api:"required"`
// The level of the storage hierarchy this type represents.
//
// The levels run from largest to smallest: `building`, `section`, `aisle`, `rack`,
// `shelf`, `bin`.
//
// Any of "building", "section", "aisle", "rack", "shelf", "bin".
Code LocationTypeCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the location type.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "location_type".
Object LocationTypeObject `json:"object" api:"required"`
// Last-updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A level in the storage location hierarchy, such as a building or a bin.
Location types are platform-defined and identical for every account: you choose one when creating a location, but you cannot add or modify the types themselves.
func (LocationType) RawJSON ¶
func (r LocationType) RawJSON() string
Returns the unmodified JSON received from the API
func (*LocationType) UnmarshalJSON ¶
func (r *LocationType) UnmarshalJSON(data []byte) error
type LocationTypeCode ¶
type LocationTypeCode string
const ( LocationTypeCodeBuilding LocationTypeCode = "building" LocationTypeCodeSection LocationTypeCode = "section" LocationTypeCodeAisle LocationTypeCode = "aisle" LocationTypeCodeRack LocationTypeCode = "rack" LocationTypeCodeShelf LocationTypeCode = "shelf" LocationTypeCodeBin LocationTypeCode = "bin" )
type LocationTypeObject ¶
type LocationTypeObject string
Resource type identifier.
const (
LocationTypeObjectLocationType LocationTypeObject = "location_type"
)
type Machine ¶
type Machine struct {
// Machine ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A functional area of a production operation, such as fabrication or packaging,
// that groups scanning stations and machines.
Department *Department `json:"department" api:"required"`
// Display name of the machine.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Free-form notes about the machine.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "machine".
Object MachineObject `json:"object" api:"required"`
// Serial number of the machine.
SerialNumber string `json:"serial_number" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
SerialNumber respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A piece of production equipment, such as a CNC router or press, assigned to a department.
func (*Machine) UnmarshalJSON ¶
type MachineCampaign ¶
type MachineCampaign struct {
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Quantity the plan asked for.
PlannedQuantity float64 `json:"planned_quantity" api:"required"`
// Machine hours the plan allocates to the campaign.
PlannedRunHours float64 `json:"planned_run_hours" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionRun Entity `json:"production_run" api:"required"`
// Batches issued to the floor for this campaign.
ReleasedBatchCount int64 `json:"released_batch_count" api:"required"`
// Quantity still to make.
//
// Never negative: an over-run shows up in `scanned_quantity` rather than as
// negative remaining work.
RemainingQuantity float64 `json:"remaining_quantity" api:"required"`
// Batches of this campaign the floor has scanned.
ScannedBatchCount int64 `json:"scanned_batch_count" api:"required"`
// Quantity the floor has scanned so far.
ScannedQuantity float64 `json:"scanned_quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ScheduleLine Entity `json:"schedule_line" api:"required"`
// SKU of the item.
SKU string `json:"sku" api:"required"`
// Where the campaign is in its lifecycle.
//
// - `planned`: scheduled, but not yet released to the floor.
// - `released`: issued to the floor as a production run, so batches can be scanned
// against it.
// - `in_progress`: being run.
// - `complete`: finished.
// - `cancelled`: will not be run.
//
// Any of "planned", "released", "in_progress", "complete", "cancelled".
Status MachineCampaignStatus `json:"status" api:"required"`
// Unit the quantities are counted in.
Unit string `json:"unit" api:"required"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// First day of the week the campaign belongs to.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Item respjson.Field
PlannedQuantity respjson.Field
PlannedRunHours respjson.Field
ProductionRun respjson.Field
ReleasedBatchCount respjson.Field
RemainingQuantity respjson.Field
ScannedBatchCount respjson.Field
ScannedQuantity respjson.Field
ScheduleLine respjson.Field
SKU respjson.Field
Status respjson.Field
Unit respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One campaign on a machine, with how far through it the floor is.
A campaign is one item scheduled to run on one machine for one week. Progress is taken from the batches the floor has scanned against it rather than reported by hand, so it advances on its own as a shift runs.
func (MachineCampaign) RawJSON ¶
func (r MachineCampaign) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineCampaign) UnmarshalJSON ¶
func (r *MachineCampaign) UnmarshalJSON(data []byte) error
type MachineCampaignStatus ¶
type MachineCampaignStatus string
Where the campaign is in its lifecycle.
- `planned`: scheduled, but not yet released to the floor.
- `released`: issued to the floor as a production run, so batches can be scanned against it.
- `in_progress`: being run.
- `complete`: finished.
- `cancelled`: will not be run.
const ( MachineCampaignStatusPlanned MachineCampaignStatus = "planned" MachineCampaignStatusReleased MachineCampaignStatus = "released" MachineCampaignStatusInProgress MachineCampaignStatus = "in_progress" MachineCampaignStatusComplete MachineCampaignStatus = "complete" MachineCampaignStatusCancelled MachineCampaignStatus = "cancelled" )
type MachineDowntimeEvent ¶
type MachineDowntimeEvent struct {
// Downtime event ID.
ID string `json:"id" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Batch Entity `json:"batch" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A functional area of a production operation, such as fabrication or packaging,
// that groups scanning stations and machines.
Department Department `json:"department" api:"required"`
// How long the machine was down, in seconds.
//
// Calculated when the event is closed, and recalculated whenever its start or end
// time changes.
DurationSeconds int64 `json:"duration_seconds" api:"required"`
// When the machine started running again.
EndedAt time.Time `json:"ended_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// A piece of production equipment, such as a CNC router or press, assigned to a
// department.
Machine Machine `json:"machine" api:"required"`
// Free-form notes about the stoppage.
Note string `json:"note" api:"required"`
// Resource type identifier.
//
// Any of "machine_downtime_event".
Object MachineDowntimeEventObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionRun Entity `json:"production_run" api:"required"`
// The reason for a stoppage, as carried on a downtime event.
//
// A denormalized view of the reason taxonomy: the stable code plus the display
// name and OEE bucket resolved from it at read time.
Reason MachineDowntimeReasonSummary `json:"reason" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
ReportedBy Actor `json:"reported_by" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ScheduleLine Entity `json:"schedule_line" api:"required"`
// The business day the stoppage is counted against.
//
// Taken from the calendar date of `started_at`, so correcting the start time can
// move the stoppage onto a different day's totals.
ShiftAt time.Time `json:"shift_at" api:"required" format:"date-time"`
// The shift the stoppage is counted against.
ShiftCode string `json:"shift_code" api:"required"`
// How the event was recorded.
//
// - `manual`: a person logged the stoppage.
// - `scanner`: a shop-floor station logged it.
// - `inferred`: the system derived it from a gap in activity.
// - `api`: an integration reported it.
//
// Any of "manual", "scanner", "inferred", "api".
Source MachineDowntimeEventSource `json:"source" api:"required"`
// When the machine stopped.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Batch respjson.Field
CreatedAt respjson.Field
Department respjson.Field
DurationSeconds respjson.Field
EndedAt respjson.Field
Item respjson.Field
Machine respjson.Field
Note respjson.Field
Object respjson.Field
ProductionRun respjson.Field
Reason respjson.Field
ReportedBy respjson.Field
ScheduleLine respjson.Field
ShiftAt respjson.Field
ShiftCode respjson.Field
Source respjson.Field
StartedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A period during which a machine was not running.
Downtime is what makes OEE Availability a measurement rather than an estimate. An event with no `ended_at` is still open, meaning the machine is down right now; a machine can only have one open event at a time.
func (MachineDowntimeEvent) RawJSON ¶
func (r MachineDowntimeEvent) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineDowntimeEvent) UnmarshalJSON ¶
func (r *MachineDowntimeEvent) UnmarshalJSON(data []byte) error
type MachineDowntimeEventObject ¶
type MachineDowntimeEventObject string
Resource type identifier.
const (
MachineDowntimeEventObjectMachineDowntimeEvent MachineDowntimeEventObject = "machine_downtime_event"
)
type MachineDowntimeEventSource ¶
type MachineDowntimeEventSource string
How the event was recorded.
- `manual`: a person logged the stoppage. - `scanner`: a shop-floor station logged it. - `inferred`: the system derived it from a gap in activity. - `api`: an integration reported it.
const ( MachineDowntimeEventSourceManual MachineDowntimeEventSource = "manual" MachineDowntimeEventSourceScanner MachineDowntimeEventSource = "scanner" MachineDowntimeEventSourceInferred MachineDowntimeEventSource = "inferred" MachineDowntimeEventSourceAPI MachineDowntimeEventSource = "api" )
type MachineDowntimeReason ¶
type MachineDowntimeReason struct {
// Downtime reason ID.
ID string `json:"id" api:"required"`
// Stable code used when logging downtime.
//
// This is the value to send as `reason` when creating or updating a downtime
// event.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Code MachineDowntimeReasonCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the reason.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "machine_downtime_reason".
Object MachineDowntimeReasonObject `json:"object" api:"required"`
// Which OEE term this reason charges.
//
// Any of "availability", "performance", "quality", "not_scheduled".
OeeBucket MachineDowntimeReasonOeeBucket `json:"oee_bucket" api:"required"`
// Whether the stoppage was scheduled in advance, such as preventive maintenance.
//
// Any of "planned", "unplanned".
PlanningStatus MachineDowntimeReasonPlanningStatus `json:"planning_status" api:"required"`
// Display order, ascending.
SortOrder int64 `json:"sort_order" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
OeeBucket respjson.Field
PlanningStatus respjson.Field
SortOrder respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A reason a machine stopped running.
The `oee_bucket` decides which OEE term the stoppage charges: `availability` losses reduce run time, `performance` losses are minor stops and speed loss, `quality` losses cover rework and holds, and `not_scheduled` time is removed from the OEE calculation entirely rather than counted against it.
func (MachineDowntimeReason) RawJSON ¶
func (r MachineDowntimeReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineDowntimeReason) UnmarshalJSON ¶
func (r *MachineDowntimeReason) UnmarshalJSON(data []byte) error
type MachineDowntimeReasonCode ¶
type MachineDowntimeReasonCode string
Stable code used when logging downtime.
This is the value to send as `reason` when creating or updating a downtime event.
const ( MachineDowntimeReasonCodeBreakdown MachineDowntimeReasonCode = "breakdown" MachineDowntimeReasonCodeChangeover MachineDowntimeReasonCode = "changeover" MachineDowntimeReasonCodeMaterialShortage MachineDowntimeReasonCode = "material_shortage" MachineDowntimeReasonCodeNoOperator MachineDowntimeReasonCode = "no_operator" MachineDowntimeReasonCodePlannedMaintenance MachineDowntimeReasonCode = "planned_maintenance" MachineDowntimeReasonCodeMinorStop MachineDowntimeReasonCode = "minor_stop" MachineDowntimeReasonCodeQualityHold MachineDowntimeReasonCode = "quality_hold" MachineDowntimeReasonCodeNoSchedule MachineDowntimeReasonCode = "no_schedule" )
type MachineDowntimeReasonObject ¶
type MachineDowntimeReasonObject string
Resource type identifier.
const (
MachineDowntimeReasonObjectMachineDowntimeReason MachineDowntimeReasonObject = "machine_downtime_reason"
)
type MachineDowntimeReasonOeeBucket ¶
type MachineDowntimeReasonOeeBucket string
Which OEE term this reason charges.
const ( MachineDowntimeReasonOeeBucketAvailability MachineDowntimeReasonOeeBucket = "availability" MachineDowntimeReasonOeeBucketPerformance MachineDowntimeReasonOeeBucket = "performance" MachineDowntimeReasonOeeBucketQuality MachineDowntimeReasonOeeBucket = "quality" MachineDowntimeReasonOeeBucketNotScheduled MachineDowntimeReasonOeeBucket = "not_scheduled" )
type MachineDowntimeReasonPlanningStatus ¶
type MachineDowntimeReasonPlanningStatus string
Whether the stoppage was scheduled in advance, such as preventive maintenance.
const ( MachineDowntimeReasonPlanningStatusPlanned MachineDowntimeReasonPlanningStatus = "planned" MachineDowntimeReasonPlanningStatusUnplanned MachineDowntimeReasonPlanningStatus = "unplanned" )
type MachineDowntimeReasonSummary ¶
type MachineDowntimeReasonSummary struct {
// Stable code identifying the reason.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Code MachineDowntimeReasonSummaryCode `json:"code" api:"required"`
// Display name of the reason.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "machine_downtime_reason".
Object MachineDowntimeReasonSummaryObject `json:"object" api:"required"`
// Which OEE term this reason charges.
//
// Any of "availability", "performance", "quality", "not_scheduled".
OeeBucket MachineDowntimeReasonSummaryOeeBucket `json:"oee_bucket" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Name respjson.Field
Object respjson.Field
OeeBucket respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The reason for a stoppage, as carried on a downtime event.
A denormalized view of the reason taxonomy: the stable code plus the display name and OEE bucket resolved from it at read time.
func (MachineDowntimeReasonSummary) RawJSON ¶
func (r MachineDowntimeReasonSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineDowntimeReasonSummary) UnmarshalJSON ¶
func (r *MachineDowntimeReasonSummary) UnmarshalJSON(data []byte) error
type MachineDowntimeReasonSummaryCode ¶
type MachineDowntimeReasonSummaryCode string
Stable code identifying the reason.
const ( MachineDowntimeReasonSummaryCodeBreakdown MachineDowntimeReasonSummaryCode = "breakdown" MachineDowntimeReasonSummaryCodeChangeover MachineDowntimeReasonSummaryCode = "changeover" MachineDowntimeReasonSummaryCodeMaterialShortage MachineDowntimeReasonSummaryCode = "material_shortage" MachineDowntimeReasonSummaryCodeNoOperator MachineDowntimeReasonSummaryCode = "no_operator" MachineDowntimeReasonSummaryCodePlannedMaintenance MachineDowntimeReasonSummaryCode = "planned_maintenance" MachineDowntimeReasonSummaryCodeMinorStop MachineDowntimeReasonSummaryCode = "minor_stop" MachineDowntimeReasonSummaryCodeQualityHold MachineDowntimeReasonSummaryCode = "quality_hold" MachineDowntimeReasonSummaryCodeNoSchedule MachineDowntimeReasonSummaryCode = "no_schedule" )
type MachineDowntimeReasonSummaryObject ¶
type MachineDowntimeReasonSummaryObject string
Resource type identifier.
const (
MachineDowntimeReasonSummaryObjectMachineDowntimeReason MachineDowntimeReasonSummaryObject = "machine_downtime_reason"
)
type MachineDowntimeReasonSummaryOeeBucket ¶
type MachineDowntimeReasonSummaryOeeBucket string
Which OEE term this reason charges.
const ( MachineDowntimeReasonSummaryOeeBucketAvailability MachineDowntimeReasonSummaryOeeBucket = "availability" MachineDowntimeReasonSummaryOeeBucketPerformance MachineDowntimeReasonSummaryOeeBucket = "performance" MachineDowntimeReasonSummaryOeeBucketQuality MachineDowntimeReasonSummaryOeeBucket = "quality" MachineDowntimeReasonSummaryOeeBucketNotScheduled MachineDowntimeReasonSummaryOeeBucket = "not_scheduled" )
type MachineDowntimeSummary ¶
type MachineDowntimeSummary struct {
// Entity is a polymorphic reference to any resource in the system.
Event Entity `json:"event" api:"required"`
// Free-text note left by whoever logged it.
Note string `json:"note" api:"required"`
// The reason for a stoppage, as carried on a downtime event.
//
// A denormalized view of the reason taxonomy: the stable code plus the display
// name and OEE bucket resolved from it at read time.
Reason MachineDowntimeReasonSummary `json:"reason" api:"required"`
// When the machine went down.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Event respjson.Field
Note respjson.Field
Reason respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An open stoppage on a machine.
func (MachineDowntimeSummary) RawJSON ¶
func (r MachineDowntimeSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineDowntimeSummary) UnmarshalJSON ¶
func (r *MachineDowntimeSummary) UnmarshalJSON(data []byte) error
type MachineObject ¶
type MachineObject string
Resource type identifier.
const (
MachineObjectMachine MachineObject = "machine"
)
type MachineStatus ¶
type MachineStatus struct {
// One campaign on a machine, with how far through it the floor is.
//
// A campaign is one item scheduled to run on one machine for one week. Progress is
// taken from the batches the floor has scanned against it rather than reported by
// hand, so it advances on its own as a shift runs.
Current MachineCampaign `json:"current" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Department Entity `json:"department" api:"required"`
// An open stoppage on a machine.
Downtime MachineDowntimeSummary `json:"downtime" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// One campaign on a machine, with how far through it the floor is.
//
// A campaign is one item scheduled to run on one machine for one week. Progress is
// taken from the batches the floor has scanned against it rather than reported by
// hand, so it advances on its own as a shift runs.
Next MachineCampaign `json:"next" api:"required"`
// Resource type identifier.
//
// Any of "machine_status".
Object MachineStatusObject `json:"object" api:"required"`
// What the machine is doing.
//
// - `running`: a released campaign with work still to scan.
// - `idle`: nothing released to it.
// - `down`: an open downtime event, which outranks running.
//
// Any of "running", "idle", "down".
Status MachineStatusStatus `json:"status" api:"required"`
// Unit the week's quantities are counted in.
Unit string `json:"unit" api:"required"`
// Quantity planned on this machine for the current week.
//
// Summed across every campaign scheduled on the machine that week, not just the
// current one.
WeekPlannedQuantity float64 `json:"week_planned_quantity" api:"required"`
// Machine hours the plan allocates on this machine for the current week.
WeekPlannedRunHours float64 `json:"week_planned_run_hours" api:"required"`
// Quantity scanned on this machine so far in the current week.
WeekScannedQuantity float64 `json:"week_scanned_quantity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Current respjson.Field
Department respjson.Field
Downtime respjson.Field
Machine respjson.Field
Next respjson.Field
Object respjson.Field
Status respjson.Field
Unit respjson.Field
WeekPlannedQuantity respjson.Field
WeekPlannedRunHours respjson.Field
WeekScannedQuantity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
What one machine is doing right now.
Assembled from the published schedule, the batches the floor has scanned against it, and any open downtime. A machine with an open stoppage reads `down` even when it has a released campaign, because a broken machine is not producing whatever the plan says.
func (MachineStatus) RawJSON ¶
func (r MachineStatus) RawJSON() string
Returns the unmodified JSON received from the API
func (*MachineStatus) UnmarshalJSON ¶
func (r *MachineStatus) UnmarshalJSON(data []byte) error
type MachineStatusObject ¶
type MachineStatusObject string
Resource type identifier.
const (
MachineStatusObjectMachineStatus MachineStatusObject = "machine_status"
)
type MachineStatusStatus ¶
type MachineStatusStatus string
What the machine is doing.
- `running`: a released campaign with work still to scan. - `idle`: nothing released to it. - `down`: an open downtime event, which outranks running.
const ( MachineStatusStatusRunning MachineStatusStatus = "running" MachineStatusStatusIdle MachineStatusStatus = "idle" MachineStatusStatusDown MachineStatusStatus = "down" )
type MarkConversationReadRequestParam ¶
type MarkConversationReadRequestParam struct {
// Mark every message up to and including this sequence number as read.
//
// A sequence past the conversation's latest message is clamped to it, and the read
// position never moves backwards, so replaying an older value is harmless.
UpToSequence int64 `json:"up_to_sequence" api:"required"`
// contains filtered or unexported fields
}
Request to advance the caller's read cursor in a conversation.
The property UpToSequence is required.
func (MarkConversationReadRequestParam) MarshalJSON ¶
func (r MarkConversationReadRequestParam) MarshalJSON() (data []byte, err error)
func (*MarkConversationReadRequestParam) UnmarshalJSON ¶
func (r *MarkConversationReadRequestParam) UnmarshalJSON(data []byte) error
type Material ¶
type Material struct {
// Material ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
LeadTime Quantity `json:"lead_time" api:"required"`
// Resource type identifier.
//
// Any of "material".
Object MaterialObject `json:"object" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
OrderPoint Quantity `json:"order_point" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Item respjson.Field
LeadTime respjson.Field
Object respjson.Field
OrderPoint respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A material in the account's catalog: a raw material or component consumed in production.
Material-level data such as the SKU, description, category, pricing, and attributes lives on the underlying `item`; the material record adds the reordering fields `order_point` and `lead_time`.
func (*Material) UnmarshalJSON ¶
type MaterialObject ¶
type MaterialObject string
Resource type identifier.
const (
MaterialObjectMaterial MaterialObject = "material"
)
type MergeCustomersRequestParam ¶
type MergeCustomersRequestParam struct {
// IDs of the source customers to merge into the target.
//
// Sources are deleted after the merge. The list must not contain duplicates or the
// target customer's ID.
SourceCustomerIDs []string `json:"source_customer_ids,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to merge source customers into a target customer.
The property SourceCustomerIDs is required.
func (MergeCustomersRequestParam) MarshalJSON ¶
func (r MergeCustomersRequestParam) MarshalJSON() (data []byte, err error)
func (*MergeCustomersRequestParam) UnmarshalJSON ¶
func (r *MergeCustomersRequestParam) UnmarshalJSON(data []byte) error
type Message ¶
type Message struct {
// Message ID.
ID string `json:"id" api:"required"`
// Machine-readable reason an agent reply failed.
//
// A client can react to the specific code rather than just showing the body —
// `agent_spending_cap_reached`, for example, is a cue to offer raising the agent
// spending limit.
//
// Any of "expired_token", "api_key_expired", "api_key_revoked",
// "invalid_credentials", "insufficient_permissions", "payment_required",
// "agent_spending_cap_reached", "validation_failed", "missing_field",
// "invalid_format", "method_not_allowed", "resource_not_found", "resource_exists",
// "resource_conflict", "resource_gone", "idempotency_in_progress",
// "limit_exceeded", "registration_closed", "rate_limit_exceeded",
// "parameter_missing", "parameter_invalid", "parameter_unknown",
// "parameters_exclusive", "internal_error", "service_unavailable",
// "external_service_error", "timeout", "connection_error", "request_timeout",
// "client_closed_request", "api_version_required", "api_version_invalid",
// "api_version_too_old".
AgentErrorCode MessageAgentErrorCode `json:"agent_error_code" api:"required"`
// A single execution of an agent, from trigger through completion.
AgentRun AgentRun `json:"agent_run" api:"required"`
// Whether this message is an agent reply reporting that the agent's run failed.
//
// The body explains the failure to the reader rather than answering the request.
AgentRunFailed bool `json:"agent_run_failed" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Attachments ListMessageAttachment `json:"attachments" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Author Actor `json:"author" api:"required"`
// Message body.
//
// A message made up of nothing but attachments or a linked record carries no body,
// and a deleted message has its body cleared.
Body string `json:"body" api:"required"`
// How the message reached its audience, or how a draft will be sent once it is
// approved.
//
// - `message`: appears in the conversation itself.
// - `email`: goes out as email on the thread of the inbox the case is bridged to.
//
// Any of "message", "email".
Channel MessageChannel `json:"channel" api:"required"`
// The dedupe key the client supplied when sending, echoed back so an optimistic
// local copy can be matched to the stored message.
ClientMessageID string `json:"client_message_id" api:"required"`
// A conversation thread the caller participates in.
Conversation *Conversation `json:"conversation" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// When the message was deleted.
//
// A deleted message keeps its place in the timeline with its body cleared, so
// surrounding ordering and replies stay intact.
DeletedAt time.Time `json:"deleted_at" api:"required" format:"date-time"`
// When the message was last edited.
EditedAt time.Time `json:"edited_at" api:"required" format:"date-time"`
// What this message represents.
//
// - `chat`: written by a person.
// - `system_event`: a record of something that happened in the conversation, such
// as someone joining or a record being linked.
// - `agent`: written by an AI agent taking part in the conversation.
// - `scheduled`: came from a send queued ahead of time.
// - `alert`: an automated alert surfaced in the conversation.
// - `email`: a message carried over the case's bridged email thread, either one
// that arrived from the customer or a reply sent back out to them.
//
// Any of "chat", "system_event", "agent", "scheduled", "alert", "email".
Kind MessageKind `json:"kind" api:"required"`
// Resource type identifier.
//
// Any of "chat_message".
Object MessageObject `json:"object" api:"required"`
// A chat message within a conversation.
//
// One resource covers every stage of a message's life: a delivered timeline
// message, a message queued for a future send, and a customer-reply draft awaiting
// approval. Read `status` to tell them apart.
ReplyTo *Message `json:"reply_to" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// When a message queued for a future send is due to go out.
ScheduledAt time.Time `json:"scheduled_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Sender Actor `json:"sender" api:"required"`
// The message's position in the conversation timeline, counting up from the first
// message.
//
// A sequence is assigned only when a message is delivered, so a draft or a
// not-yet-sent scheduled message reports `0`. Listing a conversation's messages
// pages backwards through this ordering.
Sequence int64 `json:"sequence" api:"required"`
// Where the message stands in its life.
//
// - `draft`: a proposed reply to the customer, still editable and waiting for
// approval before anyone outside sees it.
// - `scheduled`: queued to go out at a future time.
// - `sent`: delivered, and part of the conversation everyone reads.
// - `canceled`: a scheduled message stopped before it went out.
// - `rejected`: a draft discarded instead of being sent.
// - `failed`: a scheduled message that could not be delivered.
// - `superseded`: a draft replaced by a newer one for the same thread.
//
// Only a `sent` message occupies a place in the conversation; the others are
// records of messages that never reached it.
//
// Any of "draft", "scheduled", "sent", "canceled", "rejected", "failed",
// "superseded".
Status MessageStatus `json:"status" api:"required"`
// The streaming state of an agent reply.
//
// `streaming` means the body is still being generated and keeps growing as
// realtime updates arrive; `complete` means it is final.
//
// Any of "streaming", "complete".
StreamingState MessageStreamingState `json:"streaming_state" api:"required"`
// The email subject line.
//
// On an email-bridged case, this is the subject of the inbound email, or the
// subject a customer reply is sent out with.
Subject string `json:"subject" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Who can see this message.
//
// - `internal`: a note only your team can see.
// - `external`: sent to or received from an outside party, such as the customer on
// a support case, and part of the official record of that exchange.
// - `system`: an event both your team and the customer see.
//
// A customer reading their own case is never served `internal` messages.
//
// Any of "internal", "external", "system".
Visibility MessageVisibility `json:"visibility" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AgentErrorCode respjson.Field
AgentRun respjson.Field
AgentRunFailed respjson.Field
Attachments respjson.Field
Author respjson.Field
Body respjson.Field
Channel respjson.Field
ClientMessageID respjson.Field
Conversation respjson.Field
CreatedAt respjson.Field
DeletedAt respjson.Field
EditedAt respjson.Field
Kind respjson.Field
Object respjson.Field
ReplyTo respjson.Field
Resource respjson.Field
ScheduledAt respjson.Field
Sender respjson.Field
Sequence respjson.Field
Status respjson.Field
StreamingState respjson.Field
Subject respjson.Field
UpdatedAt respjson.Field
Visibility respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A chat message within a conversation.
One resource covers every stage of a message's life: a delivered timeline message, a message queued for a future send, and a customer-reply draft awaiting approval. Read `status` to tell them apart.
func (*Message) UnmarshalJSON ¶
type MessageAgentErrorCode ¶ added in v0.17.1
type MessageAgentErrorCode string
Machine-readable reason an agent reply failed.
A client can react to the specific code rather than just showing the body — `agent_spending_cap_reached`, for example, is a cue to offer raising the agent spending limit.
const ( MessageAgentErrorCodeExpiredToken MessageAgentErrorCode = "expired_token" MessageAgentErrorCodeAPIKeyExpired MessageAgentErrorCode = "api_key_expired" MessageAgentErrorCodeAPIKeyRevoked MessageAgentErrorCode = "api_key_revoked" MessageAgentErrorCodeInvalidCredentials MessageAgentErrorCode = "invalid_credentials" MessageAgentErrorCodeInsufficientPermissions MessageAgentErrorCode = "insufficient_permissions" MessageAgentErrorCodePaymentRequired MessageAgentErrorCode = "payment_required" MessageAgentErrorCodeAgentSpendingCapReached MessageAgentErrorCode = "agent_spending_cap_reached" MessageAgentErrorCodeValidationFailed MessageAgentErrorCode = "validation_failed" MessageAgentErrorCodeMissingField MessageAgentErrorCode = "missing_field" MessageAgentErrorCodeInvalidFormat MessageAgentErrorCode = "invalid_format" MessageAgentErrorCodeMethodNotAllowed MessageAgentErrorCode = "method_not_allowed" MessageAgentErrorCodeResourceNotFound MessageAgentErrorCode = "resource_not_found" MessageAgentErrorCodeResourceExists MessageAgentErrorCode = "resource_exists" MessageAgentErrorCodeResourceConflict MessageAgentErrorCode = "resource_conflict" MessageAgentErrorCodeResourceGone MessageAgentErrorCode = "resource_gone" MessageAgentErrorCodeIdempotencyInProgress MessageAgentErrorCode = "idempotency_in_progress" MessageAgentErrorCodeLimitExceeded MessageAgentErrorCode = "limit_exceeded" MessageAgentErrorCodeRegistrationClosed MessageAgentErrorCode = "registration_closed" MessageAgentErrorCodeRateLimitExceeded MessageAgentErrorCode = "rate_limit_exceeded" MessageAgentErrorCodeParameterMissing MessageAgentErrorCode = "parameter_missing" MessageAgentErrorCodeParameterInvalid MessageAgentErrorCode = "parameter_invalid" MessageAgentErrorCodeParameterUnknown MessageAgentErrorCode = "parameter_unknown" MessageAgentErrorCodeParametersExclusive MessageAgentErrorCode = "parameters_exclusive" MessageAgentErrorCodeInternalError MessageAgentErrorCode = "internal_error" MessageAgentErrorCodeExternalServiceError MessageAgentErrorCode = "external_service_error" MessageAgentErrorCodeTimeout MessageAgentErrorCode = "timeout" MessageAgentErrorCodeConnectionError MessageAgentErrorCode = "connection_error" MessageAgentErrorCodeRequestTimeout MessageAgentErrorCode = "request_timeout" MessageAgentErrorCodeClientClosedRequest MessageAgentErrorCode = "client_closed_request" MessageAgentErrorCodeAPIVersionRequired MessageAgentErrorCode = "api_version_required" MessageAgentErrorCodeAPIVersionInvalid MessageAgentErrorCode = "api_version_invalid" MessageAgentErrorCodeAPIVersionTooOld MessageAgentErrorCode = "api_version_too_old" )
type MessageAttachment ¶
type MessageAttachment struct {
// Attachment ID.
ID string `json:"id" api:"required"`
// The MIME type of the uploaded content.
//
// Carried only by `file` and `image` attachments.
ContentType string `json:"content_type" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// The filename the attachment was uploaded under.
//
// Carried only by `file` and `image` attachments.
Filename string `json:"filename" api:"required"`
// The kind of attachment, which determines how it is stored and which of the
// fields below are populated.
//
// - `file`: an uploaded non-image file.
// - `image`: an uploaded image.
// - `link`: an external URL reference, with no stored file.
// - `resource`: a reference to an in-app resource, such as an order.
//
// Any of "file", "image", "link", "resource".
Kind MessageAttachmentKind `json:"kind" api:"required"`
// Resource type identifier.
//
// Any of "message_attachment".
Object MessageAttachmentObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// The size of the uploaded content in bytes.
//
// Carried only by `file` and `image` attachments, and only when the sender
// supplied it with the message.
SizeBytes int64 `json:"size_bytes" api:"required"`
// Where to fetch the attachment: a signed download URL for `file` and `image`
// attachments, or the target address for `link` attachments.
//
// Download URLs are signed for one hour and regenerated each time the message is
// read, so follow the URL promptly instead of persisting it. `resource`
// attachments have no URL — use `resource` to resolve them.
URL string `json:"url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ContentType respjson.Field
CreatedAt respjson.Field
Filename respjson.Field
Kind respjson.Field
Object respjson.Field
Resource respjson.Field
SizeBytes respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A file, image, link, or resource attached to a message.
func (MessageAttachment) RawJSON ¶
func (r MessageAttachment) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessageAttachment) UnmarshalJSON ¶
func (r *MessageAttachment) UnmarshalJSON(data []byte) error
type MessageAttachmentInputKind ¶
type MessageAttachmentInputKind string
What is being attached.
- `file`: a document you uploaded to object storage first. - `image`: an uploaded image, rendered inline in the conversation. - `link`: an external web address, with nothing stored on our side. - `resource`: a reference to an in-app record, such as an order.
const ( MessageAttachmentInputKindFile MessageAttachmentInputKind = "file" MessageAttachmentInputKindImage MessageAttachmentInputKind = "image" MessageAttachmentInputKindLink MessageAttachmentInputKind = "link" MessageAttachmentInputKindResource MessageAttachmentInputKind = "resource" )
type MessageAttachmentInputParam ¶
type MessageAttachmentInputParam struct {
// What is being attached.
//
// - `file`: a document you uploaded to object storage first.
// - `image`: an uploaded image, rendered inline in the conversation.
// - `link`: an external web address, with nothing stored on our side.
// - `resource`: a reference to an in-app record, such as an order.
//
// Any of "file", "image", "link", "resource".
Kind MessageAttachmentInputKind `json:"kind,omitzero" api:"required"`
// The MIME content type of the uploaded file (file and image).
ContentType param.Opt[string] `json:"content_type,omitzero"`
// The filename to display for the attachment (file and image).
Filename param.Opt[string] `json:"filename,omitzero"`
// The id of the record being referenced, paired with `resource_type` (resource).
ResourceID param.Opt[string] `json:"resource_id,omitzero"`
// The type of the record being referenced, paired with `resource_id` (resource).
ResourceType param.Opt[string] `json:"resource_type,omitzero"`
// The key you uploaded the file to, taken from the upload-url response (file and
// image).
//
// The key must be one minted for this conversation and the file must already be
// uploaded, otherwise the send is rejected.
S3Key param.Opt[string] `json:"s3_key,omitzero"`
// The size of the uploaded file in bytes (file and image).
SizeBytes param.Opt[int64] `json:"size_bytes,omitzero"`
// The web address being shared (link).
URL param.Opt[string] `json:"url,omitzero"`
// contains filtered or unexported fields
}
A single attachment supplied when sending a message.
For an uploaded file or image, supply the `s3_key` you uploaded to; for a link, supply `url`; for a resource reference, supply `resource_type` and `resource_id`.
The property Kind is required.
func (MessageAttachmentInputParam) MarshalJSON ¶
func (r MessageAttachmentInputParam) MarshalJSON() (data []byte, err error)
func (*MessageAttachmentInputParam) UnmarshalJSON ¶
func (r *MessageAttachmentInputParam) UnmarshalJSON(data []byte) error
type MessageAttachmentKind ¶
type MessageAttachmentKind string
The kind of attachment, which determines how it is stored and which of the fields below are populated.
- `file`: an uploaded non-image file. - `image`: an uploaded image. - `link`: an external URL reference, with no stored file. - `resource`: a reference to an in-app resource, such as an order.
const ( MessageAttachmentKindFile MessageAttachmentKind = "file" MessageAttachmentKindImage MessageAttachmentKind = "image" MessageAttachmentKindLink MessageAttachmentKind = "link" MessageAttachmentKindResource MessageAttachmentKind = "resource" )
type MessageAttachmentObject ¶
type MessageAttachmentObject string
Resource type identifier.
const (
MessageAttachmentObjectMessageAttachment MessageAttachmentObject = "message_attachment"
)
type MessageChannel ¶
type MessageChannel string
How the message reached its audience, or how a draft will be sent once it is approved.
- `message`: appears in the conversation itself. - `email`: goes out as email on the thread of the inbox the case is bridged to.
const ( MessageChannelMessage MessageChannel = "message" MessageChannelEmail MessageChannel = "email" )
type MessageKind ¶
type MessageKind string
What this message represents.
- `chat`: written by a person.
- `system_event`: a record of something that happened in the conversation, such as someone joining or a record being linked.
- `agent`: written by an AI agent taking part in the conversation.
- `scheduled`: came from a send queued ahead of time.
- `alert`: an automated alert surfaced in the conversation.
- `email`: a message carried over the case's bridged email thread, either one that arrived from the customer or a reply sent back out to them.
const ( MessageKindChat MessageKind = "chat" MessageKindSystemEvent MessageKind = "system_event" MessageKindAgent MessageKind = "agent" MessageKindScheduled MessageKind = "scheduled" MessageKindAlert MessageKind = "alert" MessageKindEmail MessageKind = "email" )
type MessageObject ¶
type MessageObject string
Resource type identifier.
const (
MessageObjectChatMessage MessageObject = "chat_message"
)
type MessageStatus ¶
type MessageStatus string
Where the message stands in its life.
- `draft`: a proposed reply to the customer, still editable and waiting for approval before anyone outside sees it.
- `scheduled`: queued to go out at a future time.
- `sent`: delivered, and part of the conversation everyone reads.
- `canceled`: a scheduled message stopped before it went out.
- `rejected`: a draft discarded instead of being sent.
- `failed`: a scheduled message that could not be delivered.
- `superseded`: a draft replaced by a newer one for the same thread.
Only a `sent` message occupies a place in the conversation; the others are records of messages that never reached it.
const ( MessageStatusDraft MessageStatus = "draft" MessageStatusScheduled MessageStatus = "scheduled" MessageStatusSent MessageStatus = "sent" MessageStatusCanceled MessageStatus = "canceled" MessageStatusRejected MessageStatus = "rejected" MessageStatusFailed MessageStatus = "failed" MessageStatusSuperseded MessageStatus = "superseded" )
type MessageStreamingState ¶ added in v0.17.1
type MessageStreamingState string
The streaming state of an agent reply.
`streaming` means the body is still being generated and keeps growing as realtime updates arrive; `complete` means it is final.
const ( MessageStreamingStateStreaming MessageStreamingState = "streaming" MessageStreamingStateComplete MessageStreamingState = "complete" )
type MessageVisibility ¶
type MessageVisibility string
Who can see this message.
- `internal`: a note only your team can see.
- `external`: sent to or received from an outside party, such as the customer on a support case, and part of the official record of that exchange.
- `system`: an event both your team and the customer see.
A customer reading their own case is never served `internal` messages.
const ( MessageVisibilityInternal MessageVisibility = "internal" MessageVisibilityExternal MessageVisibility = "external" MessageVisibilitySystem MessageVisibility = "system" )
type MessagingAnnouncementActionDismissParams ¶
type MessagingAnnouncementActionDismissParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingAnnouncementActionDismissParams) URLQuery ¶
func (r MessagingAnnouncementActionDismissParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingAnnouncementActionDismissParams's query parameters as `url.Values`.
type MessagingAnnouncementActionReadParams ¶
type MessagingAnnouncementActionReadParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingAnnouncementActionReadParams) URLQuery ¶
func (r MessagingAnnouncementActionReadParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingAnnouncementActionReadParams's query parameters as `url.Values`.
type MessagingAnnouncementActionSeenParams ¶
type MessagingAnnouncementActionSeenParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingAnnouncementActionSeenParams) URLQuery ¶
func (r MessagingAnnouncementActionSeenParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingAnnouncementActionSeenParams's query parameters as `url.Values`.
type MessagingAnnouncementActionService ¶
type MessagingAnnouncementActionService struct {
// contains filtered or unexported fields
}
List, read, and manage broadcast announcements.
MessagingAnnouncementActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingAnnouncementActionService method instead.
func NewMessagingAnnouncementActionService ¶
func NewMessagingAnnouncementActionService(opts ...option.RequestOption) (r MessagingAnnouncementActionService)
NewMessagingAnnouncementActionService 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 (*MessagingAnnouncementActionService) Dismiss ¶
func (r *MessagingAnnouncementActionService) Dismiss(ctx context.Context, id string, body MessagingAnnouncementActionDismissParams, opts ...option.RequestOption) (res *Announcement, err error)
Dismisses an announcement for the calling user, removing it from their feed.
The announcement itself is not deleted: it stays retrievable by ID and remains in every other user's feed until they dismiss it too. Dismissing an already-dismissed announcement keeps the original dismissal time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.
This endpoint requires the permission: `messaging:update`.
func (*MessagingAnnouncementActionService) Read ¶
func (r *MessagingAnnouncementActionService) Read(ctx context.Context, id string, body MessagingAnnouncementActionReadParams, opts ...option.RequestOption) (res *Announcement, err error)
Marks an announcement as read for the calling user, as when they open it.
Reading also marks the announcement seen if it was not already, and leaves it in the feed until it is dismissed. Repeating the call keeps the original read time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.
This endpoint requires the permission: `messaging:update`.
func (*MessagingAnnouncementActionService) Seen ¶
func (r *MessagingAnnouncementActionService) Seen(ctx context.Context, id string, body MessagingAnnouncementActionSeenParams, opts ...option.RequestOption) (res *Announcement, err error)
Marks an announcement as seen for the calling user, as when it is surfaced to them without being opened.
Seeing an announcement clears it from the caller's unread bell total but leaves it in the feed, and only affects the caller: everyone else in the account keeps their own state. Repeating the call keeps the original seen time. A caller with no user of their own in the account, such as an API key, has no state to record and gets a not-found error.
This endpoint requires the permission: `messaging:update`.
type MessagingAnnouncementGetParams ¶
type MessagingAnnouncementGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingAnnouncementGetParams) URLQuery ¶
func (r MessagingAnnouncementGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingAnnouncementGetParams's query parameters as `url.Values`.
type MessagingAnnouncementListParams ¶
type MessagingAnnouncementListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingAnnouncementListParams) URLQuery ¶
func (r MessagingAnnouncementListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingAnnouncementListParams's query parameters as `url.Values`.
type MessagingAnnouncementService ¶
type MessagingAnnouncementService struct {
// List, read, and manage broadcast announcements.
Actions MessagingAnnouncementActionService
// contains filtered or unexported fields
}
List, read, and manage broadcast announcements.
MessagingAnnouncementService contains methods and other services that help with interacting with the openmrp 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 NewMessagingAnnouncementService method instead.
func NewMessagingAnnouncementService ¶
func NewMessagingAnnouncementService(opts ...option.RequestOption) (r MessagingAnnouncementService)
NewMessagingAnnouncementService 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 (*MessagingAnnouncementService) Get ¶
func (r *MessagingAnnouncementService) Get(ctx context.Context, id string, query MessagingAnnouncementGetParams, opts ...option.RequestOption) (res *Announcement, err error)
Retrieves a single announcement by ID, with the calling user's own read state.
Only announcements the caller can see are returned: one published to another account, one that has not reached its publish time, or one that has expired is reported as not found. An announcement the caller has dismissed stays retrievable even though it no longer appears in their feed.
This endpoint requires the permission: `messaging:read`.
func (*MessagingAnnouncementService) List ¶
func (r *MessagingAnnouncementService) List(ctx context.Context, query MessagingAnnouncementListParams, opts ...option.RequestOption) (res *ListAnnouncement, err error)
Lists the announcements currently active for the caller, newest first.
The feed covers announcements broadcast to the account being acted in together with platform-wide announcements from OpenMRP. Announcements the caller has dismissed are left out, as are any that are scheduled for later or have already expired.
This endpoint requires the permission: `messaging:read`.
type MessagingBlock ¶
type MessagingBlock struct {
// Block ID.
ID string `json:"id" api:"required"`
// A user's membership in an account, carrying the account-specific status, role,
// and department.
//
// Profile fields (name, email, username, image URL) live on the `user`
// sub-resource, which is shared across every account the user belongs to.
BlockedUser AccountUser `json:"blocked_user" api:"required"`
// When the block was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "messaging_block".
Object MessagingBlockObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BlockedUser respjson.Field
CreatedAt respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A block one account user has placed on another.
While the block stands, neither of the two can start a direct message with the other or post in an existing one, whichever of them created it. Group conversations and customer cases are unaffected.
func (MessagingBlock) RawJSON ¶
func (r MessagingBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingBlock) UnmarshalJSON ¶
func (r *MessagingBlock) UnmarshalJSON(data []byte) error
type MessagingBlockDeleteResponse ¶
type MessagingBlockDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingBlockDeleteResponse) RawJSON ¶
func (r MessagingBlockDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingBlockDeleteResponse) UnmarshalJSON ¶
func (r *MessagingBlockDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingBlockListParams ¶
type MessagingBlockListParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "blocked_user", "blocked_user.user", "blocked_user.role",
// "blocked_user.department".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingBlockListParams) URLQuery ¶
func (r MessagingBlockListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingBlockListParams's query parameters as `url.Values`.
type MessagingBlockNewParams ¶
type MessagingBlockNewParams struct {
// Request to block another account user from messaging the caller.
BlockRequest BlockRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "blocked_user", "blocked_user.user", "blocked_user.role",
// "blocked_user.department".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingBlockNewParams) MarshalJSON ¶
func (r MessagingBlockNewParams) MarshalJSON() (data []byte, err error)
func (MessagingBlockNewParams) URLQuery ¶
func (r MessagingBlockNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingBlockNewParams's query parameters as `url.Values`.
func (*MessagingBlockNewParams) UnmarshalJSON ¶
func (r *MessagingBlockNewParams) UnmarshalJSON(data []byte) error
type MessagingBlockObject ¶
type MessagingBlockObject string
Resource type identifier.
const (
MessagingBlockObjectMessagingBlock MessagingBlockObject = "messaging_block"
)
type MessagingBlockService ¶
type MessagingBlockService struct {
// contains filtered or unexported fields
}
Block and unblock users from direct messaging.
MessagingBlockService contains methods and other services that help with interacting with the openmrp 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 NewMessagingBlockService method instead.
func NewMessagingBlockService ¶
func NewMessagingBlockService(opts ...option.RequestOption) (r MessagingBlockService)
NewMessagingBlockService 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 (*MessagingBlockService) Delete ¶
func (r *MessagingBlockService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingBlockDeleteResponse, err error)
Lifts a block you placed on another user, letting the two of you message each other again.
Only your own block is removed: if the other person has also blocked you, direct messages between you stay blocked. Unblocking someone you have not blocked succeeds and changes nothing.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingBlockService) List ¶
func (r *MessagingBlockService) List(ctx context.Context, query MessagingBlockListParams, opts ...option.RequestOption) (res *ListMessagingBlock, err error)
Lists the users you have blocked, most recently blocked first.
Only blocks you created are returned — you are never told who has blocked you.
This endpoint requires the permission: `messaging:read`.
func (*MessagingBlockService) New ¶
func (r *MessagingBlockService) New(ctx context.Context, params MessagingBlockNewParams, opts ...option.RequestOption) (res *MessagingBlock, err error)
Blocks another user in your account from exchanging direct messages with you.
While the block stands neither of you can start a direct message with the other or post in one you already share; group conversations and customer cases are unaffected. Blocking someone you have already blocked returns the original block instead of creating a second one.
This endpoint requires the permission: `messaging:create`.
type MessagingConversationActionArchiveParams ¶
type MessagingConversationActionArchiveParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionArchiveParams) URLQuery ¶
func (r MessagingConversationActionArchiveParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionArchiveParams's query parameters as `url.Values`.
type MessagingConversationActionAssignParams ¶
type MessagingConversationActionAssignParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// Request to assign a customer-service case to a single owner — a user or a team.
//
// The owner is a polymorphic (`assignee_resource_type`, `assignee_resource_id`)
// reference; omit both fields to clear the assignment.
AssignConversationRequest AssignConversationRequestParam
// contains filtered or unexported fields
}
func (MessagingConversationActionAssignParams) MarshalJSON ¶
func (r MessagingConversationActionAssignParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionAssignParams) URLQuery ¶
func (r MessagingConversationActionAssignParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionAssignParams's query parameters as `url.Values`.
func (*MessagingConversationActionAssignParams) UnmarshalJSON ¶
func (r *MessagingConversationActionAssignParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionHideParams ¶
type MessagingConversationActionHideParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionHideParams) URLQuery ¶
func (r MessagingConversationActionHideParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionHideParams's query parameters as `url.Values`.
type MessagingConversationActionLeaveParams ¶
type MessagingConversationActionLeaveParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionLeaveParams) URLQuery ¶
func (r MessagingConversationActionLeaveParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionLeaveParams's query parameters as `url.Values`.
type MessagingConversationActionMuteParams ¶
type MessagingConversationActionMuteParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// Request to mute a conversation for the caller.
MuteConversationRequest MuteConversationRequestParam
// contains filtered or unexported fields
}
func (MessagingConversationActionMuteParams) MarshalJSON ¶
func (r MessagingConversationActionMuteParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionMuteParams) URLQuery ¶
func (r MessagingConversationActionMuteParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionMuteParams's query parameters as `url.Values`.
func (*MessagingConversationActionMuteParams) UnmarshalJSON ¶
func (r *MessagingConversationActionMuteParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionReadParams ¶
type MessagingConversationActionReadParams struct {
// Request to advance the caller's read cursor in a conversation.
MarkConversationReadRequest MarkConversationReadRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionReadParams) MarshalJSON ¶
func (r MessagingConversationActionReadParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionReadParams) URLQuery ¶
func (r MessagingConversationActionReadParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionReadParams's query parameters as `url.Values`.
func (*MessagingConversationActionReadParams) UnmarshalJSON ¶
func (r *MessagingConversationActionReadParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionRedactParams ¶
type MessagingConversationActionRedactParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionRedactParams) URLQuery ¶
func (r MessagingConversationActionRedactParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionRedactParams's query parameters as `url.Values`.
type MessagingConversationActionReportParams ¶
type MessagingConversationActionReportParams struct {
// Request to report a conversation (optionally a specific message) for abuse.
ReportConversationRequest ReportConversationRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionReportParams) MarshalJSON ¶
func (r MessagingConversationActionReportParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionReportParams) URLQuery ¶
func (r MessagingConversationActionReportParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionReportParams's query parameters as `url.Values`.
func (*MessagingConversationActionReportParams) UnmarshalJSON ¶
func (r *MessagingConversationActionReportParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionService ¶
type MessagingConversationActionService struct {
// contains filtered or unexported fields
}
Create conversations, send and read messages (1:1 direct messages).
MessagingConversationActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationActionService method instead.
func NewMessagingConversationActionService ¶
func NewMessagingConversationActionService(opts ...option.RequestOption) (r MessagingConversationActionService)
NewMessagingConversationActionService 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 (*MessagingConversationActionService) Archive ¶
func (r *MessagingConversationActionService) Archive(ctx context.Context, id string, body MessagingConversationActionArchiveParams, opts ...option.RequestOption) (res *Conversation, err error)
Archives a conversation for the whole account rather than just for the caller.
Only an owner or admin of the conversation can archive it, and direct messages cannot be archived. An archived customer-facing case leaves the working support inbox and is returned only by the archived view.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Assign ¶
func (r *MessagingConversationActionService) Assign(ctx context.Context, id string, params MessagingConversationActionAssignParams, opts ...option.RequestOption) (res *Conversation, err error)
Assigns an external customer-service case to an owner — a user or a team — or clears the assignment.
Only customer-facing cases can be assigned; assigning an internal conversation is rejected. The support inbox can then be filtered to a single assignee, or to the cases nobody owns yet.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Hide ¶
func (r *MessagingConversationActionService) Hide(ctx context.Context, id string, body MessagingConversationActionHideParams, opts ...option.RequestOption) (res *Conversation, err error)
Hides a conversation from the caller's own list without affecting other participants.
The caller stays a member and keeps receiving notifications; the conversation simply stops appearing in their list until they unhide it, and new messages do not bring it back on their own. The owner of a conversation cannot hide it.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Leave ¶
func (r *MessagingConversationActionService) Leave(ctx context.Context, id string, body MessagingConversationActionLeaveParams, opts ...option.RequestOption) (res *Conversation, err error)
Removes the caller from a conversation.
An owner cannot leave — hand ownership to someone else first. Leaving posts a "left the conversation" note to the thread and hides the conversation for the caller, who can still read it back but can no longer post.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Mute ¶
func (r *MessagingConversationActionService) Mute(ctx context.Context, id string, params MessagingConversationActionMuteParams, opts ...option.RequestOption) (res *Conversation, err error)
Mutes a conversation's notifications for the caller only, leaving the other participants unaffected.
While muted the caller gets no notification or email for new messages, though the conversation still accumulates an unread count. A direct @mention pierces the mute and still raises a notification.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Read ¶
func (r *MessagingConversationActionService) Read(ctx context.Context, id string, params MessagingConversationActionReadParams, opts ...option.RequestOption) (res *Conversation, err error)
Advances the caller's read position in a conversation and returns it with the recalculated unread count.
Reading also dismisses the caller's outstanding notifications for this conversation, and updates the read receipt the other participants see.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Redact ¶
func (r *MessagingConversationActionService) Redact(ctx context.Context, id string, body MessagingConversationActionRedactParams, opts ...option.RequestOption) (res *Conversation, err error)
Permanently erases the content of every message in a conversation, for right-to-erasure requests.
Message bodies are cleared and attachments are deleted from storage, leaving the messages behind as an empty audit shell. This cannot be undone, and it is refused while the conversation is under legal hold.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingConversationActionService) Report ¶
func (r *MessagingConversationActionService) Report(ctx context.Context, id string, params MessagingConversationActionReportParams, opts ...option.RequestOption) (res *Conversation, err error)
Files an abuse report against a conversation, or against one message within it, and returns the conversation.
Only an active participant can report a conversation. The report is recorded for review and changes nothing about the conversation itself — it is not hidden, muted, or removed.
This endpoint requires the permission: `messaging:create`.
func (*MessagingConversationActionService) SetLegalHold ¶
func (r *MessagingConversationActionService) SetLegalHold(ctx context.Context, id string, params MessagingConversationActionSetLegalHoldParams, opts ...option.RequestOption) (res *Conversation, err error)
Places a conversation under legal hold or releases it.
Holding it exempts the conversation from automatic retention purging, and any attempt to redact it is refused until the hold is released.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) SetStatus ¶
func (r *MessagingConversationActionService) SetStatus(ctx context.Context, id string, params MessagingConversationActionSetStatusParams, opts ...option.RequestOption) (res *Conversation, err error)
Moves a customer-service case to a triage lane in the support inbox.
Only customer-facing cases have a triage lane; an internal conversation is rejected. The lane also advances on its own as the case progresses — an inbound customer message moves it to `waiting_internal`, a drafted reply to `needs_approval`, and an approved reply to `waiting_external` — so a lane set by hand can be overtaken by later activity.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Unarchive ¶
func (r *MessagingConversationActionService) Unarchive(ctx context.Context, id string, body MessagingConversationActionUnarchiveParams, opts ...option.RequestOption) (res *Conversation, err error)
Returns an archived conversation to the active state for the whole account.
Only an owner or admin of the conversation can unarchive it. An unarchived customer-facing case comes back to the working support inbox, and participants who had separately hidden the conversation still see it hidden until they unhide it themselves.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Unhide ¶
func (r *MessagingConversationActionService) Unhide(ctx context.Context, id string, body MessagingConversationActionUnhideParams, opts ...option.RequestOption) (res *Conversation, err error)
Restores a conversation the caller had hidden back to their own list.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationActionService) Unmute ¶
func (r *MessagingConversationActionService) Unmute(ctx context.Context, id string, body MessagingConversationActionUnmuteParams, opts ...option.RequestOption) (res *Conversation, err error)
Restores notifications for a conversation the caller had muted.
This endpoint requires the permission: `messaging:update`.
type MessagingConversationActionSetLegalHoldParams ¶
type MessagingConversationActionSetLegalHoldParams struct {
// Request to place a conversation under legal hold or release it.
SetLegalHoldRequest SetLegalHoldRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionSetLegalHoldParams) MarshalJSON ¶
func (r MessagingConversationActionSetLegalHoldParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionSetLegalHoldParams) URLQuery ¶
func (r MessagingConversationActionSetLegalHoldParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionSetLegalHoldParams's query parameters as `url.Values`.
func (*MessagingConversationActionSetLegalHoldParams) UnmarshalJSON ¶
func (r *MessagingConversationActionSetLegalHoldParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionSetStatusParams ¶
type MessagingConversationActionSetStatusParams struct {
// Request to set the triage lane of a customer-service case.
SetWorkflowStatusRequest SetWorkflowStatusRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionSetStatusParams) MarshalJSON ¶
func (r MessagingConversationActionSetStatusParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationActionSetStatusParams) URLQuery ¶
func (r MessagingConversationActionSetStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionSetStatusParams's query parameters as `url.Values`.
func (*MessagingConversationActionSetStatusParams) UnmarshalJSON ¶
func (r *MessagingConversationActionSetStatusParams) UnmarshalJSON(data []byte) error
type MessagingConversationActionUnarchiveParams ¶
type MessagingConversationActionUnarchiveParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionUnarchiveParams) URLQuery ¶
func (r MessagingConversationActionUnarchiveParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionUnarchiveParams's query parameters as `url.Values`.
type MessagingConversationActionUnhideParams ¶
type MessagingConversationActionUnhideParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionUnhideParams) URLQuery ¶
func (r MessagingConversationActionUnhideParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionUnhideParams's query parameters as `url.Values`.
type MessagingConversationActionUnmuteParams ¶
type MessagingConversationActionUnmuteParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationActionUnmuteParams) URLQuery ¶
func (r MessagingConversationActionUnmuteParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationActionUnmuteParams's query parameters as `url.Values`.
type MessagingConversationAttachmentActionService ¶
type MessagingConversationAttachmentActionService struct {
// contains filtered or unexported fields
}
Create presigned upload targets for message attachments.
MessagingConversationAttachmentActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationAttachmentActionService method instead.
func NewMessagingConversationAttachmentActionService ¶
func NewMessagingConversationAttachmentActionService(opts ...option.RequestOption) (r MessagingConversationAttachmentActionService)
NewMessagingConversationAttachmentActionService 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 (*MessagingConversationAttachmentActionService) UploadURL ¶
func (r *MessagingConversationAttachmentActionService) UploadURL(ctx context.Context, id string, params MessagingConversationAttachmentActionUploadURLParams, opts ...option.RequestOption) (res *AttachmentUploadTarget, err error)
Creates a short-lived URL for uploading a chat attachment straight to object storage.
Upload the file to the returned URL, then send a message in the same conversation carrying the returned key as an attachment — the file only becomes part of the conversation at that point, and an upload that is never sent is discarded automatically. You must be an active participant of the conversation to stage an upload for it.
This endpoint requires the permission: `messaging:create`.
type MessagingConversationAttachmentActionUploadURLParams ¶
type MessagingConversationAttachmentActionUploadURLParams struct {
// Request to mint a presigned upload target for a chat attachment.
CreateAttachmentUploadURLRequest CreateAttachmentUploadURLRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "attachment", "attachment.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationAttachmentActionUploadURLParams) MarshalJSON ¶
func (r MessagingConversationAttachmentActionUploadURLParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationAttachmentActionUploadURLParams) URLQuery ¶
func (r MessagingConversationAttachmentActionUploadURLParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationAttachmentActionUploadURLParams's query parameters as `url.Values`.
func (*MessagingConversationAttachmentActionUploadURLParams) UnmarshalJSON ¶
func (r *MessagingConversationAttachmentActionUploadURLParams) UnmarshalJSON(data []byte) error
type MessagingConversationAttachmentService ¶
type MessagingConversationAttachmentService struct {
// Create presigned upload targets for message attachments.
Actions MessagingConversationAttachmentActionService
// contains filtered or unexported fields
}
MessagingConversationAttachmentService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationAttachmentService method instead.
func NewMessagingConversationAttachmentService ¶
func NewMessagingConversationAttachmentService(opts ...option.RequestOption) (r MessagingConversationAttachmentService)
NewMessagingConversationAttachmentService 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.
type MessagingConversationGetParams ¶
type MessagingConversationGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationGetParams) URLQuery ¶
func (r MessagingConversationGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationGetParams's query parameters as `url.Values`.
type MessagingConversationLinkDeleteParams ¶
type MessagingConversationLinkDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type MessagingConversationLinkDeleteResponse ¶
type MessagingConversationLinkDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingConversationLinkDeleteResponse) RawJSON ¶
func (r MessagingConversationLinkDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingConversationLinkDeleteResponse) UnmarshalJSON ¶
func (r *MessagingConversationLinkDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingConversationLinkListParams ¶
type MessagingConversationLinkListParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "conversation", "conversation.assignee", "conversation.group",
// "conversation.participants", "conversation.topic", "conversation.last_message",
// "conversation.last_message.sender", "conversation.last_message.author",
// "conversation.last_message.resource", "conversation.last_message.attachments",
// "conversation.last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationLinkListParams) URLQuery ¶
func (r MessagingConversationLinkListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationLinkListParams's query parameters as `url.Values`.
type MessagingConversationLinkNewParams ¶
type MessagingConversationLinkNewParams struct {
// Request to link a business record to a conversation.
AddConversationLinkRequest AddConversationLinkRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "conversation", "conversation.assignee", "conversation.group",
// "conversation.participants", "conversation.topic", "conversation.last_message",
// "conversation.last_message.sender", "conversation.last_message.author",
// "conversation.last_message.resource", "conversation.last_message.attachments",
// "conversation.last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationLinkNewParams) MarshalJSON ¶
func (r MessagingConversationLinkNewParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationLinkNewParams) URLQuery ¶
func (r MessagingConversationLinkNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationLinkNewParams's query parameters as `url.Values`.
func (*MessagingConversationLinkNewParams) UnmarshalJSON ¶
func (r *MessagingConversationLinkNewParams) UnmarshalJSON(data []byte) error
type MessagingConversationLinkService ¶
type MessagingConversationLinkService struct {
// contains filtered or unexported fields
}
Create conversations, send and read messages (1:1 direct messages).
MessagingConversationLinkService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationLinkService method instead.
func NewMessagingConversationLinkService ¶
func NewMessagingConversationLinkService(opts ...option.RequestOption) (r MessagingConversationLinkService)
NewMessagingConversationLinkService 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 (*MessagingConversationLinkService) Delete ¶
func (r *MessagingConversationLinkService) Delete(ctx context.Context, linkID string, body MessagingConversationLinkDeleteParams, opts ...option.RequestOption) (res *MessagingConversationLinkDeleteResponse, err error)
Removes a business-record link from a conversation.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationLinkService) List ¶
func (r *MessagingConversationLinkService) List(ctx context.Context, id string, query MessagingConversationLinkListParams, opts ...option.RequestOption) (res *ListConversationLink, err error)
Returns the business records linked to a conversation.
Every link is returned in one page. The conversation's primary `topic` anchor is not a link and is not listed here.
This endpoint requires the permission: `messaging:read`.
func (*MessagingConversationLinkService) New ¶
func (r *MessagingConversationLinkService) New(ctx context.Context, id string, params MessagingConversationLinkNewParams, opts ...option.RequestOption) (res *ConversationLink, err error)
Links a business record to a conversation, in addition to whatever topic the conversation is anchored to.
A conversation can link any number of records, and each linked record surfaces the conversation when conversations are listed for that record.
This endpoint requires the permission: `messaging:update`.
type MessagingConversationListParams ¶
type MessagingConversationListParams struct {
// Filter the support inbox to cases owned by this assignee, an account user or an
// account group.
AssigneeResourceID param.Opt[string] `query:"assignee_resource_id,omitzero" json:"-"`
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Return the archived support inbox instead of the working one.
//
// This swaps the view rather than widening it: archived cases are returned and
// unarchived ones are left out.
IncludeArchived param.Opt[bool] `query:"include_archived,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// The id of the business record, together with `topic_resource_type`.
TopicResourceID param.Opt[string] `query:"topic_resource_id,omitzero" json:"-"`
// Restrict the support inbox to cases nobody has been assigned yet.
Unassigned param.Opt[bool] `query:"unassigned,omitzero" json:"-"`
// Filter by whether the conversation is team-only or customer-facing.
//
// - `internal`: threads the customer never sees — direct messages, group threads,
// and record discussions.
// - `customer`: external customer-service cases the customer takes part in, from
// the portal or a bridged email thread.
//
// Any of "internal", "customer".
Audience MessagingConversationListParamsAudience `query:"audience,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// Filter by whether the caller has hidden the conversation from their own list.
//
// Any of "active", "hidden".
Status MessagingConversationListParamsStatus `query:"status,omitzero" json:"-"`
// Restrict to conversations attached to a business record of this type, together
// with `topic_resource_id`.
//
// Matches both conversations anchored to the record and conversations that merely
// link it, which is what powers the "discussions on this record" view.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
TopicResourceType MessagingConversationListParamsTopicResourceType `query:"topic_resource_type,omitzero" json:"-"`
// Filter by conversation type.
//
// Any of "direct_message", "group", "system".
Type MessagingConversationListParamsType `query:"type,omitzero" json:"-"`
// Filter the support inbox to a single triage lane.
//
// - `new`: opened but nobody has triaged it yet.
// - `open`: actively being worked.
// - `waiting_internal`: blocked on the internal team.
// - `waiting_external`: blocked on a reply from the customer.
// - `needs_approval`: a drafted reply is waiting for a human to approve it.
// - `resolved`: closed out.
//
// The working inbox hides resolved cases unless you ask for this lane explicitly.
//
// Any of "new", "open", "waiting_internal", "waiting_external", "needs_approval",
// "resolved".
WorkflowStatus MessagingConversationListParamsWorkflowStatus `query:"workflow_status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationListParams) URLQuery ¶
func (r MessagingConversationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationListParams's query parameters as `url.Values`.
type MessagingConversationListParamsAudience ¶
type MessagingConversationListParamsAudience string
Filter by whether the conversation is team-only or customer-facing.
- `internal`: threads the customer never sees — direct messages, group threads, and record discussions.
- `customer`: external customer-service cases the customer takes part in, from the portal or a bridged email thread.
const ( MessagingConversationListParamsAudienceInternal MessagingConversationListParamsAudience = "internal" MessagingConversationListParamsAudienceCustomer MessagingConversationListParamsAudience = "customer" )
type MessagingConversationListParamsStatus ¶
type MessagingConversationListParamsStatus string
Filter by whether the caller has hidden the conversation from their own list.
const ( MessagingConversationListParamsStatusActive MessagingConversationListParamsStatus = "active" MessagingConversationListParamsStatusHidden MessagingConversationListParamsStatus = "hidden" )
type MessagingConversationListParamsTopicResourceType ¶
type MessagingConversationListParamsTopicResourceType string
Restrict to conversations attached to a business record of this type, together with `topic_resource_id`.
Matches both conversations anchored to the record and conversations that merely link it, which is what powers the "discussions on this record" view.
const ( MessagingConversationListParamsTopicResourceTypeAccount MessagingConversationListParamsTopicResourceType = "account" MessagingConversationListParamsTopicResourceTypeActor MessagingConversationListParamsTopicResourceType = "actor" MessagingConversationListParamsTopicResourceTypeEntity MessagingConversationListParamsTopicResourceType = "entity" MessagingConversationListParamsTopicResourceTypeRecord MessagingConversationListParamsTopicResourceType = "record" MessagingConversationListParamsTopicResourceTypeFreight MessagingConversationListParamsTopicResourceType = "freight" MessagingConversationListParamsTopicResourceTypeCommitment MessagingConversationListParamsTopicResourceType = "commitment" MessagingConversationListParamsTopicResourceTypeSalesOrderTotals MessagingConversationListParamsTopicResourceType = "sales_order_totals" MessagingConversationListParamsTopicResourceTypeSalesOrderStageTotal MessagingConversationListParamsTopicResourceType = "sales_order_stage_total" MessagingConversationListParamsTopicResourceTypeSalesOrderRelated MessagingConversationListParamsTopicResourceType = "sales_order_related" MessagingConversationListParamsTopicResourceTypeOrderContact MessagingConversationListParamsTopicResourceType = "order_contact" MessagingConversationListParamsTopicResourceTypeUser MessagingConversationListParamsTopicResourceType = "user" MessagingConversationListParamsTopicResourceTypeAddress MessagingConversationListParamsTopicResourceType = "address" MessagingConversationListParamsTopicResourceTypeAPIKey MessagingConversationListParamsTopicResourceType = "api_key" MessagingConversationListParamsTopicResourceTypeCreatedAPIKey MessagingConversationListParamsTopicResourceType = "created_api_key" MessagingConversationListParamsTopicResourceTypeRefreshToken MessagingConversationListParamsTopicResourceType = "refresh_token" MessagingConversationListParamsTopicResourceTypeList MessagingConversationListParamsTopicResourceType = "list" MessagingConversationListParamsTopicResourceTypeSandbox MessagingConversationListParamsTopicResourceType = "sandbox" MessagingConversationListParamsTopicResourceTypeRegistrationSession MessagingConversationListParamsTopicResourceType = "registration_session" MessagingConversationListParamsTopicResourceTypePricingPlan MessagingConversationListParamsTopicResourceType = "pricing_plan" MessagingConversationListParamsTopicResourceTypeAccountPlan MessagingConversationListParamsTopicResourceType = "account_plan" MessagingConversationListParamsTopicResourceTypePlanChange MessagingConversationListParamsTopicResourceType = "plan_change" MessagingConversationListParamsTopicResourceTypeEnterpriseInquiry MessagingConversationListParamsTopicResourceType = "enterprise_inquiry" MessagingConversationListParamsTopicResourceTypeRequestLog MessagingConversationListParamsTopicResourceType = "request_log" MessagingConversationListParamsTopicResourceTypeAuditEvent MessagingConversationListParamsTopicResourceType = "audit_event" MessagingConversationListParamsTopicResourceTypeAuditFieldChange MessagingConversationListParamsTopicResourceType = "audit_field_change" MessagingConversationListParamsTopicResourceTypeRole MessagingConversationListParamsTopicResourceType = "role" MessagingConversationListParamsTopicResourceTypeUnit MessagingConversationListParamsTopicResourceType = "unit" MessagingConversationListParamsTopicResourceTypeAccountAffiliation MessagingConversationListParamsTopicResourceType = "account_affiliation" MessagingConversationListParamsTopicResourceTypeAgentDefinition MessagingConversationListParamsTopicResourceType = "agent_definition" MessagingConversationListParamsTopicResourceTypeAvailableTool MessagingConversationListParamsTopicResourceType = "available_tool" MessagingConversationListParamsTopicResourceTypeAgentDefinitionTool MessagingConversationListParamsTopicResourceType = "agent_definition_tool" MessagingConversationListParamsTopicResourceTypeAgentAccountStatus MessagingConversationListParamsTopicResourceType = "agent_account_status" MessagingConversationListParamsTopicResourceTypeAgentRun MessagingConversationListParamsTopicResourceType = "agent_run" MessagingConversationListParamsTopicResourceTypeAgentAction MessagingConversationListParamsTopicResourceType = "agent_action" MessagingConversationListParamsTopicResourceTypeAgentRunStep MessagingConversationListParamsTopicResourceType = "agent_run_step" MessagingConversationListParamsTopicResourceTypeAgentTokenUsage MessagingConversationListParamsTopicResourceType = "agent_token_usage" MessagingConversationListParamsTopicResourceTypeAgentMemory MessagingConversationListParamsTopicResourceType = "agent_memory" MessagingConversationListParamsTopicResourceTypeNotification MessagingConversationListParamsTopicResourceType = "notification" MessagingConversationListParamsTopicResourceTypeNotificationUnreadCount MessagingConversationListParamsTopicResourceType = "notification_unread_count" MessagingConversationListParamsTopicResourceTypeNotificationSendResult MessagingConversationListParamsTopicResourceType = "notification_send_result" MessagingConversationListParamsTopicResourceTypeNotificationUnreadSummary MessagingConversationListParamsTopicResourceType = "notification_unread_summary" MessagingConversationListParamsTopicResourceTypeAnnouncement MessagingConversationListParamsTopicResourceType = "announcement" MessagingConversationListParamsTopicResourceTypeConversation MessagingConversationListParamsTopicResourceType = "conversation" MessagingConversationListParamsTopicResourceTypeSupportCase MessagingConversationListParamsTopicResourceType = "support_case" MessagingConversationListParamsTopicResourceTypeConversationParticipant MessagingConversationListParamsTopicResourceType = "conversation_participant" MessagingConversationListParamsTopicResourceTypeReadCursor MessagingConversationListParamsTopicResourceType = "read_cursor" MessagingConversationListParamsTopicResourceTypeChatMessage MessagingConversationListParamsTopicResourceType = "chat_message" MessagingConversationListParamsTopicResourceTypeNotificationUnreadSummaryAccount MessagingConversationListParamsTopicResourceType = "notification_unread_summary_account" MessagingConversationListParamsTopicResourceTypeMessagingBlock MessagingConversationListParamsTopicResourceType = "messaging_block" MessagingConversationListParamsTopicResourceTypeNotificationPreference MessagingConversationListParamsTopicResourceType = "notification_preference" MessagingConversationListParamsTopicResourceTypeMessageAttachment MessagingConversationListParamsTopicResourceType = "message_attachment" MessagingConversationListParamsTopicResourceTypeAttachmentUploadTarget MessagingConversationListParamsTopicResourceType = "attachment_upload_target" MessagingConversationListParamsTopicResourceTypeScheduledMessage MessagingConversationListParamsTopicResourceType = "scheduled_message" MessagingConversationListParamsTopicResourceTypeMessagingContact MessagingConversationListParamsTopicResourceType = "messaging_contact" MessagingConversationListParamsTopicResourceTypeMessageReport MessagingConversationListParamsTopicResourceType = "message_report" MessagingConversationListParamsTopicResourceTypeToolGroup MessagingConversationListParamsTopicResourceType = "tool_group" MessagingConversationListParamsTopicResourceTypeModel MessagingConversationListParamsTopicResourceType = "model" MessagingConversationListParamsTopicResourceTypePaymentTerm MessagingConversationListParamsTopicResourceType = "payment_term" MessagingConversationListParamsTopicResourceTypeShippingTerm MessagingConversationListParamsTopicResourceType = "shipping_term" MessagingConversationListParamsTopicResourceTypeQuantity MessagingConversationListParamsTopicResourceType = "quantity" MessagingConversationListParamsTopicResourceTypeAccountGroup MessagingConversationListParamsTopicResourceType = "account_group" MessagingConversationListParamsTopicResourceTypeSupportRoute MessagingConversationListParamsTopicResourceType = "support_route" MessagingConversationListParamsTopicResourceTypeSupportAvailability MessagingConversationListParamsTopicResourceType = "support_availability" MessagingConversationListParamsTopicResourceTypeAccountStatus MessagingConversationListParamsTopicResourceType = "account_status" MessagingConversationListParamsTopicResourceTypeGeolocation MessagingConversationListParamsTopicResourceType = "geolocation" MessagingConversationListParamsTopicResourceTypeAccountUser MessagingConversationListParamsTopicResourceType = "account_user" MessagingConversationListParamsTopicResourceTypeDepartment MessagingConversationListParamsTopicResourceType = "department" MessagingConversationListParamsTopicResourceTypeAccountIntegration MessagingConversationListParamsTopicResourceType = "account_integration" MessagingConversationListParamsTopicResourceTypeAccountPrice MessagingConversationListParamsTopicResourceType = "account_price" MessagingConversationListParamsTopicResourceTypeProductLine MessagingConversationListParamsTopicResourceType = "product_line" MessagingConversationListParamsTopicResourceTypeItemCategory MessagingConversationListParamsTopicResourceType = "item_category" MessagingConversationListParamsTopicResourceTypeAttribute MessagingConversationListParamsTopicResourceType = "attribute" MessagingConversationListParamsTopicResourceTypeRate MessagingConversationListParamsTopicResourceType = "rate" MessagingConversationListParamsTopicResourceTypeAccountGroupProductLineAccess MessagingConversationListParamsTopicResourceType = "account_group_product_line_access" MessagingConversationListParamsTopicResourceTypeSalesTarget MessagingConversationListParamsTopicResourceType = "sales_target" MessagingConversationListParamsTopicResourceTypeAdjustmentType MessagingConversationListParamsTopicResourceType = "adjustment_type" MessagingConversationListParamsTopicResourceTypeAccountBranding MessagingConversationListParamsTopicResourceType = "account_branding" MessagingConversationListParamsTopicResourceTypeAccountPortal MessagingConversationListParamsTopicResourceType = "account_portal" MessagingConversationListParamsTopicResourceTypeAccountLogoURL MessagingConversationListParamsTopicResourceType = "account_logo_url" MessagingConversationListParamsTopicResourceTypeAccountFaviconURL MessagingConversationListParamsTopicResourceType = "account_favicon_url" MessagingConversationListParamsTopicResourceTypePublicAccount MessagingConversationListParamsTopicResourceType = "public_account" MessagingConversationListParamsTopicResourceTypeProperty MessagingConversationListParamsTopicResourceType = "property" MessagingConversationListParamsTopicResourceTypeCarrier MessagingConversationListParamsTopicResourceType = "carrier" MessagingConversationListParamsTopicResourceTypeServiceLevel MessagingConversationListParamsTopicResourceType = "service_level" MessagingConversationListParamsTopicResourceTypeItem MessagingConversationListParamsTopicResourceType = "item" MessagingConversationListParamsTopicResourceTypeItemLotDefault MessagingConversationListParamsTopicResourceType = "item_lot_default" MessagingConversationListParamsTopicResourceTypeItemInventory MessagingConversationListParamsTopicResourceType = "item_inventory" MessagingConversationListParamsTopicResourceTypeProduct MessagingConversationListParamsTopicResourceType = "product" MessagingConversationListParamsTopicResourceTypeBatch MessagingConversationListParamsTopicResourceType = "batch" MessagingConversationListParamsTopicResourceTypeBatchFlowNode MessagingConversationListParamsTopicResourceType = "batch_flow_node" MessagingConversationListParamsTopicResourceTypeScanningConsumption MessagingConversationListParamsTopicResourceType = "scanning_consumption" MessagingConversationListParamsTopicResourceTypeOpenBatchSummary MessagingConversationListParamsTopicResourceType = "open_batch_summary" MessagingConversationListParamsTopicResourceTypeScanningProductionStepInfo MessagingConversationListParamsTopicResourceType = "scanning_production_step_info" MessagingConversationListParamsTopicResourceTypeScanningStation MessagingConversationListParamsTopicResourceType = "scanning_station" MessagingConversationListParamsTopicResourceTypeProductionStep MessagingConversationListParamsTopicResourceType = "production_step" MessagingConversationListParamsTopicResourceTypeProductionRun MessagingConversationListParamsTopicResourceType = "production_run" MessagingConversationListParamsTopicResourceTypeMachine MessagingConversationListParamsTopicResourceType = "machine" MessagingConversationListParamsTopicResourceTypeMachineStatus MessagingConversationListParamsTopicResourceType = "machine_status" MessagingConversationListParamsTopicResourceTypeMachineDowntimeEvent MessagingConversationListParamsTopicResourceType = "machine_downtime_event" MessagingConversationListParamsTopicResourceTypeDemandOverride MessagingConversationListParamsTopicResourceType = "demand_override" MessagingConversationListParamsTopicResourceTypeDemandOverrideType MessagingConversationListParamsTopicResourceType = "demand_override_type" MessagingConversationListParamsTopicResourceTypeMachineDowntimeReason MessagingConversationListParamsTopicResourceType = "machine_downtime_reason" MessagingConversationListParamsTopicResourceTypeProductionSchedulePreview MessagingConversationListParamsTopicResourceType = "production_schedule_preview" MessagingConversationListParamsTopicResourceTypeProductionScheduleRegeneratePreview MessagingConversationListParamsTopicResourceType = "production_schedule_regenerate_preview" MessagingConversationListParamsTopicResourceTypeProductionSchedule MessagingConversationListParamsTopicResourceType = "production_schedule" MessagingConversationListParamsTopicResourceTypeProductionScheduleLine MessagingConversationListParamsTopicResourceType = "production_schedule_line" MessagingConversationListParamsTopicResourceTypeProductionScheduleDeviation MessagingConversationListParamsTopicResourceType = "production_schedule_deviation" MessagingConversationListParamsTopicResourceTypeProductionScheduleDerivedLine MessagingConversationListParamsTopicResourceType = "production_schedule_derived_line" MessagingConversationListParamsTopicResourceTypeProductionScheduleSettings MessagingConversationListParamsTopicResourceType = "production_schedule_settings" MessagingConversationListParamsTopicResourceTypeProductionScheduleResourceSetting MessagingConversationListParamsTopicResourceType = "production_schedule_resource_setting" MessagingConversationListParamsTopicResourceTypeProductionScheduleItemSetting MessagingConversationListParamsTopicResourceType = "production_schedule_item_setting" MessagingConversationListParamsTopicResourceTypeFulfillmentRecommendation MessagingConversationListParamsTopicResourceType = "fulfillment_recommendation" MessagingConversationListParamsTopicResourceTypeAnalyzeDeliveryPerformanceResponse MessagingConversationListParamsTopicResourceType = "analyze_delivery_performance_response" MessagingConversationListParamsTopicResourceTypeDeliveryPerformance MessagingConversationListParamsTopicResourceType = "delivery_performance" MessagingConversationListParamsTopicResourceTypeDeliveryBacklogBucket MessagingConversationListParamsTopicResourceType = "delivery_backlog_bucket" MessagingConversationListParamsTopicResourceTypeDeliveryLatenessBucket MessagingConversationListParamsTopicResourceType = "delivery_lateness_bucket" MessagingConversationListParamsTopicResourceTypeDeliveryBreakdown MessagingConversationListParamsTopicResourceType = "delivery_breakdown" MessagingConversationListParamsTopicResourceTypeAnalyzeSalesBreakdownResponse MessagingConversationListParamsTopicResourceType = "analyze_sales_breakdown_response" MessagingConversationListParamsTopicResourceTypeSalesTotals MessagingConversationListParamsTopicResourceType = "sales_totals" MessagingConversationListParamsTopicResourceTypeSalesBreakdown MessagingConversationListParamsTopicResourceType = "sales_breakdown" MessagingConversationListParamsTopicResourceTypeScheduleOrderCoverage MessagingConversationListParamsTopicResourceType = "schedule_order_coverage" MessagingConversationListParamsTopicResourceTypeScheduleOrderCoverageLine MessagingConversationListParamsTopicResourceType = "schedule_order_coverage_line" MessagingConversationListParamsTopicResourceTypeScheduleDeviationType MessagingConversationListParamsTopicResourceType = "schedule_deviation_type" MessagingConversationListParamsTopicResourceTypeScheduleAtRiskOrder MessagingConversationListParamsTopicResourceType = "schedule_at_risk_order" MessagingConversationListParamsTopicResourceTypeProductionScheduleFinishedPolicy MessagingConversationListParamsTopicResourceType = "production_schedule_finished_policy" MessagingConversationListParamsTopicResourceTypeProductionScheduleFinishingLine MessagingConversationListParamsTopicResourceType = "production_schedule_finishing_line" MessagingConversationListParamsTopicResourceTypeProductionScheduleWeekRelease MessagingConversationListParamsTopicResourceType = "production_schedule_week_release" MessagingConversationListParamsTopicResourceTypeProductionScheduleWeekReleasePreview MessagingConversationListParamsTopicResourceType = "production_schedule_week_release_preview" MessagingConversationListParamsTopicResourceTypeProductionScheduleItemPolicy MessagingConversationListParamsTopicResourceType = "production_schedule_item_policy" MessagingConversationListParamsTopicResourceTypeChildAccount MessagingConversationListParamsTopicResourceType = "child_account" MessagingConversationListParamsTopicResourceTypeUnitGroup MessagingConversationListParamsTopicResourceType = "unit_group" MessagingConversationListParamsTopicResourceTypeUnitGroupUnit MessagingConversationListParamsTopicResourceType = "unit_group_unit" MessagingConversationListParamsTopicResourceTypeConsumption MessagingConversationListParamsTopicResourceType = "consumption" MessagingConversationListParamsTopicResourceTypeCustomerProductLineAccess MessagingConversationListParamsTopicResourceType = "customer_product_line_access" MessagingConversationListParamsTopicResourceTypeCustomer MessagingConversationListParamsTopicResourceType = "customer" MessagingConversationListParamsTopicResourceTypeFrequentlyOrderedProduct MessagingConversationListParamsTopicResourceType = "frequently_ordered_product" MessagingConversationListParamsTopicResourceTypePriority MessagingConversationListParamsTopicResourceType = "priority" MessagingConversationListParamsTopicResourceTypeDelivery MessagingConversationListParamsTopicResourceType = "delivery" MessagingConversationListParamsTopicResourceTypeDeliveryLine MessagingConversationListParamsTopicResourceType = "delivery_line" MessagingConversationListParamsTopicResourceTypeDeliveryRelated MessagingConversationListParamsTopicResourceType = "delivery_related" MessagingConversationListParamsTopicResourceTypeSalesOrder MessagingConversationListParamsTopicResourceType = "sales_order" MessagingConversationListParamsTopicResourceTypeLocation MessagingConversationListParamsTopicResourceType = "location" MessagingConversationListParamsTopicResourceTypeLocationType MessagingConversationListParamsTopicResourceType = "location_type" MessagingConversationListParamsTopicResourceTypeLot MessagingConversationListParamsTopicResourceType = "lot" MessagingConversationListParamsTopicResourceTypeEmailLog MessagingConversationListParamsTopicResourceType = "email_log" MessagingConversationListParamsTopicResourceTypeEmailDomain MessagingConversationListParamsTopicResourceType = "email_domain" MessagingConversationListParamsTopicResourceTypeEmailInbox MessagingConversationListParamsTopicResourceType = "email_inbox" MessagingConversationListParamsTopicResourceTypeEmailSender MessagingConversationListParamsTopicResourceType = "email_sender" MessagingConversationListParamsTopicResourceTypePortalDomain MessagingConversationListParamsTopicResourceType = "portal_domain" MessagingConversationListParamsTopicResourceTypeDNSRecord MessagingConversationListParamsTopicResourceType = "dns_record" MessagingConversationListParamsTopicResourceTypeInventoryChangeLog MessagingConversationListParamsTopicResourceType = "inventory_change_log" MessagingConversationListParamsTopicResourceTypeInvoice MessagingConversationListParamsTopicResourceType = "invoice" MessagingConversationListParamsTopicResourceTypeInvoiceSummary MessagingConversationListParamsTopicResourceType = "invoice_summary" MessagingConversationListParamsTopicResourceTypeInvoiceLine MessagingConversationListParamsTopicResourceType = "invoice_line" MessagingConversationListParamsTopicResourceTypeInvoiceAllocation MessagingConversationListParamsTopicResourceType = "invoice_allocation" MessagingConversationListParamsTopicResourceTypeInvoiceForPayment MessagingConversationListParamsTopicResourceType = "invoice_for_payment" MessagingConversationListParamsTopicResourceTypeShipment MessagingConversationListParamsTopicResourceType = "shipment" MessagingConversationListParamsTopicResourceTypeShipmentSummary MessagingConversationListParamsTopicResourceType = "shipment_summary" MessagingConversationListParamsTopicResourceTypeShipmentLine MessagingConversationListParamsTopicResourceType = "shipment_line" MessagingConversationListParamsTopicResourceTypeShippingCase MessagingConversationListParamsTopicResourceType = "shipping_case" MessagingConversationListParamsTopicResourceTypeShippingCaseLabelURL MessagingConversationListParamsTopicResourceType = "shipping_case_label_url" MessagingConversationListParamsTopicResourceTypeSettlement MessagingConversationListParamsTopicResourceType = "settlement" MessagingConversationListParamsTopicResourceTypeSettlementSummary MessagingConversationListParamsTopicResourceType = "settlement_summary" MessagingConversationListParamsTopicResourceTypeRolePermission MessagingConversationListParamsTopicResourceType = "role_permission" MessagingConversationListParamsTopicResourceTypeRegistrationFlow MessagingConversationListParamsTopicResourceType = "registration_flow" MessagingConversationListParamsTopicResourceTypeRegistrationFlowOption MessagingConversationListParamsTopicResourceType = "registration_flow_option" MessagingConversationListParamsTopicResourceTypeTransaction MessagingConversationListParamsTopicResourceType = "transaction" MessagingConversationListParamsTopicResourceTypeTransactionSummary MessagingConversationListParamsTopicResourceType = "transaction_summary" MessagingConversationListParamsTopicResourceTypeTransactionMethod MessagingConversationListParamsTopicResourceType = "transaction_method" MessagingConversationListParamsTopicResourceTypeTransactionType MessagingConversationListParamsTopicResourceType = "transaction_type" MessagingConversationListParamsTopicResourceTypeTransactionAllocation MessagingConversationListParamsTopicResourceType = "transaction_allocation" MessagingConversationListParamsTopicResourceTypeUsageItem MessagingConversationListParamsTopicResourceType = "usage_item" MessagingConversationListParamsTopicResourceTypeAccountUsageResponse MessagingConversationListParamsTopicResourceType = "account_usage_response" MessagingConversationListParamsTopicResourceTypeSubscriptionInfo MessagingConversationListParamsTopicResourceType = "subscription_info" MessagingConversationListParamsTopicResourceTypeBillingPortalSessionResponse MessagingConversationListParamsTopicResourceType = "billing_portal_session_response" MessagingConversationListParamsTopicResourceTypeSwitchPlanResponse MessagingConversationListParamsTopicResourceType = "switch_plan_response" MessagingConversationListParamsTopicResourceTypeEnsureBillingCustomerResponse MessagingConversationListParamsTopicResourceType = "ensure_billing_customer_response" MessagingConversationListParamsTopicResourceTypeSpendingCapResponse MessagingConversationListParamsTopicResourceType = "spending_cap_response" MessagingConversationListParamsTopicResourceTypeAgentSpendInfo MessagingConversationListParamsTopicResourceType = "agent_spend_info" MessagingConversationListParamsTopicResourceTypeWebhookResponse MessagingConversationListParamsTopicResourceType = "webhook_response" MessagingConversationListParamsTopicResourceTypeAddressSuggestion MessagingConversationListParamsTopicResourceType = "address_suggestion" MessagingConversationListParamsTopicResourceTypeAddressComponents MessagingConversationListParamsTopicResourceType = "address_components" MessagingConversationListParamsTopicResourceTypeAddressDetailsResult MessagingConversationListParamsTopicResourceType = "address_details_result" MessagingConversationListParamsTopicResourceTypeValidatedAddress MessagingConversationListParamsTopicResourceType = "validated_address" MessagingConversationListParamsTopicResourceTypePlanLimit MessagingConversationListParamsTopicResourceType = "plan_limit" MessagingConversationListParamsTopicResourceTypePlanChangeProration MessagingConversationListParamsTopicResourceType = "plan_change_proration" MessagingConversationListParamsTopicResourceTypePlanChangeLineItem MessagingConversationListParamsTopicResourceType = "plan_change_line_item" MessagingConversationListParamsTopicResourceTypeSetupBillingResponse MessagingConversationListParamsTopicResourceType = "setup_billing_response" MessagingConversationListParamsTopicResourceTypeConfirmPaymentResponse MessagingConversationListParamsTopicResourceType = "confirm_payment_response" MessagingConversationListParamsTopicResourceTypeOAuthResponse MessagingConversationListParamsTopicResourceType = "oauth_response" MessagingConversationListParamsTopicResourceTypeOAuthStatusResponse MessagingConversationListParamsTopicResourceType = "oauth_status_response" MessagingConversationListParamsTopicResourceTypeStripePublishableKey MessagingConversationListParamsTopicResourceType = "stripe_publishable_key" MessagingConversationListParamsTopicResourceTypeStripeStatus MessagingConversationListParamsTopicResourceType = "stripe_status" MessagingConversationListParamsTopicResourceTypeHealthcheck MessagingConversationListParamsTopicResourceType = "healthcheck" MessagingConversationListParamsTopicResourceTypeAgentDefinitionConfig MessagingConversationListParamsTopicResourceType = "agent_definition_config" MessagingConversationListParamsTopicResourceTypeTriggerConfig MessagingConversationListParamsTopicResourceType = "trigger_config" MessagingConversationListParamsTopicResourceTypeCustomerContactInfo MessagingConversationListParamsTopicResourceType = "customer_contact_info" MessagingConversationListParamsTopicResourceTypeCustomerFreightPreferences MessagingConversationListParamsTopicResourceType = "customer_freight_preferences" MessagingConversationListParamsTopicResourceTypeCustomerDefaults MessagingConversationListParamsTopicResourceType = "customer_defaults" MessagingConversationListParamsTopicResourceTypeCustomerLeadTime MessagingConversationListParamsTopicResourceType = "customer_lead_time" MessagingConversationListParamsTopicResourceTypeCustomerNotificationPreferences MessagingConversationListParamsTopicResourceType = "customer_notification_preferences" MessagingConversationListParamsTopicResourceTypeOrderNotificationRecipient MessagingConversationListParamsTopicResourceType = "order_notification_recipient" MessagingConversationListParamsTopicResourceTypeOrderDiscount MessagingConversationListParamsTopicResourceType = "order_discount" MessagingConversationListParamsTopicResourceTypeSalesOrderLine MessagingConversationListParamsTopicResourceType = "sales_order_line" MessagingConversationListParamsTopicResourceTypeSalesOrderType MessagingConversationListParamsTopicResourceType = "sales_order_type" MessagingConversationListParamsTopicResourceTypeSalesOrderStatus MessagingConversationListParamsTopicResourceType = "sales_order_status" MessagingConversationListParamsTopicResourceTypeMaterial MessagingConversationListParamsTopicResourceType = "material" MessagingConversationListParamsTopicResourceTypeSupplierMaterial MessagingConversationListParamsTopicResourceType = "supplier_material" MessagingConversationListParamsTopicResourceTypePart MessagingConversationListParamsTopicResourceType = "part" MessagingConversationListParamsTopicResourceTypePermissionGroup MessagingConversationListParamsTopicResourceType = "permission_group" MessagingConversationListParamsTopicResourceTypePermission MessagingConversationListParamsTopicResourceType = "permission" MessagingConversationListParamsTopicResourceTypePick MessagingConversationListParamsTopicResourceType = "pick" MessagingConversationListParamsTopicResourceTypePickLine MessagingConversationListParamsTopicResourceType = "pick_line" MessagingConversationListParamsTopicResourceTypeProductType MessagingConversationListParamsTopicResourceType = "product_type" MessagingConversationListParamsTopicResourceTypeProduction MessagingConversationListParamsTopicResourceType = "production" MessagingConversationListParamsTopicResourceTypeProductionFlow MessagingConversationListParamsTopicResourceType = "production_flow" MessagingConversationListParamsTopicResourceTypeMap MessagingConversationListParamsTopicResourceType = "map" MessagingConversationListParamsTopicResourceTypePurchaseOrder MessagingConversationListParamsTopicResourceType = "purchase_order" MessagingConversationListParamsTopicResourceTypePurchaseOrderLine MessagingConversationListParamsTopicResourceType = "purchase_order_line" MessagingConversationListParamsTopicResourceTypePurchaseOrderRelated MessagingConversationListParamsTopicResourceType = "purchase_order_related" MessagingConversationListParamsTopicResourceTypeSupplier MessagingConversationListParamsTopicResourceType = "supplier" MessagingConversationListParamsTopicResourceTypeReceivableEntry MessagingConversationListParamsTopicResourceType = "receivable_entry" MessagingConversationListParamsTopicResourceTypeReceivingOrder MessagingConversationListParamsTopicResourceType = "receiving_order" MessagingConversationListParamsTopicResourceTypeReceivingOrderLine MessagingConversationListParamsTopicResourceType = "receiving_order_line" MessagingConversationListParamsTopicResourceTypeReceivingOrderTotals MessagingConversationListParamsTopicResourceType = "receiving_order_totals" MessagingConversationListParamsTopicResourceTypeReceivingOrderStageTotal MessagingConversationListParamsTopicResourceType = "receiving_order_stage_total" MessagingConversationListParamsTopicResourceTypeReceivingOrderRelated MessagingConversationListParamsTopicResourceType = "receiving_order_related" MessagingConversationListParamsTopicResourceTypeEmailContact MessagingConversationListParamsTopicResourceType = "email_contact" MessagingConversationListParamsTopicResourceTypeAllocationEntry MessagingConversationListParamsTopicResourceType = "allocation_entry" MessagingConversationListParamsTopicResourceTypeOpenCreditEntry MessagingConversationListParamsTopicResourceType = "open_credit_entry" MessagingConversationListParamsTopicResourceTypeVolumeDiscount MessagingConversationListParamsTopicResourceType = "volume_discount" MessagingConversationListParamsTopicResourceTypeVolumeDiscountTier MessagingConversationListParamsTopicResourceType = "volume_discount_tier" MessagingConversationListParamsTopicResourceTypeAnalyzeDeliveriesResponse MessagingConversationListParamsTopicResourceType = "analyze_deliveries_response" MessagingConversationListParamsTopicResourceTypeAnalyzeManufacturingResponse MessagingConversationListParamsTopicResourceType = "analyze_manufacturing_response" MessagingConversationListParamsTopicResourceTypeAnalyzeManufacturingBatchResponse MessagingConversationListParamsTopicResourceType = "analyze_manufacturing_batch_response" MessagingConversationListParamsTopicResourceTypeAnalyzeQuarterlyOrdersResponse MessagingConversationListParamsTopicResourceType = "analyze_quarterly_orders_response" MessagingConversationListParamsTopicResourceTypeAnalyzeNewCustomersResponse MessagingConversationListParamsTopicResourceType = "analyze_new_customers_response" MessagingConversationListParamsTopicResourceTypeAnalyzeDemandForecastResponse MessagingConversationListParamsTopicResourceType = "analyze_demand_forecast_response" MessagingConversationListParamsTopicResourceTypeAnalyzeOeeResponse MessagingConversationListParamsTopicResourceType = "analyze_oee_response" MessagingConversationListParamsTopicResourceTypeAnalyzeOeeTrendResponse MessagingConversationListParamsTopicResourceType = "analyze_oee_trend_response" MessagingConversationListParamsTopicResourceTypeAnalyzeScheduleAttainmentResponse MessagingConversationListParamsTopicResourceType = "analyze_schedule_attainment_response" MessagingConversationListParamsTopicResourceTypeCatalogProductLine MessagingConversationListParamsTopicResourceType = "catalog_product_line" MessagingConversationListParamsTopicResourceTypeCatalogCategory MessagingConversationListParamsTopicResourceType = "catalog_category" MessagingConversationListParamsTopicResourceTypeCatalogProduct MessagingConversationListParamsTopicResourceType = "catalog_product" MessagingConversationListParamsTopicResourceTypeCatalogProperty MessagingConversationListParamsTopicResourceType = "catalog_property" MessagingConversationListParamsTopicResourceTypeCatalogAttribute MessagingConversationListParamsTopicResourceType = "catalog_attribute" MessagingConversationListParamsTopicResourceTypeDcLocation MessagingConversationListParamsTopicResourceType = "dc_location" MessagingConversationListParamsTopicResourceTypeEdiRun MessagingConversationListParamsTopicResourceType = "edi_run" MessagingConversationListParamsTopicResourceTypeInventoryItem MessagingConversationListParamsTopicResourceType = "inventory_item" MessagingConversationListParamsTopicResourceTypeAnalyzeWeeksOfSalesResponse MessagingConversationListParamsTopicResourceType = "analyze_weeks_of_sales_response" MessagingConversationListParamsTopicResourceTypeBulkReconcileItemsResponse MessagingConversationListParamsTopicResourceType = "bulk_reconcile_items_response" MessagingConversationListParamsTopicResourceTypeSysProperty MessagingConversationListParamsTopicResourceType = "sys_property" MessagingConversationListParamsTopicResourceTypeSysPropertyType MessagingConversationListParamsTopicResourceType = "sys_property_type" MessagingConversationListParamsTopicResourceTypeSysPropertyValue MessagingConversationListParamsTopicResourceType = "sys_property_value" MessagingConversationListParamsTopicResourceTypeTerritory MessagingConversationListParamsTopicResourceType = "territory" MessagingConversationListParamsTopicResourceTypeTenancy MessagingConversationListParamsTopicResourceType = "tenancy" MessagingConversationListParamsTopicResourceTypeCheckoutSession MessagingConversationListParamsTopicResourceType = "checkout_session" MessagingConversationListParamsTopicResourceTypeEstimateRateResult MessagingConversationListParamsTopicResourceType = "estimate_rate_result" MessagingConversationListParamsTopicResourceTypeRateShopOption MessagingConversationListParamsTopicResourceType = "rate_shop_option" MessagingConversationListParamsTopicResourceTypeRateShopResult MessagingConversationListParamsTopicResourceType = "rate_shop_result" MessagingConversationListParamsTopicResourceTypeOwner MessagingConversationListParamsTopicResourceType = "owner" MessagingConversationListParamsTopicResourceTypeCreatedBy MessagingConversationListParamsTopicResourceType = "created_by" MessagingConversationListParamsTopicResourceTypeMessage MessagingConversationListParamsTopicResourceType = "message" MessagingConversationListParamsTopicResourceTypeAccountPhotoUploadResult MessagingConversationListParamsTopicResourceType = "account_photo_upload_result" MessagingConversationListParamsTopicResourceTypeUserPhotoUploadResult MessagingConversationListParamsTopicResourceType = "user_photo_upload_result" MessagingConversationListParamsTopicResourceTypeUserPhotoURL MessagingConversationListParamsTopicResourceType = "user_photo_url" MessagingConversationListParamsTopicResourceTypeBatchLot MessagingConversationListParamsTopicResourceType = "batch_lot" MessagingConversationListParamsTopicResourceTypeCheckDuplicateResult MessagingConversationListParamsTopicResourceType = "check_duplicate_result" MessagingConversationListParamsTopicResourceTypeItemCosts MessagingConversationListParamsTopicResourceType = "item_costs" MessagingConversationListParamsTopicResourceTypeItemTrends MessagingConversationListParamsTopicResourceType = "item_trends" MessagingConversationListParamsTopicResourceTypeReconciledItemResult MessagingConversationListParamsTopicResourceType = "reconciled_item_result" MessagingConversationListParamsTopicResourceTypeSkippedItemResult MessagingConversationListParamsTopicResourceType = "skipped_item_result" MessagingConversationListParamsTopicResourceTypeReconcileErrorResult MessagingConversationListParamsTopicResourceType = "reconcile_error_result" MessagingConversationListParamsTopicResourceTypeItemTrendPoint MessagingConversationListParamsTopicResourceType = "item_trend_point" MessagingConversationListParamsTopicResourceTypeTenancyPendingRegistration MessagingConversationListParamsTopicResourceType = "tenancy_pending_registration" MessagingConversationListParamsTopicResourceTypeInvoiceAllocationEntry MessagingConversationListParamsTopicResourceType = "invoice_allocation_entry" MessagingConversationListParamsTopicResourceTypeAllocationCustomer MessagingConversationListParamsTopicResourceType = "allocation_customer" MessagingConversationListParamsTopicResourceTypeCheckoutSalesOrder MessagingConversationListParamsTopicResourceType = "checkout_sales_order" MessagingConversationListParamsTopicResourceTypeSalesOrderPriceQuote MessagingConversationListParamsTopicResourceType = "sales_order_price_quote" MessagingConversationListParamsTopicResourceTypeSalesOrderFreightQuote MessagingConversationListParamsTopicResourceType = "sales_order_freight_quote" MessagingConversationListParamsTopicResourceTypeSalesOrderCommitmentQuote MessagingConversationListParamsTopicResourceType = "sales_order_commitment_quote" MessagingConversationListParamsTopicResourceTypeOperatingCalendar MessagingConversationListParamsTopicResourceType = "operating_calendar" MessagingConversationListParamsTopicResourceTypeOperatingCalendarClosure MessagingConversationListParamsTopicResourceType = "operating_calendar_closure" MessagingConversationListParamsTopicResourceTypeSalesOrderPriceQuoteLine MessagingConversationListParamsTopicResourceType = "sales_order_price_quote_line" MessagingConversationListParamsTopicResourceTypeHubspotSyncJob MessagingConversationListParamsTopicResourceType = "hubspot_sync_job" MessagingConversationListParamsTopicResourceTypeHubspotSyncReport MessagingConversationListParamsTopicResourceType = "hubspot_sync_report" MessagingConversationListParamsTopicResourceTypeHubspotCompanyReview MessagingConversationListParamsTopicResourceType = "hubspot_company_review" MessagingConversationListParamsTopicResourceTypeHubspotCompanyCandidate MessagingConversationListParamsTopicResourceType = "hubspot_company_candidate" MessagingConversationListParamsTopicResourceTypeHubspotSyncRecord MessagingConversationListParamsTopicResourceType = "hubspot_sync_record" MessagingConversationListParamsTopicResourceTypeContactMatch MessagingConversationListParamsTopicResourceType = "contact_match" MessagingConversationListParamsTopicResourceTypeReplyDraft MessagingConversationListParamsTopicResourceType = "reply_draft" MessagingConversationListParamsTopicResourceTypeConversationLink MessagingConversationListParamsTopicResourceType = "conversation_link" MessagingConversationListParamsTopicResourceTypeMessagingGroup MessagingConversationListParamsTopicResourceType = "messaging_group" MessagingConversationListParamsTopicResourceTypeMessagingGroupMember MessagingConversationListParamsTopicResourceType = "messaging_group_member" MessagingConversationListParamsTopicResourceTypePortalProfile MessagingConversationListParamsTopicResourceType = "portal_profile" MessagingConversationListParamsTopicResourceTypePortalRegistrationSession MessagingConversationListParamsTopicResourceType = "portal_registration_session" MessagingConversationListParamsTopicResourceTypePortalRegistrationSessionData MessagingConversationListParamsTopicResourceType = "portal_registration_session_data" MessagingConversationListParamsTopicResourceTypePackList MessagingConversationListParamsTopicResourceType = "pack_list" MessagingConversationListParamsTopicResourceTypePackListParty MessagingConversationListParamsTopicResourceType = "pack_list_party" MessagingConversationListParamsTopicResourceTypePackListLineItem MessagingConversationListParamsTopicResourceType = "pack_list_line_item" MessagingConversationListParamsTopicResourceTypePackListBackOrder MessagingConversationListParamsTopicResourceType = "pack_list_back_order" MessagingConversationListParamsTopicResourceTypePackListCase MessagingConversationListParamsTopicResourceType = "pack_list_case" MessagingConversationListParamsTopicResourceTypeJob MessagingConversationListParamsTopicResourceType = "job" MessagingConversationListParamsTopicResourceTypeJobResult MessagingConversationListParamsTopicResourceType = "job_result" MessagingConversationListParamsTopicResourceTypeJobExport MessagingConversationListParamsTopicResourceType = "job_export" MessagingConversationListParamsTopicResourceTypeAnalyzeCustomerPricingResponse MessagingConversationListParamsTopicResourceType = "analyze_customer_pricing_response" MessagingConversationListParamsTopicResourceTypeCustomerPricingFinding MessagingConversationListParamsTopicResourceType = "customer_pricing_finding" MessagingConversationListParamsTopicResourceTypeCustomerPricingSummary MessagingConversationListParamsTopicResourceType = "customer_pricing_summary" MessagingConversationListParamsTopicResourceTypeComputedRate MessagingConversationListParamsTopicResourceType = "computed_rate" MessagingConversationListParamsTopicResourceTypeComputedQuantity MessagingConversationListParamsTopicResourceType = "computed_quantity" MessagingConversationListParamsTopicResourceTypeAnalyzeRealizedMarginsResponse MessagingConversationListParamsTopicResourceType = "analyze_realized_margins_response" MessagingConversationListParamsTopicResourceTypeRealizedMarginFinding MessagingConversationListParamsTopicResourceType = "realized_margin_finding" MessagingConversationListParamsTopicResourceTypeRealizedMarginSummary MessagingConversationListParamsTopicResourceType = "realized_margin_summary" MessagingConversationListParamsTopicResourceTypeShipmentRelated MessagingConversationListParamsTopicResourceType = "shipment_related" MessagingConversationListParamsTopicResourceTypeInvoiceRelated MessagingConversationListParamsTopicResourceType = "invoice_related" MessagingConversationListParamsTopicResourceTypePickRelated MessagingConversationListParamsTopicResourceType = "pick_related" MessagingConversationListParamsTopicResourceTypePickTotals MessagingConversationListParamsTopicResourceType = "pick_totals" MessagingConversationListParamsTopicResourceTypePickStageTotal MessagingConversationListParamsTopicResourceType = "pick_stage_total" )
type MessagingConversationListParamsType ¶
type MessagingConversationListParamsType string
Filter by conversation type.
const ( MessagingConversationListParamsTypeDirectMessage MessagingConversationListParamsType = "direct_message" MessagingConversationListParamsTypeGroup MessagingConversationListParamsType = "group" MessagingConversationListParamsTypeSystem MessagingConversationListParamsType = "system" )
type MessagingConversationListParamsWorkflowStatus ¶
type MessagingConversationListParamsWorkflowStatus string
Filter the support inbox to a single triage lane.
- `new`: opened but nobody has triaged it yet. - `open`: actively being worked. - `waiting_internal`: blocked on the internal team. - `waiting_external`: blocked on a reply from the customer. - `needs_approval`: a drafted reply is waiting for a human to approve it. - `resolved`: closed out.
The working inbox hides resolved cases unless you ask for this lane explicitly.
const ( MessagingConversationListParamsWorkflowStatusNew MessagingConversationListParamsWorkflowStatus = "new" MessagingConversationListParamsWorkflowStatusOpen MessagingConversationListParamsWorkflowStatus = "open" MessagingConversationListParamsWorkflowStatusWaitingInternal MessagingConversationListParamsWorkflowStatus = "waiting_internal" MessagingConversationListParamsWorkflowStatusWaitingExternal MessagingConversationListParamsWorkflowStatus = "waiting_external" MessagingConversationListParamsWorkflowStatusNeedsApproval MessagingConversationListParamsWorkflowStatus = "needs_approval" MessagingConversationListParamsWorkflowStatusResolved MessagingConversationListParamsWorkflowStatus = "resolved" )
type MessagingConversationMessageListParams ¶
type MessagingConversationMessageListParams struct {
// Return only messages that come after this position in the timeline.
//
// Use it to catch up after a dropped realtime connection: pass the sequence of the
// last message you already have to fetch everything since.
AfterSequence param.Opt[int64] `query:"after_sequence,omitzero" json:"-"`
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// Which set of the conversation's messages to return.
//
// Left unset, you get the delivered timeline. Pass `draft` for the case's reply
// drafts awaiting approval, or `scheduled` for the messages you yourself have
// queued for a future send, soonest first. Those two ignore paging and come back
// in a single response.
//
// Any of "draft", "scheduled", "sent", "canceled", "rejected", "failed",
// "superseded".
Status MessagingConversationMessageListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationMessageListParams) URLQuery ¶
func (r MessagingConversationMessageListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationMessageListParams's query parameters as `url.Values`.
type MessagingConversationMessageListParamsStatus ¶
type MessagingConversationMessageListParamsStatus string
Which set of the conversation's messages to return.
Left unset, you get the delivered timeline. Pass `draft` for the case's reply drafts awaiting approval, or `scheduled` for the messages you yourself have queued for a future send, soonest first. Those two ignore paging and come back in a single response.
const ( MessagingConversationMessageListParamsStatusDraft MessagingConversationMessageListParamsStatus = "draft" MessagingConversationMessageListParamsStatusScheduled MessagingConversationMessageListParamsStatus = "scheduled" MessagingConversationMessageListParamsStatusSent MessagingConversationMessageListParamsStatus = "sent" MessagingConversationMessageListParamsStatusCanceled MessagingConversationMessageListParamsStatus = "canceled" MessagingConversationMessageListParamsStatusRejected MessagingConversationMessageListParamsStatus = "rejected" MessagingConversationMessageListParamsStatusFailed MessagingConversationMessageListParamsStatus = "failed" MessagingConversationMessageListParamsStatusSuperseded MessagingConversationMessageListParamsStatus = "superseded" )
type MessagingConversationMessageNewParams ¶
type MessagingConversationMessageNewParams struct {
// Request to post a message to a conversation.
SendMessageRequest SendMessageRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationMessageNewParams) MarshalJSON ¶
func (r MessagingConversationMessageNewParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationMessageNewParams) URLQuery ¶
func (r MessagingConversationMessageNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationMessageNewParams's query parameters as `url.Values`.
func (*MessagingConversationMessageNewParams) UnmarshalJSON ¶
func (r *MessagingConversationMessageNewParams) UnmarshalJSON(data []byte) error
type MessagingConversationMessageService ¶
type MessagingConversationMessageService struct {
// contains filtered or unexported fields
}
Send, list, edit, and delete chat messages.
MessagingConversationMessageService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationMessageService method instead.
func NewMessagingConversationMessageService ¶
func NewMessagingConversationMessageService(opts ...option.RequestOption) (r MessagingConversationMessageService)
NewMessagingConversationMessageService 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 (*MessagingConversationMessageService) List ¶
func (r *MessagingConversationMessageService) List(ctx context.Context, id string, query MessagingConversationMessageListParams, opts ...option.RequestOption) (res *ListMessage, err error)
Returns the messages in a conversation, newest first.
You must be an active participant. A customer reading their own case receives only the messages meant for them — internal team notes are never included.
This endpoint requires the permission: `messaging:read`.
func (*MessagingConversationMessageService) New ¶
func (r *MessagingConversationMessageService) New(ctx context.Context, id string, params MessagingConversationMessageNewParams, opts ...option.RequestOption) (res *Message, err error)
Posts a message to a conversation.
With `mode` = `send` the message is delivered — immediately, or queued when `scheduled_at` is set — and a retry of an immediate send with the same `client_message_id` returns the original message rather than posting it twice. With `mode` = `draft` the message is proposed as a reply to the customer and held for a teammate to approve instead of being sent, and `channel` is required.
Sending requires you to be an active participant allowed to post: view-only participants cannot post, and in a direct message neither side of a block can. On a customer-facing case, replying to the customer moves the case to waiting on the customer, and proposing a draft moves it to awaiting approval.
This endpoint requires the permission: `messaging:create`.
type MessagingConversationNewParams ¶
type MessagingConversationNewParams struct {
// Request to create a conversation.
CreateConversationRequest CreateConversationRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationNewParams) MarshalJSON ¶
func (r MessagingConversationNewParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationNewParams) URLQuery ¶
func (r MessagingConversationNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationNewParams's query parameters as `url.Values`.
func (*MessagingConversationNewParams) UnmarshalJSON ¶
func (r *MessagingConversationNewParams) UnmarshalJSON(data []byte) error
type MessagingConversationParticipantActionService ¶
type MessagingConversationParticipantActionService struct {
// contains filtered or unexported fields
}
Add, remove, and manage participants (including agents) in a conversation.
MessagingConversationParticipantActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationParticipantActionService method instead.
func NewMessagingConversationParticipantActionService ¶
func NewMessagingConversationParticipantActionService(opts ...option.RequestOption) (r MessagingConversationParticipantActionService)
NewMessagingConversationParticipantActionService 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 (*MessagingConversationParticipantActionService) SetRole ¶
func (r *MessagingConversationParticipantActionService) SetRole(ctx context.Context, pid string, params MessagingConversationParticipantActionSetRoleParams, opts ...option.RequestOption) (res *Conversation, err error)
Changes a participant's role in a conversation and returns the updated conversation.
Only the conversation's owner can change roles, and agent and system participants are rejected — they hold no role that can be changed. This is also the only way to grant `owner`: the promoted member gains full control while the caller keeps their own owner role, so a conversation can have more than one owner.
A change of role posts a system event to the thread; setting a participant to the role they already hold is a no-op.
This endpoint requires the permission: `messaging:update`.
type MessagingConversationParticipantActionSetRoleParams ¶
type MessagingConversationParticipantActionSetRoleParams struct {
ID string `path:"id" api:"required" json:"-"`
// Request to change a participant's role in a conversation.
UpdateParticipantRoleRequest UpdateParticipantRoleRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "participants", "topic", "last_message", "last_message.sender",
// "last_message.author", "last_message.resource", "last_message.attachments".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationParticipantActionSetRoleParams) MarshalJSON ¶
func (r MessagingConversationParticipantActionSetRoleParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationParticipantActionSetRoleParams) URLQuery ¶
func (r MessagingConversationParticipantActionSetRoleParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationParticipantActionSetRoleParams's query parameters as `url.Values`.
func (*MessagingConversationParticipantActionSetRoleParams) UnmarshalJSON ¶
func (r *MessagingConversationParticipantActionSetRoleParams) UnmarshalJSON(data []byte) error
type MessagingConversationParticipantDeleteParams ¶
type MessagingConversationParticipantDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type MessagingConversationParticipantDeleteResponse ¶
type MessagingConversationParticipantDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingConversationParticipantDeleteResponse) RawJSON ¶
func (r MessagingConversationParticipantDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingConversationParticipantDeleteResponse) UnmarshalJSON ¶
func (r *MessagingConversationParticipantDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingConversationParticipantNewParams ¶
type MessagingConversationParticipantNewParams struct {
// Request to add an account user to a group conversation.
AddParticipantRequest AddParticipantRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "participants", "topic", "last_message", "last_message.sender",
// "last_message.author", "last_message.resource", "last_message.attachments".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingConversationParticipantNewParams) MarshalJSON ¶
func (r MessagingConversationParticipantNewParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationParticipantNewParams) URLQuery ¶
func (r MessagingConversationParticipantNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationParticipantNewParams's query parameters as `url.Values`.
func (*MessagingConversationParticipantNewParams) UnmarshalJSON ¶
func (r *MessagingConversationParticipantNewParams) UnmarshalJSON(data []byte) error
type MessagingConversationParticipantService ¶
type MessagingConversationParticipantService struct {
// Add, remove, and manage participants (including agents) in a conversation.
Actions MessagingConversationParticipantActionService
// contains filtered or unexported fields
}
Add, remove, and manage participants (including agents) in a conversation.
MessagingConversationParticipantService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationParticipantService method instead.
func NewMessagingConversationParticipantService ¶
func NewMessagingConversationParticipantService(opts ...option.RequestOption) (r MessagingConversationParticipantService)
NewMessagingConversationParticipantService 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 (*MessagingConversationParticipantService) Delete ¶
func (r *MessagingConversationParticipantService) Delete(ctx context.Context, pid string, body MessagingConversationParticipantDeleteParams, opts ...option.RequestOption) (res *MessagingConversationParticipantDeleteResponse, err error)
Removes a participant from a group conversation.
Only an owner or admin can remove someone, participants cannot be removed from a direct message, and callers cannot remove themselves — leave the conversation instead. Use the remove-agent endpoint for agent participants.
The removed member immediately loses access to the conversation, but their earlier messages stay in the thread and a system event records the removal. Adding them back later reactivates the same membership.
This endpoint requires the permission: `messaging:update`.
func (*MessagingConversationParticipantService) New ¶
func (r *MessagingConversationParticipantService) New(ctx context.Context, id string, params MessagingConversationParticipantNewParams, opts ...option.RequestOption) (res *Conversation, err error)
Adds an account user to a group conversation and returns the updated conversation.
Only an owner or admin of the conversation can add someone, and nobody can be added to a direct message. Adding a user who previously left or was removed reactivates their original membership with the role given here; adding someone who is already an active member changes nothing.
The added user receives a notification that they were added, and a system event marking the addition is posted to the thread.
This endpoint requires the permission: `messaging:create`.
type MessagingConversationService ¶
type MessagingConversationService struct {
// Create conversations, send and read messages (1:1 direct messages).
Actions MessagingConversationActionService
// Create conversations, send and read messages (1:1 direct messages).
Links MessagingConversationLinkService
// Send, list, edit, and delete chat messages.
Messages MessagingConversationMessageService
// Add, remove, and manage participants (including agents) in a conversation.
Participants MessagingConversationParticipantService
Attachments MessagingConversationAttachmentService
// contains filtered or unexported fields
}
Create conversations, send and read messages (1:1 direct messages).
MessagingConversationService contains methods and other services that help with interacting with the openmrp 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 NewMessagingConversationService method instead.
func NewMessagingConversationService ¶
func NewMessagingConversationService(opts ...option.RequestOption) (r MessagingConversationService)
NewMessagingConversationService 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 (*MessagingConversationService) Get ¶
func (r *MessagingConversationService) Get(ctx context.Context, id string, query MessagingConversationGetParams, opts ...option.RequestOption) (res *Conversation, err error)
Returns a single conversation the caller participates in.
Someone who has left the conversation can still read it back; it comes back marked hidden for them. A team member who opens a customer-facing case they are not yet part of is seated in it as a participant.
This endpoint requires the permission: `messaging:read`.
func (*MessagingConversationService) List ¶
func (r *MessagingConversationService) List(ctx context.Context, query MessagingConversationListParams, opts ...option.RequestOption) (res *ListConversation, err error)
Returns the caller's conversations, most recently active first.
A customer portal user sees only their own support case with the vendor, and an empty list until they have contacted support.
This endpoint requires the permission: `messaging:read`.
func (*MessagingConversationService) New ¶
func (r *MessagingConversationService) New(ctx context.Context, params MessagingConversationNewParams, opts ...option.RequestOption) (res *Conversation, err error)
Starts a direct message or group conversation.
Requesting a direct message that already exists returns the existing thread instead of creating a duplicate, and a direct message is refused when either user has blocked the other. Conversation creation is rate limited per user.
This endpoint requires the permission: `messaging:create`.
func (*MessagingConversationService) Update ¶
func (r *MessagingConversationService) Update(ctx context.Context, id string, params MessagingConversationUpdateParams, opts ...option.RequestOption) (res *Conversation, err error)
Renames a group conversation.
Only an owner or admin of the conversation can rename it, and direct messages cannot be renamed.
This endpoint requires the permission: `messaging:update`.
type MessagingConversationUpdateParams ¶
type MessagingConversationUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "assignee", "group", "participants", "topic", "last_message",
// "last_message.sender", "last_message.author", "last_message.resource",
// "last_message.attachments", "last_message.attachments.resource".
Include []string `query:"include,omitzero" json:"-"`
// Request to rename a conversation.
UpdateConversationRequest UpdateConversationRequestParam
// contains filtered or unexported fields
}
func (MessagingConversationUpdateParams) MarshalJSON ¶
func (r MessagingConversationUpdateParams) MarshalJSON() (data []byte, err error)
func (MessagingConversationUpdateParams) URLQuery ¶
func (r MessagingConversationUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingConversationUpdateParams's query parameters as `url.Values`.
func (*MessagingConversationUpdateParams) UnmarshalJSON ¶
func (r *MessagingConversationUpdateParams) UnmarshalJSON(data []byte) error
type MessagingEmailDomainActionService ¶
type MessagingEmailDomainActionService struct {
// contains filtered or unexported fields
}
Register customer-owned domains with the email bridge and verify them for sending and receiving mail.
MessagingEmailDomainActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingEmailDomainActionService method instead.
func NewMessagingEmailDomainActionService ¶
func NewMessagingEmailDomainActionService(opts ...option.RequestOption) (r MessagingEmailDomainActionService)
NewMessagingEmailDomainActionService 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 (*MessagingEmailDomainActionService) Verify ¶
func (r *MessagingEmailDomainActionService) Verify(ctx context.Context, id string, opts ...option.RequestOption) (res *EmailDomain, err error)
Checks whether the domain's DKIM records have been published and marks it `verified` once they are confirmed.
Call this after publishing the DKIM records returned at registration. It is safe to call repeatedly: a domain whose records are not visible yet is returned unchanged in `pending`, and an already-verified domain is returned as-is without re-checking. DNS propagation can take a while, so expect to poll.
This endpoint requires the permission: `messaging:update`.
type MessagingEmailDomainDeleteResponse ¶
type MessagingEmailDomainDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingEmailDomainDeleteResponse) RawJSON ¶
func (r MessagingEmailDomainDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingEmailDomainDeleteResponse) UnmarshalJSON ¶
func (r *MessagingEmailDomainDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingEmailDomainNewParams ¶
type MessagingEmailDomainNewParams struct {
// Request to register a sending/receiving domain with the email bridge.
CreateEmailDomainRequest CreateEmailDomainRequestParam
// contains filtered or unexported fields
}
func (MessagingEmailDomainNewParams) MarshalJSON ¶
func (r MessagingEmailDomainNewParams) MarshalJSON() (data []byte, err error)
func (*MessagingEmailDomainNewParams) UnmarshalJSON ¶
func (r *MessagingEmailDomainNewParams) UnmarshalJSON(data []byte) error
type MessagingEmailDomainService ¶
type MessagingEmailDomainService struct {
// Register customer-owned domains with the email bridge and verify them for
// sending and receiving mail.
Actions MessagingEmailDomainActionService
// contains filtered or unexported fields
}
Register customer-owned domains with the email bridge and verify them for sending and receiving mail.
MessagingEmailDomainService contains methods and other services that help with interacting with the openmrp 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 NewMessagingEmailDomainService method instead.
func NewMessagingEmailDomainService ¶
func NewMessagingEmailDomainService(opts ...option.RequestOption) (r MessagingEmailDomainService)
NewMessagingEmailDomainService 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 (*MessagingEmailDomainService) Delete ¶
func (r *MessagingEmailDomainService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingEmailDomainDeleteResponse, err error)
Deregisters a domain from the email bridge and removes its sending identity from the mail provider.
Delete the domain's inboxes first: while any inbox still exists on it, this returns a conflict error.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingEmailDomainService) Get ¶
func (r *MessagingEmailDomainService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *EmailDomain, err error)
Returns a single email domain owned by the account.
This endpoint requires the permission: `messaging:read`.
func (*MessagingEmailDomainService) List ¶
func (r *MessagingEmailDomainService) List(ctx context.Context, opts ...option.RequestOption) (res *ListEmailDomain, err error)
Returns the account's registered email domains.
Every domain is returned in a single response; this list is not paginated.
This endpoint requires the permission: `messaging:read`.
func (*MessagingEmailDomainService) New ¶
func (r *MessagingEmailDomainService) New(ctx context.Context, body MessagingEmailDomainNewParams, opts ...option.RequestOption) (res *EmailDomain, err error)
Registers a domain you own with the email bridge and returns the DKIM tokens to publish.
The domain starts in `pending`. Publish each returned token as a CNAME record in the domain's DNS, then call the verify action to move it to `verified`; only then can inboxes be created on it.
A domain can only be registered once across the platform, so registering one that is already in use returns a conflict error.
This endpoint requires the permission: `messaging:create`.
type MessagingEmailInboxDeleteResponse ¶
type MessagingEmailInboxDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingEmailInboxDeleteResponse) RawJSON ¶
func (r MessagingEmailInboxDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingEmailInboxDeleteResponse) UnmarshalJSON ¶
func (r *MessagingEmailInboxDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingEmailInboxGetParams ¶
type MessagingEmailInboxGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "email_domain", "agent_config".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingEmailInboxGetParams) URLQuery ¶
func (r MessagingEmailInboxGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingEmailInboxGetParams's query parameters as `url.Values`.
type MessagingEmailInboxListParams ¶
type MessagingEmailInboxListParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "email_domain", "agent_config".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingEmailInboxListParams) URLQuery ¶
func (r MessagingEmailInboxListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingEmailInboxListParams's query parameters as `url.Values`.
type MessagingEmailInboxNewParams ¶
type MessagingEmailInboxNewParams struct {
// Request to provision a routable inbox on a verified domain.
CreateEmailInboxRequest CreateEmailInboxRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "email_domain", "agent_config".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingEmailInboxNewParams) MarshalJSON ¶
func (r MessagingEmailInboxNewParams) MarshalJSON() (data []byte, err error)
func (MessagingEmailInboxNewParams) URLQuery ¶
func (r MessagingEmailInboxNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingEmailInboxNewParams's query parameters as `url.Values`.
func (*MessagingEmailInboxNewParams) UnmarshalJSON ¶
func (r *MessagingEmailInboxNewParams) UnmarshalJSON(data []byte) error
type MessagingEmailInboxService ¶
type MessagingEmailInboxService struct {
// contains filtered or unexported fields
}
Provision and manage routable email inboxes that bind inbound mail to chat conversations and send agent replies.
MessagingEmailInboxService contains methods and other services that help with interacting with the openmrp 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 NewMessagingEmailInboxService method instead.
func NewMessagingEmailInboxService ¶
func NewMessagingEmailInboxService(opts ...option.RequestOption) (r MessagingEmailInboxService)
NewMessagingEmailInboxService 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 (*MessagingEmailInboxService) Delete ¶
func (r *MessagingEmailInboxService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingEmailInboxDeleteResponse, err error)
Removes an email inbox.
Mail sent to its address is no longer routed. Conversations the inbox already opened are kept, but replies can no longer be sent on them, so disable the inbox instead of deleting it if you still need to answer open threads.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingEmailInboxService) Get ¶
func (r *MessagingEmailInboxService) Get(ctx context.Context, id string, query MessagingEmailInboxGetParams, opts ...option.RequestOption) (res *EmailInbox, err error)
Returns a single email inbox owned by the account.
This endpoint requires the permission: `messaging:read`.
func (*MessagingEmailInboxService) List ¶
func (r *MessagingEmailInboxService) List(ctx context.Context, query MessagingEmailInboxListParams, opts ...option.RequestOption) (res *ListEmailInbox, err error)
Returns the account's email inboxes across every registered domain.
Every inbox is returned in a single response; this list is not paginated.
This endpoint requires the permission: `messaging:read`.
func (*MessagingEmailInboxService) New ¶
func (r *MessagingEmailInboxService) New(ctx context.Context, params MessagingEmailInboxNewParams, opts ...option.RequestOption) (res *EmailInbox, err error)
Provisions a routable inbox address on a verified domain.
Once created, mail arriving at the address opens a customer case conversation and seats the bound agent and the group's members on it; a reply in a thread that already opened one joins that conversation instead.
This endpoint requires the permission: `messaging:create`.
func (*MessagingEmailInboxService) Update ¶
func (r *MessagingEmailInboxService) Update(ctx context.Context, id string, params MessagingEmailInboxUpdateParams, opts ...option.RequestOption) (res *EmailInbox, err error)
Edits an email inbox's from-name, status, agent configuration, and roster.
Every field except `status` is merged into the inbox's current settings: a field you omit — and an empty array you send — keeps the value it already has, so this endpoint can change a setting but cannot clear one back to unset. The inbox's address and domain are fixed at creation and cannot be changed here.
This endpoint requires the permission: `messaging:update`.
type MessagingEmailInboxUpdateParams ¶
type MessagingEmailInboxUpdateParams struct {
// Request to edit an email inbox's from-name, status, agent configuration, and
// roster.
UpdateEmailInboxRequest UpdateEmailInboxRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "email_domain", "agent_config".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingEmailInboxUpdateParams) MarshalJSON ¶
func (r MessagingEmailInboxUpdateParams) MarshalJSON() (data []byte, err error)
func (MessagingEmailInboxUpdateParams) URLQuery ¶
func (r MessagingEmailInboxUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingEmailInboxUpdateParams's query parameters as `url.Values`.
func (*MessagingEmailInboxUpdateParams) UnmarshalJSON ¶
func (r *MessagingEmailInboxUpdateParams) UnmarshalJSON(data []byte) error
type MessagingEmailSenderDeleteResponse ¶ added in v0.22.0
type MessagingEmailSenderDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingEmailSenderDeleteResponse) RawJSON ¶ added in v0.22.0
func (r MessagingEmailSenderDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingEmailSenderDeleteResponse) UnmarshalJSON ¶ added in v0.22.0
func (r *MessagingEmailSenderDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingEmailSenderService ¶ added in v0.22.0
type MessagingEmailSenderService struct {
// contains filtered or unexported fields
}
Choose the address your order, invoice, and statement emails are sent from, on a domain you have verified.
MessagingEmailSenderService contains methods and other services that help with interacting with the openmrp 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 NewMessagingEmailSenderService method instead.
func NewMessagingEmailSenderService ¶ added in v0.22.0
func NewMessagingEmailSenderService(opts ...option.RequestOption) (r MessagingEmailSenderService)
NewMessagingEmailSenderService 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 (*MessagingEmailSenderService) Delete ¶ added in v0.22.0
func (r *MessagingEmailSenderService) Delete(ctx context.Context, opts ...option.RequestOption) (res *MessagingEmailSenderDeleteResponse, err error)
Clears the configured sending address, returning your customer-facing email to the platform address.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingEmailSenderService) List ¶ added in v0.22.0
func (r *MessagingEmailSenderService) List(ctx context.Context, opts ...option.RequestOption) (res *EmailSender, err error)
Returns the address your order, invoice, and statement emails are sent from, or 404 when none is configured and that mail sends from the platform address.
This endpoint requires the permission: `messaging:read`.
func (*MessagingEmailSenderService) Update ¶ added in v0.22.0
func (r *MessagingEmailSenderService) Update(ctx context.Context, body MessagingEmailSenderUpdateParams, opts ...option.RequestOption) (res *EmailSender, err error)
Sets the address your order, invoice, and statement emails are sent from, replacing any address already configured.
The domain must be verified first. Emails about someone's OpenMRP account — password resets, verification, plan changes — continue to send from the platform address.
This endpoint requires the permission: `messaging:update`.
type MessagingEmailSenderUpdateParams ¶ added in v0.22.0
type MessagingEmailSenderUpdateParams struct {
// Request to configure the address the account's customer-facing email is sent
// from.
SetEmailSenderRequest SetEmailSenderRequestParam
// contains filtered or unexported fields
}
func (MessagingEmailSenderUpdateParams) MarshalJSON ¶ added in v0.22.0
func (r MessagingEmailSenderUpdateParams) MarshalJSON() (data []byte, err error)
func (*MessagingEmailSenderUpdateParams) UnmarshalJSON ¶ added in v0.22.0
func (r *MessagingEmailSenderUpdateParams) UnmarshalJSON(data []byte) error
type MessagingGetContactsParams ¶
type MessagingGetContactsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingGetContactsParams) URLQuery ¶
func (r MessagingGetContactsParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingGetContactsParams's query parameters as `url.Values`.
type MessagingGroup ¶
type MessagingGroup struct {
// Messaging group ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Members ListMessagingGroupMember `json:"members" api:"required"`
// The roster's display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "messaging_group".
Object MessagingGroupObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Members respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A reusable roster: a named set of members (users and/or agents) that seeds new conversations.
Starting a conversation from a group snapshots its current members into that conversation, so the same group can back many conversations (each with its own title); later edits to the group never change conversations already created from it.
func (MessagingGroup) RawJSON ¶
func (r MessagingGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingGroup) UnmarshalJSON ¶
func (r *MessagingGroup) UnmarshalJSON(data []byte) error
type MessagingGroupDeleteResponse ¶
type MessagingGroupDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingGroupDeleteResponse) RawJSON ¶
func (r MessagingGroupDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingGroupDeleteResponse) UnmarshalJSON ¶
func (r *MessagingGroupDeleteResponse) UnmarshalJSON(data []byte) error
type MessagingGroupMember ¶
type MessagingGroupMember struct {
// Membership ID.
//
// This identifies the member's place on the roster, not the user or agent
// themselves; it is the id to pass when removing them from the roster.
ID string `json:"id" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// Resource type identifier.
//
// Any of "messaging_group_member".
Object MessagingGroupMemberObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Actor respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A member of a reusable roster: either a user or an agent, represented by its actor.
func (MessagingGroupMember) RawJSON ¶
func (r MessagingGroupMember) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingGroupMember) UnmarshalJSON ¶
func (r *MessagingGroupMember) UnmarshalJSON(data []byte) error
type MessagingGroupMemberDeleteParams ¶
type MessagingGroupMemberDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type MessagingGroupMemberNewParams ¶
type MessagingGroupMemberNewParams struct {
// Request to add a member to a reusable roster.
AddMessagingGroupMemberRequest AddMessagingGroupMemberRequestParam
// contains filtered or unexported fields
}
func (MessagingGroupMemberNewParams) MarshalJSON ¶
func (r MessagingGroupMemberNewParams) MarshalJSON() (data []byte, err error)
func (*MessagingGroupMemberNewParams) UnmarshalJSON ¶
func (r *MessagingGroupMemberNewParams) UnmarshalJSON(data []byte) error
type MessagingGroupMemberObject ¶
type MessagingGroupMemberObject string
Resource type identifier.
const (
MessagingGroupMemberObjectMessagingGroupMember MessagingGroupMemberObject = "messaging_group_member"
)
type MessagingGroupMemberService ¶
type MessagingGroupMemberService struct {
// contains filtered or unexported fields
}
Create and manage reusable rosters (named member sets) that seed many conversations.
MessagingGroupMemberService contains methods and other services that help with interacting with the openmrp 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 NewMessagingGroupMemberService method instead.
func NewMessagingGroupMemberService ¶
func NewMessagingGroupMemberService(opts ...option.RequestOption) (r MessagingGroupMemberService)
NewMessagingGroupMemberService 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 (*MessagingGroupMemberService) Delete ¶
func (r *MessagingGroupMemberService) Delete(ctx context.Context, memberID string, body MessagingGroupMemberDeleteParams, opts ...option.RequestOption) (res *MessagingGroup, err error)
Removes a member from a reusable roster and returns the updated roster.
Only conversations started from the roster afterwards are affected; the member stays in every conversation that was already seeded from it.
This endpoint requires the permission: `messaging:update`.
func (*MessagingGroupMemberService) New ¶
func (r *MessagingGroupMemberService) New(ctx context.Context, id string, body MessagingGroupMemberNewParams, opts ...option.RequestOption) (res *MessagingGroup, err error)
Adds a member (a user or an agent) to a reusable roster and returns the updated roster.
Adding someone who is already on the roster does not create a second entry for them. The new member is picked up only by conversations started from the roster afterwards; conversations already created from it keep the members they were seeded with.
This endpoint requires the permission: `messaging:update`.
type MessagingGroupNewParams ¶
type MessagingGroupNewParams struct {
// Request to create a reusable roster.
CreateMessagingGroupRequest CreateMessagingGroupRequestParam
// contains filtered or unexported fields
}
func (MessagingGroupNewParams) MarshalJSON ¶
func (r MessagingGroupNewParams) MarshalJSON() (data []byte, err error)
func (*MessagingGroupNewParams) UnmarshalJSON ¶
func (r *MessagingGroupNewParams) UnmarshalJSON(data []byte) error
type MessagingGroupObject ¶
type MessagingGroupObject string
Resource type identifier.
const (
MessagingGroupObjectMessagingGroup MessagingGroupObject = "messaging_group"
)
type MessagingGroupService ¶
type MessagingGroupService struct {
// Create and manage reusable rosters (named member sets) that seed many
// conversations.
Members MessagingGroupMemberService
// contains filtered or unexported fields
}
Create and manage reusable rosters (named member sets) that seed many conversations.
MessagingGroupService contains methods and other services that help with interacting with the openmrp 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 NewMessagingGroupService method instead.
func NewMessagingGroupService ¶
func NewMessagingGroupService(opts ...option.RequestOption) (r MessagingGroupService)
NewMessagingGroupService 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 (*MessagingGroupService) Delete ¶
func (r *MessagingGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingGroupDeleteResponse, err error)
Deletes a reusable roster.
Conversations already started from it are unaffected (their members were snapshotted); they simply lose the roster reference.
This endpoint requires the permission: `messaging:delete`.
func (*MessagingGroupService) Get ¶
func (r *MessagingGroupService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MessagingGroup, err error)
Retrieves a reusable roster together with its current members.
This endpoint requires the permission: `messaging:read`.
func (*MessagingGroupService) List ¶
func (r *MessagingGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *ListMessagingGroup, err error)
Lists the reusable rosters in the caller's account, each with its members.
Rosters come back most-recently-updated first, and adding or removing a member counts as an update. The whole account's rosters are returned in one page.
This endpoint requires the permission: `messaging:read`.
func (*MessagingGroupService) New ¶
func (r *MessagingGroupService) New(ctx context.Context, body MessagingGroupNewParams, opts ...option.RequestOption) (res *MessagingGroup, err error)
Creates a reusable roster of members (users and/or agents) that can seed many conversations.
Every account user listed must exist; repeated ids are ignored. The caller is recorded as the creator but is not added to the roster automatically — include their own account user id to be a member.
This endpoint requires the permission: `messaging:create`.
func (*MessagingGroupService) Update ¶
func (r *MessagingGroupService) Update(ctx context.Context, id string, body MessagingGroupUpdateParams, opts ...option.RequestOption) (res *MessagingGroup, err error)
Renames a reusable roster.
Members are managed through the add-member and remove-member endpoints, not here.
This endpoint requires the permission: `messaging:update`.
type MessagingGroupUpdateParams ¶
type MessagingGroupUpdateParams struct {
// Request to rename a reusable roster.
UpdateMessagingGroupRequest UpdateMessagingGroupRequestParam
// contains filtered or unexported fields
}
func (MessagingGroupUpdateParams) MarshalJSON ¶
func (r MessagingGroupUpdateParams) MarshalJSON() (data []byte, err error)
func (*MessagingGroupUpdateParams) UnmarshalJSON ¶
func (r *MessagingGroupUpdateParams) UnmarshalJSON(data []byte) error
type MessagingMessageActionApproveSendParams ¶
type MessagingMessageActionApproveSendParams struct {
// Request to approve a customer-reply draft and send it to the customer.
ApproveSendDraftRequest ApproveSendDraftRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingMessageActionApproveSendParams) MarshalJSON ¶
func (r MessagingMessageActionApproveSendParams) MarshalJSON() (data []byte, err error)
func (MessagingMessageActionApproveSendParams) URLQuery ¶
func (r MessagingMessageActionApproveSendParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingMessageActionApproveSendParams's query parameters as `url.Values`.
func (*MessagingMessageActionApproveSendParams) UnmarshalJSON ¶
func (r *MessagingMessageActionApproveSendParams) UnmarshalJSON(data []byte) error
type MessagingMessageActionCancelParams ¶
type MessagingMessageActionCancelParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingMessageActionCancelParams) URLQuery ¶
func (r MessagingMessageActionCancelParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingMessageActionCancelParams's query parameters as `url.Values`.
type MessagingMessageActionRejectParams ¶
type MessagingMessageActionRejectParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingMessageActionRejectParams) URLQuery ¶
func (r MessagingMessageActionRejectParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingMessageActionRejectParams's query parameters as `url.Values`.
type MessagingMessageActionService ¶
type MessagingMessageActionService struct {
// contains filtered or unexported fields
}
Send, list, edit, and delete chat messages.
MessagingMessageActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingMessageActionService method instead.
func NewMessagingMessageActionService ¶
func NewMessagingMessageActionService(opts ...option.RequestOption) (r MessagingMessageActionService)
NewMessagingMessageActionService 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 (*MessagingMessageActionService) ApproveSend ¶
func (r *MessagingMessageActionService) ApproveSend(ctx context.Context, id string, params MessagingMessageActionApproveSendParams, opts ...option.RequestOption) (res *Message, err error)
Approves a reply draft and sends it to the customer.
The draft becomes the sent message rather than spawning a copy: it takes its place in the case timeline, and the customer sees it as coming from "Customer Service". A draft on the email channel goes out as a reply on the case's email thread; otherwise it appears in the customer's conversation. Sending also moves the case to waiting on the customer.
Only the first approval of a draft sends it — approving one that is no longer open fails, so a concurrent double-approve cannot reach the customer twice. Customer accounts cannot approve drafts.
This endpoint requires the permission: `messaging:update`.
func (*MessagingMessageActionService) Cancel ¶
func (r *MessagingMessageActionService) Cancel(ctx context.Context, id string, body MessagingMessageActionCancelParams, opts ...option.RequestOption) (res *Message, err error)
Cancels a message that was scheduled for a future send, so it is never delivered.
You can only cancel a message you scheduled yourself, and only while it is still waiting to go out — once it has been delivered or has otherwise left the scheduled state, the request fails. The canceled message is kept as a record and never appears in the conversation.
This endpoint requires the permission: `messaging:update`.
func (*MessagingMessageActionService) Reject ¶
func (r *MessagingMessageActionService) Reject(ctx context.Context, id string, body MessagingMessageActionRejectParams, opts ...option.RequestOption) (res *Message, err error)
Discards a reply draft without sending it to the customer.
The draft is kept as a rejected record for history and can no longer be edited or approved. Because the customer is still owed an answer, the case moves back to waiting on your team.
This endpoint requires the permission: `messaging:update`.
type MessagingMessageService ¶
type MessagingMessageService struct {
// Send, list, edit, and delete chat messages.
Actions MessagingMessageActionService
// contains filtered or unexported fields
}
Send, list, edit, and delete chat messages.
MessagingMessageService contains methods and other services that help with interacting with the openmrp 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 NewMessagingMessageService method instead.
func NewMessagingMessageService ¶
func NewMessagingMessageService(opts ...option.RequestOption) (r MessagingMessageService)
NewMessagingMessageService 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 (*MessagingMessageService) Update ¶
func (r *MessagingMessageService) Update(ctx context.Context, id string, params MessagingMessageUpdateParams, opts ...option.RequestOption) (res *Message, err error)
Revises a reply draft before it is sent to the customer.
Only a draft that is still awaiting approval can be edited; once it has been approved, rejected, or superseded the request fails. Nothing reaches the customer until the draft is approved.
This endpoint requires the permission: `messaging:update`.
type MessagingMessageUpdateParams ¶
type MessagingMessageUpdateParams struct {
// Request to edit a still-open customer-reply draft message.
UpdateDraftRequest UpdateDraftRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "author", "resource", "attachments", "attachments.resource",
// "conversation", "conversation.participants", "conversation.last_message",
// "reply_to", "reply_to.sender", "reply_to.author", "reply_to.attachments",
// "agent_run".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingMessageUpdateParams) MarshalJSON ¶
func (r MessagingMessageUpdateParams) MarshalJSON() (data []byte, err error)
func (MessagingMessageUpdateParams) URLQuery ¶
func (r MessagingMessageUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingMessageUpdateParams's query parameters as `url.Values`.
func (*MessagingMessageUpdateParams) UnmarshalJSON ¶
func (r *MessagingMessageUpdateParams) UnmarshalJSON(data []byte) error
type MessagingNotificationActionDismissParams ¶
type MessagingNotificationActionDismissParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingNotificationActionDismissParams) URLQuery ¶
func (r MessagingNotificationActionDismissParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingNotificationActionDismissParams's query parameters as `url.Values`.
type MessagingNotificationActionMarkAllSeenResponse ¶
type MessagingNotificationActionMarkAllSeenResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (MessagingNotificationActionMarkAllSeenResponse) RawJSON ¶
func (r MessagingNotificationActionMarkAllSeenResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*MessagingNotificationActionMarkAllSeenResponse) UnmarshalJSON ¶
func (r *MessagingNotificationActionMarkAllSeenResponse) UnmarshalJSON(data []byte) error
type MessagingNotificationActionReadParams ¶
type MessagingNotificationActionReadParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingNotificationActionReadParams) URLQuery ¶
func (r MessagingNotificationActionReadParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingNotificationActionReadParams's query parameters as `url.Values`.
type MessagingNotificationActionSeenParams ¶
type MessagingNotificationActionSeenParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingNotificationActionSeenParams) URLQuery ¶
func (r MessagingNotificationActionSeenParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingNotificationActionSeenParams's query parameters as `url.Values`.
type MessagingNotificationActionService ¶
type MessagingNotificationActionService struct {
// contains filtered or unexported fields
}
List, read, and manage in-app notifications.
MessagingNotificationActionService contains methods and other services that help with interacting with the openmrp 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 NewMessagingNotificationActionService method instead.
func NewMessagingNotificationActionService ¶
func NewMessagingNotificationActionService(opts ...option.RequestOption) (r MessagingNotificationActionService)
NewMessagingNotificationActionService 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 (*MessagingNotificationActionService) Dismiss ¶
func (r *MessagingNotificationActionService) Dismiss(ctx context.Context, id string, body MessagingNotificationActionDismissParams, opts ...option.RequestOption) (res *Notification, err error)
Dismisses a notification, removing it from the active feed.
The notification is not deleted: it can still be retrieved by ID and listed with the `dismissed` status filter. Dismissing an already-dismissed notification keeps the original dismissal time.
This endpoint requires the permission: `messaging:update`.
func (*MessagingNotificationActionService) MarkAllSeen ¶
func (r *MessagingNotificationActionService) MarkAllSeen(ctx context.Context, opts ...option.RequestOption) (res *MessagingNotificationActionMarkAllSeenResponse, err error)
Marks every one of the caller's unseen notifications as seen in a single call.
The notifications stay in the feed and are not marked read. Account announcements are unaffected and are cleared individually, so the unread total can remain above zero afterwards.
This endpoint requires the permission: `messaging:update`.
func (*MessagingNotificationActionService) Read ¶
func (r *MessagingNotificationActionService) Read(ctx context.Context, id string, body MessagingNotificationActionReadParams, opts ...option.RequestOption) (res *Notification, err error)
Marks a notification as read, as when the user opens it.
Reading also marks the notification seen if it was not already, and leaves it in the feed until it is dismissed. Repeating the call keeps the original read time.
This endpoint requires the permission: `messaging:update`.
func (*MessagingNotificationActionService) Seen ¶
func (r *MessagingNotificationActionService) Seen(ctx context.Context, id string, body MessagingNotificationActionSeenParams, opts ...option.RequestOption) (res *Notification, err error)
Marks a notification as seen, as when it is surfaced to the user without being opened.
Seeing a notification removes it from the unread count but leaves it in the feed. Repeating the call keeps the original seen time.
This endpoint requires the permission: `messaging:update`.
type MessagingNotificationGetParams ¶
type MessagingNotificationGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "resource".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingNotificationGetParams) URLQuery ¶
func (r MessagingNotificationGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingNotificationGetParams's query parameters as `url.Values`.
type MessagingNotificationListParams ¶
type MessagingNotificationListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Return only notifications of this category, such as `chat.mention` or
// `order.updated`.
//
// Any of "chat.message", "chat.mention", "chat.added", "order.updated",
// "agent.run_completed", "agent.alert", "system.broadcast", "customer.registered".
Category MessagingNotificationListParamsCategory `query:"category,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sender", "resource".
Include []string `query:"include,omitzero" json:"-"`
// Return only notifications sent by these actors.
//
// A notification sent by a person is attributed to their account user id, not
// their user id.
SenderIDs []string `query:"sender_ids,omitzero" json:"-"`
// Return only notifications sent by these kinds of actor.
//
// Notifications raised by the platform itself are attributed to the `system`
// sender type but are returned without a sender.
//
// Any of "user", "group", "system", "agent", "apikey".
SenderTypes []string `query:"sender_types,omitzero" json:"-"`
// Return only notifications in this lifecycle state.
//
// When omitted, the response is the active feed: every notification that has not
// been dismissed, whatever its seen or read state. Pass `dismissed` to review
// notifications that were cleared out of the feed.
//
// Any of "unseen", "seen", "read", "dismissed".
Status MessagingNotificationListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (MessagingNotificationListParams) URLQuery ¶
func (r MessagingNotificationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes MessagingNotificationListParams's query parameters as `url.Values`.
type MessagingNotificationListParamsCategory ¶
type MessagingNotificationListParamsCategory string
Return only notifications of this category, such as `chat.mention` or `order.updated`.
const ( MessagingNotificationListParamsCategoryChatMessage MessagingNotificationListParamsCategory = "chat.message" MessagingNotificationListParamsCategoryChatMention MessagingNotificationListParamsCategory = "chat.mention" MessagingNotificationListParamsCategoryChatAdded MessagingNotificationListParamsCategory = "chat.added" MessagingNotificationListParamsCategoryOrderUpdated MessagingNotificationListParamsCategory = "order.updated" MessagingNotificationListParamsCategoryAgentRunCompleted MessagingNotificationListParamsCategory = "agent.run_completed" MessagingNotificationListParamsCategoryAgentAlert MessagingNotificationListParamsCategory = "agent.alert" MessagingNotificationListParamsCategorySystemBroadcast MessagingNotificationListParamsCategory = "system.broadcast" MessagingNotificationListParamsCategoryCustomerRegistered MessagingNotificationListParamsCategory = "customer.registered" )
type MessagingNotificationListParamsStatus ¶
type MessagingNotificationListParamsStatus string
Return only notifications in this lifecycle state.
When omitted, the response is the active feed: every notification that has not been dismissed, whatever its seen or read state. Pass `dismissed` to review notifications that were cleared out of the feed.
const ( MessagingNotificationListParamsStatusUnseen MessagingNotificationListParamsStatus = "unseen" MessagingNotificationListParamsStatusSeen MessagingNotificationListParamsStatus = "seen" MessagingNotificationListParamsStatusRead MessagingNotificationListParamsStatus = "read" MessagingNotificationListParamsStatusDismissed MessagingNotificationListParamsStatus = "dismissed" )
type MessagingNotificationNewParams ¶
type MessagingNotificationNewParams struct {
// Request to send an in-app notification.
//
// The target decides whether the notification goes to one member of the account or
// to everyone in it.
SendNotificationRequest SendNotificationRequestParam
// contains filtered or unexported fields
}
func (MessagingNotificationNewParams) MarshalJSON ¶
func (r MessagingNotificationNewParams) MarshalJSON() (data []byte, err error)
func (*MessagingNotificationNewParams) UnmarshalJSON ¶
func (r *MessagingNotificationNewParams) UnmarshalJSON(data []byte) error
type MessagingNotificationService ¶
type MessagingNotificationService struct {
// List, read, and manage in-app notifications.
Actions MessagingNotificationActionService
// contains filtered or unexported fields
}
List, read, and manage in-app notifications.
MessagingNotificationService contains methods and other services that help with interacting with the openmrp 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 NewMessagingNotificationService method instead.
func NewMessagingNotificationService ¶
func NewMessagingNotificationService(opts ...option.RequestOption) (r MessagingNotificationService)
NewMessagingNotificationService 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 (*MessagingNotificationService) Get ¶
func (r *MessagingNotificationService) Get(ctx context.Context, id string, query MessagingNotificationGetParams, opts ...option.RequestOption) (res *Notification, err error)
Retrieves a single notification by ID.
Only notifications addressed to the current user are visible; another user's notification is reported as not found. Dismissed notifications remain retrievable.
This endpoint requires the permission: `messaging:read`.
func (*MessagingNotificationService) GetUnreadCount ¶
func (r *MessagingNotificationService) GetUnreadCount(ctx context.Context, opts ...option.RequestOption) (res *NotificationUnreadCount, err error)
Returns the current user's unread tallies for the account they are acting in, for driving a notification badge.
The total also counts account announcements the user has not seen, so it can be higher than the notification count alone.
This endpoint requires the permission: `messaging:read`.
func (*MessagingNotificationService) GetUnreadSummary ¶
func (r *MessagingNotificationService) GetUnreadSummary(ctx context.Context, opts ...option.RequestOption) (res *NotificationUnreadSummary, err error)
Returns the caller's unread totals broken down by account, covering every account they belong to and not just the one they are acting in.
Use it to show a user that activity is waiting for them elsewhere before they switch accounts. Each tally counts unseen notifications and unseen account announcements together.
This endpoint requires the permission: `messaging:read`.
func (*MessagingNotificationService) List ¶
func (r *MessagingNotificationService) List(ctx context.Context, query MessagingNotificationListParams, opts ...option.RequestOption) (res *ListNotification, err error)
Lists the notifications addressed to the current user, newest first.
The feed is personal and scoped to the account being acted in, so it never includes another user's notifications. Callers with no user membership in that account, such as an API key, get an empty list rather than an error.
This endpoint requires the permission: `messaging:read`.
func (*MessagingNotificationService) New ¶
func (r *MessagingNotificationService) New(ctx context.Context, body MessagingNotificationNewParams, opts ...option.RequestOption) (res *NotificationSendResult, err error)
Sends an in-app notification to a single member of an account, or announces it to everyone in the account.
A send to one member is attributed to the authenticated caller, so the recipient sees who sent it. It is accepted and then fanned out, so it reaches the recipient's feed and their connected clients shortly after the response.
An announcement to the whole account is stored as the request is accepted, carries no sender, and may only target the account you are currently acting in.
This endpoint requires the permission: `alerts:create`.
type MessagingPreferenceService ¶
type MessagingPreferenceService struct {
// contains filtered or unexported fields
}
Manage per-category notification channel preferences (in-app, email, push).
MessagingPreferenceService contains methods and other services that help with interacting with the openmrp 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 NewMessagingPreferenceService method instead.
func NewMessagingPreferenceService ¶
func NewMessagingPreferenceService(opts ...option.RequestOption) (r MessagingPreferenceService)
NewMessagingPreferenceService 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 (*MessagingPreferenceService) List ¶
func (r *MessagingPreferenceService) List(ctx context.Context, opts ...option.RequestOption) (res *ListNotificationPreference, err error)
Lists the current user's notification preferences for the account they are acting in: their global default plus any per-category overrides.
Only preferences the user has explicitly set are returned, so an empty list means everything falls back to the standard behavior — in-app notifications on, email and push off.
This endpoint requires the permission: `messaging:read`.
func (*MessagingPreferenceService) Update ¶
func (r *MessagingPreferenceService) Update(ctx context.Context, body MessagingPreferenceUpdateParams, opts ...option.RequestOption) (res *NotificationPreference, err error)
Creates or replaces one of the current user's notification preferences, either their global default or the override for a single category.
The preference applies only to the account being acted in, and the category must be one the platform recognizes. Callers without a user membership in that account cannot hold preferences and are refused.
This endpoint requires the permission: `messaging:update`.
type MessagingPreferenceUpdateParams ¶
type MessagingPreferenceUpdateParams struct {
// Request to create or replace one of the caller's notification preferences.
//
// A user has at most one preference per category, so sending the same category
// again replaces the previous settings outright — every channel is written from
// this request, not merged with what was there before.
//
// Chat notifications are the only ones these settings currently govern:
// notifications in every other category reach the in-app feed and are never
// emailed, whatever is stored here.
UpsertNotificationPreferenceRequest UpsertNotificationPreferenceRequestParam
// contains filtered or unexported fields
}
func (MessagingPreferenceUpdateParams) MarshalJSON ¶
func (r MessagingPreferenceUpdateParams) MarshalJSON() (data []byte, err error)
func (*MessagingPreferenceUpdateParams) UnmarshalJSON ¶
func (r *MessagingPreferenceUpdateParams) UnmarshalJSON(data []byte) error
type MessagingService ¶
type MessagingService struct {
// List, read, and manage in-app notifications.
Notifications MessagingNotificationService
// List, read, and manage broadcast announcements.
Announcements MessagingAnnouncementService
// Create conversations, send and read messages (1:1 direct messages).
Conversations MessagingConversationService
// Send, list, edit, and delete chat messages.
Messages MessagingMessageService
// Create and manage reusable rosters (named member sets) that seed many
// conversations.
Groups MessagingGroupService
// Block and unblock users from direct messaging.
Blocks MessagingBlockService
// Manage per-category notification channel preferences (in-app, email, push).
Preferences MessagingPreferenceService
// Register customer-owned domains with the email bridge and verify them for
// sending and receiving mail.
EmailDomains MessagingEmailDomainService
// Provision and manage routable email inboxes that bind inbound mail to chat
// conversations and send agent replies.
EmailInboxes MessagingEmailInboxService
// Choose the address your order, invoice, and statement emails are sent from, on a
// domain you have verified.
EmailSender MessagingEmailSenderService
// contains filtered or unexported fields
}
List messageable contacts (the messaging directory).
MessagingService contains methods and other services that help with interacting with the openmrp 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 NewMessagingService method instead.
func NewMessagingService ¶
func NewMessagingService(opts ...option.RequestOption) (r MessagingService)
NewMessagingService 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 (*MessagingService) GetContacts ¶
func (r *MessagingService) GetContacts(ctx context.Context, query MessagingGetContactsParams, opts ...option.RequestOption) (res *ListActor, err error)
Lists the people the caller can start a conversation with.
For a member of the account, this is everyone active in that account, including themselves — messaging yourself is allowed. A customer signed in to the portal instead gets one shared "Customer Service" contact rather than the individual staff of the account they are dealing with; messages to it are routed by the account's support routes.
Blocking is not applied to the directory: someone you have blocked, or who has blocked you, is still listed even though a direct message with them cannot be opened.
The directory is returned as a single unpaginated page capped at 100 names, so narrow it with `q` in an account with many people.
This endpoint requires the permission: `messaging:read`.
type MuteConversationRequestParam ¶
type MuteConversationRequestParam struct {
// When the mute expires.
//
// Omit to mute indefinitely.
MutedUntil param.Opt[time.Time] `json:"muted_until,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
Request to mute a conversation for the caller.
func (MuteConversationRequestParam) MarshalJSON ¶
func (r MuteConversationRequestParam) MarshalJSON() (data []byte, err error)
func (*MuteConversationRequestParam) UnmarshalJSON ¶
func (r *MuteConversationRequestParam) UnmarshalJSON(data []byte) error
type Notification ¶
type Notification struct {
// Notification ID.
ID string `json:"id" api:"required"`
// Supporting detail shown beneath the title, such as a preview of the message that
// triggered the notification.
Body string `json:"body" api:"required"`
// The kind of event this notification represents.
//
// The set is open-ended and may grow over time. Common first-party categories are:
//
// - `chat.message`: a new message in a conversation.
// - `chat.mention`: a direct @mention, delivered even when the conversation is
// muted.
// - `chat.added`: the user was added to a conversation.
// - `order.updated`: an order the user is involved with changed.
// - `agent.run_completed`: an agent run the user triggered finished.
// - `agent.alert`: an agent raised an alert during a run.
// - `system.broadcast`: a targeted system message.
// - `customer.registered`: a buyer completed registration on your customer portal.
//
// Any of "chat.message", "chat.mention", "chat.added", "order.updated",
// "agent.run_completed", "agent.alert", "system.broadcast", "customer.registered".
Category NotificationCategory `json:"category" api:"required"`
ChangeCount int64 `json:"change_count" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// When the notification was dismissed.
DismissedAt time.Time `json:"dismissed_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "notification".
Object NotificationObject `json:"object" api:"required"`
// How prominently the notification should be surfaced, from `low` through
// `urgent`.
//
// Any of "low", "normal", "high", "urgent".
Priority NotificationPriority `json:"priority" api:"required"`
// When the notification was explicitly opened.
ReadAt time.Time `json:"read_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Resource Entity `json:"resource" api:"required"`
// When the notification was first surfaced to the user.
SeenAt time.Time `json:"seen_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Sender Actor `json:"sender" api:"required"`
// Where the notification is in its lifecycle.
//
// - `unseen`: delivered but not yet surfaced to the user.
// - `seen`: surfaced in the feed but not yet opened.
// - `read`: explicitly opened by the user.
// - `dismissed`: removed from the active feed.
//
// The status is derived from the seen, read, and dismissed timestamps, and only
// ever moves forward — a notification can never become unseen again.
//
// Any of "unseen", "seen", "read", "dismissed".
Status NotificationStatus `json:"status" api:"required"`
// Short headline shown in the feed.
Title string `json:"title" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Body respjson.Field
Category respjson.Field
ChangeCount respjson.Field
CreatedAt respjson.Field
DismissedAt respjson.Field
Object respjson.Field
Priority respjson.Field
ReadAt respjson.Field
Resource respjson.Field
SeenAt respjson.Field
Sender respjson.Field
Status respjson.Field
Title respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An in-app notification addressed to a single user, shown in their notification (bell) feed.
A notification belongs to one user in one account, so the feed you read is always that of the authenticated caller in the account they are acting in. Announcements broadcast to a whole account are a separate resource.
func (Notification) RawJSON ¶
func (r Notification) RawJSON() string
Returns the unmodified JSON received from the API
func (*Notification) UnmarshalJSON ¶
func (r *Notification) UnmarshalJSON(data []byte) error
type NotificationCategory ¶
type NotificationCategory string
The kind of event this notification represents.
The set is open-ended and may grow over time. Common first-party categories are:
- `chat.message`: a new message in a conversation.
- `chat.mention`: a direct @mention, delivered even when the conversation is muted.
- `chat.added`: the user was added to a conversation.
- `order.updated`: an order the user is involved with changed.
- `agent.run_completed`: an agent run the user triggered finished.
- `agent.alert`: an agent raised an alert during a run.
- `system.broadcast`: a targeted system message.
- `customer.registered`: a buyer completed registration on your customer portal.
const ( NotificationCategoryChatMessage NotificationCategory = "chat.message" NotificationCategoryChatMention NotificationCategory = "chat.mention" NotificationCategoryChatAdded NotificationCategory = "chat.added" NotificationCategoryOrderUpdated NotificationCategory = "order.updated" NotificationCategoryAgentRunCompleted NotificationCategory = "agent.run_completed" NotificationCategoryAgentAlert NotificationCategory = "agent.alert" NotificationCategorySystemBroadcast NotificationCategory = "system.broadcast" NotificationCategoryCustomerRegistered NotificationCategory = "customer.registered" )
type NotificationObject ¶
type NotificationObject string
Resource type identifier.
const (
NotificationObjectNotification NotificationObject = "notification"
)
type NotificationPreference ¶
type NotificationPreference struct {
// Preference ID.
ID string `json:"id" api:"required"`
// The notification category this preference applies to.
//
// A preference with no category is the user's global default, used for every
// category they have not set a specific preference for.
//
// Any of "chat.message", "chat.mention", "chat.added", "order.updated",
// "agent.run_completed", "agent.alert", "system.broadcast", "customer.registered".
Category NotificationPreferenceCategory `json:"category" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// How often email for this category is sent.
//
// - `instant`: send an email as soon as an eligible notification occurs.
// - `hourly`: collect eligible notifications into a single hourly email.
// - `daily`: collect eligible notifications into a single daily email.
// - `off`: never send email for this category, even when email is otherwise
// enabled.
//
// This governs email only; in-app delivery is unaffected. Batched sending is not
// running yet, so `hourly` and `daily` currently hold email back in the same way
// as `off`.
//
// Any of "instant", "hourly", "daily", "off".
Digest NotificationPreferenceDigest `json:"digest" api:"required"`
// Whether notifications in this category are also emailed to the user.
//
// Email is additionally suppressed for a conversation the user has muted, and only
// sent on the cadence set by `digest`.
EmailEnabled bool `json:"email_enabled" api:"required"`
// Whether notifications in this category appear in the user's in-app feed.
//
// A direct @mention is always delivered in-app, even when this is disabled.
InAppEnabled bool `json:"in_app_enabled" api:"required"`
// Resource type identifier.
//
// Any of "notification_preference".
Object NotificationPreferenceObject `json:"object" api:"required"`
// Whether notifications in this category are also sent as push notifications.
//
// Push delivery is not available yet; the choice is stored for when it is.
PushEnabled bool `json:"push_enabled" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Category respjson.Field
CreatedAt respjson.Field
Digest respjson.Field
EmailEnabled respjson.Field
InAppEnabled respjson.Field
Object respjson.Field
PushEnabled respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One user's choice of which channels a category of notification is delivered on.
Preferences belong to the user's membership in a single account, so the same person can be notified differently in each account they belong to. A preference with no category is that user's global default, and a category-specific preference overrides it. Where neither exists, in-app notifications are delivered and email and push are not.
Chat notifications are the only ones these settings currently govern: notifications in every other category reach the in-app feed and are never emailed, whatever is stored here.
func (NotificationPreference) RawJSON ¶
func (r NotificationPreference) RawJSON() string
Returns the unmodified JSON received from the API
func (*NotificationPreference) UnmarshalJSON ¶
func (r *NotificationPreference) UnmarshalJSON(data []byte) error
type NotificationPreferenceCategory ¶ added in v0.17.1
type NotificationPreferenceCategory string
The notification category this preference applies to.
A preference with no category is the user's global default, used for every category they have not set a specific preference for.
const ( NotificationPreferenceCategoryChatMessage NotificationPreferenceCategory = "chat.message" NotificationPreferenceCategoryChatMention NotificationPreferenceCategory = "chat.mention" NotificationPreferenceCategoryChatAdded NotificationPreferenceCategory = "chat.added" NotificationPreferenceCategoryOrderUpdated NotificationPreferenceCategory = "order.updated" NotificationPreferenceCategoryAgentRunCompleted NotificationPreferenceCategory = "agent.run_completed" NotificationPreferenceCategoryAgentAlert NotificationPreferenceCategory = "agent.alert" NotificationPreferenceCategorySystemBroadcast NotificationPreferenceCategory = "system.broadcast" NotificationPreferenceCategoryCustomerRegistered NotificationPreferenceCategory = "customer.registered" )
type NotificationPreferenceDigest ¶
type NotificationPreferenceDigest string
How often email for this category is sent.
- `instant`: send an email as soon as an eligible notification occurs.
- `hourly`: collect eligible notifications into a single hourly email.
- `daily`: collect eligible notifications into a single daily email.
- `off`: never send email for this category, even when email is otherwise enabled.
This governs email only; in-app delivery is unaffected. Batched sending is not running yet, so `hourly` and `daily` currently hold email back in the same way as `off`.
const ( NotificationPreferenceDigestInstant NotificationPreferenceDigest = "instant" NotificationPreferenceDigestHourly NotificationPreferenceDigest = "hourly" NotificationPreferenceDigestDaily NotificationPreferenceDigest = "daily" NotificationPreferenceDigestOff NotificationPreferenceDigest = "off" )
type NotificationPreferenceItemNotificationType ¶
type NotificationPreferenceItemNotificationType string
Notification type.
const ( NotificationPreferenceItemNotificationTypeInvoice NotificationPreferenceItemNotificationType = "invoice" NotificationPreferenceItemNotificationTypeOrderAcknowledgement NotificationPreferenceItemNotificationType = "order_acknowledgement" NotificationPreferenceItemNotificationTypePurchaseOrderSubmission NotificationPreferenceItemNotificationType = "purchase_order_submission" )
type NotificationPreferenceItemParam ¶
type NotificationPreferenceItemParam struct {
// Whether this notification type is enabled for the account user.
Enabled bool `json:"enabled" api:"required"`
// Notification type.
//
// Any of "invoice", "order_acknowledgement", "purchase_order_submission".
NotificationType NotificationPreferenceItemNotificationType `json:"notification_type,omitzero" api:"required"`
// contains filtered or unexported fields
}
NotificationPreferenceItem toggles a single account-relation notification type.
The properties Enabled, NotificationType are required.
func (NotificationPreferenceItemParam) MarshalJSON ¶
func (r NotificationPreferenceItemParam) MarshalJSON() (data []byte, err error)
func (*NotificationPreferenceItemParam) UnmarshalJSON ¶
func (r *NotificationPreferenceItemParam) UnmarshalJSON(data []byte) error
type NotificationPreferenceObject ¶
type NotificationPreferenceObject string
Resource type identifier.
const (
NotificationPreferenceObjectNotificationPreference NotificationPreferenceObject = "notification_preference"
)
type NotificationPriority ¶
type NotificationPriority string
How prominently the notification should be surfaced, from `low` through `urgent`.
const ( NotificationPriorityLow NotificationPriority = "low" NotificationPriorityNormal NotificationPriority = "normal" NotificationPriorityHigh NotificationPriority = "high" NotificationPriorityUrgent NotificationPriority = "urgent" )
type NotificationSendResult ¶
type NotificationSendResult struct {
// Number of deliveries accepted for the notification.
//
// An account broadcast is stored once as a single announcement that serves
// everyone in the account, so it reports `1` rather than a per-user count.
// Acceptance is not delivery: recipients who cannot be resolved are skipped when
// the notification is fanned out.
Enqueued int64 `json:"enqueued" api:"required"`
// Resource type identifier.
//
// Any of "notification_send_result".
Object NotificationSendResultObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enqueued respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The acknowledgement returned when a notification is accepted for delivery.
func (NotificationSendResult) RawJSON ¶
func (r NotificationSendResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*NotificationSendResult) UnmarshalJSON ¶
func (r *NotificationSendResult) UnmarshalJSON(data []byte) error
type NotificationSendResultObject ¶
type NotificationSendResultObject string
Resource type identifier.
const (
NotificationSendResultObjectNotificationSendResult NotificationSendResultObject = "notification_send_result"
)
type NotificationStatus ¶
type NotificationStatus string
Where the notification is in its lifecycle.
- `unseen`: delivered but not yet surfaced to the user. - `seen`: surfaced in the feed but not yet opened. - `read`: explicitly opened by the user. - `dismissed`: removed from the active feed.
The status is derived from the seen, read, and dismissed timestamps, and only ever moves forward — a notification can never become unseen again.
const ( NotificationStatusUnseen NotificationStatus = "unseen" NotificationStatusSeen NotificationStatus = "seen" NotificationStatusRead NotificationStatus = "read" NotificationStatusDismissed NotificationStatus = "dismissed" )
type NotificationTargetInputParam ¶
type NotificationTargetInputParam struct {
// The id of the recipient, matching `type`: an account user id, or an account id.
//
// An account target must be the account you are currently acting in — you cannot
// broadcast into another account.
ID string `json:"id" api:"required"`
// The kind of recipient being addressed.
//
// - `account_user`: one member of the account, who receives a personal
// notification in their feed.
// - `account`: every member of the account, who all receive a single shared
// announcement.
//
// Any of "account_user", "account".
Type NotificationTargetInputType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
Who a notification is aimed at.
The properties ID, Type are required.
func (NotificationTargetInputParam) MarshalJSON ¶
func (r NotificationTargetInputParam) MarshalJSON() (data []byte, err error)
func (*NotificationTargetInputParam) UnmarshalJSON ¶
func (r *NotificationTargetInputParam) UnmarshalJSON(data []byte) error
type NotificationTargetInputType ¶
type NotificationTargetInputType string
The kind of recipient being addressed.
- `account_user`: one member of the account, who receives a personal notification in their feed.
- `account`: every member of the account, who all receive a single shared announcement.
const ( NotificationTargetInputTypeAccountUser NotificationTargetInputType = "account_user" NotificationTargetInputTypeAccount NotificationTargetInputType = "account" )
type NotificationUnreadCount ¶
type NotificationUnreadCount struct {
// Number of conversations with unread messages.
//
// Always `0` today — conversation unread counts are not yet folded into the bell.
Conversations int64 `json:"conversations" api:"required"`
// Number of the caller's notifications that have not been seen yet.
//
// Dismissed notifications are never counted, and marking all notifications seen
// drops this to zero.
Notifications int64 `json:"notifications" api:"required"`
// Resource type identifier.
//
// Any of "notification_unread_count".
Object NotificationUnreadCountObject `json:"object" api:"required"`
// Combined unread total for the bell badge.
//
// This is the unseen notification count plus any account announcements the caller
// has not seen, so it can exceed `notifications`. Announcements are cleared
// individually rather than by marking all notifications seen.
Total int64 `json:"total" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Conversations respjson.Field
Notifications respjson.Field
Object respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The caller's unread tallies in one account, used to drive the notification bell badge.
func (NotificationUnreadCount) RawJSON ¶
func (r NotificationUnreadCount) RawJSON() string
Returns the unmodified JSON received from the API
func (*NotificationUnreadCount) UnmarshalJSON ¶
func (r *NotificationUnreadCount) UnmarshalJSON(data []byte) error
type NotificationUnreadCountObject ¶
type NotificationUnreadCountObject string
Resource type identifier.
const (
NotificationUnreadCountObjectNotificationUnreadCount NotificationUnreadCountObject = "notification_unread_count"
)
type NotificationUnreadSummary ¶
type NotificationUnreadSummary struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Accounts ListNotificationUnreadSummaryAccount `json:"accounts" api:"required"`
// Resource type identifier.
//
// Any of "notification_unread_summary".
Object NotificationUnreadSummaryObject `json:"object" api:"required"`
// Combined unread total across all of the caller's accounts.
Total int64 `json:"total" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Accounts respjson.Field
Object respjson.Field
Total respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The caller's unread totals across every account they belong to, used to show unread activity waiting in accounts they are not currently working in.
func (NotificationUnreadSummary) RawJSON ¶
func (r NotificationUnreadSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*NotificationUnreadSummary) UnmarshalJSON ¶
func (r *NotificationUnreadSummary) UnmarshalJSON(data []byte) error
type NotificationUnreadSummaryAccount ¶
type NotificationUnreadSummaryAccount struct {
// Entity is a polymorphic reference to any resource in the system.
Account Entity `json:"account" api:"required"`
// Resource type identifier.
//
// Any of "notification_unread_summary_account".
Object NotificationUnreadSummaryAccountObject `json:"object" api:"required"`
// Number of unseen notifications and account announcements the caller has in this
// account.
Unread int64 `json:"unread" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Object respjson.Field
Unread respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One account's unread tally within the caller's cross-account summary.
func (NotificationUnreadSummaryAccount) RawJSON ¶
func (r NotificationUnreadSummaryAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*NotificationUnreadSummaryAccount) UnmarshalJSON ¶
func (r *NotificationUnreadSummaryAccount) UnmarshalJSON(data []byte) error
type NotificationUnreadSummaryAccountObject ¶
type NotificationUnreadSummaryAccountObject string
Resource type identifier.
const (
NotificationUnreadSummaryAccountObjectNotificationUnreadSummaryAccount NotificationUnreadSummaryAccountObject = "notification_unread_summary_account"
)
type NotificationUnreadSummaryObject ¶
type NotificationUnreadSummaryObject string
Resource type identifier.
const (
NotificationUnreadSummaryObjectNotificationUnreadSummary NotificationUnreadSummaryObject = "notification_unread_summary"
)
type ObjectIdentifierParam ¶
type ObjectIdentifierParam struct {
// Object ID.
ID string `json:"id" api:"required"`
// Object name, matched case-insensitively.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
-------------------------- Named Object -------------------------- Identifies an object by its id or its name. An id wins when both are given.
The properties ID, Name are required.
func (ObjectIdentifierParam) MarshalJSON ¶
func (r ObjectIdentifierParam) MarshalJSON() (data []byte, err error)
func (*ObjectIdentifierParam) UnmarshalJSON ¶
func (r *ObjectIdentifierParam) UnmarshalJSON(data []byte) error
type OeeDepartment ¶
type OeeDepartment struct {
// Data-quality warnings for this grouping. Empty when the numbers can be taken at
// face value.
//
// Any of "performance_above_capacity".
Anomalies []string `json:"anomalies" api:"required"`
// Logged downtime charged against availability, in seconds.
AvailabilityLossSeconds float64 `json:"availability_loss_seconds" api:"required"`
// Run time (capped at scheduled) divided by scheduled time.
AvailabilityPct float64 `json:"availability_pct" api:"required"`
// Time spent changing over between products, in seconds.
ChangeoverSeconds float64 `json:"changeover_seconds" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Department Entity `json:"department" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
DowntimeBreakdown ListOeeDowntimeReason `json:"downtime_breakdown" api:"required"`
// Number of downtime events logged in the period.
DowntimeEventCount int64 `json:"downtime_event_count" api:"required"`
// The estimated runtime in hours.
EstimatedRuntimeHours float64 `json:"estimated_runtime_hours" api:"required"`
// The number of good units produced.
GoodUnits float64 `json:"good_units" api:"required"`
// Whether availability was measured from logged downtime or estimated from
// runtime. A department with no logged downtime computes as perfectly available,
// so an estimate is labeled rather than presented as a measurement.
//
// Any of "measured", "estimated".
MeasurementStatus OeeDepartmentMeasurementStatus `json:"measurement_status" api:"required"`
// Time nobody planned to run, removed from the OEE denominator rather than counted
// as a loss.
NotScheduledSeconds float64 `json:"not_scheduled_seconds" api:"required"`
// Availability multiplied by performance multiplied by quality.
OeePct float64 `json:"oee_pct" api:"required"`
// The scheduled machines' measured run time (first-to-last scan per machine per
// day), in seconds. Performance's denominator.
OperatingTimeSeconds float64 `json:"operating_time_seconds" api:"required"`
// Measured run time beyond the scheduled window, in seconds. A schedule-adherence
// signal reported apart from OEE, so overtime is not counted as extra
// availability.
OverrunSeconds float64 `json:"overrun_seconds" api:"required"`
// Logged downtime charged against performance, in seconds.
PerformanceLossSeconds float64 `json:"performance_loss_seconds" api:"required"`
// Standard seconds earned divided by measured operating time: how fast the
// department ran against the designed speed of its production steps.
PerformancePct float64 `json:"performance_pct" api:"required"`
// Logged downtime charged against quality, in seconds.
QualityLossSeconds float64 `json:"quality_loss_seconds" api:"required"`
// Good units divided by total units produced.
QualityPct float64 `json:"quality_pct" api:"required"`
// Operating time counted toward availability: measured run time capped at
// scheduled time, in seconds.
RunTimeSeconds float64 `json:"run_time_seconds" api:"required"`
// Planned production time net of not-scheduled downtime, in seconds.
// Availability's denominator.
ScheduledSeconds float64 `json:"scheduled_seconds" api:"required"`
// The number of seconds units.
SecondsUnits float64 `json:"seconds_units" api:"required"`
// The time this output should have taken at each production step's own labor rate:
// ideal cycle time multiplied by the units produced. This is the numerator of
// Performance.
StandardSecondsEarned float64 `json:"standard_seconds_earned" api:"required"`
// The number of waste units.
WasteUnits float64 `json:"waste_units" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Anomalies respjson.Field
AvailabilityLossSeconds respjson.Field
AvailabilityPct respjson.Field
ChangeoverSeconds respjson.Field
Department respjson.Field
DowntimeBreakdown respjson.Field
DowntimeEventCount respjson.Field
EstimatedRuntimeHours respjson.Field
GoodUnits respjson.Field
MeasurementStatus respjson.Field
NotScheduledSeconds respjson.Field
OeePct respjson.Field
OperatingTimeSeconds respjson.Field
OverrunSeconds respjson.Field
PerformanceLossSeconds respjson.Field
PerformancePct respjson.Field
QualityLossSeconds respjson.Field
QualityPct respjson.Field
RunTimeSeconds respjson.Field
ScheduledSeconds respjson.Field
SecondsUnits respjson.Field
StandardSecondsEarned respjson.Field
WasteUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OeeDepartment represents OEE metrics for a single department.
func (OeeDepartment) RawJSON ¶
func (r OeeDepartment) RawJSON() string
Returns the unmodified JSON received from the API
func (*OeeDepartment) UnmarshalJSON ¶
func (r *OeeDepartment) UnmarshalJSON(data []byte) error
type OeeDepartmentMeasurementStatus ¶
type OeeDepartmentMeasurementStatus string
Whether availability was measured from logged downtime or estimated from runtime. A department with no logged downtime computes as perfectly available, so an estimate is labeled rather than presented as a measurement.
const ( OeeDepartmentMeasurementStatusMeasured OeeDepartmentMeasurementStatus = "measured" OeeDepartmentMeasurementStatusEstimated OeeDepartmentMeasurementStatus = "estimated" )
type OeeDepartmentPlannedTimeParam ¶
type OeeDepartmentPlannedTimeParam struct {
// The department ID.
DepartmentID string `json:"department_id" api:"required"`
// Scheduled production hours for the period.
PlannedHours float64 `json:"planned_hours" api:"required"`
// contains filtered or unexported fields
}
OeeDepartmentPlannedTime supplies the scheduled production time for one department.
The properties DepartmentID, PlannedHours are required.
func (OeeDepartmentPlannedTimeParam) MarshalJSON ¶
func (r OeeDepartmentPlannedTimeParam) MarshalJSON() (data []byte, err error)
func (*OeeDepartmentPlannedTimeParam) UnmarshalJSON ¶
func (r *OeeDepartmentPlannedTimeParam) UnmarshalJSON(data []byte) error
type OeeDowntimeReason ¶
type OeeDowntimeReason struct {
// Downtime attributed to this reason, in seconds.
DowntimeSeconds float64 `json:"downtime_seconds" api:"required"`
// Number of events logged against this reason.
EventCount int64 `json:"event_count" api:"required"`
// Which OEE term this reason charges.
//
// Any of "availability", "performance", "quality", "not_scheduled".
OeeBucket OeeDowntimeReasonOeeBucket `json:"oee_bucket" api:"required"`
// Why the machine stopped.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Reason OeeDowntimeReasonReason `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DowntimeSeconds respjson.Field
EventCount respjson.Field
OeeBucket respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OeeDowntimeReason represents one reason's contribution to a department's downtime.
func (OeeDowntimeReason) RawJSON ¶
func (r OeeDowntimeReason) RawJSON() string
Returns the unmodified JSON received from the API
func (*OeeDowntimeReason) UnmarshalJSON ¶
func (r *OeeDowntimeReason) UnmarshalJSON(data []byte) error
type OeeDowntimeReasonOeeBucket ¶
type OeeDowntimeReasonOeeBucket string
Which OEE term this reason charges.
const ( OeeDowntimeReasonOeeBucketAvailability OeeDowntimeReasonOeeBucket = "availability" OeeDowntimeReasonOeeBucketPerformance OeeDowntimeReasonOeeBucket = "performance" OeeDowntimeReasonOeeBucketQuality OeeDowntimeReasonOeeBucket = "quality" OeeDowntimeReasonOeeBucketNotScheduled OeeDowntimeReasonOeeBucket = "not_scheduled" )
type OeeDowntimeReasonReason ¶
type OeeDowntimeReasonReason string
Why the machine stopped.
const ( OeeDowntimeReasonReasonBreakdown OeeDowntimeReasonReason = "breakdown" OeeDowntimeReasonReasonChangeover OeeDowntimeReasonReason = "changeover" OeeDowntimeReasonReasonMaterialShortage OeeDowntimeReasonReason = "material_shortage" OeeDowntimeReasonReasonNoOperator OeeDowntimeReasonReason = "no_operator" OeeDowntimeReasonReasonPlannedMaintenance OeeDowntimeReasonReason = "planned_maintenance" OeeDowntimeReasonReasonMinorStop OeeDowntimeReasonReason = "minor_stop" OeeDowntimeReasonReasonQualityHold OeeDowntimeReasonReason = "quality_hold" OeeDowntimeReasonReasonNoSchedule OeeDowntimeReasonReason = "no_schedule" )
type OeeTrendPeriod ¶
type OeeTrendPeriod struct {
// Logged downtime charged against availability, in seconds.
AvailabilityLossSeconds float64 `json:"availability_loss_seconds" api:"required"`
// Run time (capped at scheduled) divided by scheduled time.
AvailabilityPct float64 `json:"availability_pct" api:"required"`
// Number of downtime events overlapping this period.
DowntimeEventCount int64 `json:"downtime_event_count" api:"required"`
// The instant this period ends, exclusive.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// The number of good units produced.
GoodUnits float64 `json:"good_units" api:"required"`
// Whether availability was measured from logged downtime or estimated from
// runtime.
//
// Any of "measured", "estimated".
MeasurementStatus OeeTrendPeriodMeasurementStatus `json:"measurement_status" api:"required"`
// Time nobody planned to run, removed from the denominator rather than counted as
// a loss.
NotScheduledSeconds float64 `json:"not_scheduled_seconds" api:"required"`
// Availability multiplied by performance multiplied by quality.
OeePct float64 `json:"oee_pct" api:"required"`
// The scheduled machines' measured run time, in seconds. Performance's
// denominator.
OperatingTimeSeconds float64 `json:"operating_time_seconds" api:"required"`
// Measured run time beyond the scheduled window, in seconds, reported apart from
// OEE.
OverrunSeconds float64 `json:"overrun_seconds" api:"required"`
// Standard seconds earned divided by measured operating time.
PerformancePct float64 `json:"performance_pct" api:"required"`
// Good units divided by total units produced.
QualityPct float64 `json:"quality_pct" api:"required"`
// Operating time counted toward availability: measured run time capped at
// scheduled time, in seconds.
RunTimeSeconds float64 `json:"run_time_seconds" api:"required"`
// Planned production time net of not-scheduled downtime, in seconds.
// Availability's denominator.
ScheduledSeconds float64 `json:"scheduled_seconds" api:"required"`
// The number of seconds units.
SecondsUnits float64 `json:"seconds_units" api:"required"`
// The time this output should have taken at each production step's own labor rate:
// ideal cycle time multiplied by the units produced.
StandardSecondsEarned float64 `json:"standard_seconds_earned" api:"required"`
// The first instant this period covers. Weeks start on Monday; the first and last
// periods of a window are clipped to the window itself.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// The number of waste units.
WasteUnits float64 `json:"waste_units" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AvailabilityLossSeconds respjson.Field
AvailabilityPct respjson.Field
DowntimeEventCount respjson.Field
EndsAt respjson.Field
GoodUnits respjson.Field
MeasurementStatus respjson.Field
NotScheduledSeconds respjson.Field
OeePct respjson.Field
OperatingTimeSeconds respjson.Field
OverrunSeconds respjson.Field
PerformancePct respjson.Field
QualityPct respjson.Field
RunTimeSeconds respjson.Field
ScheduledSeconds respjson.Field
SecondsUnits respjson.Field
StandardSecondsEarned respjson.Field
StartsAt respjson.Field
WasteUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OeeTrendPeriod represents one production week of OEE, rolled up across the departments that had scheduled time in it. Departments with no scheduled time have no OEE and take no part in the roll-up, so their output is not counted here either.
func (OeeTrendPeriod) RawJSON ¶
func (r OeeTrendPeriod) RawJSON() string
Returns the unmodified JSON received from the API
func (*OeeTrendPeriod) UnmarshalJSON ¶
func (r *OeeTrendPeriod) UnmarshalJSON(data []byte) error
type OeeTrendPeriodMeasurementStatus ¶
type OeeTrendPeriodMeasurementStatus string
Whether availability was measured from logged downtime or estimated from runtime.
const ( OeeTrendPeriodMeasurementStatusMeasured OeeTrendPeriodMeasurementStatus = "measured" OeeTrendPeriodMeasurementStatusEstimated OeeTrendPeriodMeasurementStatus = "estimated" )
type OperatingCalendar ¶
type OperatingCalendar struct {
// Unique identifier.
ID string `json:"id" api:"required"`
// Short stable identifier, unique per account.
Code string `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Local time freight has to be tendered by, as "15:00". Only a shipping calendar
// carries one.
CutoffAt string `json:"cutoff_at" api:"required"`
// Open weekdays as seven characters of '0' or '1', Monday first. "1111100" is
// Monday to Friday; "1111000" is a Monday-to-Thursday plant.
DaysOfWeek string `json:"days_of_week" api:"required"`
// Whether this is the calendar used when nothing more specific is linked. Exactly
// one per kind.
IsDefault bool `json:"is_default" api:"required"`
// Which side of a shipment this calendar describes.
//
// Any of "ship", "receive".
Kind OperatingCalendarKind `json:"kind" api:"required"`
// Human-readable name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "operating_calendar".
Object OperatingCalendarObject `json:"object" api:"required"`
// IANA zone the cutoff is read in. Null on a receiving calendar means it is taken
// from the ship-to address.
Timezone string `json:"timezone" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
CutoffAt respjson.Field
DaysOfWeek respjson.Field
IsDefault respjson.Field
Kind respjson.Field
Name respjson.Field
Object respjson.Field
Timezone respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OperatingCalendar is the set of days one party to a shipment operates.
A `ship` calendar is the plant tendering freight to a carrier; a `receive` calendar is a customer's dock accepting it. Ship-by dates are resolved against both, so an order is never committed to a day nobody can act on.
func (OperatingCalendar) RawJSON ¶
func (r OperatingCalendar) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperatingCalendar) UnmarshalJSON ¶
func (r *OperatingCalendar) UnmarshalJSON(data []byte) error
type OperatingCalendarClosure ¶
type OperatingCalendarClosure struct {
// Unique identifier.
ID string `json:"id" api:"required"`
// The date nothing operates.
ClosedOn time.Time `json:"closed_on" api:"required" format:"date-time"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// What the closure is, such as "Thanksgiving Day" or "Summer shutdown".
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "operating_calendar_closure".
Object OperatingCalendarClosureObject `json:"object" api:"required"`
// The calendar this closure belongs to.
OperatingCalendarID string `json:"operating_calendar_id" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ClosedOn respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
OperatingCalendarID respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
OperatingCalendarClosure is one date a calendar is shut — a holiday, or a day of a shutdown week.
func (OperatingCalendarClosure) RawJSON ¶
func (r OperatingCalendarClosure) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperatingCalendarClosure) UnmarshalJSON ¶
func (r *OperatingCalendarClosure) UnmarshalJSON(data []byte) error
type OperatingCalendarClosureObject ¶
type OperatingCalendarClosureObject string
Resource type identifier.
const (
OperatingCalendarClosureObjectOperatingCalendarClosure OperatingCalendarClosureObject = "operating_calendar_closure"
)
type OperatingCalendarKind ¶
type OperatingCalendarKind string
Which side of a shipment this calendar describes.
const ( OperatingCalendarKindShip OperatingCalendarKind = "ship" OperatingCalendarKindReceive OperatingCalendarKind = "receive" )
type OperatingCalendarObject ¶
type OperatingCalendarObject string
Resource type identifier.
const (
OperatingCalendarObjectOperatingCalendar OperatingCalendarObject = "operating_calendar"
)
type OperationCarrierDeleteResponse ¶
type OperationCarrierDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationCarrierDeleteResponse) RawJSON ¶
func (r OperationCarrierDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationCarrierDeleteResponse) UnmarshalJSON ¶
func (r *OperationCarrierDeleteResponse) UnmarshalJSON(data []byte) error
type OperationCarrierGetParams ¶
type OperationCarrierGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierGetParams) URLQuery ¶
func (r OperationCarrierGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierGetParams's query parameters as `url.Values`.
type OperationCarrierListParams ¶
type OperationCarrierListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierListParams) URLQuery ¶
func (r OperationCarrierListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierListParams's query parameters as `url.Values`.
type OperationCarrierNewParams ¶
type OperationCarrierNewParams struct {
// Request to create a carrier.
CreateCarrierRequest CreateCarrierRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierNewParams) MarshalJSON ¶
func (r OperationCarrierNewParams) MarshalJSON() (data []byte, err error)
func (OperationCarrierNewParams) URLQuery ¶
func (r OperationCarrierNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierNewParams's query parameters as `url.Values`.
func (*OperationCarrierNewParams) UnmarshalJSON ¶
func (r *OperationCarrierNewParams) UnmarshalJSON(data []byte) error
type OperationCarrierService ¶
type OperationCarrierService struct {
// List and manage service levels (shipping service levels).
ServiceLevels OperationCarrierServiceLevelService
// contains filtered or unexported fields
}
List and manage carriers and their Shippo integrations.
OperationCarrierService contains methods and other services that help with interacting with the openmrp 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 NewOperationCarrierService method instead.
func NewOperationCarrierService ¶
func NewOperationCarrierService(opts ...option.RequestOption) (r OperationCarrierService)
NewOperationCarrierService 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 (*OperationCarrierService) Delete ¶
func (r *OperationCarrierService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationCarrierDeleteResponse, err error)
Deletes a carrier and all of its service levels.
If the carrier is connected through Shippo, its Shippo carrier account is deactivated. System-owned carriers cannot be deleted.
This endpoint requires the permission: `carriers:delete`.
func (*OperationCarrierService) Get ¶
func (r *OperationCarrierService) Get(ctx context.Context, id string, query OperationCarrierGetParams, opts ...option.RequestOption) (res *Carrier, err error)
Returns a carrier by ID.
This endpoint requires the permissions: `carriers:read`, `customers:read`, `suppliers:read`.
func (*OperationCarrierService) List ¶
func (r *OperationCarrierService) List(ctx context.Context, query OperationCarrierListParams, opts ...option.RequestOption) (res *ListCarrier, err error)
Returns a paginated list of the carriers available to the current account.
This covers the carriers you have created plus the platform-provided system carriers that every account shares.
This endpoint requires the permissions: `carriers:read`, `customers:read`, `suppliers:read`.
func (*OperationCarrierService) New ¶
func (r *OperationCarrierService) New(ctx context.Context, params OperationCarrierNewParams, opts ...option.RequestOption) (res *Carrier, err error)
Creates a shipping carrier your account can ship orders with.
Supplying a Shippo-supported code (`fedex`, `ups`, `usps`) connects a Shippo carrier account and creates a service level for every service that carrier offers, each hidden from the customer portal until you make it visible. This requires an active Shippo integration on the account and is skipped entirely for sandbox accounts, which get a carrier record with no service levels and no live rating.
This endpoint requires the permission: `carriers:create`.
func (*OperationCarrierService) Update ¶
func (r *OperationCarrierService) Update(ctx context.Context, id string, params OperationCarrierUpdateParams, opts ...option.RequestOption) (res *Carrier, err error)
Updates a carrier's name and customer portal visibility.
Only these two attributes can change: a carrier's code and account number are fixed at creation, and system-owned carriers cannot be updated at all.
This endpoint requires the permission: `carriers:update`.
type OperationCarrierServiceLevelDeleteParams ¶
type OperationCarrierServiceLevelDeleteParams struct {
CarrierID string `path:"carrier_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type OperationCarrierServiceLevelDeleteResponse ¶
type OperationCarrierServiceLevelDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationCarrierServiceLevelDeleteResponse) RawJSON ¶
func (r OperationCarrierServiceLevelDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationCarrierServiceLevelDeleteResponse) UnmarshalJSON ¶
func (r *OperationCarrierServiceLevelDeleteResponse) UnmarshalJSON(data []byte) error
type OperationCarrierServiceLevelGetParams ¶
type OperationCarrierServiceLevelGetParams struct {
CarrierID string `path:"carrier_id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierServiceLevelGetParams) URLQuery ¶
func (r OperationCarrierServiceLevelGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierServiceLevelGetParams's query parameters as `url.Values`.
type OperationCarrierServiceLevelListParams ¶
type OperationCarrierServiceLevelListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierServiceLevelListParams) URLQuery ¶
func (r OperationCarrierServiceLevelListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierServiceLevelListParams's query parameters as `url.Values`.
type OperationCarrierServiceLevelNewParams ¶
type OperationCarrierServiceLevelNewParams struct {
// Request to create a service level.
CreateServiceLevelRequest CreateServiceLevelRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationCarrierServiceLevelNewParams) MarshalJSON ¶
func (r OperationCarrierServiceLevelNewParams) MarshalJSON() (data []byte, err error)
func (OperationCarrierServiceLevelNewParams) URLQuery ¶
func (r OperationCarrierServiceLevelNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierServiceLevelNewParams's query parameters as `url.Values`.
func (*OperationCarrierServiceLevelNewParams) UnmarshalJSON ¶
func (r *OperationCarrierServiceLevelNewParams) UnmarshalJSON(data []byte) error
type OperationCarrierServiceLevelService ¶
type OperationCarrierServiceLevelService struct {
// contains filtered or unexported fields
}
List and manage service levels (shipping service levels).
OperationCarrierServiceLevelService contains methods and other services that help with interacting with the openmrp 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 NewOperationCarrierServiceLevelService method instead.
func NewOperationCarrierServiceLevelService ¶
func NewOperationCarrierServiceLevelService(opts ...option.RequestOption) (r OperationCarrierServiceLevelService)
NewOperationCarrierServiceLevelService 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 (*OperationCarrierServiceLevelService) Delete ¶
func (r *OperationCarrierServiceLevelService) Delete(ctx context.Context, id string, body OperationCarrierServiceLevelDeleteParams, opts ...option.RequestOption) (res *OperationCarrierServiceLevelDeleteResponse, err error)
Permanently deletes a service level so it can no longer be selected on shipments.
System-owned service levels and the carrier's default service level cannot be deleted; to remove a default, first clear its `is_default` flag or promote another service level in its place.
This endpoint requires the permission: `carriers:delete`.
func (*OperationCarrierServiceLevelService) Get ¶
func (r *OperationCarrierServiceLevelService) Get(ctx context.Context, id string, params OperationCarrierServiceLevelGetParams, opts ...option.RequestOption) (res *ServiceLevel, err error)
Returns a service level by ID.
This endpoint requires the permissions: `carriers:read`, `customers:read`, `suppliers:read`.
func (*OperationCarrierServiceLevelService) List ¶
func (r *OperationCarrierServiceLevelService) List(ctx context.Context, carrierID string, query OperationCarrierServiceLevelListParams, opts ...option.RequestOption) (res *ListServiceLevel, err error)
Returns a paginated list of the service levels a carrier offers.
Use this rather than the `service_levels` field on the carrier itself when a carrier has more than a handful of services, since that inline list is capped.
This endpoint requires the permissions: `carriers:read`, `customers:read`, `suppliers:read`.
func (*OperationCarrierServiceLevelService) New ¶
func (r *OperationCarrierServiceLevelService) New(ctx context.Context, carrierID string, params OperationCarrierServiceLevelNewParams, opts ...option.RequestOption) (res *ServiceLevel, err error)
Adds a shipping service level to a carrier.
Use this for self-managed carriers, or to add a service a connected carrier does not publish. Service levels created here are never removed by a later sync of the carrier's services.
This endpoint requires the permission: `carriers:create`.
func (*OperationCarrierServiceLevelService) Update ¶
func (r *OperationCarrierServiceLevelService) Update(ctx context.Context, id string, params OperationCarrierServiceLevelUpdateParams, opts ...option.RequestOption) (res *ServiceLevel, err error)
Updates a service level's name, code, customer portal visibility, or default status.
Only the fields you send are changed. System-owned service levels cannot be updated.
This endpoint requires the permission: `carriers:update`.
type OperationCarrierServiceLevelUpdateParams ¶
type OperationCarrierServiceLevelUpdateParams struct {
CarrierID string `path:"carrier_id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a service level.
UpdateServiceLevelRequest UpdateServiceLevelRequestParam
// contains filtered or unexported fields
}
func (OperationCarrierServiceLevelUpdateParams) MarshalJSON ¶
func (r OperationCarrierServiceLevelUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationCarrierServiceLevelUpdateParams) URLQuery ¶
func (r OperationCarrierServiceLevelUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierServiceLevelUpdateParams's query parameters as `url.Values`.
func (*OperationCarrierServiceLevelUpdateParams) UnmarshalJSON ¶
func (r *OperationCarrierServiceLevelUpdateParams) UnmarshalJSON(data []byte) error
type OperationCarrierUpdateParams ¶
type OperationCarrierUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "service_levels".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a carrier.
UpdateCarrierRequest UpdateCarrierRequestParam
// contains filtered or unexported fields
}
func (OperationCarrierUpdateParams) MarshalJSON ¶
func (r OperationCarrierUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationCarrierUpdateParams) URLQuery ¶
func (r OperationCarrierUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationCarrierUpdateParams's query parameters as `url.Values`.
func (*OperationCarrierUpdateParams) UnmarshalJSON ¶
func (r *OperationCarrierUpdateParams) UnmarshalJSON(data []byte) error
type OperationDemandOverrideDeleteResponse ¶
type OperationDemandOverrideDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationDemandOverrideDeleteResponse) RawJSON ¶
func (r OperationDemandOverrideDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationDemandOverrideDeleteResponse) UnmarshalJSON ¶
func (r *OperationDemandOverrideDeleteResponse) UnmarshalJSON(data []byte) error
type OperationDemandOverrideGetParams ¶
type OperationDemandOverrideGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "scope".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDemandOverrideGetParams) URLQuery ¶
func (r OperationDemandOverrideGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDemandOverrideGetParams's query parameters as `url.Values`.
type OperationDemandOverrideListParams ¶
type OperationDemandOverrideListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// The end of the window to match against. Only return overrides whose period
// starts on or before this timestamp, formatted as RFC3339.
EndsAt param.Opt[string] `query:"ends_at,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// The start of the window to match against. Only return overrides whose period
// ends on or after this timestamp, formatted as RFC3339.
StartsAt param.Opt[string] `query:"starts_at,omitzero" json:"-"`
// Only return overrides making these kinds of adjustment.
//
// Any of "absolute", "delta_units", "delta_percent".
Adjustments []string `query:"adjustments,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "scope".
Include []string `query:"include,omitzero" json:"-"`
// Only return overrides targeting these items or product lines.
ScopeRefIDs []string `query:"scope_ref_ids,omitzero" json:"-"`
// Only return overrides with these kinds of target.
//
// Any of "item", "product_line", "account".
ScopeTypes []string `query:"scope_types,omitzero" json:"-"`
// Only return overrides in these activation states.
//
// Any of "active", "inactive".
Statuses []string `query:"statuses,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDemandOverrideListParams) URLQuery ¶
func (r OperationDemandOverrideListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDemandOverrideListParams's query parameters as `url.Values`.
type OperationDemandOverrideNewParams ¶
type OperationDemandOverrideNewParams struct {
// Request to create a demand override.
CreateDemandOverrideRequest CreateDemandOverrideRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "scope".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDemandOverrideNewParams) MarshalJSON ¶
func (r OperationDemandOverrideNewParams) MarshalJSON() (data []byte, err error)
func (OperationDemandOverrideNewParams) URLQuery ¶
func (r OperationDemandOverrideNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDemandOverrideNewParams's query parameters as `url.Values`.
func (*OperationDemandOverrideNewParams) UnmarshalJSON ¶
func (r *OperationDemandOverrideNewParams) UnmarshalJSON(data []byte) error
type OperationDemandOverrideService ¶
type OperationDemandOverrideService struct {
// contains filtered or unexported fields
}
Adjust the demand a production schedule plans against. Overrides are how management accounts for demand that sales history cannot see.
OperationDemandOverrideService contains methods and other services that help with interacting with the openmrp 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 NewOperationDemandOverrideService method instead.
func NewOperationDemandOverrideService ¶
func NewOperationDemandOverrideService(opts ...option.RequestOption) (r OperationDemandOverrideService)
NewOperationDemandOverrideService 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 (*OperationDemandOverrideService) Delete ¶
func (r *OperationDemandOverrideService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationDemandOverrideDeleteResponse, err error)
Deletes a demand override permanently.
Schedules that have already been generated are unaffected: each one records the overrides it applied, so deleting an override changes only schedules generated from now on. To stop an override applying while keeping it on file, deactivate it instead.
This endpoint requires the permission: `demand_overrides:delete`.
func (*OperationDemandOverrideService) Get ¶
func (r *OperationDemandOverrideService) Get(ctx context.Context, id string, query OperationDemandOverrideGetParams, opts ...option.RequestOption) (res *DemandOverride, err error)
Retrieves a single demand override by ID.
This endpoint requires the permission: `demand_overrides:read`.
func (*OperationDemandOverrideService) List ¶
func (r *OperationDemandOverrideService) List(ctx context.Context, query OperationDemandOverrideListParams, opts ...option.RequestOption) (res *ListDemandOverride, err error)
Returns a paginated list of demand overrides, most recently created first.
The period filters match on overlap rather than containment, so an override spanning a quarter is returned when querying a single month inside it. The `q` search term matches the override's note.
This endpoint requires the permission: `demand_overrides:read`.
func (*OperationDemandOverrideService) New ¶
func (r *OperationDemandOverrideService) New(ctx context.Context, params OperationDemandOverrideNewParams, opts ...option.RequestOption) (res *DemandOverride, err error)
Creates a demand override, telling the planner about demand the sales history cannot see.
The scope reference is validated against the account's items and product lines, so an override can never silently match nothing. An `account`-scoped override takes no scope reference and must be a delta rather than an absolute value, since one number fanned out across every item would flatten the whole plan.
Schedules that have already been generated are unaffected; the override is picked up by the next one.
This endpoint requires the permission: `demand_overrides:create`.
func (*OperationDemandOverrideService) Update ¶
func (r *OperationDemandOverrideService) Update(ctx context.Context, id string, params OperationDemandOverrideUpdateParams, opts ...option.RequestOption) (res *DemandOverride, err error)
Updates a demand override.
Only the fields sent are changed. The adjustment and value are validated as a pair against the resulting override, so switching a stored unit adjustment to `delta_percent` is checked as a percentage even when only the adjustment is sent; the period is checked the same way.
What an override targets cannot be changed — create a new override to adjust a different item, product line, or the account as a whole. Schedules that have already been generated are unaffected; the change is picked up by the next one.
This endpoint requires the permission: `demand_overrides:update`.
type OperationDemandOverrideUpdateParams ¶
type OperationDemandOverrideUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "scope".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a demand override.
UpdateDemandOverrideRequest UpdateDemandOverrideRequestParam
// contains filtered or unexported fields
}
func (OperationDemandOverrideUpdateParams) MarshalJSON ¶
func (r OperationDemandOverrideUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationDemandOverrideUpdateParams) URLQuery ¶
func (r OperationDemandOverrideUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDemandOverrideUpdateParams's query parameters as `url.Values`.
func (*OperationDemandOverrideUpdateParams) UnmarshalJSON ¶
func (r *OperationDemandOverrideUpdateParams) UnmarshalJSON(data []byte) error
type OperationDepartmentDeleteResponse ¶
type OperationDepartmentDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationDepartmentDeleteResponse) RawJSON ¶
func (r OperationDepartmentDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationDepartmentDeleteResponse) UnmarshalJSON ¶
func (r *OperationDepartmentDeleteResponse) UnmarshalJSON(data []byte) error
type OperationDepartmentGetParams ¶
type OperationDepartmentGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "location", "scanning_stations", "machines".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDepartmentGetParams) URLQuery ¶
func (r OperationDepartmentGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDepartmentGetParams's query parameters as `url.Values`.
type OperationDepartmentListParams ¶
type OperationDepartmentListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "location", "scanning_stations", "machines".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDepartmentListParams) URLQuery ¶
func (r OperationDepartmentListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDepartmentListParams's query parameters as `url.Values`.
type OperationDepartmentNewParams ¶
type OperationDepartmentNewParams struct {
// Request to create a department.
CreateDepartmentRequest CreateDepartmentRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "location", "scanning_stations", "machines".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationDepartmentNewParams) MarshalJSON ¶
func (r OperationDepartmentNewParams) MarshalJSON() (data []byte, err error)
func (OperationDepartmentNewParams) URLQuery ¶
func (r OperationDepartmentNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDepartmentNewParams's query parameters as `url.Values`.
func (*OperationDepartmentNewParams) UnmarshalJSON ¶
func (r *OperationDepartmentNewParams) UnmarshalJSON(data []byte) error
type OperationDepartmentService ¶
type OperationDepartmentService struct {
// contains filtered or unexported fields
}
List and manage departments.
OperationDepartmentService contains methods and other services that help with interacting with the openmrp 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 NewOperationDepartmentService method instead.
func NewOperationDepartmentService ¶
func NewOperationDepartmentService(opts ...option.RequestOption) (r OperationDepartmentService)
NewOperationDepartmentService 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 (*OperationDepartmentService) Delete ¶
func (r *OperationDepartmentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationDepartmentDeleteResponse, err error)
Deletes a department.
Scanning stations and machines assigned to the department are not deleted, but they keep pointing at it, and a machine whose department is gone can no longer be read, updated, or deleted through the machines endpoints. Reassign both to another department before deleting this one. Deleting a department that was already deleted returns an already-deleted error rather than a not-found error.
This endpoint requires the permission: `departments:delete`.
func (*OperationDepartmentService) Get ¶
func (r *OperationDepartmentService) Get(ctx context.Context, id string, query OperationDepartmentGetParams, opts ...option.RequestOption) (res *Department, err error)
Returns a department by ID.
This endpoint requires the permission: `departments:read`.
func (*OperationDepartmentService) List ¶
func (r *OperationDepartmentService) List(ctx context.Context, query OperationDepartmentListParams, opts ...option.RequestOption) (res *ListDepartment, err error)
Returns a paginated list of departments in your account, most recently created first.
The `q` search term matches the department name.
This endpoint requires the permission: `departments:read`.
func (*OperationDepartmentService) New ¶
func (r *OperationDepartmentService) New(ctx context.Context, params OperationDepartmentNewParams, opts ...option.RequestOption) (res *Department, err error)
Creates a department, optionally assigning scanning stations and machines to it.
Returns a conflict error if a department with the same name already exists.
This endpoint requires the permission: `departments:create`.
func (*OperationDepartmentService) Update ¶
func (r *OperationDepartmentService) Update(ctx context.Context, id string, params OperationDepartmentUpdateParams, opts ...option.RequestOption) (res *Department, err error)
Partially updates a department.
Only the fields provided in the request are changed. Assigning scanning stations or machines is additive and does not remove existing ones. Returns a conflict error if the new name is already in use by another department.
This endpoint requires the permission: `departments:update`.
type OperationDepartmentUpdateParams ¶
type OperationDepartmentUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "location", "scanning_stations", "machines".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a department.
UpdateDepartmentRequest UpdateDepartmentRequestParam
// contains filtered or unexported fields
}
func (OperationDepartmentUpdateParams) MarshalJSON ¶
func (r OperationDepartmentUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationDepartmentUpdateParams) URLQuery ¶
func (r OperationDepartmentUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationDepartmentUpdateParams's query parameters as `url.Values`.
func (*OperationDepartmentUpdateParams) UnmarshalJSON ¶
func (r *OperationDepartmentUpdateParams) UnmarshalJSON(data []byte) error
type OperationFulfillmentRecommendationActionApplyParams ¶
type OperationFulfillmentRecommendationActionApplyParams struct {
// Request to adopt fulfillment recommendations for specific items.
ApplyFulfillmentRecommendationsRequest ApplyFulfillmentRecommendationsRequestParam
// contains filtered or unexported fields
}
func (OperationFulfillmentRecommendationActionApplyParams) MarshalJSON ¶
func (r OperationFulfillmentRecommendationActionApplyParams) MarshalJSON() (data []byte, err error)
func (*OperationFulfillmentRecommendationActionApplyParams) UnmarshalJSON ¶
func (r *OperationFulfillmentRecommendationActionApplyParams) UnmarshalJSON(data []byte) error
type OperationFulfillmentRecommendationActionService ¶
type OperationFulfillmentRecommendationActionService struct {
// contains filtered or unexported fields
}
The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
OperationFulfillmentRecommendationActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationFulfillmentRecommendationActionService method instead.
func NewOperationFulfillmentRecommendationActionService ¶
func NewOperationFulfillmentRecommendationActionService(opts ...option.RequestOption) (r OperationFulfillmentRecommendationActionService)
NewOperationFulfillmentRecommendationActionService 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 (*OperationFulfillmentRecommendationActionService) Apply ¶
func (r *OperationFulfillmentRecommendationActionService) Apply(ctx context.Context, body OperationFulfillmentRecommendationActionApplyParams, opts ...option.RequestOption) (res *ListFulfillmentRecommendation, err error)
Adopts the recommended fulfillment policy for the named items, writing it as a per-item planning override.
The recommendation is recomputed as part of applying it, rather than taken from the request. Advice read minutes ago may no longer be the advice — demand moves — and writing a stale verdict would set a policy the engine would not give today. What comes back is what was actually written.
Takes effect on the next generated schedule; versions already generated keep the assumptions they were solved under.
This endpoint requires the permission: `production_schedules:update`.
type OperationFulfillmentRecommendationService ¶
type OperationFulfillmentRecommendationService struct {
// The planning assumptions production schedules are solved against, and the
// per-resource overrides that mark which machines constrain the plan.
Actions OperationFulfillmentRecommendationActionService
// contains filtered or unexported fields
}
The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
OperationFulfillmentRecommendationService contains methods and other services that help with interacting with the openmrp 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 NewOperationFulfillmentRecommendationService method instead.
func NewOperationFulfillmentRecommendationService ¶
func NewOperationFulfillmentRecommendationService(opts ...option.RequestOption) (r OperationFulfillmentRecommendationService)
NewOperationFulfillmentRecommendationService 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 (*OperationFulfillmentRecommendationService) List ¶
func (r *OperationFulfillmentRecommendationService) List(ctx context.Context, opts ...option.RequestOption) (res *ListFulfillmentRecommendation, err error)
Returns, for every sellable SKU, whether it should be built to stock or only against orders — and the measurement that decided.
The rules are ordered and the first match wins. Lead-time feasibility is checked before anything else: if customers are promised less time than production needs, building to order is not possible rather than not preferred, and no amount of lumpy demand changes that. After that the engine looks for dead stock, a single contract customer, demand too erratic for a buffer to size, and slow-moving expensive units.
Every verdict carries its numbers — demand interval, variability, customer concentration, promised lead time, annual cost of goods — so a planner can disagree with the rule rather than only with the answer. Thresholds are merchant-editable in the planning settings.
Computed fresh on every call rather than stored. A recommendation is only meaningful next to current demand, and a saved one would go quietly stale; the durable artifact is the item setting written when someone agrees with it. Nothing here changes a plan on its own.
This endpoint requires the permission: `production_schedules:read`.
type OperationGetMachineStatusParams ¶
type OperationGetMachineStatusParams struct {
// The moment to read the floor at.
//
// Chooses the week the campaigns are read for, and the published schedule whose
// horizon covers that moment; open downtime and scan progress are always read as
// they stand now. Omit it to read the floor as it is at this instant.
AsOf param.Opt[time.Time] `query:"as_of,omitzero" format:"date-time" json:"-"`
// Only include machines in these departments.
DepartmentIDs []string `query:"department_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationGetMachineStatusParams) URLQuery ¶
func (r OperationGetMachineStatusParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationGetMachineStatusParams's query parameters as `url.Values`.
type OperationInventoryChangeLogActionExportParams ¶ added in v0.20.0
type OperationInventoryChangeLogActionExportParams struct {
// Restricts results to change logs created on or before this timestamp.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Restricts results to change logs created on or after this timestamp.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Restricts results to these action types.
//
// Any of "scan", "user_action", "system_action", "user_correction".
ActionTypes []string `query:"action_types,omitzero" json:"-"`
// Restricts results to changes made by these users.
//
// Changes that were recorded without a responsible user are excluded whenever this
// filter is set.
ChangedByUserIDs []string `query:"changed_by_user_ids,omitzero" json:"-"`
// Restricts results to changes affecting these items.
ItemIDs []string `query:"item_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationInventoryChangeLogActionExportParams) URLQuery ¶ added in v0.20.0
func (r OperationInventoryChangeLogActionExportParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationInventoryChangeLogActionExportParams's query parameters as `url.Values`.
type OperationInventoryChangeLogActionService ¶ added in v0.20.0
type OperationInventoryChangeLogActionService struct {
// contains filtered or unexported fields
}
List and export inventory change logs.
OperationInventoryChangeLogActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationInventoryChangeLogActionService method instead.
func NewOperationInventoryChangeLogActionService ¶ added in v0.20.0
func NewOperationInventoryChangeLogActionService(opts ...option.RequestOption) (r OperationInventoryChangeLogActionService)
NewOperationInventoryChangeLogActionService 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 (*OperationInventoryChangeLogActionService) Export ¶ added in v0.20.0
func (r *OperationInventoryChangeLogActionService) Export(ctx context.Context, query OperationInventoryChangeLogActionExportParams, opts ...option.RequestOption) (res *FileDownload, err error)
Exports inventory change logs matching the provided filters as an Excel file.
Unlike the list endpoint, results are not paginated — every matching change log is included in the download, newest first. The download is named for the date range you requested, using `all` in place of a bound you left open.
This endpoint requires the permission: `inventory_logs:read`.
type OperationInventoryChangeLogGetParams ¶ added in v0.20.0
type OperationInventoryChangeLogGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "responsible_user", "responsible_scanning_station".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationInventoryChangeLogGetParams) URLQuery ¶ added in v0.20.0
func (r OperationInventoryChangeLogGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationInventoryChangeLogGetParams's query parameters as `url.Values`.
type OperationInventoryChangeLogListParams ¶ added in v0.20.0
type OperationInventoryChangeLogListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Restricts results to change logs created on or before this timestamp.
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Restricts results to change logs created on or after this timestamp.
//
// Defaults to 90 days before `ends_at`, or before now when `ends_at` is also
// omitted, unless `item_ids` is given — an item's history is returned whole. Pass
// an earlier timestamp to search further back.
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Restricts results to these action types.
//
// Any of "scan", "user_action", "system_action", "user_correction".
ActionTypes []string `query:"action_types,omitzero" json:"-"`
// Restricts results to changes made by these users.
//
// Changes that were recorded without a responsible user are excluded whenever this
// filter is set.
ChangedByUserIDs []string `query:"changed_by_user_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "item", "responsible_user", "responsible_scanning_station".
Include []string `query:"include,omitzero" json:"-"`
// Restricts results to changes affecting these items.
ItemIDs []string `query:"item_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationInventoryChangeLogListParams) URLQuery ¶ added in v0.20.0
func (r OperationInventoryChangeLogListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationInventoryChangeLogListParams's query parameters as `url.Values`.
type OperationInventoryChangeLogService ¶ added in v0.20.0
type OperationInventoryChangeLogService struct {
// List and export inventory change logs.
Actions OperationInventoryChangeLogActionService
// contains filtered or unexported fields
}
List and export inventory change logs.
OperationInventoryChangeLogService contains methods and other services that help with interacting with the openmrp 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 NewOperationInventoryChangeLogService method instead.
func NewOperationInventoryChangeLogService ¶ added in v0.20.0
func NewOperationInventoryChangeLogService(opts ...option.RequestOption) (r OperationInventoryChangeLogService)
NewOperationInventoryChangeLogService 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 (*OperationInventoryChangeLogService) Get ¶ added in v0.20.0
func (r *OperationInventoryChangeLogService) Get(ctx context.Context, id string, query OperationInventoryChangeLogGetParams, opts ...option.RequestOption) (res *InventoryChangeLog, err error)
Returns an inventory change log by ID.
This endpoint requires the permission: `inventory_logs:read`.
func (*OperationInventoryChangeLogService) List ¶ added in v0.20.0
func (r *OperationInventoryChangeLogService) List(ctx context.Context, query OperationInventoryChangeLogListParams, opts ...option.RequestOption) (res *ListInventoryChangeLog, err error)
Returns a paginated list of inventory change logs, newest first.
Filters combine with AND, while the values within a single filter combine with OR. The `q` search term matches changes affecting items whose SKU contains it, as a case-insensitive substring.
This endpoint requires the permission: `inventory_logs:read`.
type OperationLocationActionBulkUpsertParams ¶
type OperationLocationActionBulkUpsertParams struct {
// BulkUpsertLocationsRequest is the request to bulk upsert locations.
BulkUpsertLocationsRequest BulkUpsertLocationsRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationLocationActionBulkUpsertParams) MarshalJSON ¶
func (r OperationLocationActionBulkUpsertParams) MarshalJSON() (data []byte, err error)
func (OperationLocationActionBulkUpsertParams) URLQuery ¶
func (r OperationLocationActionBulkUpsertParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationActionBulkUpsertParams's query parameters as `url.Values`.
func (*OperationLocationActionBulkUpsertParams) UnmarshalJSON ¶
func (r *OperationLocationActionBulkUpsertParams) UnmarshalJSON(data []byte) error
type OperationLocationActionService ¶
type OperationLocationActionService struct {
// contains filtered or unexported fields
}
List and manage locations.
OperationLocationActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationLocationActionService method instead.
func NewOperationLocationActionService ¶
func NewOperationLocationActionService(opts ...option.RequestOption) (r OperationLocationActionService)
NewOperationLocationActionService 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 (*OperationLocationActionService) BulkUpsert ¶
func (r *OperationLocationActionService) BulkUpsert(ctx context.Context, params OperationLocationActionBulkUpsertParams, opts ...option.RequestOption) (res *Job, err error)
Creates or updates multiple locations for the account, matched by name (case-insensitive), then writes asynchronously — 202 with a job to poll.
type OperationLocationDeleteResponse ¶
type OperationLocationDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationLocationDeleteResponse) RawJSON ¶
func (r OperationLocationDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationLocationDeleteResponse) UnmarshalJSON ¶
func (r *OperationLocationDeleteResponse) UnmarshalJSON(data []byte) error
type OperationLocationGetParams ¶
type OperationLocationGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "parent", "children".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationLocationGetParams) URLQuery ¶
func (r OperationLocationGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationGetParams's query parameters as `url.Values`.
type OperationLocationListParams ¶
type OperationLocationListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "parent", "children".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationLocationListParams) URLQuery ¶
func (r OperationLocationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationListParams's query parameters as `url.Values`.
type OperationLocationNewParams ¶
type OperationLocationNewParams struct {
// Request to create a location.
CreateLocationRequest CreateLocationRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "parent", "children".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationLocationNewParams) MarshalJSON ¶
func (r OperationLocationNewParams) MarshalJSON() (data []byte, err error)
func (OperationLocationNewParams) URLQuery ¶
func (r OperationLocationNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationNewParams's query parameters as `url.Values`.
func (*OperationLocationNewParams) UnmarshalJSON ¶
func (r *OperationLocationNewParams) UnmarshalJSON(data []byte) error
type OperationLocationService ¶
type OperationLocationService struct {
// List and manage locations.
Actions OperationLocationActionService
// contains filtered or unexported fields
}
List and manage locations.
OperationLocationService contains methods and other services that help with interacting with the openmrp 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 NewOperationLocationService method instead.
func NewOperationLocationService ¶
func NewOperationLocationService(opts ...option.RequestOption) (r OperationLocationService)
NewOperationLocationService 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 (*OperationLocationService) Delete ¶
func (r *OperationLocationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationLocationDeleteResponse, err error)
Deletes a location.
Fails if the location has child locations; remove or reassign the children first.
This endpoint requires the permission: `locations:delete`.
func (*OperationLocationService) Get ¶
func (r *OperationLocationService) Get(ctx context.Context, id string, query OperationLocationGetParams, opts ...option.RequestOption) (res *Location, err error)
Returns a location by ID.
This endpoint requires the permission: `locations:read`.
func (*OperationLocationService) List ¶
func (r *OperationLocationService) List(ctx context.Context, query OperationLocationListParams, opts ...option.RequestOption) (res *ListLocation, err error)
Returns a paginated list of locations in your account, newest first.
Every location is returned regardless of its depth in the hierarchy, so top-level locations and their descendants appear side by side. The `q` search term matches on location name.
This endpoint requires the permission: `locations:read`.
func (*OperationLocationService) New ¶
func (r *OperationLocationService) New(ctx context.Context, params OperationLocationNewParams, opts ...option.RequestOption) (res *Location, err error)
Creates a storage location, optionally placing it in the location hierarchy.
This endpoint requires the permission: `locations:create`.
func (*OperationLocationService) Update ¶
func (r *OperationLocationService) Update(ctx context.Context, id string, params OperationLocationUpdateParams, opts ...option.RequestOption) (res *Location, err error)
Partially updates a location.
This endpoint requires the permission: `locations:update`.
type OperationLocationTypeListParams ¶
type OperationLocationTypeListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationLocationTypeListParams) URLQuery ¶
func (r OperationLocationTypeListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationTypeListParams's query parameters as `url.Values`.
type OperationLocationTypeService ¶
type OperationLocationTypeService struct {
// contains filtered or unexported fields
}
List and manage locations.
OperationLocationTypeService contains methods and other services that help with interacting with the openmrp 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 NewOperationLocationTypeService method instead.
func NewOperationLocationTypeService ¶
func NewOperationLocationTypeService(opts ...option.RequestOption) (r OperationLocationTypeService)
NewOperationLocationTypeService 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 (*OperationLocationTypeService) Get ¶
func (r *OperationLocationTypeService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *LocationType, err error)
Returns a location type by ID or code.
This endpoint requires the permission: `locations:read`.
func (*OperationLocationTypeService) List ¶
func (r *OperationLocationTypeService) List(ctx context.Context, query OperationLocationTypeListParams, opts ...option.RequestOption) (res *ListLocationType, err error)
Returns a paginated list of location types.
Location types are platform-defined and the same for every account, so this list is the complete set of levels you can assign when creating a location. The `q` search term matches on location type name.
This endpoint requires the permission: `locations:read`.
type OperationLocationUpdateParams ¶
type OperationLocationUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "parent", "children".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a location.
UpdateLocationRequest UpdateLocationRequestParam
// contains filtered or unexported fields
}
func (OperationLocationUpdateParams) MarshalJSON ¶
func (r OperationLocationUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationLocationUpdateParams) URLQuery ¶
func (r OperationLocationUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationLocationUpdateParams's query parameters as `url.Values`.
func (*OperationLocationUpdateParams) UnmarshalJSON ¶
func (r *OperationLocationUpdateParams) UnmarshalJSON(data []byte) error
type OperationMachineDeleteResponse ¶
type OperationMachineDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationMachineDeleteResponse) RawJSON ¶
func (r OperationMachineDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationMachineDeleteResponse) UnmarshalJSON ¶
func (r *OperationMachineDeleteResponse) UnmarshalJSON(data []byte) error
type OperationMachineDowntimeEventDeleteResponse ¶
type OperationMachineDowntimeEventDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationMachineDowntimeEventDeleteResponse) RawJSON ¶
func (r OperationMachineDowntimeEventDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationMachineDowntimeEventDeleteResponse) UnmarshalJSON ¶
func (r *OperationMachineDowntimeEventDeleteResponse) UnmarshalJSON(data []byte) error
type OperationMachineDowntimeEventGetParams ¶
type OperationMachineDowntimeEventGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "machine", "department", "item", "reported_by".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineDowntimeEventGetParams) URLQuery ¶
func (r OperationMachineDowntimeEventGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineDowntimeEventGetParams's query parameters as `url.Values`.
type OperationMachineDowntimeEventListParams ¶
type OperationMachineDowntimeEventListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Only return events that started on or before this timestamp, formatted as
// RFC3339.
EndsAt param.Opt[string] `query:"ends_at,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Only return events that are still open, meaning the machine is down right now.
//
// Sending `false` is the same as leaving it out: both open and closed events come
// back.
Open param.Opt[bool] `query:"open,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Only return events that started on or after this timestamp, formatted as
// RFC3339.
StartsAt param.Opt[string] `query:"starts_at,omitzero" json:"-"`
// Only return events for machines in these departments.
DepartmentIDs []string `query:"department_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "machine", "department", "item", "reported_by".
Include []string `query:"include,omitzero" json:"-"`
// Only return events for these machines.
MachineIDs []string `query:"machine_ids,omitzero" json:"-"`
// Only return events logged against these reasons.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Reasons []string `query:"reasons,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineDowntimeEventListParams) URLQuery ¶
func (r OperationMachineDowntimeEventListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineDowntimeEventListParams's query parameters as `url.Values`.
type OperationMachineDowntimeEventNewParams ¶
type OperationMachineDowntimeEventNewParams struct {
// Request to log a machine downtime event.
CreateMachineDowntimeEventRequest CreateMachineDowntimeEventRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "machine", "department", "item", "reported_by".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineDowntimeEventNewParams) MarshalJSON ¶
func (r OperationMachineDowntimeEventNewParams) MarshalJSON() (data []byte, err error)
func (OperationMachineDowntimeEventNewParams) URLQuery ¶
func (r OperationMachineDowntimeEventNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineDowntimeEventNewParams's query parameters as `url.Values`.
func (*OperationMachineDowntimeEventNewParams) UnmarshalJSON ¶
func (r *OperationMachineDowntimeEventNewParams) UnmarshalJSON(data []byte) error
type OperationMachineDowntimeEventService ¶
type OperationMachineDowntimeEventService struct {
// contains filtered or unexported fields
}
Log and review machine stoppages. Downtime is the source of OEE availability and changeover time.
OperationMachineDowntimeEventService contains methods and other services that help with interacting with the openmrp 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 NewOperationMachineDowntimeEventService method instead.
func NewOperationMachineDowntimeEventService ¶
func NewOperationMachineDowntimeEventService(opts ...option.RequestOption) (r OperationMachineDowntimeEventService)
NewOperationMachineDowntimeEventService 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 (*OperationMachineDowntimeEventService) Delete ¶
func (r *OperationMachineDowntimeEventService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationMachineDowntimeEventDeleteResponse, err error)
Deletes a machine downtime event.
Meant for a stoppage that was logged by mistake: the event is removed permanently and stops counting against the machine's availability. To correct a real stoppage, update it instead so the record of the downtime survives.
This endpoint requires the permission: `machine_downtime:delete`.
func (*OperationMachineDowntimeEventService) Get ¶
func (r *OperationMachineDowntimeEventService) Get(ctx context.Context, id string, query OperationMachineDowntimeEventGetParams, opts ...option.RequestOption) (res *MachineDowntimeEvent, err error)
Returns a single machine downtime event.
This endpoint requires the permission: `machine_downtime:read`.
func (*OperationMachineDowntimeEventService) List ¶
func (r *OperationMachineDowntimeEventService) List(ctx context.Context, query OperationMachineDowntimeEventListParams, opts ...option.RequestOption) (res *ListMachineDowntimeEvent, err error)
Returns a paginated list of machine downtime events, most recently started first.
The search term matches text in the event note. Filters combine, so a machine, a reason and a date range narrow the list together.
This endpoint requires the permission: `machine_downtime:read`.
func (*OperationMachineDowntimeEventService) New ¶
func (r *OperationMachineDowntimeEventService) New(ctx context.Context, params OperationMachineDowntimeEventNewParams, opts ...option.RequestOption) (res *MachineDowntimeEvent, err error)
Logs a machine downtime event.
Give the stoppage an end either as `ended_at` or as a `duration` counted in a unit of time — sending both is rejected. Omit `ended_at` while the machine is still down. A machine can only have one open event at a time, so logging a second open stoppage against a machine that is already down is rejected until the first is closed.
The department is taken from the machine, the business day is taken from `started_at`, the event is attributed to the credentials that made the request, and the duration is calculated when the event is closed.
This endpoint requires the permission: `machine_downtime:create`.
func (*OperationMachineDowntimeEventService) Update ¶
func (r *OperationMachineDowntimeEventService) Update(ctx context.Context, id string, params OperationMachineDowntimeEventUpdateParams, opts ...option.RequestOption) (res *MachineDowntimeEvent, err error)
Closes or corrects a machine downtime event.
Only the fields provided in the request are changed. Setting `ended_at` — or a `duration`, which says the same thing as a length of time from the start — closes the event and calculates how long it lasted; sending either as null reopens an event closed by mistake, which is rejected when the machine already has another open stoppage. Moving the event to another machine re-resolves the department the stoppage is charged to.
This endpoint requires the permission: `machine_downtime:update`.
type OperationMachineDowntimeEventUpdateParams ¶
type OperationMachineDowntimeEventUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "machine", "department", "item", "reported_by".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a machine downtime event.
UpdateMachineDowntimeEventRequest UpdateMachineDowntimeEventRequestParam
// contains filtered or unexported fields
}
func (OperationMachineDowntimeEventUpdateParams) MarshalJSON ¶
func (r OperationMachineDowntimeEventUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationMachineDowntimeEventUpdateParams) URLQuery ¶
func (r OperationMachineDowntimeEventUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineDowntimeEventUpdateParams's query parameters as `url.Values`.
func (*OperationMachineDowntimeEventUpdateParams) UnmarshalJSON ¶
func (r *OperationMachineDowntimeEventUpdateParams) UnmarshalJSON(data []byte) error
type OperationMachineGetParams ¶
type OperationMachineGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineGetParams) URLQuery ¶
func (r OperationMachineGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineGetParams's query parameters as `url.Values`.
type OperationMachineListParams ¶
type OperationMachineListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineListParams) URLQuery ¶
func (r OperationMachineListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineListParams's query parameters as `url.Values`.
type OperationMachineNewParams ¶
type OperationMachineNewParams struct {
// Request to create a machine.
CreateMachineRequest CreateMachineRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationMachineNewParams) MarshalJSON ¶
func (r OperationMachineNewParams) MarshalJSON() (data []byte, err error)
func (OperationMachineNewParams) URLQuery ¶
func (r OperationMachineNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineNewParams's query parameters as `url.Values`.
func (*OperationMachineNewParams) UnmarshalJSON ¶
func (r *OperationMachineNewParams) UnmarshalJSON(data []byte) error
type OperationMachineService ¶
type OperationMachineService struct {
// contains filtered or unexported fields
}
List and manage machines.
OperationMachineService contains methods and other services that help with interacting with the openmrp 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 NewOperationMachineService method instead.
func NewOperationMachineService ¶
func NewOperationMachineService(opts ...option.RequestOption) (r OperationMachineService)
NewOperationMachineService 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 (*OperationMachineService) Delete ¶
func (r *OperationMachineService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationMachineDeleteResponse, err error)
Deletes a machine.
Deletion is permanent, and repeating the call reports that the machine has already been deleted. Downtime events and schedule lines already logged against the machine are kept rather than removed with it.
This endpoint requires the permission: `machines:delete`.
func (*OperationMachineService) Get ¶
func (r *OperationMachineService) Get(ctx context.Context, id string, query OperationMachineGetParams, opts ...option.RequestOption) (res *Machine, err error)
Returns a machine by ID.
This endpoint requires the permission: `machines:read`.
func (*OperationMachineService) List ¶
func (r *OperationMachineService) List(ctx context.Context, query OperationMachineListParams, opts ...option.RequestOption) (res *ListMachine, err error)
Returns a paginated list of machines in your account, most recently created first.
The search term matches the machine name.
This endpoint requires the permission: `machines:read`.
func (*OperationMachineService) New ¶
func (r *OperationMachineService) New(ctx context.Context, params OperationMachineNewParams, opts ...option.RequestOption) (res *Machine, err error)
Creates a machine and assigns it to a department.
Returns a conflict error if another machine in your account already uses the same name, and a not-found error if the department does not belong to your account. The department cannot be changed once the machine exists.
This endpoint requires the permission: `machines:create`.
func (*OperationMachineService) Update ¶
func (r *OperationMachineService) Update(ctx context.Context, id string, params OperationMachineUpdateParams, opts ...option.RequestOption) (res *Machine, err error)
Partially updates a machine.
Only the fields provided in the request are changed. Returns a conflict error if the new name is already in use by another machine in your account. A machine cannot be moved to a different department.
This endpoint requires the permission: `machines:update`.
type OperationMachineUpdateParams ¶
type OperationMachineUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a machine.
UpdateMachineRequest UpdateMachineRequestParam
// contains filtered or unexported fields
}
func (OperationMachineUpdateParams) MarshalJSON ¶
func (r OperationMachineUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationMachineUpdateParams) URLQuery ¶
func (r OperationMachineUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationMachineUpdateParams's query parameters as `url.Values`.
func (*OperationMachineUpdateParams) UnmarshalJSON ¶
func (r *OperationMachineUpdateParams) UnmarshalJSON(data []byte) error
type OperationOperatingCalendarClosureDeleteParams ¶
type OperationOperatingCalendarClosureDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type OperationOperatingCalendarClosureDeleteResponse ¶
type OperationOperatingCalendarClosureDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationOperatingCalendarClosureDeleteResponse) RawJSON ¶
func (r OperationOperatingCalendarClosureDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationOperatingCalendarClosureDeleteResponse) UnmarshalJSON ¶
func (r *OperationOperatingCalendarClosureDeleteResponse) UnmarshalJSON(data []byte) error
type OperationOperatingCalendarClosureListParams ¶
type OperationOperatingCalendarClosureListParams struct {
// Earliest closure date to return. Defaults to a year ago.
FromDate param.Opt[time.Time] `query:"from_date,omitzero" format:"date-time" json:"-"`
// Latest closure date to return. Defaults to a year ahead.
ToDate param.Opt[time.Time] `query:"to_date,omitzero" format:"date-time" json:"-"`
// contains filtered or unexported fields
}
func (OperationOperatingCalendarClosureListParams) URLQuery ¶
func (r OperationOperatingCalendarClosureListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationOperatingCalendarClosureListParams's query parameters as `url.Values`.
type OperationOperatingCalendarClosureNewParams ¶
type OperationOperatingCalendarClosureNewParams struct {
// Request to close a calendar on a date.
CreateOperatingCalendarClosureRequest CreateOperatingCalendarClosureRequestParam
// contains filtered or unexported fields
}
func (OperationOperatingCalendarClosureNewParams) MarshalJSON ¶
func (r OperationOperatingCalendarClosureNewParams) MarshalJSON() (data []byte, err error)
func (*OperationOperatingCalendarClosureNewParams) UnmarshalJSON ¶
func (r *OperationOperatingCalendarClosureNewParams) UnmarshalJSON(data []byte) error
type OperationOperatingCalendarClosureService ¶
type OperationOperatingCalendarClosureService struct {
// contains filtered or unexported fields
}
The days a plant tenders freight and a customer's dock accepts it, less the holidays and shutdowns either side is closed for. Every ship-by date is resolved against them, so an order is never committed to a day nobody can act on.
OperationOperatingCalendarClosureService contains methods and other services that help with interacting with the openmrp 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 NewOperationOperatingCalendarClosureService method instead.
func NewOperationOperatingCalendarClosureService ¶
func NewOperationOperatingCalendarClosureService(opts ...option.RequestOption) (r OperationOperatingCalendarClosureService)
NewOperationOperatingCalendarClosureService 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 (*OperationOperatingCalendarClosureService) Delete ¶
func (r *OperationOperatingCalendarClosureService) Delete(ctx context.Context, closureID string, body OperationOperatingCalendarClosureDeleteParams, opts ...option.RequestOption) (res *OperationOperatingCalendarClosureDeleteResponse, err error)
Reopens a date the calendar was closed on.
Used to drop a seeded holiday a plant actually works through. Orders already issued keep the dates they were stamped with.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationOperatingCalendarClosureService) List ¶
func (r *OperationOperatingCalendarClosureService) List(ctx context.Context, id string, query OperationOperatingCalendarClosureListParams, opts ...option.RequestOption) (res *ListOperatingCalendarClosure, err error)
Lists the dates a calendar is shut, within a date window.
Bounded rather than exhaustive: a calendar accumulates closures indefinitely, and the useful answer is the year either side of today. Widen it with `from_date` and `to_date`.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationOperatingCalendarClosureService) New ¶
func (r *OperationOperatingCalendarClosureService) New(ctx context.Context, id string, body OperationOperatingCalendarClosureNewParams, opts ...option.RequestOption) (res *OperatingCalendarClosure, err error)
Closes a calendar on a date.
Every ship-by date resolved against this calendar afterwards walks past the closure: a carrier that does not move on Thanksgiving pushes the day an order has to leave earlier, and a plant shutdown does the same.
Closing the same date twice is a no-op rather than an error, so re-seeding a year is safe and never renames a closure somebody has relabelled.
This endpoint requires the permission: `production_schedules:update`.
type OperationOperatingCalendarDeleteResponse ¶
type OperationOperatingCalendarDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationOperatingCalendarDeleteResponse) RawJSON ¶
func (r OperationOperatingCalendarDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationOperatingCalendarDeleteResponse) UnmarshalJSON ¶
func (r *OperationOperatingCalendarDeleteResponse) UnmarshalJSON(data []byte) error
type OperationOperatingCalendarListParams ¶
type OperationOperatingCalendarListParams struct {
// Return only shipping or only receiving calendars.
//
// Any of "ship", "receive".
Kind OperationOperatingCalendarListParamsKind `query:"kind,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationOperatingCalendarListParams) URLQuery ¶
func (r OperationOperatingCalendarListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationOperatingCalendarListParams's query parameters as `url.Values`.
type OperationOperatingCalendarListParamsKind ¶
type OperationOperatingCalendarListParamsKind string
Return only shipping or only receiving calendars.
const ( OperationOperatingCalendarListParamsKindShip OperationOperatingCalendarListParamsKind = "ship" OperationOperatingCalendarListParamsKindReceive OperationOperatingCalendarListParamsKind = "receive" )
type OperationOperatingCalendarNewParams ¶
type OperationOperatingCalendarNewParams struct {
// Request to create an operating calendar.
CreateOperatingCalendarRequest CreateOperatingCalendarRequestParam
// contains filtered or unexported fields
}
func (OperationOperatingCalendarNewParams) MarshalJSON ¶
func (r OperationOperatingCalendarNewParams) MarshalJSON() (data []byte, err error)
func (*OperationOperatingCalendarNewParams) UnmarshalJSON ¶
func (r *OperationOperatingCalendarNewParams) UnmarshalJSON(data []byte) error
type OperationOperatingCalendarService ¶
type OperationOperatingCalendarService struct {
// The days a plant tenders freight and a customer's dock accepts it, less the
// holidays and shutdowns either side is closed for. Every ship-by date is resolved
// against them, so an order is never committed to a day nobody can act on.
Closures OperationOperatingCalendarClosureService
// contains filtered or unexported fields
}
The days a plant tenders freight and a customer's dock accepts it, less the holidays and shutdowns either side is closed for. Every ship-by date is resolved against them, so an order is never committed to a day nobody can act on.
OperationOperatingCalendarService contains methods and other services that help with interacting with the openmrp 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 NewOperationOperatingCalendarService method instead.
func NewOperationOperatingCalendarService ¶
func NewOperationOperatingCalendarService(opts ...option.RequestOption) (r OperationOperatingCalendarService)
NewOperationOperatingCalendarService 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 (*OperationOperatingCalendarService) Delete ¶
func (r *OperationOperatingCalendarService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationOperatingCalendarDeleteResponse, err error)
Deletes an operating calendar.
Refused while any address, customer, customer group, or account setting still points at it. Deleting a calendar out from under its references would quietly return every affected order to a plain Monday-to-Friday week, which reads as the feature breaking rather than as a decision anybody made — so re-point them first.
This endpoint requires the permission: `production_schedules:delete`.
func (*OperationOperatingCalendarService) Get ¶
func (r *OperationOperatingCalendarService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OperatingCalendar, err error)
Retrieves one operating calendar by ID.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationOperatingCalendarService) List ¶
func (r *OperationOperatingCalendarService) List(ctx context.Context, query OperationOperatingCalendarListParams, opts ...option.RequestOption) (res *ListOperatingCalendar, err error)
Lists the operating calendars configured for the account.
Both kinds are returned unless `kind` narrows it, ordered with each kind's default first.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationOperatingCalendarService) New ¶
func (r *OperationOperatingCalendarService) New(ctx context.Context, body OperationOperatingCalendarNewParams, opts ...option.RequestOption) (res *OperatingCalendar, err error)
Creates an operating calendar.
The days govern every ship-by date resolved against this calendar: a plant that tenders freight Monday to Thursday never gets committed to a Friday shipment, and a customer's promised delivery date is worked back from a day they can actually receive on.
A calendar starts with no closures. Add holidays and shutdowns to it separately.
This endpoint requires the permission: `production_schedules:create`.
func (*OperationOperatingCalendarService) Update ¶
func (r *OperationOperatingCalendarService) Update(ctx context.Context, id string, body OperationOperatingCalendarUpdateParams, opts ...option.RequestOption) (res *OperatingCalendar, err error)
Updates an operating calendar.
A calendar's kind cannot change: a shipping calendar that became a receiving one would silently drop the pickup cutoff every commitment resolved against it depends on. Create a second calendar instead.
Changes apply to commitments made from now on. Orders already issued keep the dates they were stamped with, so adding a holiday never retroactively makes a past order late.
This endpoint requires the permission: `production_schedules:update`.
type OperationOperatingCalendarUpdateParams ¶
type OperationOperatingCalendarUpdateParams struct {
// Request to update an operating calendar.
UpdateOperatingCalendarRequest UpdateOperatingCalendarRequestParam
// contains filtered or unexported fields
}
func (OperationOperatingCalendarUpdateParams) MarshalJSON ¶
func (r OperationOperatingCalendarUpdateParams) MarshalJSON() (data []byte, err error)
func (*OperationOperatingCalendarUpdateParams) UnmarshalJSON ¶
func (r *OperationOperatingCalendarUpdateParams) UnmarshalJSON(data []byte) error
type OperationPickActionPackParams ¶ added in v0.20.0
type OperationPickActionPackParams struct {
// Request to pack a pick, creating a shipment from the picked lines.
PackPickRequest PackPickRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationPickActionPackParams) MarshalJSON ¶ added in v0.20.0
func (r OperationPickActionPackParams) MarshalJSON() (data []byte, err error)
func (OperationPickActionPackParams) URLQuery ¶ added in v0.20.0
func (r OperationPickActionPackParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationPickActionPackParams's query parameters as `url.Values`.
func (*OperationPickActionPackParams) UnmarshalJSON ¶ added in v0.20.0
func (r *OperationPickActionPackParams) UnmarshalJSON(data []byte) error
type OperationPickActionService ¶ added in v0.20.0
type OperationPickActionService struct {
// contains filtered or unexported fields
}
List, view, pick, void, and pack picks and pick lines.
OperationPickActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationPickActionService method instead.
func NewOperationPickActionService ¶ added in v0.20.0
func NewOperationPickActionService(opts ...option.RequestOption) (r OperationPickActionService)
NewOperationPickActionService 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 (*OperationPickActionService) Pack ¶ added in v0.20.0
func (r *OperationPickActionService) Pack(ctx context.Context, id string, params OperationPickActionPackParams, opts ...option.RequestOption) (res *Job, err error)
Packs a pick, creating a shipment from the picked lines.
Returns `202 Accepted` with a job, because packing writes a shipment, one shipment line per packed pick line, and the requested shipping cases. Poll the job at the returned `Location`; once it reports `completed`, its first result carries the new shipment's `id`, with the shipment line and shipping case ids in `sub_resource_ids`. Every unpacked line with a picked quantity greater than zero is marked as packed and added to a new shipment in `packed` status, which inherits the sales order's carrier, service level, and shipping address. When a sales order line still has outstanding quantity afterward and no unpacked pick line is already open for it, a new zero-quantity pick line is created for the remainder, so packing a partial pick leaves the pick open for the next round. The pick is marked finished only once every one of its lines is packed.
Returns a validation error if no line on the pick has a picked quantity greater than zero.
This endpoint requires the permission: `picks:update`.
func (*OperationPickActionService) Pick ¶ added in v0.20.0
func (r *OperationPickActionService) Pick(ctx context.Context, id string, opts ...option.RequestOption) (res *Pick, err error)
Marks all lines on a pick as picked.
Sets each unpacked line's picked quantity to the quantity still outstanding on its sales order line, after accounting for what other pick lines for that order line have already picked. Lines that have already been packed are unaffected. Use this to fill in a full pick in one call instead of picking each line individually; nothing is shipped until the pick is packed.
This endpoint requires the permission: `picks:update`.
func (*OperationPickActionService) Void ¶ added in v0.20.0
func (r *OperationPickActionService) Void(ctx context.Context, id string, opts ...option.RequestOption) (res *Pick, err error)
Voids a pick, undoing all picking work recorded on it.
Resets the picked quantity on every unpacked line to zero and clears the pick's `finished_at` timestamp, so the pick starts over as open with nothing picked. The pick itself is not deleted, and the sales order is unaffected.
Returns a validation error if any shipment exists for the pick's sales order. Voiding those shipments is not enough — they must be deleted, since a voided shipment still exists.
This endpoint requires the permission: `picks:update`.
type OperationPickGetParams ¶ added in v0.20.0
type OperationPickGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "created_by", "freight", "related.sales_order",
// "related.shipments", "lines", "lines.item", "lines.sales_order_line",
// "lines.sales_order_line.product", "lines.quantity", "lines.quantity.unit",
// "lines.ordered_quantity", "lines.ordered_quantity.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationPickGetParams) URLQuery ¶ added in v0.20.0
func (r OperationPickGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationPickGetParams's query parameters as `url.Values`.
type OperationPickLineActionPickParams ¶ added in v0.20.0
type OperationPickLineActionPickParams struct {
PickID string `path:"pick_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type OperationPickLineActionService ¶ added in v0.20.0
type OperationPickLineActionService struct {
// contains filtered or unexported fields
}
List, view, pick, void, and pack picks and pick lines.
OperationPickLineActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationPickLineActionService method instead.
func NewOperationPickLineActionService ¶ added in v0.20.0
func NewOperationPickLineActionService(opts ...option.RequestOption) (r OperationPickLineActionService)
NewOperationPickLineActionService 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 (*OperationPickLineActionService) Pick ¶ added in v0.20.0
func (r *OperationPickLineActionService) Pick(ctx context.Context, id string, body OperationPickLineActionPickParams, opts ...option.RequestOption) (res *PickLine, err error)
Marks a pick line as fully picked.
Sets the line's picked quantity to its sales order line's ordered quantity less everything already picked for that order line, including whatever this line had picked before the call. To record a short pick instead, set the quantity yourself with Update Pick Line. Has no effect on a line that has already been packed.
This endpoint requires the permission: `picks:update`.
func (*OperationPickLineActionService) Void ¶ added in v0.20.0
func (r *OperationPickLineActionService) Void(ctx context.Context, id string, body OperationPickLineActionVoidParams, opts ...option.RequestOption) (res *PickLine, err error)
Voids a pick line, undoing the picking work recorded on it.
Resets the line's picked quantity to zero without deleting the line, so the quantity can be picked again. Returns a validation error if the line has already been packed.
This endpoint requires the permission: `picks:update`.
type OperationPickLineActionVoidParams ¶ added in v0.20.0
type OperationPickLineActionVoidParams struct {
PickID string `path:"pick_id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type OperationPickLineService ¶ added in v0.20.0
type OperationPickLineService struct {
// List, view, pick, void, and pack picks and pick lines.
Actions OperationPickLineActionService
// contains filtered or unexported fields
}
List, view, pick, void, and pack picks and pick lines.
OperationPickLineService contains methods and other services that help with interacting with the openmrp 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 NewOperationPickLineService method instead.
func NewOperationPickLineService ¶ added in v0.20.0
func NewOperationPickLineService(opts ...option.RequestOption) (r OperationPickLineService)
NewOperationPickLineService 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 (*OperationPickLineService) Update ¶ added in v0.20.0
func (r *OperationPickLineService) Update(ctx context.Context, id string, params OperationPickLineUpdateParams, opts ...option.RequestOption) (res *PickLine, err error)
Updates a pick line's picked quantity.
Use this to record a short or partial pick; Pick Pick Line fills in the full outstanding quantity instead.
This endpoint requires the permission: `picks:update`.
type OperationPickLineUpdateParams ¶ added in v0.20.0
type OperationPickLineUpdateParams struct {
PickID string `path:"pick_id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "sales_order_line", "sales_order_line.product", "quantity.unit",
// "ordered_quantity.unit".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a pick line's picked quantity.
UpdatePickLineRequest UpdatePickLineRequestParam
// contains filtered or unexported fields
}
func (OperationPickLineUpdateParams) MarshalJSON ¶ added in v0.20.0
func (r OperationPickLineUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationPickLineUpdateParams) URLQuery ¶ added in v0.20.0
func (r OperationPickLineUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationPickLineUpdateParams's query parameters as `url.Values`.
func (*OperationPickLineUpdateParams) UnmarshalJSON ¶ added in v0.20.0
func (r *OperationPickLineUpdateParams) UnmarshalJSON(data []byte) error
type OperationPickListParams ¶ added in v0.20.0
type OperationPickListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Latest pick creation date to include, in `YYYY-MM-DD` format. Inclusive of the
// date itself.
EndsAt param.Opt[string] `query:"ends_at,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Earliest pick creation date to include, in `YYYY-MM-DD` format.
StartsAt param.Opt[string] `query:"starts_at,omitzero" json:"-"`
// Restricts results to picks whose customer belongs to any of these account
// groups, matching the `type` on the customer.
CustomerGroupIDs []string `query:"customer_group_ids,omitzero" json:"-"`
// Restricts results to picks raised for any of these customers.
CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "created_by", "freight", "related.sales_order",
// "related.shipments", "lines", "lines.item", "lines.sales_order_line",
// "lines.sales_order_line.product", "lines.quantity", "lines.quantity.unit",
// "lines.ordered_quantity", "lines.ordered_quantity.unit".
Include []string `query:"include,omitzero" json:"-"`
// Restricts results to picks with at least one line whose product belongs to any
// of these product lines.
ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
// Orders the results: `ship_by_date` puts the soonest delivery commitment first,
// with picks whose order has no ship-by date last; `created_at` puts the newest
// pick first.
//
// Any of "ship_by_date", "created_at".
Sort OperationPickListParamsSort `query:"sort,omitzero" json:"-"`
// Restricts results to picks in this state.
//
// - `open`: picks that have not been finished.
// - `closed`: picks that have been finished.
//
// Any of "open", "closed".
Status OperationPickListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationPickListParams) URLQuery ¶ added in v0.20.0
func (r OperationPickListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationPickListParams's query parameters as `url.Values`.
type OperationPickListParamsSort ¶ added in v0.20.0
type OperationPickListParamsSort string
Orders the results: `ship_by_date` puts the soonest delivery commitment first, with picks whose order has no ship-by date last; `created_at` puts the newest pick first.
const ( OperationPickListParamsSortShipByDate OperationPickListParamsSort = "ship_by_date" OperationPickListParamsSortCreatedAt OperationPickListParamsSort = "created_at" )
type OperationPickListParamsStatus ¶ added in v0.20.0
type OperationPickListParamsStatus string
Restricts results to picks in this state.
- `open`: picks that have not been finished. - `closed`: picks that have been finished.
const ( OperationPickListParamsStatusOpen OperationPickListParamsStatus = "open" OperationPickListParamsStatusClosed OperationPickListParamsStatus = "closed" )
type OperationPickService ¶ added in v0.20.0
type OperationPickService struct {
// List, view, pick, void, and pack picks and pick lines.
Actions OperationPickActionService
// List, view, pick, void, and pack picks and pick lines.
Lines OperationPickLineService
// contains filtered or unexported fields
}
List, view, pick, void, and pack picks and pick lines.
OperationPickService contains methods and other services that help with interacting with the openmrp 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 NewOperationPickService method instead.
func NewOperationPickService ¶ added in v0.20.0
func NewOperationPickService(opts ...option.RequestOption) (r OperationPickService)
NewOperationPickService 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 (*OperationPickService) Get ¶ added in v0.20.0
func (r *OperationPickService) Get(ctx context.Context, id string, query OperationPickGetParams, opts ...option.RequestOption) (res *Pick, err error)
Returns a pick by ID.
This endpoint requires the permission: `picks:read`.
func (*OperationPickService) List ¶ added in v0.20.0
func (r *OperationPickService) List(ctx context.Context, query OperationPickListParams, opts ...option.RequestOption) (res *ListPick, err error)
Returns a paginated list of picks, soonest ship-by date first.
The `q` search term matches the pick number (which is the order number) and the customer PO number. To narrow by customer, use `customer_ids` rather than searching for a customer name.
This endpoint requires the permissions: `picks:read`, `customers:read`, `suppliers:read`.
type OperationProductionScheduleActionPreviewParams ¶
type OperationProductionScheduleActionPreviewParams struct {
// Request to preview a production schedule.
PreviewProductionScheduleRequest PreviewProductionScheduleRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleActionPreviewParams) MarshalJSON ¶
func (r OperationProductionScheduleActionPreviewParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleActionPreviewParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleActionPreviewParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleActionPreviewRegenerateParams ¶
type OperationProductionScheduleActionPreviewRegenerateParams struct {
// Request to see what a re-solve would change.
PreviewRegenerateProductionScheduleRequest PreviewRegenerateProductionScheduleRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleActionPreviewRegenerateParams) MarshalJSON ¶
func (r OperationProductionScheduleActionPreviewRegenerateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleActionPreviewRegenerateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleActionPreviewRegenerateParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleActionRegenerateParams ¶
type OperationProductionScheduleActionRegenerateParams struct {
// Request to re-solve a draft in place.
RegenerateProductionScheduleRequest RegenerateProductionScheduleRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleActionRegenerateParams) MarshalJSON ¶
func (r OperationProductionScheduleActionRegenerateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleActionRegenerateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleActionRegenerateParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleActionReleaseWeekParams ¶
type OperationProductionScheduleActionReleaseWeekParams struct {
// Request to release one week of a production schedule to the floor.
ReleaseProductionScheduleWeekRequest ReleaseProductionScheduleWeekRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleActionReleaseWeekParams) MarshalJSON ¶
func (r OperationProductionScheduleActionReleaseWeekParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleActionReleaseWeekParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleActionReleaseWeekParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleActionService ¶
type OperationProductionScheduleActionService struct {
// contains filtered or unexported fields
}
Generate and review machine-level production schedules.
OperationProductionScheduleActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleActionService method instead.
func NewOperationProductionScheduleActionService ¶
func NewOperationProductionScheduleActionService(opts ...option.RequestOption) (r OperationProductionScheduleActionService)
NewOperationProductionScheduleActionService 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 (*OperationProductionScheduleActionService) Archive ¶
func (r *OperationProductionScheduleActionService) Archive(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Archives a schedule version, retiring it without discarding its history.
Any version that is not already archived can be archived, including a draft that was never published. The version stays readable — its campaigns, policy snapshot and deviation log are kept — and it still backs any attainment already measured against it.
Archiving does not supersede anything or promote another version in its place. To take a published version out of use by replacing it, generate and publish a newer one instead.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleActionService) Preview ¶
func (r *OperationProductionScheduleActionService) Preview(ctx context.Context, body OperationProductionScheduleActionPreviewParams, opts ...option.RequestOption) (res *ProductionSchedulePreview, err error)
Runs the production scheduling solver and returns the plan without saving it.
This is the inspection surface for the scheduler: it takes the same path a generated schedule will take, minus the write, so a plan can be reviewed and compared before anything depends on it. No version is created and nothing is numbered, so this can be called as often as needed.
The solver plans the constraint department — the room that sets the pace of the factory — so production schedule settings must name one and it must have machines that are included in planning. Without that there is nothing to schedule and the request is rejected rather than returning an empty plan.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleActionService) PreviewRegenerate ¶
func (r *OperationProductionScheduleActionService) PreviewRegenerate(ctx context.Context, id string, body OperationProductionScheduleActionPreviewRegenerateParams, opts ...option.RequestOption) (res *ProductionScheduleRegeneratePreview, err error)
Returns what regenerating this draft would change, without changing it.
Every campaign either plan holds is listed, including the ones both agree on, so the caller can render a full side-by-side rather than a list of surprises. Only a draft can be previewed, for the same reason only a draft can be regenerated.
The comparison is run the way a regenerate runs by default — hand-edited campaigns are kept, and the fresh solve plans around them — so they read as unchanged rather than as work the solver wants to take away. `manual_line_count` is how many campaigns on the draft were placed or edited by hand, which is the work a `replace_all` regenerate is putting at risk.
The horizon and demand basis default to the ones this version already has, so a plain call changes only how current the plan is, not what question is being asked.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleActionService) Publish ¶
func (r *OperationProductionScheduleActionService) Publish(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Publishes a draft schedule, freezing its first weeks.
Publishing is what makes a plan a commitment: the frozen weeks' lines are marked frozen, the frozen line count and quantity are captured onto the version, and any published version whose horizon overlaps this one's is superseded rather than rewritten. After this, a change inside the frozen window has to state a reason.
Only a draft can be published. How many weeks freeze comes from the account's frozen-weeks setting as it stood when the version was generated, and a version generated with zero frozen weeks publishes without committing to anything.
The frozen counts are snapshotted here and never recomputed, so adherence keeps the denominator it was committed to.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleActionService) Regenerate ¶
func (r *OperationProductionScheduleActionService) Regenerate(ctx context.Context, id string, body OperationProductionScheduleActionRegenerateParams, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Re-solves a draft in place, keeping its version number.
Only a draft can be regenerated. A published version is a commitment the floor is already working to, and a superseded or archived one is history; re-solving either in place would change what a week was measured against after the fact. To replan against a published version, generate a new one — publishing it supersedes the current one.
The version number is kept deliberately: minting a new version for every re-solve would fill the list with drafts nobody asked for and make the version number meaningless as a count of the plans actually considered.
Every hand edit a `replace_all` destroys is written to the deviation log before it goes, so "where did my change go" stays answerable. Call `preview-regenerate` first to see what a re-solve would change.
Aside from the hand edits a `preserve_manual` run keeps, the version's campaigns, policy snapshot, derived department work, solver diagnostics and settings snapshot are all replaced with the fresh solve's, so the plan can still explain itself afterwards.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleActionService) ReleaseWeek ¶
func (r *OperationProductionScheduleActionService) ReleaseWeek(ctx context.Context, id string, body OperationProductionScheduleActionReleaseWeekParams, opts ...option.RequestOption) (res *ReleaseScheduleWeekResult, err error)
Turns one planned week into a production run.
Each campaign in the week becomes one batch per planned lot, using the lot size the campaign was planned at. A 360-unit campaign at a 60-unit lot arrives on the floor as six batches, not one instruction to make 360; a quantity that is not a whole number of lots trails a single short lot at the end of the run.
The release is atomic. A run holding half a week's batches is worse than no run, because the missing half looks like work nobody was asked to do and attainment would count it as unplanned production.
Releasing the same week twice fails rather than creating a second run. Each released line records the run now carrying it, and a line that is already released is never re-pointed.
Lots an earlier week already issued are carried forward rather than reissued. When a week fell short, the next plan asks for the shortfall — and the batches covering it are usually already printed and sitting on the floor. Those tickets are moved into this run and counted against the campaign, so only the genuinely new work is created. `carried_forward_batch_count` says how many arrived that way, and each one names the run it came off. Send `skip_carry_forward` to issue the whole week new instead.
Cancelled campaigns and campaigns planned at zero are left behind rather than released. A week that would produce an implausible number of batches is rejected outright, since that is far more likely to be a misconfigured lot size than a real week's work.
This endpoint requires the permissions: `production_schedules:update`, `production_runs:create`.
type OperationProductionScheduleDeleteResponse ¶
type OperationProductionScheduleDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationProductionScheduleDeleteResponse) RawJSON ¶
func (r OperationProductionScheduleDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationProductionScheduleDeleteResponse) UnmarshalJSON ¶
func (r *OperationProductionScheduleDeleteResponse) UnmarshalJSON(data []byte) error
type OperationProductionScheduleGetDerivedLinesParams ¶
type OperationProductionScheduleGetDerivedLinesParams struct {
// Only return work in this horizon week, zero-based.
WeekIndex param.Opt[int64] `query:"week_index,omitzero" json:"-"`
// Only return work owned by these departments.
DepartmentIDs []string `query:"department_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleGetDerivedLinesParams) URLQuery ¶
func (r OperationProductionScheduleGetDerivedLinesParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleGetDerivedLinesParams's query parameters as `url.Values`.
type OperationProductionScheduleGetDeviationsParams ¶
type OperationProductionScheduleGetDeviationsParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Whether the change fell inside the frozen window.
//
// Judged against the freeze as it stood when the change was made, not as it stands
// now, so a later publish cannot reclassify history.
Frozen param.Opt[bool] `query:"frozen,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleGetDeviationsParams) URLQuery ¶
func (r OperationProductionScheduleGetDeviationsParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleGetDeviationsParams's query parameters as `url.Values`.
type OperationProductionScheduleGetFinishingLinesParams ¶
type OperationProductionScheduleGetFinishingLinesParams struct {
// Only the finishing planned for this finished good.
ItemID param.Opt[string] `query:"item_id,omitzero" json:"-"`
// Only the finishing planned for this week, zero-based from the start of the
// horizon.
WeekIndex param.Opt[int64] `query:"week_index,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleGetFinishingLinesParams) URLQuery ¶
func (r OperationProductionScheduleGetFinishingLinesParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleGetFinishingLinesParams's query parameters as `url.Values`.
type OperationProductionScheduleGetWeekReleasePreviewParams ¶
type OperationProductionScheduleGetWeekReleasePreviewParams struct {
// Preview the week as if every batch were newly issued.
//
// By default the preview counts tickets an earlier week issued and the floor never
// worked against this week's campaigns, because that is what releasing would do.
SkipCarryForward param.Opt[bool] `query:"skip_carry_forward,omitzero" json:"-"`
// Zero-based week offset from the start of the horizon.
WeekIndex param.Opt[int64] `query:"week_index,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleGetWeekReleasePreviewParams) URLQuery ¶
func (r OperationProductionScheduleGetWeekReleasePreviewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleGetWeekReleasePreviewParams's query parameters as `url.Values`.
type OperationProductionScheduleLineDeleteParams ¶
type OperationProductionScheduleLineDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// Free-form explanation of the change.
ReasonNote param.Opt[string] `query:"reason_note,omitzero" json:"-"`
// Why the campaign was removed.
//
// Required when the campaign sits in a frozen week, since that is a commitment
// being broken.
//
// Any of "machine_down", "material_shortage", "rush_order", "quality_hold",
// "over_run", "under_run", "capacity_change", "other".
Reason OperationProductionScheduleLineDeleteParamsReason `query:"reason,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleLineDeleteParams) URLQuery ¶
func (r OperationProductionScheduleLineDeleteParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleLineDeleteParams's query parameters as `url.Values`.
type OperationProductionScheduleLineDeleteParamsReason ¶
type OperationProductionScheduleLineDeleteParamsReason string
Why the campaign was removed.
Required when the campaign sits in a frozen week, since that is a commitment being broken.
const ( OperationProductionScheduleLineDeleteParamsReasonMachineDown OperationProductionScheduleLineDeleteParamsReason = "machine_down" OperationProductionScheduleLineDeleteParamsReasonMaterialShortage OperationProductionScheduleLineDeleteParamsReason = "material_shortage" OperationProductionScheduleLineDeleteParamsReasonRushOrder OperationProductionScheduleLineDeleteParamsReason = "rush_order" OperationProductionScheduleLineDeleteParamsReasonQualityHold OperationProductionScheduleLineDeleteParamsReason = "quality_hold" OperationProductionScheduleLineDeleteParamsReasonOverRun OperationProductionScheduleLineDeleteParamsReason = "over_run" OperationProductionScheduleLineDeleteParamsReasonUnderRun OperationProductionScheduleLineDeleteParamsReason = "under_run" OperationProductionScheduleLineDeleteParamsReasonCapacityChange OperationProductionScheduleLineDeleteParamsReason = "capacity_change" OperationProductionScheduleLineDeleteParamsReasonOther OperationProductionScheduleLineDeleteParamsReason = "other" )
type OperationProductionScheduleLineDeleteResponse ¶
type OperationProductionScheduleLineDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationProductionScheduleLineDeleteResponse) RawJSON ¶
func (r OperationProductionScheduleLineDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationProductionScheduleLineDeleteResponse) UnmarshalJSON ¶
func (r *OperationProductionScheduleLineDeleteResponse) UnmarshalJSON(data []byte) error
type OperationProductionScheduleLineListParams ¶
type OperationProductionScheduleLineListParams struct {
// Only return campaigns in this horizon week, zero-based.
WeekIndex param.Opt[int64] `query:"week_index,omitzero" json:"-"`
// Only return campaigns on these machines.
MachineIDs []string `query:"machine_ids,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleLineListParams) URLQuery ¶
func (r OperationProductionScheduleLineListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleLineListParams's query parameters as `url.Values`.
type OperationProductionScheduleLineNewParams ¶
type OperationProductionScheduleLineNewParams struct {
// Request to add a campaign to a schedule by hand.
CreateProductionScheduleLineRequest CreateProductionScheduleLineRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleLineNewParams) MarshalJSON ¶
func (r OperationProductionScheduleLineNewParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleLineNewParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleLineNewParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleLineService ¶
type OperationProductionScheduleLineService struct {
// contains filtered or unexported fields
}
Generate and review machine-level production schedules.
OperationProductionScheduleLineService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleLineService method instead.
func NewOperationProductionScheduleLineService ¶
func NewOperationProductionScheduleLineService(opts ...option.RequestOption) (r OperationProductionScheduleLineService)
NewOperationProductionScheduleLineService 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 (*OperationProductionScheduleLineService) Delete ¶
func (r *OperationProductionScheduleLineService) Delete(ctx context.Context, lineID string, params OperationProductionScheduleLineDeleteParams, opts ...option.RequestOption) (res *OperationProductionScheduleLineDeleteResponse, err error)
Removes a campaign from a schedule.
The deviation log keeps a full snapshot of the removed line, so the change stays readable after the line itself is gone. Removing from a frozen week requires a `reason`.
Only a draft or a published version can be edited; a superseded or archived version is history. Removing a campaign whose week has already been released does not remove the batches it created; those live on the production run and have to be dealt with there.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleLineService) List ¶
func (r *OperationProductionScheduleLineService) List(ctx context.Context, id string, query OperationProductionScheduleLineListParams, opts ...option.RequestOption) (res *ListProductionScheduleLine, err error)
Returns the planned campaigns for a schedule version, in the order they run.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleLineService) New ¶
func (r *OperationProductionScheduleLineService) New(ctx context.Context, id string, body OperationProductionScheduleLineNewParams, opts ...option.RequestOption) (res *ProductionScheduleLine, err error)
Adds a campaign to a schedule by hand.
The line is recorded as manual, so a later regenerate can tell it apart from what the solver produced, and the change is written to the deviation log. Adding into a frozen week requires a `reason`.
Only a draft or a published version can be edited; a superseded or archived version is history. The campaign is appended to the end of its week's run order.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleLineService) Update ¶
func (r *OperationProductionScheduleLineService) Update(ctx context.Context, lineID string, params OperationProductionScheduleLineUpdateParams, opts ...option.RequestOption) (res *ProductionScheduleLine, err error)
Edits a campaign on a schedule.
Every change is written to the deviation log with a full before-and-after snapshot, and the line becomes manual so a regenerate can tell it apart from solver output. A change that touches a frozen week — including moving a campaign out of one — requires a `reason`.
Only a draft or a published version can be edited; a superseded or archived version is history. An edit that changes several things at once is logged under the single most significant one, in the order machine, week, quantity, position — that being the change a planner has to react to first.
This endpoint requires the permission: `production_schedules:update`.
type OperationProductionScheduleLineUpdateParams ¶
type OperationProductionScheduleLineUpdateParams struct {
ID string `path:"id" api:"required" json:"-"`
// Request to edit a campaign on a schedule.
UpdateProductionScheduleLineRequest UpdateProductionScheduleLineRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleLineUpdateParams) MarshalJSON ¶
func (r OperationProductionScheduleLineUpdateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleLineUpdateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleLineUpdateParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleListParams ¶
type OperationProductionScheduleListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Only return versions in these lifecycle states.
//
// - `draft`: still editable and committed to nothing.
// - `generating`: the solver is still building the version.
// - `published`: live, with its first weeks frozen as a commitment to the floor.
// - `superseded`: a later version was published over the same horizon and replaced
// this one.
// - `archived`: retired without being replaced.
// - `failed`: the solver could not produce a plan.
//
// Any of "draft", "generating", "published", "superseded", "archived", "failed".
Statuses []string `query:"statuses,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationProductionScheduleListParams) URLQuery ¶
func (r OperationProductionScheduleListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationProductionScheduleListParams's query parameters as `url.Values`.
type OperationProductionScheduleNewParams ¶
type OperationProductionScheduleNewParams struct {
// Request to generate a production schedule.
GenerateProductionScheduleRequest GenerateProductionScheduleRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleNewParams) MarshalJSON ¶
func (r OperationProductionScheduleNewParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleNewParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleNewParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleService ¶
type OperationProductionScheduleService struct {
// Generate and review machine-level production schedules.
Lines OperationProductionScheduleLineService
// Generate and review machine-level production schedules.
Actions OperationProductionScheduleActionService
// contains filtered or unexported fields
}
Generate and review machine-level production schedules.
OperationProductionScheduleService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleService method instead.
func NewOperationProductionScheduleService ¶
func NewOperationProductionScheduleService(opts ...option.RequestOption) (r OperationProductionScheduleService)
NewOperationProductionScheduleService 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 (*OperationProductionScheduleService) Delete ¶
func (r *OperationProductionScheduleService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationProductionScheduleDeleteResponse, err error)
Deletes a draft schedule along with its planned campaigns and its item policy snapshot.
Only drafts can be deleted. A published version is the baseline attainment is measured against, so removing it would erase the record of what was promised — archive those instead.
This endpoint requires the permission: `production_schedules:delete`.
func (*OperationProductionScheduleService) Get ¶
func (r *OperationProductionScheduleService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Returns a single production schedule version.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetAtRiskOrders ¶
func (r *OperationProductionScheduleService) GetAtRiskOrders(ctx context.Context, id string, opts ...option.RequestOption) (res *ListScheduleOrderCoverage, err error)
Returns the customer commitments this schedule version does not meet, soonest first.
Three ways an order lands here. `past_due` means the constraint stage needed to start before this plan begins. `undated` means the order carries no ship-by commitment at all, so it is treated as owed now. `short` means the plan simply does not build enough of it in time — the campaigns it does allocate are listed alongside, because building three hundred of five hundred is a different conversation from building none.
Read from the version's own record rather than re-solved, so what comes back is what was decided when the plan was made. A version generated before commitments were tracked reports nothing, which is correct: it made no promises it could break.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetCurrent ¶
func (r *OperationProductionScheduleService) GetCurrent(ctx context.Context, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Returns the published schedule covering today.
Responds 404 when no published version covers today, which is the normal state before the first schedule is published. Drafts are never returned here — a plan nobody has committed to is not the current plan.
At most one version is ever current: publishing a new one supersedes every published version its horizon overlaps, so republishing mid-horizon takes over immediately.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetDerivedLines ¶
func (r *OperationProductionScheduleService) GetDerivedLines(ctx context.Context, id string, query OperationProductionScheduleGetDerivedLinesParams, opts ...option.RequestOption) (res *ListProductionScheduleDerivedLine, err error)
Returns the department work implied by a schedule's constraint plan.
The solver schedules only the constraint; every other department's work is derived from it by walking the production-step graph, applying each step's lead-time offset and yield. That makes this the work list a supervisor reads, rather than a second plan someone has to maintain.
`explosion_depth` is how many steps downstream the work sits, which is what a readiness indicator keys off. Depth 0 is the constraint's own campaigns, so a plant with nothing configured downstream of its constraint still gets the work it actually scheduled. Work whose derived week falls past the schedule's horizon is still returned — a department needs to see it coming.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetDeviations ¶
func (r *OperationProductionScheduleService) GetDeviations(ctx context.Context, id string, query OperationProductionScheduleGetDeviationsParams, opts ...option.RequestOption) (res *ListProductionScheduleDeviation, err error)
Returns the append-only log of hand changes made to a schedule, most recent first.
This is what frozen-week adherence is measured from. A change recorded as frozen was inside the freeze window at the moment it was made, and stays that way regardless of what is published later.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetFinishedPolicies ¶
func (r *OperationProductionScheduleService) GetFinishedPolicies(ctx context.Context, id string, opts ...option.RequestOption) (res *ListProductionScheduleFinishedPolicy, err error)
Returns the per-finished-SKU inventory targets behind a schedule version, grouped under the constraint item each one is made from.
The item policies pool every finished good a constraint item feeds into one echelon figure, which is what the build decision is made against. These rows are what that pooling hides: each finished SKU's own demand, its own variability, its own stock, and a buffer sized against the finishing lead time rather than the constraint's.
The two stages do not overlap, so together they describe the whole network's stock without counting any of it twice: the constraint stage holds its pooled buffer, and the finished stage holds these.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetFinishingLines ¶
func (r *OperationProductionScheduleService) GetFinishingLines(ctx context.Context, id string, query OperationProductionScheduleGetFinishingLinesParams, opts ...option.RequestOption) (res *ListProductionScheduleFinishingLine, err error)
Returns the second stage of a schedule: how many of which finished good to make from the knitted parts, week by week.
The constraint plan says how much greige to knit and deliberately does not say what to turn it into — a family's demand is pooled onto the greige precisely so the buffer can sit at the undifferentiated stage, where it is cheapest. These lines are where that pooling is undone, against each finished SKU's own stock position, its own orders, and the hours the rest of the factory has that week.
Leveled, not merely allocated. Work that does not fit a week moves to the next one rather than being dropped, so the plan never asks the second stage for more hours than it has. Two things bound it, and they are reported separately in the schedule's diagnostics because they call for opposite responses: a SKU held back for want of greige is a knitting problem, and a SKU held back for want of hours is a finishing one.
Everything is counted in the constraint item's unit, so `greige_consumed` here and `planned_quantity` on the constraint plan are directly comparable — which is what lets the two stages be reconciled rather than only read side by side.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetItemPolicies ¶
func (r *OperationProductionScheduleService) GetItemPolicies(ctx context.Context, id string, opts ...option.RequestOption) (res *ListProductionScheduleItemPolicy, err error)
Returns the per-item policy behind a schedule version, ordered by constraint run hours descending.
This is the "why" behind every campaign: lot size, reorder point, safety stock and lead times as they stood when the plan was generated.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) GetWeekReleasePreview ¶
func (r *OperationProductionScheduleService) GetWeekReleasePreview(ctx context.Context, id string, query OperationProductionScheduleGetWeekReleasePreviewParams, opts ...option.RequestOption) (res *ReleaseScheduleWeekPreview, err error)
Returns what releasing a week would create, without creating it.
The lots are resolved exactly as the release itself resolves them, so what a planner is shown and what the floor receives cannot drift apart.
`is_releasable` is false when the week is empty or already released, with `blocked_reason` saying which; `existing_production_run_id` names the run a released week is already tied to.
Cancelled campaigns and campaigns planned at zero are excluded here exactly as the release excludes them, so a week holding nothing but those previews as empty.
Lots the floor is already holding are named as such. A batch with `carried_forward_from` set is a ticket an earlier week issued and nobody worked, which the release moves into the new run rather than reissuing, so nothing has to be reprinted.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) List ¶
func (r *OperationProductionScheduleService) List(ctx context.Context, query OperationProductionScheduleListParams, opts ...option.RequestOption) (res *ListProductionSchedule, err error)
Returns a paginated list of production schedule versions, newest first.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleService) New ¶
func (r *OperationProductionScheduleService) New(ctx context.Context, body OperationProductionScheduleNewParams, opts ...option.RequestOption) (res *ProductionSchedule, err error)
Generates and saves a new production schedule.
The plan is saved as a draft: nothing is frozen yet, so campaigns can be added, changed and removed without having to give a reason. Generating again creates a new version rather than replacing this one, because attainment is measured against whichever version was live at the time.
The solver plans the constraint department — the room that sets the pace of the factory — so production schedule settings must name one and it must have machines that are included in planning. Without that there is nothing to schedule and the request is rejected rather than returning an empty plan.
Alongside the campaigns, the version stores the assumptions it was solved with, the per-item policies behind each campaign, and the downstream department work implied by the plan.
This endpoint requires the permission: `production_schedules:create`.
type OperationProductionScheduleSettingItemDeleteResponse ¶
type OperationProductionScheduleSettingItemDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationProductionScheduleSettingItemDeleteResponse) RawJSON ¶
func (r OperationProductionScheduleSettingItemDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationProductionScheduleSettingItemDeleteResponse) UnmarshalJSON ¶
func (r *OperationProductionScheduleSettingItemDeleteResponse) UnmarshalJSON(data []byte) error
type OperationProductionScheduleSettingItemService ¶
type OperationProductionScheduleSettingItemService struct {
// contains filtered or unexported fields
}
The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
OperationProductionScheduleSettingItemService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleSettingItemService method instead.
func NewOperationProductionScheduleSettingItemService ¶
func NewOperationProductionScheduleSettingItemService(opts ...option.RequestOption) (r OperationProductionScheduleSettingItemService)
NewOperationProductionScheduleSettingItemService 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 (*OperationProductionScheduleSettingItemService) Delete ¶
func (r *OperationProductionScheduleSettingItemService) Delete(ctx context.Context, itemID string, opts ...option.RequestOption) (res *OperationProductionScheduleSettingItemDeleteResponse, err error)
Removes one item's planning overrides, returning it to the account defaults and its product line's conventions.
Fails with a not-found error when the item has no overrides, rather than reporting success: a mistyped item ID would otherwise read as a change that never happened.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleSettingItemService) Get ¶
func (r *OperationProductionScheduleSettingItemService) Get(ctx context.Context, itemID string, opts ...option.RequestOption) (res *ProductionScheduleItemSetting, err error)
Returns the planning overrides for one item.
Fails with a not-found error when the item has none, rather than returning an empty set of overrides: an item with no overrides is planned on the account defaults and its product line's conventions, and reporting that as a resource would suggest there is something here to edit.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleSettingItemService) List ¶
func (r *OperationProductionScheduleSettingItemService) List(ctx context.Context, opts ...option.RequestOption) (res *ListProductionScheduleItemSetting, err error)
Returns every per-item planning override in the account.
Only items that have been given an override appear here. An item with none is planned on the account defaults and its product line's conventions, which is the normal case — this is the list of exceptions, not a list of every item.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleSettingItemService) Update ¶
func (r *OperationProductionScheduleSettingItemService) Update(ctx context.Context, itemID string, body OperationProductionScheduleSettingItemUpdateParams, opts ...option.RequestOption) (res *ProductionScheduleItemSetting, err error)
Writes the planning overrides for one item.
An item has at most one set of overrides, so this replaces the existing entry rather than adding a second, and the entry keeps the ID it already had.
The fulfillment policy is the most consequential of these. A `make_to_order` item contributes no forecast demand and holds no safety stock, so it is built only against orders already on the book — which is what stops a slow mover accumulating inventory nobody asked for. It also propagates: an intermediate item is planned to order only when every finished good it becomes is, so one stocked sibling keeps the whole family buffered.
Overrides are read when a plan is generated, so a change takes effect on the next generated version and leaves existing ones untouched.
This endpoint requires the permission: `production_schedules:update`.
type OperationProductionScheduleSettingItemUpdateParams ¶
type OperationProductionScheduleSettingItemUpdateParams struct {
// Request to write one item's planning overrides.
UpsertItemSettingRequest UpsertItemSettingRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleSettingItemUpdateParams) MarshalJSON ¶
func (r OperationProductionScheduleSettingItemUpdateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleSettingItemUpdateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleSettingItemUpdateParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleSettingResourceDeleteResponse ¶
type OperationProductionScheduleSettingResourceDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationProductionScheduleSettingResourceDeleteResponse) RawJSON ¶
func (r OperationProductionScheduleSettingResourceDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationProductionScheduleSettingResourceDeleteResponse) UnmarshalJSON ¶
func (r *OperationProductionScheduleSettingResourceDeleteResponse) UnmarshalJSON(data []byte) error
type OperationProductionScheduleSettingResourceService ¶
type OperationProductionScheduleSettingResourceService struct {
// contains filtered or unexported fields
}
The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
OperationProductionScheduleSettingResourceService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleSettingResourceService method instead.
func NewOperationProductionScheduleSettingResourceService ¶
func NewOperationProductionScheduleSettingResourceService(opts ...option.RequestOption) (r OperationProductionScheduleSettingResourceService)
NewOperationProductionScheduleSettingResourceService 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 (*OperationProductionScheduleSettingResourceService) Delete ¶
func (r *OperationProductionScheduleSettingResourceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationProductionScheduleSettingResourceDeleteResponse, err error)
Removes a planning override, returning that resource to the account's own settings.
Deleting a machine's override puts it back into the plan alongside the rest of its department; deleting a production step's removes the lead-time offset its work was shifted by. The change takes effect on the next generated version.
This endpoint requires the permission: `production_schedules:update`.
func (*OperationProductionScheduleSettingResourceService) List ¶
func (r *OperationProductionScheduleSettingResourceService) List(ctx context.Context, opts ...option.RequestOption) (res *ListProductionScheduleResourceSetting, err error)
Returns every per-machine, per-department and per-step override of the account's planning assumptions.
An override exists only for a resource that has been given one: this is where a machine is taken out of the plan, and where a production step declares how many weeks its work starts after the step that feeds it. Anything absent from this list is planned on the account settings alone.
The account's full set of overrides is returned at once — there are no filters and nothing to page through.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleSettingResourceService) Update ¶
func (r *OperationProductionScheduleSettingResourceService) Update(ctx context.Context, body OperationProductionScheduleSettingResourceUpdateParams, opts ...option.RequestOption) (res *ProductionScheduleResourceSetting, err error)
Writes a planning override for one machine, department or production step.
A resource has at most one override, so this replaces the existing entry for the same scope rather than adding a second, and the entry keeps the ID it already had. Machines are chosen by naming the constraint department, so this is where one is taken _out_ of planning — a machine down for a rebuild — and where a production step declares how many weeks its work starts after the step that feeds it.
Overrides are read when a plan is generated, so a change takes effect on the next generated version and leaves existing ones untouched.
This endpoint requires the permission: `production_schedules:update`.
type OperationProductionScheduleSettingResourceUpdateParams ¶
type OperationProductionScheduleSettingResourceUpdateParams struct {
// Request to write a per-resource planning override.
UpsertResourceSettingRequest UpsertResourceSettingRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleSettingResourceUpdateParams) MarshalJSON ¶
func (r OperationProductionScheduleSettingResourceUpdateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleSettingResourceUpdateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleSettingResourceUpdateParams) UnmarshalJSON(data []byte) error
type OperationProductionScheduleSettingService ¶
type OperationProductionScheduleSettingService struct {
// The planning assumptions production schedules are solved against, and the
// per-resource overrides that mark which machines constrain the plan.
Resources OperationProductionScheduleSettingResourceService
// The planning assumptions production schedules are solved against, and the
// per-resource overrides that mark which machines constrain the plan.
Items OperationProductionScheduleSettingItemService
// contains filtered or unexported fields
}
The planning assumptions production schedules are solved against, and the per-resource overrides that mark which machines constrain the plan.
OperationProductionScheduleSettingService contains methods and other services that help with interacting with the openmrp 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 NewOperationProductionScheduleSettingService method instead.
func NewOperationProductionScheduleSettingService ¶
func NewOperationProductionScheduleSettingService(opts ...option.RequestOption) (r OperationProductionScheduleSettingService)
NewOperationProductionScheduleSettingService 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 (*OperationProductionScheduleSettingService) List ¶
func (r *OperationProductionScheduleSettingService) List(ctx context.Context, opts ...option.RequestOption) (res *ProductionScheduleSettings, err error)
Returns the planning assumptions production schedules are solved against.
The whole set is always returned. An account that has never saved settings reads back the values the solver would apply anyway, so a caller never has to know which assumptions are in play; `settings_status` says whether the values were saved on the account or are those defaults.
Per-machine, per-department and per-step overrides of these assumptions are read separately.
This endpoint requires the permission: `production_schedules:read`.
func (*OperationProductionScheduleSettingService) Update ¶
func (r *OperationProductionScheduleSettingService) Update(ctx context.Context, body OperationProductionScheduleSettingUpdateParams, opts ...option.RequestOption) (res *ProductionScheduleSettings, err error)
Replaces the planning assumptions production schedules are solved against.
Settings are replaced wholesale rather than patched, because they are read as one coherent set: a horizon that no longer matches the frozen window, or a capacity headroom that no longer matches the shift pattern, would produce a plan nobody intended. Send the full set on every call — a value the request leaves out is never carried over from what was stored.
The set is validated together, so a frozen window longer than the horizon, a minimum changeover above the maximum, or an active cadence with no valid schedule expression is rejected as a whole.
Existing schedule versions are unaffected — each one records the assumptions it was solved under, so changing settings changes future plans only.
This endpoint requires the permission: `production_schedules:update`.
type OperationProductionScheduleSettingUpdateParams ¶
type OperationProductionScheduleSettingUpdateParams struct {
// Request to replace the account's planning assumptions.
UpdateProductionScheduleSettingsRequest UpdateProductionScheduleSettingsRequestParam
// contains filtered or unexported fields
}
func (OperationProductionScheduleSettingUpdateParams) MarshalJSON ¶
func (r OperationProductionScheduleSettingUpdateParams) MarshalJSON() (data []byte, err error)
func (*OperationProductionScheduleSettingUpdateParams) UnmarshalJSON ¶
func (r *OperationProductionScheduleSettingUpdateParams) UnmarshalJSON(data []byte) error
type OperationScanningStationDeleteResponse ¶
type OperationScanningStationDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationScanningStationDeleteResponse) RawJSON ¶
func (r OperationScanningStationDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationScanningStationDeleteResponse) UnmarshalJSON ¶
func (r *OperationScanningStationDeleteResponse) UnmarshalJSON(data []byte) error
type OperationScanningStationGetParams ¶
type OperationScanningStationGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department", "production_steps".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationScanningStationGetParams) URLQuery ¶
func (r OperationScanningStationGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationScanningStationGetParams's query parameters as `url.Values`.
type OperationScanningStationListParams ¶
type OperationScanningStationListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department", "production_steps".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationScanningStationListParams) URLQuery ¶
func (r OperationScanningStationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationScanningStationListParams's query parameters as `url.Values`.
type OperationScanningStationNewParams ¶
type OperationScanningStationNewParams struct {
// Request to create a scanning station.
CreateScanningStationRequest CreateScanningStationRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department", "production_steps".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationScanningStationNewParams) MarshalJSON ¶
func (r OperationScanningStationNewParams) MarshalJSON() (data []byte, err error)
func (OperationScanningStationNewParams) URLQuery ¶
func (r OperationScanningStationNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationScanningStationNewParams's query parameters as `url.Values`.
func (*OperationScanningStationNewParams) UnmarshalJSON ¶
func (r *OperationScanningStationNewParams) UnmarshalJSON(data []byte) error
type OperationScanningStationService ¶
type OperationScanningStationService struct {
// contains filtered or unexported fields
}
List and manage scanning stations.
OperationScanningStationService contains methods and other services that help with interacting with the openmrp 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 NewOperationScanningStationService method instead.
func NewOperationScanningStationService ¶
func NewOperationScanningStationService(opts ...option.RequestOption) (r OperationScanningStationService)
NewOperationScanningStationService 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 (*OperationScanningStationService) Delete ¶
func (r *OperationScanningStationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationScanningStationDeleteResponse, err error)
Deletes a scanning station.
Production steps connected to the station are not deleted, but they are left without a station to scan at until you connect them to another one. Deleting a station that was already deleted returns an already-deleted error rather than a not-found error.
This endpoint requires the permission: `scanners:delete`.
func (*OperationScanningStationService) Get ¶
func (r *OperationScanningStationService) Get(ctx context.Context, id string, query OperationScanningStationGetParams, opts ...option.RequestOption) (res *ScanningStation, err error)
Returns a scanning station by ID.
This endpoint requires the permission: `scanners:read`.
func (*OperationScanningStationService) List ¶
func (r *OperationScanningStationService) List(ctx context.Context, query OperationScanningStationListParams, opts ...option.RequestOption) (res *ListScanningStation, err error)
Returns a paginated list of scanning stations in your account.
The `q` search term matches the station name.
This endpoint requires the permission: `scanners:read`.
func (*OperationScanningStationService) New ¶
func (r *OperationScanningStationService) New(ctx context.Context, params OperationScanningStationNewParams, opts ...option.RequestOption) (res *ScanningStation, err error)
Creates a scanning station and assigns it to a department.
The new station has no production steps connected to it; use Connect Production Steps to Scanning Station to attach them.
Returns a conflict error if a scanning station with the same name already exists, and a not-found error if the department does not exist in your account.
This endpoint requires the permission: `scanners:create`.
func (*OperationScanningStationService) Update ¶
func (r *OperationScanningStationService) Update(ctx context.Context, id string, params OperationScanningStationUpdateParams, opts ...option.RequestOption) (res *ScanningStation, err error)
Partially updates a scanning station.
Only the fields provided in the request are changed. Returns a conflict error if the new name is already in use by another scanning station.
This endpoint requires the permission: `scanners:update`.
type OperationScanningStationUpdateParams ¶
type OperationScanningStationUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "department", "production_steps".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a scanning station.
//
// The station's type and department are set at creation and cannot be changed
// here.
UpdateScanningStationRequest UpdateScanningStationRequestParam
// contains filtered or unexported fields
}
func (OperationScanningStationUpdateParams) MarshalJSON ¶
func (r OperationScanningStationUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationScanningStationUpdateParams) URLQuery ¶
func (r OperationScanningStationUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationScanningStationUpdateParams's query parameters as `url.Values`.
func (*OperationScanningStationUpdateParams) UnmarshalJSON ¶
func (r *OperationScanningStationUpdateParams) UnmarshalJSON(data []byte) error
type OperationService ¶
type OperationService struct {
// List and manage shipping terms.
ShippingTerms OperationShippingTermService
// List and manage carriers and their Shippo integrations.
Carriers OperationCarrierService
// List and manage departments.
Departments OperationDepartmentService
// List and export inventory change logs.
InventoryChangeLogs OperationInventoryChangeLogService
// List and manage machines.
Machines OperationMachineService
// Log and review machine stoppages. Downtime is the source of OEE availability and
// changeover time.
MachineDowntimeEvents OperationMachineDowntimeEventService
// Adjust the demand a production schedule plans against. Overrides are how
// management accounts for demand that sales history cannot see.
DemandOverrides OperationDemandOverrideService
// Generate and review machine-level production schedules.
ProductionSchedules OperationProductionScheduleService
// The planning assumptions production schedules are solved against, and the
// per-resource overrides that mark which machines constrain the plan.
ProductionScheduleSettings OperationProductionScheduleSettingService
// The planning assumptions production schedules are solved against, and the
// per-resource overrides that mark which machines constrain the plan.
FulfillmentRecommendations OperationFulfillmentRecommendationService
// The days a plant tenders freight and a customer's dock accepts it, less the
// holidays and shutdowns either side is closed for. Every ship-by date is resolved
// against them, so an order is never committed to a day nobody can act on.
OperatingCalendars OperationOperatingCalendarService
// List, view, pick, void, and pack picks and pick lines.
Picks OperationPickService
// List and manage locations.
Locations OperationLocationService
// List and manage locations.
LocationTypes OperationLocationTypeService
Shipments OperationShipmentService
// List and manage scanning stations.
ScanningStations OperationScanningStationService
// contains filtered or unexported fields
}
OperationService contains methods and other services that help with interacting with the openmrp 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 NewOperationService method instead.
func NewOperationService ¶
func NewOperationService(opts ...option.RequestOption) (r OperationService)
NewOperationService 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 (*OperationService) GetDemandOverrideTypes ¶
func (r *OperationService) GetDemandOverrideTypes(ctx context.Context, opts ...option.RequestOption) (res *ListDemandOverrideType, err error)
Returns the demand override types, which describe how an override's value adjusts the forecast.
The taxonomy is platform-provided and identical for every account; each type's `code` is a value accepted as an override's `adjustment`.
This endpoint requires the permission: `demand_overrides:read`.
func (*OperationService) GetMachineDowntimeReasons ¶
func (r *OperationService) GetMachineDowntimeReasons(ctx context.Context, opts ...option.RequestOption) (res *ListMachineDowntimeReason, err error)
Returns the downtime reasons available when logging a stoppage.
The list is the same for every account and is ordered for display, so it can be rendered straight into a reason picker. Each reason carries the OEE term its stoppages charge, which is what makes the choice of reason matter beyond labeling.
This endpoint requires the permission: `machine_downtime:read`.
func (*OperationService) GetMachineStatus ¶
func (r *OperationService) GetMachineStatus(ctx context.Context, query OperationGetMachineStatusParams, opts ...option.RequestOption) (res *ListMachineStatus, err error)
Returns what every machine is running right now, how much is left on it, and what is queued behind that.
The whole floor comes back in one response rather than a page at a time, so a wall display can render it in a single call.
Assembled from the published schedule, the batches the floor has scanned against each campaign, and any open downtime. A campaign is `current` once its week is released and while it still has batches to scan; when the last one is scanned it hands over to the next, so this advances on its own as a shift progresses.
A machine with an open stoppage reads `down` even when it has a released campaign, because a broken machine is not producing whatever the plan says. A machine with nothing released reads `idle`, which is a state worth seeing rather than an absence from the list.
Reads the published version rather than the newest draft: the floor works to what was committed, and a draft regenerating underneath a wall display would make machines appear to change job on their own. With nothing published every machine reads idle rather than the request failing.
This endpoint requires the permission: `machines:read`.
func (*OperationService) GetScheduleDeviationTypes ¶
func (r *OperationService) GetScheduleDeviationTypes(ctx context.Context, opts ...option.RequestOption) (res *ListScheduleDeviationType, err error)
Returns the kinds of hand change a schedule deviation can record.
This endpoint requires the permission: `production_schedules:read`.
type OperationShipmentActionRateShopParams ¶
type OperationShipmentActionRateShopParams struct {
// Request to rate shop across carriers.
RateShopRequest RateShopRequestParam
// contains filtered or unexported fields
}
func (OperationShipmentActionRateShopParams) MarshalJSON ¶
func (r OperationShipmentActionRateShopParams) MarshalJSON() (data []byte, err error)
func (*OperationShipmentActionRateShopParams) UnmarshalJSON ¶
func (r *OperationShipmentActionRateShopParams) UnmarshalJSON(data []byte) error
type OperationShipmentActionService ¶
type OperationShipmentActionService struct {
// contains filtered or unexported fields
}
List and manage shipments, shipment lines, and shipping operations.
OperationShipmentActionService contains methods and other services that help with interacting with the openmrp 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 NewOperationShipmentActionService method instead.
func NewOperationShipmentActionService ¶
func NewOperationShipmentActionService(opts ...option.RequestOption) (r OperationShipmentActionService)
NewOperationShipmentActionService 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 (*OperationShipmentActionService) RateShop ¶
func (r *OperationShipmentActionService) RateShop(ctx context.Context, body OperationShipmentActionRateShopParams, opts ...option.RequestOption) (res *RateShopResult, err error)
Compares shipping rates across all of the account's carriers and service levels for the given addresses and parcels.
Returns options sorted by rate ascending, after applying the account's freight rules: freight-exempt product lines or customers and free-freight shipping terms return no options, a flat-rate shipping term replaces carrier rates with the flat rate, and a met free-shipping minimum order value zeroes the rate on eligible options.
Live carrier rates require the Shippo integration. Carriers that are not linked to a live-rating account are returned at a rate of `0`, while carriers that are linked but whose rates cannot be fetched are left out of the results entirely. Customer portal callers only see carriers and service levels that have been enabled for the portal.
This endpoint requires the permissions: `shipments:read`, `customers:read`, `suppliers:read`.
type OperationShipmentService ¶
type OperationShipmentService struct {
// List and manage shipments, shipment lines, and shipping operations.
Actions OperationShipmentActionService
// contains filtered or unexported fields
}
OperationShipmentService contains methods and other services that help with interacting with the openmrp 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 NewOperationShipmentService method instead.
func NewOperationShipmentService ¶
func NewOperationShipmentService(opts ...option.RequestOption) (r OperationShipmentService)
NewOperationShipmentService 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.
type OperationShippingTermDeleteResponse ¶
type OperationShippingTermDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (OperationShippingTermDeleteResponse) RawJSON ¶
func (r OperationShippingTermDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*OperationShippingTermDeleteResponse) UnmarshalJSON ¶
func (r *OperationShippingTermDeleteResponse) UnmarshalJSON(data []byte) error
type OperationShippingTermGetParams ¶
type OperationShippingTermGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
// "free_shipping_service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationShippingTermGetParams) URLQuery ¶
func (r OperationShippingTermGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationShippingTermGetParams's query parameters as `url.Values`.
type OperationShippingTermListParams ¶
type OperationShippingTermListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
// "free_shipping_service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationShippingTermListParams) URLQuery ¶
func (r OperationShippingTermListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationShippingTermListParams's query parameters as `url.Values`.
type OperationShippingTermNewParams ¶
type OperationShippingTermNewParams struct {
// Request to create a shipping term.
CreateShippingTermRequest CreateShippingTermRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
// "free_shipping_service_levels".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OperationShippingTermNewParams) MarshalJSON ¶
func (r OperationShippingTermNewParams) MarshalJSON() (data []byte, err error)
func (OperationShippingTermNewParams) URLQuery ¶
func (r OperationShippingTermNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationShippingTermNewParams's query parameters as `url.Values`.
func (*OperationShippingTermNewParams) UnmarshalJSON ¶
func (r *OperationShippingTermNewParams) UnmarshalJSON(data []byte) error
type OperationShippingTermService ¶
type OperationShippingTermService struct {
// contains filtered or unexported fields
}
List and manage shipping terms.
OperationShippingTermService contains methods and other services that help with interacting with the openmrp 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 NewOperationShippingTermService method instead.
func NewOperationShippingTermService ¶
func NewOperationShippingTermService(opts ...option.RequestOption) (r OperationShippingTermService)
NewOperationShippingTermService 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 (*OperationShippingTermService) Delete ¶
func (r *OperationShippingTermService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OperationShippingTermDeleteResponse, err error)
Deletes a shipping term owned by your account.
System-provided default shipping terms cannot be deleted. The term's free-shipping service level rules, flat rate and minimum order value go with it, and deleting a term that has already been deleted returns an error rather than succeeding again.
This endpoint requires the permission: `shipping_terms:delete`.
func (*OperationShippingTermService) Get ¶
func (r *OperationShippingTermService) Get(ctx context.Context, id string, query OperationShippingTermGetParams, opts ...option.RequestOption) (res *ShippingTerm, err error)
Returns a shipping term by ID.
This endpoint requires the permission: `shipping_terms:read`.
func (*OperationShippingTermService) List ¶
func (r *OperationShippingTermService) List(ctx context.Context, query OperationShippingTermListParams, opts ...option.RequestOption) (res *ListShippingTerm, err error)
Returns a paginated list of shipping terms, newest first.
Both the terms your account has created and the system-provided default terms are returned. The `q` parameter matches on the shipping term name.
This endpoint requires the permission: `shipping_terms:read`.
func (*OperationShippingTermService) New ¶
func (r *OperationShippingTermService) New(ctx context.Context, params OperationShippingTermNewParams, opts ...option.RequestOption) (res *ShippingTerm, err error)
Creates a shipping term owned by your account.
The new term takes effect on freight quoting once it is assigned as a customer's default shipping term.
This endpoint requires the permission: `shipping_terms:create`.
func (*OperationShippingTermService) Update ¶
func (r *OperationShippingTermService) Update(ctx context.Context, id string, params OperationShippingTermUpdateParams, opts ...option.RequestOption) (res *ShippingTerm, err error)
Partially updates a shipping term owned by your account.
System-provided default shipping terms cannot be updated. Changes affect freight quoted after the update; freight already recorded on existing orders is not recalculated.
This endpoint requires the permission: `shipping_terms:update`.
type OperationShippingTermUpdateParams ¶
type OperationShippingTermUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner", "owner.account", "flat_rate.unit", "minimum_order_value.unit",
// "free_shipping_service_levels".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a shipping term.
//
// Fields left out of the request keep their current values. Send an explicit JSON
// `null` for `flat_rate`, `minimum_order_value`, or
// `free_shipping_service_level_ids` to clear the stored value.
UpdateShippingTermRequest UpdateShippingTermRequestParam
// contains filtered or unexported fields
}
func (OperationShippingTermUpdateParams) MarshalJSON ¶
func (r OperationShippingTermUpdateParams) MarshalJSON() (data []byte, err error)
func (OperationShippingTermUpdateParams) URLQuery ¶
func (r OperationShippingTermUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes OperationShippingTermUpdateParams's query parameters as `url.Values`.
func (*OperationShippingTermUpdateParams) UnmarshalJSON ¶
func (r *OperationShippingTermUpdateParams) UnmarshalJSON(data []byte) error
type OrderContact ¶
type OrderContact struct {
// Email addresses that receive order acknowledgements for this order.
Acknowledgement []string `json:"acknowledgement" api:"required"`
// Email addresses that receive invoices for this order.
Invoice []string `json:"invoice" api:"required"`
// Resource type identifier.
//
// Any of "order_contact".
Object OrderContactObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Acknowledgement respjson.Field
Invoice respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A sales order's email recipients, grouped by the notification they receive.
func (OrderContact) RawJSON ¶
func (r OrderContact) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderContact) UnmarshalJSON ¶
func (r *OrderContact) UnmarshalJSON(data []byte) error
type OrderContactObject ¶
type OrderContactObject string
Resource type identifier.
const (
OrderContactObjectOrderContact OrderContactObject = "order_contact"
)
type OrderDiscount ¶
type OrderDiscount struct {
// Order discount ID.
ID string `json:"id" api:"required"`
// The flat amount taken off the order total, as a decimal string.
//
// Only read when `discount_type` is `amount`.
Amount string `json:"amount" api:"required" format:"decimal"`
// The code a buyer enters to apply this discount to an order.
//
// Codes are unique within your account and are matched without regard to letter
// case.
Code string `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// How the discount is calculated.
//
// - `percentage`: the order total is reduced by the fraction in `percentage`.
// - `amount`: the order total is reduced by the flat amount in `amount`.
//
// Any of "percentage", "amount".
DiscountType OrderDiscountDiscountType `json:"discount_type" api:"required"`
// Display name of the discount.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "order_discount".
Object OrderDiscountObject `json:"object" api:"required"`
// How many sales orders this discount has been applied to, across all buyers.
OrderCount int64 `json:"order_count" api:"required"`
// The fraction of the order total taken off, as a decimal string.
//
// This is a multiplier, not a whole percent: `0.1` takes 10% off. Only read when
// `discount_type` is `percentage`.
Percentage string `json:"percentage" api:"required" format:"decimal"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Amount respjson.Field
Code respjson.Field
CreatedAt respjson.Field
DiscountType respjson.Field
Name respjson.Field
Object respjson.Field
OrderCount respjson.Field
Percentage respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A discount code that can be applied to a sales order.
An order discount reduces the order total by either a percentage or a fixed amount, depending on `discount_type`. The reduction is capped at the order total and rounded to the nearest cent.
func (OrderDiscount) RawJSON ¶
func (r OrderDiscount) RawJSON() string
Returns the unmodified JSON received from the API
func (*OrderDiscount) UnmarshalJSON ¶
func (r *OrderDiscount) UnmarshalJSON(data []byte) error
type OrderDiscountDiscountType ¶
type OrderDiscountDiscountType string
How the discount is calculated.
- `percentage`: the order total is reduced by the fraction in `percentage`. - `amount`: the order total is reduced by the flat amount in `amount`.
const ( OrderDiscountDiscountTypePercentage OrderDiscountDiscountType = "percentage" OrderDiscountDiscountTypeAmount OrderDiscountDiscountType = "amount" )
type OrderDiscountObject ¶
type OrderDiscountObject string
Resource type identifier.
const (
OrderDiscountObjectOrderDiscount OrderDiscountObject = "order_discount"
)
type Owner ¶
type Owner struct {
// An organization on OpenMRP, including its branding and customer portal
// sub-resources.
//
// Your own account and any customer or supplier account you trade with are both
// represented by this object.
Account Account `json:"account" api:"required"`
// Resource type identifier.
//
// Any of "owner".
Object OwnerObject `json:"object" api:"required"`
// Where this resource came from.
//
// - `system`: a platform-provided default shared across all accounts; not
// editable.
// - `account`: created and owned by a specific account; the `account` field
// identifies which.
//
// Any of "system", "account".
Type OwnerType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Account respjson.Field
Object respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Owner describes the provenance of a resource.
func (*Owner) UnmarshalJSON ¶
type OwnerObject ¶
type OwnerObject string
Resource type identifier.
const (
OwnerObjectOwner OwnerObject = "owner"
)
type OwnerType ¶
type OwnerType string
Where this resource came from.
- `system`: a platform-provided default shared across all accounts; not editable.
- `account`: created and owned by a specific account; the `account` field identifies which.
type PackPickRequestParam ¶ added in v0.20.0
type PackPickRequestParam struct {
// Number of shipping cases to create on the new shipment.
//
// Must be at least 1. Cases are numbered sequentially from the shipment number
// (e.g. `SO-001-1`, `SO-001-2`), and each starts with zero freight weight and
// freight cost for you to fill in later.
ShipmentCaseCount int64 `json:"shipment_case_count" api:"required"`
// contains filtered or unexported fields
}
Request to pack a pick, creating a shipment from the picked lines.
The property ShipmentCaseCount is required.
func (PackPickRequestParam) MarshalJSON ¶ added in v0.20.0
func (r PackPickRequestParam) MarshalJSON() (data []byte, err error)
func (*PackPickRequestParam) UnmarshalJSON ¶ added in v0.20.0
func (r *PackPickRequestParam) UnmarshalJSON(data []byte) error
type PageInfo ¶
type PageInfo struct {
// Whether more results exist after this page.
HasNextPage bool `json:"has_next_page" api:"required"`
// Whether results exist before this page.
HasPrevPage bool `json:"has_prev_page" api:"required"`
// Relative URL that fetches the next page of results.
NextPageURL string `json:"next_page_url" api:"required"`
// Relative URL that fetches the previous page of results.
PreviousPageURL string `json:"previous_page_url" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
HasNextPage respjson.Field
HasPrevPage respjson.Field
NextPageURL respjson.Field
PreviousPageURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
PageInfo describes where the current page sits within a paginated result set and how to move to the adjacent pages.
Page a list by following the URLs below rather than assembling cursors yourself. For a top-level list endpoint the URL repeats the original request's query string with only the cursor swapped, so following it preserves the same filters, search term, and page size.
func (*PageInfo) UnmarshalJSON ¶
type ParcelInputParam ¶
type ParcelInputParam struct {
// Parcel height in inches.
Height float64 `json:"height" api:"required"`
// Parcel length in inches.
Length float64 `json:"length" api:"required"`
// Parcel weight in pounds.
Weight float64 `json:"weight" api:"required"`
// Parcel width in inches.
Width float64 `json:"width" api:"required"`
// contains filtered or unexported fields
}
A parcel's weight and dimensions for shipping rate calculations.
The properties Height, Length, Weight, Width are required.
func (ParcelInputParam) MarshalJSON ¶
func (r ParcelInputParam) MarshalJSON() (data []byte, err error)
func (*ParcelInputParam) UnmarshalJSON ¶
func (r *ParcelInputParam) UnmarshalJSON(data []byte) error
type Part ¶
type Part struct {
// Part ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "part".
Object PartObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Item respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A part in the account's catalog: a component used in production.
Part-level data such as the SKU, description, category, pricing, and attributes lives on the underlying `item`.
func (*Part) UnmarshalJSON ¶
type PartObject ¶
type PartObject string
Resource type identifier.
const (
PartObjectPart PartObject = "part"
)
type PaymentTerm ¶
type PaymentTerm struct {
// Payment term ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name (e.g. `Net 30`), unique among the payment terms visible to your
// account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "payment_term".
Object PaymentTermObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Whether this payment term is still in active use.
//
// Payment terms created through the API are always `active`, and no endpoint
// changes a term's status. List Payment Terms returns inactive terms alongside
// active ones, so filter them out yourself if you only want the ones still on
// offer.
//
// Any of "active", "inactive".
Status PaymentTermStatus `json:"status" api:"required"`
// Last-updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A payment term describing when payment is due (e.g. `Net 30`), assignable to customers, sales orders, purchase orders, and invoices.
func (PaymentTerm) RawJSON ¶
func (r PaymentTerm) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaymentTerm) UnmarshalJSON ¶
func (r *PaymentTerm) UnmarshalJSON(data []byte) error
type PaymentTermObject ¶
type PaymentTermObject string
Resource type identifier.
const (
PaymentTermObjectPaymentTerm PaymentTermObject = "payment_term"
)
type PaymentTermStatus ¶
type PaymentTermStatus string
Whether this payment term is still in active use.
Payment terms created through the API are always `active`, and no endpoint changes a term's status. List Payment Terms returns inactive terms alongside active ones, so filter them out yourself if you only want the ones still on offer.
const ( PaymentTermStatusActive PaymentTermStatus = "active" PaymentTermStatusInactive PaymentTermStatus = "inactive" )
type Permission ¶
type Permission struct {
// Permission ID.
ID string `json:"id" api:"required"`
// Stable code identifying the area this permission controls, such as `customers`
// or `sales_orders`.
//
// Pair the code with an action (`create`, `read`, `update`, or `delete`) to form
// the permission strings used when creating or updating a role.
Code string `json:"code" api:"required"`
// When the permission was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Human-readable description of what this permission controls.
Description string `json:"description" api:"required"`
// Code of the permission group this permission is listed under, such as
// `inventory`.
Group string `json:"group" api:"required"`
// Human-readable name for the permission.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "permission".
Object PermissionObject `json:"object" api:"required"`
// When the permission was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Group respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One area of the product that access can be granted for, such as customers, invoices, or production runs.
A role never grants a permission outright; it grants specific actions on it, written as `{code}:{action}` — for example `customers:read`.
func (Permission) RawJSON ¶
func (r Permission) RawJSON() string
Returns the unmodified JSON received from the API
func (*Permission) UnmarshalJSON ¶
func (r *Permission) UnmarshalJSON(data []byte) error
type PermissionGroup ¶
type PermissionGroup struct {
// Permission group ID.
ID string `json:"id" api:"required"`
// Unique code identifying the permission group, such as `customers`.
Code string `json:"code" api:"required"`
// When the permission group was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Free-form description of the permission group.
Description string `json:"description" api:"required"`
// Human-readable name for the permission group.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "permission_group".
Object PermissionGroupObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Permissions ListPermission `json:"permissions" api:"required"`
// When the permission group was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Description respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
Permissions respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A category of the permission catalog that collects related permissions, such as inventory or invoices.
Groups exist to organize the catalog for display; access is always granted by the individual permissions inside a group, never by the group itself.
func (PermissionGroup) RawJSON ¶
func (r PermissionGroup) RawJSON() string
Returns the unmodified JSON received from the API
func (*PermissionGroup) UnmarshalJSON ¶
func (r *PermissionGroup) UnmarshalJSON(data []byte) error
type PermissionGroupObject ¶
type PermissionGroupObject string
Resource type identifier.
const (
PermissionGroupObjectPermissionGroup PermissionGroupObject = "permission_group"
)
type PermissionObject ¶
type PermissionObject string
Resource type identifier.
const (
PermissionObjectPermission PermissionObject = "permission"
)
type Pick ¶ added in v0.20.0
type Pick struct {
// Pick ID.
ID string `json:"id" api:"required"`
// Commitment describes when a record is due to ship: what was asked for, what that
// resolved to, and which rule decided.
//
// It is a generic, reusable sub-resource shared by anything carrying a ship-by
// commitment — a sales order, the pick that fulfills it, or a preview of an order
// that does not exist yet.
//
// The three inputs are alternative answers to the same question and at most one is
// ever set; `lead_time_source` reports which of them, or which level of the
// customer chain, produced the date. They are written flat on the create and
// update bodies, the way a carrier is written as `carrier_id` and read back under
// `freight`.
Commitment Commitment `json:"commitment" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// CreatedBy describes who created a resource and their relationship to the account
// that owns it.
//
// It is resolved from the resource's create audit event.
CreatedBy CreatedBy `json:"created_by" api:"required"`
// A business you sell to, with its contact details, default fulfillment settings,
// and order policies.
Customer Customer `json:"customer" api:"required"`
// The customer's own purchase order number for the sales order this pick fulfills.
CustomerPurchaseOrderNumber string `json:"customer_purchase_order_number" api:"required"`
// Timestamp when the pick was finished.
FinishedAt time.Time `json:"finished_at" api:"required" format:"date-time"`
// Freight describes the carrier selection and freight billing for a record.
//
// It is a generic, reusable sub-resource shared by anything that carries shipping
// configuration — a sales order, a purchase order, or a shipment.
Freight Freight `json:"freight" api:"required"`
// Timestamp of the most recent shipment sent (null until shipped).
LastShippedAt time.Time `json:"last_shipped_at" api:"required" format:"date-time"`
// Number of lines on this pick.
LineCount int64 `json:"line_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListPickLine `json:"lines" api:"required"`
// Free-form note carried from the sales order this pick fulfills.
Note string `json:"note" api:"required"`
// Human-readable number that identifies the pick, distinct from the `id`.
Number string `json:"number" api:"required"`
// Resource type identifier.
//
// Any of "pick".
Object PickObject `json:"object" api:"required"`
// How urgently the pick should be worked.
//
// Any of "low", "normal", "high".
Priority PickPriority `json:"priority" api:"required"`
// Groups the records a pick sits between — the order it fulfills and the shipments
// packed from it — and is returned only once at least one member has been
// expanded.
Related PickRelated `json:"related" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
ShipTo Address `json:"ship_to" api:"required"`
// Progress through each fulfillment stage of a pick.
Totals PickTotals `json:"totals" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Commitment respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Customer respjson.Field
CustomerPurchaseOrderNumber respjson.Field
FinishedAt respjson.Field
Freight respjson.Field
LastShippedAt respjson.Field
LineCount respjson.Field
Lines respjson.Field
Note respjson.Field
Number respjson.Field
Object respjson.Field
Priority respjson.Field
Related respjson.Field
ShipTo respjson.Field
Totals respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A warehouse picking task for a sales order, tracking the quantities to pull from inventory and pack for shipment.
A pick is created automatically when a sales order is issued, with one line for each order line whose product is of type `sale` service, shipping, tax, credit and return lines are skipped — and nothing picked yet.
func (*Pick) UnmarshalJSON ¶ added in v0.20.0
type PickLine ¶ added in v0.20.0
type PickLine struct {
// Pick line ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "pick_line".
Object PickLineObject `json:"object" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
OrderedQuantity Quantity `json:"ordered_quantity" api:"required"`
// Timestamp when the line was packed.
PackedAt time.Time `json:"packed_at" api:"required" format:"date-time"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
Quantity Quantity `json:"quantity" api:"required"`
// A single line item on a sales order.
SalesOrderLine SalesOrderLine `json:"sales_order_line" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Item respjson.Field
Object respjson.Field
OrderedQuantity respjson.Field
PackedAt respjson.Field
Quantity respjson.Field
SalesOrderLine respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single line on a pick, tracking the quantity picked against one sales order line.
func (*PickLine) UnmarshalJSON ¶ added in v0.20.0
type PickLineObject ¶ added in v0.20.0
type PickLineObject string
Resource type identifier.
const (
PickLineObjectPickLine PickLineObject = "pick_line"
)
type PickObject ¶ added in v0.20.0
type PickObject string
Resource type identifier.
const (
PickObjectPick PickObject = "pick"
)
type PickPriority ¶ added in v0.20.0
type PickPriority string
How urgently the pick should be worked.
const ( PickPriorityLow PickPriority = "low" PickPriorityNormal PickPriority = "normal" PickPriorityHigh PickPriority = "high" )
type PickRelated ¶ added in v0.20.0
type PickRelated struct {
// Resource type identifier.
//
// Any of "pick_related".
Object PickRelatedObject `json:"object" api:"required"`
// Record is a lightweight reference to a business record — a sales order, purchase
// order, pick, shipment, production run, invoice, etc.
//
// Like the `actor` and `entity` references, it carries just enough to identify and
// label the referenced record without embedding its full resource. The `status`
// and `metadata` fields hold type-specific detail that varies by the kind of
// record referenced.
SalesOrder Record `json:"sales_order" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Shipments ListRecord `json:"shipments" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
SalesOrder respjson.Field
Shipments respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Groups the records a pick sits between — the order it fulfills and the shipments packed from it — and is returned only once at least one member has been expanded.
func (PickRelated) RawJSON ¶ added in v0.20.0
func (r PickRelated) RawJSON() string
Returns the unmodified JSON received from the API
func (*PickRelated) UnmarshalJSON ¶ added in v0.20.0
func (r *PickRelated) UnmarshalJSON(data []byte) error
type PickRelatedObject ¶ added in v0.20.0
type PickRelatedObject string
Resource type identifier.
const (
PickRelatedObjectPickRelated PickRelatedObject = "pick_related"
)
type PickStageTotal ¶ added in v0.20.0
type PickStageTotal struct {
// Progress as a fraction between 0 and 1.
Completion float64 `json:"completion" api:"required"`
// Resource type identifier.
//
// Any of "pick_stage_total".
Object PickStageTotalObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Completion respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
How far one fulfillment stage of a pick has progressed.
func (PickStageTotal) RawJSON ¶ added in v0.20.0
func (r PickStageTotal) RawJSON() string
Returns the unmodified JSON received from the API
func (*PickStageTotal) UnmarshalJSON ¶ added in v0.20.0
func (r *PickStageTotal) UnmarshalJSON(data []byte) error
type PickStageTotalObject ¶ added in v0.20.0
type PickStageTotalObject string
Resource type identifier.
const (
PickStageTotalObjectPickStageTotal PickStageTotalObject = "pick_stage_total"
)
type PickTotals ¶ added in v0.20.0
type PickTotals struct {
// Resource type identifier.
//
// Any of "pick_totals".
Object PickTotalsObject `json:"object" api:"required"`
// How far one fulfillment stage of a pick has progressed.
Packed PickStageTotal `json:"packed" api:"required"`
// How far one fulfillment stage of a pick has progressed.
Picked PickStageTotal `json:"picked" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
Packed respjson.Field
Picked respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Progress through each fulfillment stage of a pick.
func (PickTotals) RawJSON ¶ added in v0.20.0
func (r PickTotals) RawJSON() string
Returns the unmodified JSON received from the API
func (*PickTotals) UnmarshalJSON ¶ added in v0.20.0
func (r *PickTotals) UnmarshalJSON(data []byte) error
type PickTotalsObject ¶ added in v0.20.0
type PickTotalsObject string
Resource type identifier.
const (
PickTotalsObjectPickTotals PickTotalsObject = "pick_totals"
)
type PortalDomain ¶
type PortalDomain struct {
// Portal domain ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
DNSRecords ListDNSRecord `json:"dns_records" api:"required"`
// The fully-qualified domain name (e.g. `shop.acme.com`).
Domain string `json:"domain" api:"required"`
// Resource type identifier.
//
// Any of "portal_domain".
Object PortalDomainObject `json:"object" api:"required"`
// How far the domain has progressed towards serving the portal.
//
// - `pending`: the domain is waiting on DNS. Publish the listed records, then run
// the verify action.
// - `securing`: DNS is correct and the TLS certificate is being issued. The portal
// is not yet reachable over HTTPS.
// - `verified`: the certificate is live and the portal is served on the domain.
// - `failed`: the domain was rejected and cannot be used.
//
// Any of "pending", "securing", "verified", "failed".
Status PortalDomainStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// When the domain became fully verified — its TLS certificate live and the portal
// serving on it.
VerifiedAt time.Time `json:"verified_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DNSRecords respjson.Field
Domain respjson.Field
Object respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
VerifiedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A custom domain that serves the account's customer portal (e.g. `shop.acme.com`).
After creation the domain starts in `pending`; publish the returned DNS records, then poll the verify action. Once DNS is correct the domain moves to `securing` while its TLS certificate is issued — it is not yet reachable over HTTPS during this window — and finally to `verified` once the certificate is live and the portal is served on the domain.
func (PortalDomain) RawJSON ¶
func (r PortalDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*PortalDomain) UnmarshalJSON ¶
func (r *PortalDomain) UnmarshalJSON(data []byte) error
type PortalDomainObject ¶
type PortalDomainObject string
Resource type identifier.
const (
PortalDomainObjectPortalDomain PortalDomainObject = "portal_domain"
)
type PortalDomainStatus ¶
type PortalDomainStatus string
How far the domain has progressed towards serving the portal.
- `pending`: the domain is waiting on DNS. Publish the listed records, then run the verify action.
- `securing`: DNS is correct and the TLS certificate is being issued. The portal is not yet reachable over HTTPS.
- `verified`: the certificate is live and the portal is served on the domain.
- `failed`: the domain was rejected and cannot be used.
const ( PortalDomainStatusPending PortalDomainStatus = "pending" PortalDomainStatusSecuring PortalDomainStatus = "securing" PortalDomainStatusVerified PortalDomainStatus = "verified" PortalDomainStatusFailed PortalDomainStatus = "failed" )
type PreviewProductionScheduleRequestDemandBasis ¶
type PreviewProductionScheduleRequestDemandBasis string
How future demand is derived, overriding the account's configured basis for this preview only.
- `trailing_12`: demand is the trailing twelve months of orders.
- `seasonal_ema`: demand is a seasonal exponential moving average, which follows a season arriving early or late rather than flattening it.
const ( PreviewProductionScheduleRequestDemandBasisTrailing12 PreviewProductionScheduleRequestDemandBasis = "trailing_12" PreviewProductionScheduleRequestDemandBasisSeasonalEma PreviewProductionScheduleRequestDemandBasis = "seasonal_ema" )
type PreviewProductionScheduleRequestParam ¶
type PreviewProductionScheduleRequestParam struct {
// Number of weeks the plan should cover, overriding the account's configured
// horizon for this preview only.
HorizonWeeks param.Opt[int64] `json:"horizon_weeks,omitzero"`
// The instant to plan against, which is what stock, demand history and active
// demand overrides are read as of.
//
// Left unset, the preview is solved against the moment the request arrives. The
// horizon starts on the account's configured week-start day on or before this
// instant, so backdating this shifts the whole week grid.
PlanningAsOf param.Opt[time.Time] `json:"planning_as_of,omitzero" format:"date-time"`
// How future demand is derived, overriding the account's configured basis for this
// preview only.
//
// - `trailing_12`: demand is the trailing twelve months of orders.
// - `seasonal_ema`: demand is a seasonal exponential moving average, which follows
// a season arriving early or late rather than flattening it.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis PreviewProductionScheduleRequestDemandBasis `json:"demand_basis,omitzero"`
// contains filtered or unexported fields
}
Request to preview a production schedule.
func (PreviewProductionScheduleRequestParam) MarshalJSON ¶
func (r PreviewProductionScheduleRequestParam) MarshalJSON() (data []byte, err error)
func (*PreviewProductionScheduleRequestParam) UnmarshalJSON ¶
func (r *PreviewProductionScheduleRequestParam) UnmarshalJSON(data []byte) error
type PreviewRegenerateProductionScheduleRequestDemandBasis ¶
type PreviewRegenerateProductionScheduleRequestDemandBasis string
How future demand is derived, defaulting to the basis this version was solved with.
- `trailing_12`: demand is the trailing twelve months of orders.
- `seasonal_ema`: demand is a seasonal exponential moving average, which follows a season arriving early or late rather than flattening it.
const ( PreviewRegenerateProductionScheduleRequestDemandBasisTrailing12 PreviewRegenerateProductionScheduleRequestDemandBasis = "trailing_12" PreviewRegenerateProductionScheduleRequestDemandBasisSeasonalEma PreviewRegenerateProductionScheduleRequestDemandBasis = "seasonal_ema" )
type PreviewRegenerateProductionScheduleRequestParam ¶
type PreviewRegenerateProductionScheduleRequestParam struct {
// Number of weeks the re-solve should cover, defaulting to the horizon this
// version already has.
HorizonWeeks param.Opt[int64] `json:"horizon_weeks,omitzero"`
// The instant to plan against, which is what stock, demand history and active
// demand overrides are read as of.
//
// Defaults to now rather than to the instant the version was first generated, so a
// plain call answers "what would the solver say today". Because the horizon
// re-anchors to the week containing this instant, a campaign can appear under a
// different `week_index` than the one stored on the draft.
PlanningAsOf param.Opt[time.Time] `json:"planning_as_of,omitzero" format:"date-time"`
// How future demand is derived, defaulting to the basis this version was solved
// with.
//
// - `trailing_12`: demand is the trailing twelve months of orders.
// - `seasonal_ema`: demand is a seasonal exponential moving average, which follows
// a season arriving early or late rather than flattening it.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis PreviewRegenerateProductionScheduleRequestDemandBasis `json:"demand_basis,omitzero"`
// contains filtered or unexported fields
}
Request to see what a re-solve would change.
func (PreviewRegenerateProductionScheduleRequestParam) MarshalJSON ¶
func (r PreviewRegenerateProductionScheduleRequestParam) MarshalJSON() (data []byte, err error)
func (*PreviewRegenerateProductionScheduleRequestParam) UnmarshalJSON ¶
func (r *PreviewRegenerateProductionScheduleRequestParam) UnmarshalJSON(data []byte) error
type Priority ¶
type Priority struct {
// Priority ID.
ID string `json:"id" api:"required"`
// Machine-readable code identifying the priority level.
//
// Other resources refer to a priority by this code rather than by its ID, such as
// a sales order's `priority`, and it can be used in place of the ID when
// retrieving a priority.
//
// Any of "low", "normal", "high".
Code PriorityCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the priority level.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "priority".
Object PriorityObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Priority level used to order work on sales orders, purchase orders, and picks.
The levels are platform-provided and the same for every account, so they cannot be created, renamed, or removed. A customer can carry a default priority that pre-fills new orders for them.
func (*Priority) UnmarshalJSON ¶
type PriorityCode ¶
type PriorityCode string
Machine-readable code identifying the priority level.
Other resources refer to a priority by this code rather than by its ID, such as a sales order's `priority`, and it can be used in place of the ID when retrieving a priority.
const ( PriorityCodeLow PriorityCode = "low" PriorityCodeNormal PriorityCode = "normal" PriorityCodeHigh PriorityCode = "high" )
type PriorityObject ¶
type PriorityObject string
Resource type identifier.
const (
PriorityObjectPriority PriorityObject = "priority"
)
type Product ¶
type Product struct {
// Product ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "product".
Object ProductObject `json:"object" api:"required"`
// Whether the product is shown to buyers in the customer portal.
//
// - `visible`: buyers can see and order the product in the portal.
// - `hidden`: the product is concealed from the portal but remains usable
// internally.
//
// Visibility alone is not enough to expose a product: a buyer only sees it if
// their account has also been granted access to the product's product line.
//
// Any of "visible", "hidden".
PortalVisibility ProductPortalVisibility `json:"portal_visibility" api:"required"`
// A named grouping of related products in your catalog.
//
// A product line carries the default commission and freight policies for the
// products assigned to it, along with the unit group that determines how those
// products are measured. Product lines are also the unit that catalog access is
// granted over, for both customers and account groups.
ProductLine ProductLine `json:"product_line" api:"required"`
// Product type code, which determines how the product behaves on orders and
// invoices.
//
// - `sale`: a standard sellable product.
// - `service`: a non-physical service line, such as labor or installation.
// - `shipping`: a shipping charge applied to an order.
// - `credit`: a credit applied against an order or invoice.
// - `return`: a returned product (RMA).
// - `tax`: a tax line.
//
// Any of "sale", "service", "shipping", "credit", "return", "tax".
Type ProductType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Item respjson.Field
Object respjson.Field
PortalVisibility respjson.Field
ProductLine respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A catalog entry as it is sold: an inventory item together with its product type, product line, and customer portal visibility.
Every product is backed by exactly one item, which carries the SKU, description, pricing, attributes, and inventory position. Creating a product creates that item; deleting the product deletes it.
func (*Product) UnmarshalJSON ¶
type ProductLine ¶
type ProductLine struct {
// Product line ID.
ID string `json:"id" api:"required"`
// Default commission policy for products in this product line.
//
// - `commission_exempt`: no commission applies to these products.
// - `commission_applied`: commission applies to these products, unless overridden
// elsewhere.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy ProductLineCommissionPolicy `json:"commission_policy" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
DefaultLot Quantity `json:"default_lot" api:"required"`
// Free-form description of the product line.
Description string `json:"description" api:"required"`
// Default freight policy for products in this product line.
//
// - `free_freight`: these products do not incur a freight charge.
// - `billed_freight`: freight is billed for these products, unless overridden
// elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy ProductLineFreightPolicy `json:"freight_policy" api:"required"`
// How products in this line are produced when they do not say for themselves.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Null falls through to the account default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy ProductLineFulfillmentPolicy `json:"fulfillment_policy" api:"required"`
// Display name of the product line.
//
// Unique among the product lines visible to your account, which includes the
// shared system lines.
Name string `json:"name" api:"required"`
// Free-form notes about the product line.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "product_line".
Object ProductLineObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// A named collection of units that share one dimension, defining which units a
// product can be ordered in.
//
// Each associated unit carries its own discount and customer portal visibility,
// applied when an order line is priced in that unit. A product takes its unit
// group from its product line, falling back to its item category.
UnitGroup UnitGroup `json:"unit_group" api:"required"`
// Last-updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CommissionPolicy respjson.Field
CreatedAt respjson.Field
DefaultLot respjson.Field
Description respjson.Field
FreightPolicy respjson.Field
FulfillmentPolicy respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
Owner respjson.Field
UnitGroup respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named grouping of related products in your catalog.
A product line carries the default commission and freight policies for the products assigned to it, along with the unit group that determines how those products are measured. Product lines are also the unit that catalog access is granted over, for both customers and account groups.
func (ProductLine) RawJSON ¶
func (r ProductLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductLine) UnmarshalJSON ¶
func (r *ProductLine) UnmarshalJSON(data []byte) error
type ProductLineCommissionPolicy ¶
type ProductLineCommissionPolicy string
Default commission policy for products in this product line.
- `commission_exempt`: no commission applies to these products.
- `commission_applied`: commission applies to these products, unless overridden elsewhere.
const ( ProductLineCommissionPolicyCommissionApplied ProductLineCommissionPolicy = "commission_applied" ProductLineCommissionPolicyCommissionExempt ProductLineCommissionPolicy = "commission_exempt" )
type ProductLineFreightPolicy ¶
type ProductLineFreightPolicy string
Default freight policy for products in this product line.
- `free_freight`: these products do not incur a freight charge.
- `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const ( ProductLineFreightPolicyFreeFreight ProductLineFreightPolicy = "free_freight" ProductLineFreightPolicyBilledFreight ProductLineFreightPolicy = "billed_freight" )
type ProductLineFulfillmentPolicy ¶
type ProductLineFulfillmentPolicy string
How products in this line are produced when they do not say for themselves.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
Null falls through to the account default.
const ( ProductLineFulfillmentPolicyMakeToStock ProductLineFulfillmentPolicy = "make_to_stock" ProductLineFulfillmentPolicyMakeToOrder ProductLineFulfillmentPolicy = "make_to_order" )
type ProductLineObject ¶
type ProductLineObject string
Resource type identifier.
const (
ProductLineObjectProductLine ProductLineObject = "product_line"
)
type ProductObject ¶
type ProductObject string
Resource type identifier.
const (
ProductObjectProduct ProductObject = "product"
)
type ProductPortalVisibility ¶
type ProductPortalVisibility string
Whether the product is shown to buyers in the customer portal.
- `visible`: buyers can see and order the product in the portal.
- `hidden`: the product is concealed from the portal but remains usable internally.
Visibility alone is not enough to expose a product: a buyer only sees it if their account has also been granted access to the product's product line.
const ( ProductPortalVisibilityVisible ProductPortalVisibility = "visible" ProductPortalVisibilityHidden ProductPortalVisibility = "hidden" )
type ProductType ¶
type ProductType string
Product type code, which determines how the product behaves on orders and invoices.
- `sale`: a standard sellable product. - `service`: a non-physical service line, such as labor or installation. - `shipping`: a shipping charge applied to an order. - `credit`: a credit applied against an order or invoice. - `return`: a returned product (RMA). - `tax`: a tax line.
const ( ProductTypeSale ProductType = "sale" ProductTypeService ProductType = "service" ProductTypeShipping ProductType = "shipping" ProductTypeCredit ProductType = "credit" ProductTypeReturn ProductType = "return" ProductTypeTax ProductType = "tax" )
type ProductionOutput ¶
type ProductionOutput struct {
// Production ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "production".
Object ProductionOutputObject `json:"object" api:"required"`
// An entry in your catalog: something you sell, consume, or build with.
ProducedItem Item `json:"produced_item" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
Quantity Quantity `json:"quantity" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Object respjson.Field
ProducedItem respjson.Field
Quantity respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The output of a production step: the item it produces and the quantity produced.
func (ProductionOutput) RawJSON ¶
func (r ProductionOutput) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionOutput) UnmarshalJSON ¶
func (r *ProductionOutput) UnmarshalJSON(data []byte) error
type ProductionOutputObject ¶
type ProductionOutputObject string
Resource type identifier.
const (
ProductionOutputObjectProduction ProductionOutputObject = "production"
)
type ProductionRun ¶
type ProductionRun struct {
// Production run ID.
ID string `json:"id" api:"required"`
// Number of batches currently recorded against this run.
BatchCount int64 `json:"batch_count" api:"required"`
// Time the run finished production.
//
// Set automatically once every batch in the run has been scanned or deleted. From
// that point the run can no longer be updated and no further batches can be added
// to it.
CompletedAt time.Time `json:"completed_at" api:"required" format:"date-time"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Production run number, unique per account.
//
// Assigned automatically at creation as the next sequential number for the
// account; can be changed via update.
Number string `json:"number" api:"required"`
// Resource type identifier.
//
// Any of "production_run".
Object ProductionRunObject `json:"object" api:"required"`
// A user's membership in an account, carrying the account-specific status, role,
// and department.
//
// Profile fields (name, email, username, image URL) live on the `user`
// sub-resource, which is shared across every account the user belongs to.
ResponsibleUser AccountUser `json:"responsible_user" api:"required"`
// Time the run started production.
//
// Set automatically the first time a batch in the run is scanned at a station.
StartedAt time.Time `json:"started_at" api:"required" format:"date-time"`
// Last-updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BatchCount respjson.Field
CompletedAt respjson.Field
CreatedAt respjson.Field
Number respjson.Field
Object respjson.Field
ResponsibleUser respjson.Field
StartedAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A production run: the group of shop-floor batches that are executed together, tracked from the first batch scan through to completion.
func (ProductionRun) RawJSON ¶
func (r ProductionRun) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionRun) UnmarshalJSON ¶
func (r *ProductionRun) UnmarshalJSON(data []byte) error
type ProductionRunObject ¶
type ProductionRunObject string
Resource type identifier.
const (
ProductionRunObjectProductionRun ProductionRunObject = "production_run"
)
type ProductionSchedule ¶
type ProductionSchedule struct {
// Schedule ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Which demand basis produced the plan.
//
// - `trailing_12`: demand is taken from the trailing twelve months of orders.
// - `seasonal_ema`: demand is a seasonal exponential moving average, which follows
// a season arriving earlier or later than usual.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis ProductionScheduleDemandBasis `json:"demand_basis" api:"required"`
// What the solver could not do, and why the plan differs from raw history.
Diagnostics ScheduleDiagnostics `json:"diagnostics" api:"required"`
// Why generation failed, when it did.
ErrorMessage string `json:"error_message" api:"required"`
// Number of lines that were frozen at publish.
//
// Captured once and never recomputed, because frozen-week adherence measures
// against what was committed to.
FrozenLineCount int64 `json:"frozen_line_count" api:"required"`
// Total quantity frozen at publish.
FrozenPlannedQuantity float64 `json:"frozen_planned_quantity" api:"required"`
// The last day the frozen window covers, set when the version is published.
FrozenThroughAt time.Time `json:"frozen_through_at" api:"required" format:"date-time"`
// How many leading weeks freeze on publish.
//
// Publishing freezes every campaign that starts inside the window; changing one
// afterwards requires a reason and is recorded in the deviation log.
FrozenWeeks int64 `json:"frozen_weeks" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
GeneratedBy Actor `json:"generated_by" api:"required"`
// What triggered the generation.
//
// - `manual`: someone asked for this version.
// - `scheduled`: the account's generation cadence produced it on its own.
//
// Any of "manual", "scheduled".
GenerationSource ProductionScheduleGenerationSource `json:"generation_source" api:"required"`
// First instant of the last day of the horizon.
HorizonEndsAt time.Time `json:"horizon_ends_at" api:"required" format:"date-time"`
// First instant of the horizon.
HorizonStartsAt time.Time `json:"horizon_starts_at" api:"required" format:"date-time"`
// Length of the horizon in weeks.
HorizonWeeks int64 `json:"horizon_weeks" api:"required"`
// Label for the version, such as the planning cycle it was generated for.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule".
Object ProductionScheduleObject `json:"object" api:"required"`
// The instant the plan was calculated against.
PlanningAsOfAt time.Time `json:"planning_as_of_at" api:"required" format:"date-time"`
// When this version was published.
PublishedAt time.Time `json:"published_at" api:"required" format:"date-time"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
PublishedBy Actor `json:"published_by" api:"required"`
// The planning assumptions used, frozen at generation so the plan stays
// explainable after settings change.
SettingsSnapshot map[string]any `json:"settings_snapshot" api:"required"`
// Version of the solver that produced the plan.
SolverVersion string `json:"solver_version" api:"required"`
// Where this version is in its lifecycle.
//
// - `draft`: still editable and commits to nothing.
// - `generating`: a scheduled solve is still building this version.
// - `published`: live, with its leading weeks frozen as a commitment to the floor.
// - `superseded`: a later version was published over an overlapping horizon.
// - `archived`: retired without being replaced.
// - `failed`: the solver could not produce a plan; `error_message` says why.
//
// Any of "draft", "generating", "published", "superseded", "archived", "failed".
Status ProductionScheduleStatus `json:"status" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
SupersededBy Entity `json:"superseded_by" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Sequential version number within the account.
//
// Regenerating a draft re-solves it in place and keeps its number; only generating
// a new plan takes the next one.
Version int64 `json:"version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DemandBasis respjson.Field
Diagnostics respjson.Field
ErrorMessage respjson.Field
FrozenLineCount respjson.Field
FrozenPlannedQuantity respjson.Field
FrozenThroughAt respjson.Field
FrozenWeeks respjson.Field
GeneratedBy respjson.Field
GenerationSource respjson.Field
HorizonEndsAt respjson.Field
HorizonStartsAt respjson.Field
HorizonWeeks respjson.Field
Name respjson.Field
Object respjson.Field
PlanningAsOfAt respjson.Field
PublishedAt respjson.Field
PublishedBy respjson.Field
SettingsSnapshot respjson.Field
SolverVersion respjson.Field
Status respjson.Field
SupersededBy respjson.Field
UpdatedAt respjson.Field
Version respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A saved production schedule.
A published version is a record rather than a document that keeps being edited: generating again creates a new version, and publishing supersedes the previous one rather than changing it, because attainment is measured against whichever version was live at the time.
func (ProductionSchedule) RawJSON ¶
func (r ProductionSchedule) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionSchedule) UnmarshalJSON ¶
func (r *ProductionSchedule) UnmarshalJSON(data []byte) error
type ProductionScheduleDemandBasis ¶
type ProductionScheduleDemandBasis string
Which demand basis produced the plan.
- `trailing_12`: demand is taken from the trailing twelve months of orders.
- `seasonal_ema`: demand is a seasonal exponential moving average, which follows a season arriving earlier or later than usual.
const ( ProductionScheduleDemandBasisTrailing12 ProductionScheduleDemandBasis = "trailing_12" ProductionScheduleDemandBasisSeasonalEma ProductionScheduleDemandBasis = "seasonal_ema" )
type ProductionScheduleDerivedLine ¶
type ProductionScheduleDerivedLine struct {
// Derived line ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Department Entity `json:"department" api:"required"`
// How many steps downstream of the constraint this work sits.
ExplosionDepth int64 `json:"explosion_depth" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_derived_line".
Object ProductionScheduleDerivedLineObject `json:"object" api:"required"`
// Weeks after the constraint campaign this work starts.
OffsetWeeks int64 `json:"offset_weeks" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
PlannedUnit Entity `json:"planned_unit" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionStep Entity `json:"production_step" api:"required"`
// Units implied for this step.
Quantity float64 `json:"quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
SourceLine Entity `json:"source_line" api:"required"`
// State of the derived work.
//
// Derived rows are discarded and rebuilt from the constraint plan every time the
// version is solved, and are only ever written as `planned`, so they report what
// the plan implies rather than what the floor has done.
//
// Any of "planned", "released", "in_progress", "complete", "cancelled".
Status ProductionScheduleDerivedLineStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Horizon week the work falls in, zero-based.
WeekIndex int64 `json:"week_index" api:"required"`
// First instant of that week.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
ExplosionDepth respjson.Field
Item respjson.Field
Object respjson.Field
OffsetWeeks respjson.Field
PlannedUnit respjson.Field
ProductionSchedule respjson.Field
ProductionStep respjson.Field
Quantity respjson.Field
SourceLine respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Downstream department work implied by a constraint campaign.
The solver only schedules the constraint; every other department's work follows from it by walking the production-step graph. `explosion_depth` is how many steps downstream this sits — depth 1 waits only on the constraint, depth 3 waits on two intermediate steps — which is what a readiness indicator keys off.
The derived week can fall past the schedule's horizon when a long chain follows a late campaign. That work is still returned rather than dropped, because a department needs to see it coming.
func (ProductionScheduleDerivedLine) RawJSON ¶
func (r ProductionScheduleDerivedLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleDerivedLine) UnmarshalJSON ¶
func (r *ProductionScheduleDerivedLine) UnmarshalJSON(data []byte) error
type ProductionScheduleDerivedLineObject ¶
type ProductionScheduleDerivedLineObject string
Resource type identifier.
const (
ProductionScheduleDerivedLineObjectProductionScheduleDerivedLine ProductionScheduleDerivedLineObject = "production_schedule_derived_line"
)
type ProductionScheduleDerivedLineStatus ¶
type ProductionScheduleDerivedLineStatus string
State of the derived work.
Derived rows are discarded and rebuilt from the constraint plan every time the version is solved, and are only ever written as `planned`, so they report what the plan implies rather than what the floor has done.
const ( ProductionScheduleDerivedLineStatusPlanned ProductionScheduleDerivedLineStatus = "planned" ProductionScheduleDerivedLineStatusReleased ProductionScheduleDerivedLineStatus = "released" ProductionScheduleDerivedLineStatusInProgress ProductionScheduleDerivedLineStatus = "in_progress" ProductionScheduleDerivedLineStatusComplete ProductionScheduleDerivedLineStatus = "complete" ProductionScheduleDerivedLineStatusCancelled ProductionScheduleDerivedLineStatus = "cancelled" )
type ProductionScheduleDeviation ¶
type ProductionScheduleDeviation struct {
// Deviation ID.
ID string `json:"id" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// Snapshot of the line after the change, null when the change removed it. Encoded
// as a JSON value (object, array, string, number, boolean, or null), not a
// JSON-encoded string.
After any `json:"after" api:"required"`
// Snapshot of the line before the change, null when the change created it. Encoded
// as a JSON value (object, array, string, number, boolean, or null), not a
// JSON-encoded string.
Before any `json:"before" api:"required"`
// When the change was made.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Signed change in planned units.
DeltaQuantity float64 `json:"delta_quantity" api:"required"`
// Signed change in planned run hours.
DeltaRunHours float64 `json:"delta_run_hours" api:"required"`
// What kind of change this was.
//
// Derived from the change itself rather than supplied by the person making it. An
// edit that both moves a campaign to another machine and changes its quantity is
// recorded as the machine change, because that is what a planner has to react to
// first.
//
// Any of "line_added", "line_removed", "quantity_changed", "machine_changed",
// "resequenced", "week_moved".
DeviationType ProductionScheduleDeviationDeviationType `json:"deviation_type" api:"required"`
// Whether the change fell inside the frozen window when it was made.
//
// Any of "frozen", "flexible".
FreezeStatus ProductionScheduleDeviationFreezeStatus `json:"freeze_status" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Line Entity `json:"line" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_deviation".
Object ProductionScheduleDeviationObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Why the change was made.
//
// A change inside a frozen week has to supply one; outside it a reason is left to
// the planner.
//
// - `machine_down`: the machine the campaign was on stopped running.
// - `material_shortage`: the material the campaign needs did not arrive.
// - `rush_order`: demand that could not wait for the next plan.
// - `quality_hold`: the work was stopped over a quality problem.
// - `over_run`: the floor produced more than the plan asked for.
// - `under_run`: the floor produced less than the plan asked for.
// - `capacity_change`: the available machine time changed, such as a shutdown or
// an added shift.
// - `other`: something outside the list, which should be spelled out in
// `reason_note`.
//
// Any of "machine_down", "material_shortage", "rush_order", "quality_hold",
// "over_run", "under_run", "capacity_change", "other".
Reason ProductionScheduleDeviationReason `json:"reason" api:"required"`
// Free-form explanation of the change.
ReasonNote string `json:"reason_note" api:"required"`
// The horizon week the change affected, zero-based.
WeekIndex int64 `json:"week_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Actor respjson.Field
After respjson.Field
Before respjson.Field
CreatedAt respjson.Field
DeltaQuantity respjson.Field
DeltaRunHours respjson.Field
DeviationType respjson.Field
FreezeStatus respjson.Field
Item respjson.Field
Line respjson.Field
Machine respjson.Field
Object respjson.Field
ProductionSchedule respjson.Field
Reason respjson.Field
ReasonNote respjson.Field
WeekIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One hand change to a production schedule.
The log is append-only: it is what frozen-week adherence is measured from, and a plan edited back into shape has to stay distinguishable from one that was right the first time. `before` and `after` are full snapshots of the line, so a deviation stays readable after the line it describes is deleted.
`freeze_status` is recorded when the change is made, from the freeze window as it stood at that moment. It is never re-derived, so a later publish cannot retroactively reclassify a past edit.
func (ProductionScheduleDeviation) RawJSON ¶
func (r ProductionScheduleDeviation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleDeviation) UnmarshalJSON ¶
func (r *ProductionScheduleDeviation) UnmarshalJSON(data []byte) error
type ProductionScheduleDeviationDeviationType ¶
type ProductionScheduleDeviationDeviationType string
What kind of change this was.
Derived from the change itself rather than supplied by the person making it. An edit that both moves a campaign to another machine and changes its quantity is recorded as the machine change, because that is what a planner has to react to first.
const ( ProductionScheduleDeviationDeviationTypeLineAdded ProductionScheduleDeviationDeviationType = "line_added" ProductionScheduleDeviationDeviationTypeLineRemoved ProductionScheduleDeviationDeviationType = "line_removed" ProductionScheduleDeviationDeviationTypeQuantityChanged ProductionScheduleDeviationDeviationType = "quantity_changed" ProductionScheduleDeviationDeviationTypeMachineChanged ProductionScheduleDeviationDeviationType = "machine_changed" ProductionScheduleDeviationDeviationTypeResequenced ProductionScheduleDeviationDeviationType = "resequenced" ProductionScheduleDeviationDeviationTypeWeekMoved ProductionScheduleDeviationDeviationType = "week_moved" )
type ProductionScheduleDeviationFreezeStatus ¶
type ProductionScheduleDeviationFreezeStatus string
Whether the change fell inside the frozen window when it was made.
const ( ProductionScheduleDeviationFreezeStatusFrozen ProductionScheduleDeviationFreezeStatus = "frozen" ProductionScheduleDeviationFreezeStatusFlexible ProductionScheduleDeviationFreezeStatus = "flexible" )
type ProductionScheduleDeviationObject ¶
type ProductionScheduleDeviationObject string
Resource type identifier.
const (
ProductionScheduleDeviationObjectProductionScheduleDeviation ProductionScheduleDeviationObject = "production_schedule_deviation"
)
type ProductionScheduleDeviationReason ¶
type ProductionScheduleDeviationReason string
Why the change was made.
A change inside a frozen week has to supply one; outside it a reason is left to the planner.
- `machine_down`: the machine the campaign was on stopped running.
- `material_shortage`: the material the campaign needs did not arrive.
- `rush_order`: demand that could not wait for the next plan.
- `quality_hold`: the work was stopped over a quality problem.
- `over_run`: the floor produced more than the plan asked for.
- `under_run`: the floor produced less than the plan asked for.
- `capacity_change`: the available machine time changed, such as a shutdown or an added shift.
- `other`: something outside the list, which should be spelled out in `reason_note`.
const ( ProductionScheduleDeviationReasonMachineDown ProductionScheduleDeviationReason = "machine_down" ProductionScheduleDeviationReasonMaterialShortage ProductionScheduleDeviationReason = "material_shortage" ProductionScheduleDeviationReasonRushOrder ProductionScheduleDeviationReason = "rush_order" ProductionScheduleDeviationReasonQualityHold ProductionScheduleDeviationReason = "quality_hold" ProductionScheduleDeviationReasonOverRun ProductionScheduleDeviationReason = "over_run" ProductionScheduleDeviationReasonUnderRun ProductionScheduleDeviationReason = "under_run" ProductionScheduleDeviationReasonCapacityChange ProductionScheduleDeviationReason = "capacity_change" ProductionScheduleDeviationReasonOther ProductionScheduleDeviationReason = "other" )
type ProductionScheduleFinishedPolicy ¶
type ProductionScheduleFinishedPolicy struct {
// Finished policy ID.
ID string `json:"id" api:"required"`
// This SKU's own annual demand.
AnnualDemand float64 `json:"annual_demand" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
GreigeItem Entity `json:"greige_item" api:"required"`
// SKU of that constraint item.
GreigeSKU string `json:"greige_sku" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_finished_policy".
Object ProductionScheduleFinishedPolicyObject `json:"object" api:"required"`
// This SKU's own stock, not the echelon it contributes to.
OnHand float64 `json:"on_hand" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductLine Entity `json:"product_line" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Stock position at which this finished good needs replenishing.
ReorderPoint float64 `json:"reorder_point" api:"required"`
// Buffer held as this finished good, covering the finishing lead time.
SafetyStock float64 `json:"safety_stock" api:"required"`
// This SKU's own weekly demand variability.
//
// The constraint buffer pools these as the root of the sum of squares; these
// targets use them one at a time.
SigmaWeekly float64 `json:"sigma_weekly" api:"required"`
// SKU of the finished good.
SKU string `json:"sku" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// This SKU's own weekly demand.
WeeklyDemand float64 `json:"weekly_demand" api:"required"`
// Weeks of demand this SKU's own stock covers.
WeeksOfCover float64 `json:"weeks_of_cover" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AnnualDemand respjson.Field
CreatedAt respjson.Field
GreigeItem respjson.Field
GreigeSKU respjson.Field
Item respjson.Field
Object respjson.Field
OnHand respjson.Field
ProductLine respjson.Field
ProductionSchedule respjson.Field
ReorderPoint respjson.Field
SafetyStock respjson.Field
SigmaWeekly respjson.Field
SKU respjson.Field
UpdatedAt respjson.Field
WeeklyDemand respjson.Field
WeeksOfCover respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One finished SKU's own inventory target, snapshotted onto a schedule version.
The item policy pools every finished good a constraint item feeds into one echelon figure, which is the right basis for deciding whether to build. These rows are what that pooling hides: this SKU's own demand, its own variability, and a buffer sized against the finishing lead time rather than the constraint's — because finishing, not the constraint, is what replenishes this stock.
The two stages do not overlap. The constraint stage holds its pooled buffer and the finished stage holds these, so together they describe the whole network's stock without counting any of it twice.
func (ProductionScheduleFinishedPolicy) RawJSON ¶
func (r ProductionScheduleFinishedPolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleFinishedPolicy) UnmarshalJSON ¶
func (r *ProductionScheduleFinishedPolicy) UnmarshalJSON(data []byte) error
type ProductionScheduleFinishedPolicyObject ¶
type ProductionScheduleFinishedPolicyObject string
Resource type identifier.
const (
ProductionScheduleFinishedPolicyObjectProductionScheduleFinishedPolicy ProductionScheduleFinishedPolicyObject = "production_schedule_finished_policy"
)
type ProductionScheduleFinishingLine ¶
type ProductionScheduleFinishingLine struct {
// Finishing line ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Department Entity `json:"department" api:"required"`
// How much of the week's draw on this SKU is an order rather than a forecast.
FirmUnits float64 `json:"firm_units" api:"required"`
// Units of the constraint item this takes out of the greige buffer.
//
// Equal to `planned_quantity` unless a finishing yield loss means a finished unit
// costs more than one knitted one.
GreigeConsumed float64 `json:"greige_consumed" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
GreigeItem Entity `json:"greige_item" api:"required"`
// SKU of that constraint item.
GreigeSKU string `json:"greige_sku" api:"required"`
// Whether the line sits inside the published frozen window.
IsFrozen bool `json:"is_frozen" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_finishing_line".
Object ProductionScheduleFinishingLineObject `json:"object" api:"required"`
// Units in one lot.
PlannedLotUnits float64 `json:"planned_lot_units" api:"required"`
// How many lots the quantity breaks into.
PlannedLots int64 `json:"planned_lots" api:"required"`
// Units of the finished good to make.
PlannedQuantity float64 `json:"planned_quantity" api:"required"`
// Hours of the second stage's capacity this line consumes.
PlannedRunHours float64 `json:"planned_run_hours" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionStep Entity `json:"production_step" api:"required"`
// And after it lands.
ProjectedOnHandAfter float64 `json:"projected_on_hand_after" api:"required"`
// This SKU's own projected stock before the line lands.
ProjectedOnHandBefore float64 `json:"projected_on_hand_before" api:"required"`
// SKU of the finished good, as it stood when the plan was generated.
SKU string `json:"sku" api:"required"`
// Whether the solver produced this line or a person did.
//
// Any of "solver", "manual".
Source ProductionScheduleFinishingLineSource `json:"source" api:"required"`
// Where the line stands.
//
// Any of "planned", "released", "in_progress", "complete", "cancelled".
Status ProductionScheduleFinishingLineStatus `json:"status" api:"required"`
// Abbreviation of the unit everything on this line is counted in.
Unit string `json:"unit" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// First day of the week this is planned in.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
FirmUnits respjson.Field
GreigeConsumed respjson.Field
GreigeItem respjson.Field
GreigeSKU respjson.Field
IsFrozen respjson.Field
Item respjson.Field
Object respjson.Field
PlannedLotUnits respjson.Field
PlannedLots respjson.Field
PlannedQuantity respjson.Field
PlannedRunHours respjson.Field
ProductionSchedule respjson.Field
ProductionStep respjson.Field
ProjectedOnHandAfter respjson.Field
ProjectedOnHandBefore respjson.Field
SKU respjson.Field
Source respjson.Field
Status respjson.Field
Unit respjson.Field
UpdatedAt respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One finished good's build in one week: the second stage of the plan.
The constraint plan says how much greige to knit and deliberately does not say what to turn it into — a family's demand is pooled onto the greige precisely so the buffer can sit at the undifferentiated stage. These lines are where that pooling is undone: how many of which finished good to make from the knitted parts, decided against each SKU's own stock position, its own orders, and the hours the rest of the factory has that week.
Quantities are counted in the constraint item's unit, so `greige_consumed` and the knit plan's `planned_quantity` are directly comparable. That is what lets the two stages be reconciled rather than merely read side by side.
func (ProductionScheduleFinishingLine) RawJSON ¶
func (r ProductionScheduleFinishingLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleFinishingLine) UnmarshalJSON ¶
func (r *ProductionScheduleFinishingLine) UnmarshalJSON(data []byte) error
type ProductionScheduleFinishingLineObject ¶
type ProductionScheduleFinishingLineObject string
Resource type identifier.
const (
ProductionScheduleFinishingLineObjectProductionScheduleFinishingLine ProductionScheduleFinishingLineObject = "production_schedule_finishing_line"
)
type ProductionScheduleFinishingLineSource ¶
type ProductionScheduleFinishingLineSource string
Whether the solver produced this line or a person did.
const ( ProductionScheduleFinishingLineSourceSolver ProductionScheduleFinishingLineSource = "solver" ProductionScheduleFinishingLineSourceManual ProductionScheduleFinishingLineSource = "manual" )
type ProductionScheduleFinishingLineStatus ¶
type ProductionScheduleFinishingLineStatus string
Where the line stands.
const ( ProductionScheduleFinishingLineStatusPlanned ProductionScheduleFinishingLineStatus = "planned" ProductionScheduleFinishingLineStatusReleased ProductionScheduleFinishingLineStatus = "released" ProductionScheduleFinishingLineStatusInProgress ProductionScheduleFinishingLineStatus = "in_progress" ProductionScheduleFinishingLineStatusComplete ProductionScheduleFinishingLineStatus = "complete" ProductionScheduleFinishingLineStatusCancelled ProductionScheduleFinishingLineStatus = "cancelled" )
type ProductionScheduleGenerationSource ¶
type ProductionScheduleGenerationSource string
What triggered the generation.
- `manual`: someone asked for this version. - `scheduled`: the account's generation cadence produced it on its own.
const ( ProductionScheduleGenerationSourceManual ProductionScheduleGenerationSource = "manual" ProductionScheduleGenerationSourceScheduled ProductionScheduleGenerationSource = "scheduled" )
type ProductionScheduleItemPolicy ¶
type ProductionScheduleItemPolicy struct {
// Policy ID.
ID string `json:"id" api:"required"`
// ABC class by share of constraint run hours.
//
// - `a`: consumes the largest share of constraint capacity.
// - `b`: moderate constraint consumption.
// - `c`: consumes little constraint capacity.
//
// Any of "a", "b", "c".
AbcClass ProductionScheduleItemPolicyAbcClass `json:"abc_class" api:"required"`
// Demand used for planning, annualized.
AnnualDemand float64 `json:"annual_demand" api:"required"`
// Constraint hours this item's annual demand consumes.
AnnualRunHours float64 `json:"annual_run_hours" api:"required"`
// What the constraint stage holds on average: its buffer, plus half a campaign as
// one lands and drains.
AverageGreigeInventory float64 `json:"average_greige_inventory" api:"required"`
// Observed or default lead time at the constraint.
ConstraintLeadTimeWeeks float64 `json:"constraint_lead_time_weeks" api:"required"`
// Limits the solver hit while sizing this item's campaigns, empty when the policy
// was applied as calculated.
//
// - `eoq_capped`: the economic lot size did not fit one machine-week and was cut
// back to what does, so campaigns run shorter and more often than the cost
// calculation alone would ask for.
// - `capacity_starved`: the item was already below its trigger point and never won
// a slot in the horizon, so the plan does not replenish it.
//
// Any of "eoq_capped", "capacity_starved".
Constraints []string `json:"constraints" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Economic order quantity: the campaign size that balances the cost of a
// changeover against the cost of holding what it produces.
EoqUnits float64 `json:"eoq_units" api:"required"`
// Lead time from the constraint to sellable stock.
FinishLeadTimeWeeks float64 `json:"finish_lead_time_weeks" api:"required"`
// Outstanding quantity the order book already owed for this item over the horizon.
FirmDemandUnits float64 `json:"firm_demand_units" api:"required"`
// Quantity the forecast projected for the same window.
ForecastDemandUnits float64 `json:"forecast_demand_units" api:"required"`
// How this item was planned.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer, so its safety stocks and reorder point are all zero.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy ProductionScheduleItemPolicyFulfillmentPolicy `json:"fulfillment_policy" api:"required"`
// Annual cost of holding one unit.
HoldingCost float64 `json:"holding_cost" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// What the constraint stage holds at its peak: its buffer plus a whole campaign.
MaxGreigeInventory float64 `json:"max_greige_inventory" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_item_policy".
Object ProductionScheduleItemPolicyObject `json:"object" api:"required"`
// Stock at the constraint plus everything downstream of it.
//
// This is what the build decision is made against — stock already finished still
// counts against building more.
OnHandEchelon float64 `json:"on_hand_echelon" api:"required"`
// Stock sitting at the constraint stage on its own.
//
// Kept alongside the echelon total because that total cannot be decomposed back
// into its stages once summed.
OnHandGreige float64 `json:"on_hand_greige" api:"required"`
// Ceiling on how far ahead this item is built.
OrderUpTo float64 `json:"order_up_to" api:"required"`
// Which rule decided that policy: the item itself, its product line, or the
// account default.
//
// Any of "item", "product_line", "account_default".
PolicySource ProductionScheduleItemPolicyPolicySource `json:"policy_source" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
PrimaryMachine Entity `json:"primary_machine" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionStep Entity `json:"production_step" api:"required"`
// The physical greige store at the end of each horizon week — the constraint stage
// on its own, which `projected_on_hand` cannot be decomposed back into.
//
// A week where this dips to `safety_stock_primary` is the week knitting is meant
// to replenish, even where `projected_on_hand` still reads full because the stock
// is held downstream as finished goods. Empty for a schedule generated before the
// greige buffer existed.
ProjectedGreigeOnHand []float64 `json:"projected_greige_on_hand" api:"required"`
// The echelon position at the end of each horizon week, after that week's
// campaigns land and its demand is drawn down.
//
// A run of weeks with no campaign is stock draining toward `reorder_point`; this
// is what makes that visible rather than looking like the solver did nothing.
ProjectedOnHand []float64 `json:"projected_on_hand" api:"required"`
// Stock position at which a campaign is triggered.
ReorderPoint float64 `json:"reorder_point" api:"required"`
// Buffer held as finished goods.
SafetyStockDownstream float64 `json:"safety_stock_downstream" api:"required"`
// Buffer held at the constraint.
SafetyStockPrimary float64 `json:"safety_stock_primary" api:"required"`
// How long one unit occupies the constraint.
SecondsPerUnit float64 `json:"seconds_per_unit" api:"required"`
// Cost of one changeover.
SetupCost float64 `json:"setup_cost" api:"required"`
// Summed weekly variability of the finished goods this item becomes.
SigmaDownstreamSum float64 `json:"sigma_downstream_sum" api:"required"`
// Pooled weekly demand variability at the constraint.
SigmaWeeklyPooled float64 `json:"sigma_weekly_pooled" api:"required"`
// SKU of the item.
SKU string `json:"sku" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Unit Entity `json:"unit" api:"required"`
// Abbreviation of the unit every quantity in this policy is counted in, for
// display.
//
// A reorder point of 2,508 is uninterpretable without it, so the two are never
// meaningful apart.
UnitAbbreviation string `json:"unit_abbreviation" api:"required"`
// Standard cost per unit.
UnitCost float64 `json:"unit_cost" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Demand used for planning, per week.
WeeklyDemand float64 `json:"weekly_demand" api:"required"`
// Weeks of demand the current stock covers.
WeeksOfCover float64 `json:"weeks_of_cover" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AbcClass respjson.Field
AnnualDemand respjson.Field
AnnualRunHours respjson.Field
AverageGreigeInventory respjson.Field
ConstraintLeadTimeWeeks respjson.Field
Constraints respjson.Field
CreatedAt respjson.Field
EoqUnits respjson.Field
FinishLeadTimeWeeks respjson.Field
FirmDemandUnits respjson.Field
ForecastDemandUnits respjson.Field
FulfillmentPolicy respjson.Field
HoldingCost respjson.Field
Item respjson.Field
MaxGreigeInventory respjson.Field
Object respjson.Field
OnHandEchelon respjson.Field
OnHandGreige respjson.Field
OrderUpTo respjson.Field
PolicySource respjson.Field
PrimaryMachine respjson.Field
ProductionSchedule respjson.Field
ProductionStep respjson.Field
ProjectedGreigeOnHand respjson.Field
ProjectedOnHand respjson.Field
ReorderPoint respjson.Field
SafetyStockDownstream respjson.Field
SafetyStockPrimary respjson.Field
SecondsPerUnit respjson.Field
SetupCost respjson.Field
SigmaDownstreamSum respjson.Field
SigmaWeeklyPooled respjson.Field
SKU respjson.Field
Unit respjson.Field
UnitAbbreviation respjson.Field
UnitCost respjson.Field
UpdatedAt respjson.Field
WeeklyDemand respjson.Field
WeeksOfCover respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The per-item policy behind a schedule version.
Snapshotted at generation rather than recomputed, so a historical plan can still explain itself after costs, demand or settings move.
func (ProductionScheduleItemPolicy) RawJSON ¶
func (r ProductionScheduleItemPolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleItemPolicy) UnmarshalJSON ¶
func (r *ProductionScheduleItemPolicy) UnmarshalJSON(data []byte) error
type ProductionScheduleItemPolicyAbcClass ¶
type ProductionScheduleItemPolicyAbcClass string
ABC class by share of constraint run hours.
- `a`: consumes the largest share of constraint capacity. - `b`: moderate constraint consumption. - `c`: consumes little constraint capacity.
const ( ProductionScheduleItemPolicyAbcClassA ProductionScheduleItemPolicyAbcClass = "a" ProductionScheduleItemPolicyAbcClassB ProductionScheduleItemPolicyAbcClass = "b" ProductionScheduleItemPolicyAbcClassC ProductionScheduleItemPolicyAbcClass = "c" )
type ProductionScheduleItemPolicyFulfillmentPolicy ¶
type ProductionScheduleItemPolicyFulfillmentPolicy string
How this item was planned.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer, so its safety stocks and reorder point are all zero.
const ( ProductionScheduleItemPolicyFulfillmentPolicyMakeToStock ProductionScheduleItemPolicyFulfillmentPolicy = "make_to_stock" ProductionScheduleItemPolicyFulfillmentPolicyMakeToOrder ProductionScheduleItemPolicyFulfillmentPolicy = "make_to_order" )
type ProductionScheduleItemPolicyObject ¶
type ProductionScheduleItemPolicyObject string
Resource type identifier.
const (
ProductionScheduleItemPolicyObjectProductionScheduleItemPolicy ProductionScheduleItemPolicyObject = "production_schedule_item_policy"
)
type ProductionScheduleItemPolicyPolicySource ¶
type ProductionScheduleItemPolicyPolicySource string
Which rule decided that policy: the item itself, its product line, or the account default.
const ( ProductionScheduleItemPolicyPolicySourceItem ProductionScheduleItemPolicyPolicySource = "item" ProductionScheduleItemPolicyPolicySourceProductLine ProductionScheduleItemPolicyPolicySource = "product_line" ProductionScheduleItemPolicyPolicySourceAccountDefault ProductionScheduleItemPolicyPolicySource = "account_default" )
type ProductionScheduleItemSetting ¶
type ProductionScheduleItemSetting struct {
// Item setting ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// How this item is produced.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Null inherits from the item's product line, then from the account default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy ProductionScheduleItemSettingFulfillmentPolicy `json:"fulfillment_policy" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Units in one production lot for this item, overriding the lot its product line
// would supply.
LotMultipleUnits float64 `json:"lot_multiple_units" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_item_setting".
Object ProductionScheduleItemSettingObject `json:"object" api:"required"`
// Whether this item takes part in planning.
//
// An excluded item is left out of the plan entirely: no campaigns, no policy, no
// capacity.
//
// Any of "included", "excluded".
ParticipationStatus ProductionScheduleItemSettingParticipationStatus `json:"participation_status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
FulfillmentPolicy respjson.Field
Item respjson.Field
LotMultipleUnits respjson.Field
Object respjson.Field
ParticipationStatus respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Planning overrides for one item, on top of the account-wide assumptions.
func (ProductionScheduleItemSetting) RawJSON ¶
func (r ProductionScheduleItemSetting) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleItemSetting) UnmarshalJSON ¶
func (r *ProductionScheduleItemSetting) UnmarshalJSON(data []byte) error
type ProductionScheduleItemSettingFulfillmentPolicy ¶
type ProductionScheduleItemSettingFulfillmentPolicy string
How this item is produced.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
Null inherits from the item's product line, then from the account default.
const ( ProductionScheduleItemSettingFulfillmentPolicyMakeToStock ProductionScheduleItemSettingFulfillmentPolicy = "make_to_stock" ProductionScheduleItemSettingFulfillmentPolicyMakeToOrder ProductionScheduleItemSettingFulfillmentPolicy = "make_to_order" )
type ProductionScheduleItemSettingObject ¶
type ProductionScheduleItemSettingObject string
Resource type identifier.
const (
ProductionScheduleItemSettingObjectProductionScheduleItemSetting ProductionScheduleItemSettingObject = "production_schedule_item_setting"
)
type ProductionScheduleItemSettingParticipationStatus ¶
type ProductionScheduleItemSettingParticipationStatus string
Whether this item takes part in planning.
An excluded item is left out of the plan entirely: no campaigns, no policy, no capacity.
const ( ProductionScheduleItemSettingParticipationStatusIncluded ProductionScheduleItemSettingParticipationStatus = "included" ProductionScheduleItemSettingParticipationStatusExcluded ProductionScheduleItemSettingParticipationStatus = "excluded" )
type ProductionScheduleLine ¶
type ProductionScheduleLine struct {
// Line ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Department Entity `json:"department" api:"required"`
// Whether the line is inside the frozen window, where changing it requires a
// reason for the deviation log.
//
// Any of "frozen", "flexible".
FreezeStatus ProductionScheduleLineFreezeStatus `json:"freeze_status" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_line".
Object ProductionScheduleLineObject `json:"object" api:"required"`
// Modeled changeover time before the campaign.
PlannedChangeoverMinutes float64 `json:"planned_changeover_minutes" api:"required"`
// Units in one lot, which is the batch size the week is released to the floor in.
PlannedLotUnits float64 `json:"planned_lot_units" api:"required"`
// Whole lots the quantity rounds to.
PlannedLots int64 `json:"planned_lots" api:"required"`
// Quantity to produce.
PlannedQuantity float64 `json:"planned_quantity" api:"required"`
// Constraint hours the campaign consumes.
PlannedRunHours float64 `json:"planned_run_hours" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
PlannedUnit Entity `json:"planned_unit" api:"required"`
// Abbreviation of the unit every quantity on this line is counted in, for display.
//
// A campaign of 360 means 360 pairs or 360 eaches depending on this, so the two
// are never meaningful apart.
PlannedUnitAbbreviation string `json:"planned_unit_abbreviation" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionRun Entity `json:"production_run" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionStep Entity `json:"production_step" api:"required"`
// Projected stock after the campaign lands and the week's demand is drawn down.
ProjectedOnHandAfter float64 `json:"projected_on_hand_after" api:"required"`
// Projected stock before the campaign lands.
ProjectedOnHandBefore float64 `json:"projected_on_hand_before" api:"required"`
// Why the campaign was placed or last changed by hand.
//
// Only hand changes record a reason, and a change that touches a frozen week has
// to supply one.
//
// Any of "machine_down", "material_shortage", "rush_order", "quality_hold",
// "over_run", "under_run", "capacity_change", "other".
Reason ProductionScheduleLineReason `json:"reason" api:"required"`
// Batches this campaign issued to the floor when its week was released.
ReleasedBatchCount int64 `json:"released_batch_count" api:"required"`
// Batches of this campaign the floor has scanned.
ScannedBatchCount int64 `json:"scanned_batch_count" api:"required"`
// Quantity scanned so far, in the planned unit.
//
// Measured from the run the week was released as, matched on this campaign's item,
// so a run holding several SKUs credits each campaign with only its own work.
ScannedQuantity float64 `json:"scanned_quantity" api:"required"`
// Order the campaign runs within its week.
SequenceIndex int64 `json:"sequence_index" api:"required"`
// Whether the solver or a person created the line.
//
// Editing a solver-placed campaign turns it `manual`, and a regenerate that
// preserves hand work keeps exactly the campaigns marked that way.
//
// Any of "solver", "manual".
Source ProductionScheduleLineSource `json:"source" api:"required"`
// Where the line is in its lifecycle.
//
// A campaign becomes `released` when its week is issued to the floor as a
// production run, and goes back to `planned` if that run is deleted.
//
// Any of "planned", "released", "in_progress", "complete", "cancelled".
Status ProductionScheduleLineStatus `json:"status" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// First instant of the week this campaign runs in.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
FreezeStatus respjson.Field
Item respjson.Field
Machine respjson.Field
Object respjson.Field
PlannedChangeoverMinutes respjson.Field
PlannedLotUnits respjson.Field
PlannedLots respjson.Field
PlannedQuantity respjson.Field
PlannedRunHours respjson.Field
PlannedUnit respjson.Field
PlannedUnitAbbreviation respjson.Field
ProductionRun respjson.Field
ProductionSchedule respjson.Field
ProductionStep respjson.Field
ProjectedOnHandAfter respjson.Field
ProjectedOnHandBefore respjson.Field
Reason respjson.Field
ReleasedBatchCount respjson.Field
ScannedBatchCount respjson.Field
ScannedQuantity respjson.Field
SequenceIndex respjson.Field
Source respjson.Field
Status respjson.Field
UpdatedAt respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A saved campaign on a production schedule.
func (ProductionScheduleLine) RawJSON ¶
func (r ProductionScheduleLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleLine) UnmarshalJSON ¶
func (r *ProductionScheduleLine) UnmarshalJSON(data []byte) error
type ProductionScheduleLineFreezeStatus ¶
type ProductionScheduleLineFreezeStatus string
Whether the line is inside the frozen window, where changing it requires a reason for the deviation log.
const ( ProductionScheduleLineFreezeStatusFrozen ProductionScheduleLineFreezeStatus = "frozen" ProductionScheduleLineFreezeStatusFlexible ProductionScheduleLineFreezeStatus = "flexible" )
type ProductionScheduleLineObject ¶
type ProductionScheduleLineObject string
Resource type identifier.
const (
ProductionScheduleLineObjectProductionScheduleLine ProductionScheduleLineObject = "production_schedule_line"
)
type ProductionScheduleLineReason ¶
type ProductionScheduleLineReason string
Why the campaign was placed or last changed by hand.
Only hand changes record a reason, and a change that touches a frozen week has to supply one.
const ( ProductionScheduleLineReasonMachineDown ProductionScheduleLineReason = "machine_down" ProductionScheduleLineReasonMaterialShortage ProductionScheduleLineReason = "material_shortage" ProductionScheduleLineReasonRushOrder ProductionScheduleLineReason = "rush_order" ProductionScheduleLineReasonQualityHold ProductionScheduleLineReason = "quality_hold" ProductionScheduleLineReasonOverRun ProductionScheduleLineReason = "over_run" ProductionScheduleLineReasonUnderRun ProductionScheduleLineReason = "under_run" ProductionScheduleLineReasonCapacityChange ProductionScheduleLineReason = "capacity_change" ProductionScheduleLineReasonOther ProductionScheduleLineReason = "other" )
type ProductionScheduleLineSource ¶
type ProductionScheduleLineSource string
Whether the solver or a person created the line.
Editing a solver-placed campaign turns it `manual`, and a regenerate that preserves hand work keeps exactly the campaigns marked that way.
const ( ProductionScheduleLineSourceSolver ProductionScheduleLineSource = "solver" ProductionScheduleLineSourceManual ProductionScheduleLineSource = "manual" )
type ProductionScheduleLineStatus ¶
type ProductionScheduleLineStatus string
Where the line is in its lifecycle.
A campaign becomes `released` when its week is issued to the floor as a production run, and goes back to `planned` if that run is deleted.
const ( ProductionScheduleLineStatusPlanned ProductionScheduleLineStatus = "planned" ProductionScheduleLineStatusReleased ProductionScheduleLineStatus = "released" ProductionScheduleLineStatusInProgress ProductionScheduleLineStatus = "in_progress" ProductionScheduleLineStatusComplete ProductionScheduleLineStatus = "complete" ProductionScheduleLineStatusCancelled ProductionScheduleLineStatus = "cancelled" )
type ProductionScheduleObject ¶
type ProductionScheduleObject string
Resource type identifier.
const (
ProductionScheduleObjectProductionSchedule ProductionScheduleObject = "production_schedule"
)
type ProductionSchedulePreview ¶
type ProductionSchedulePreview struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Campaigns ListScheduleCampaign `json:"campaigns" api:"required"`
// What the solver could not do, and why the plan differs from raw history.
Diagnostics ScheduleDiagnostics `json:"diagnostics" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_preview".
Object ProductionSchedulePreviewObject `json:"object" api:"required"`
// The instant the plan was calculated against.
PlanningAsOfAt time.Time `json:"planning_as_of_at" api:"required" format:"date-time"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Policies ListSchedulePolicy `json:"policies" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Projections ListScheduleProjection `json:"projections" api:"required"`
// Version of the solver that produced this plan.
SolverVersion string `json:"solver_version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Campaigns respjson.Field
Diagnostics respjson.Field
Object respjson.Field
PlanningAsOfAt respjson.Field
Policies respjson.Field
Projections respjson.Field
SolverVersion respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A production plan produced by the scheduling solver.
func (ProductionSchedulePreview) RawJSON ¶
func (r ProductionSchedulePreview) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionSchedulePreview) UnmarshalJSON ¶
func (r *ProductionSchedulePreview) UnmarshalJSON(data []byte) error
type ProductionSchedulePreviewObject ¶
type ProductionSchedulePreviewObject string
Resource type identifier.
const (
ProductionSchedulePreviewObjectProductionSchedulePreview ProductionSchedulePreviewObject = "production_schedule_preview"
)
type ProductionScheduleRegeneratePreview ¶
type ProductionScheduleRegeneratePreview struct {
// Campaigns the fresh solve wants that the current plan does not have.
AddedCount int64 `json:"added_count" api:"required"`
// Campaigns both hold, in different quantities.
ChangedCount int64 `json:"changed_count" api:"required"`
// Hand-edited campaigns `replace_all` would destroy.
DiscardedManualCount int64 `json:"discarded_manual_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListScheduleDiffLine `json:"lines" api:"required"`
// Hand-edited campaigns currently on the draft.
ManualLineCount int64 `json:"manual_line_count" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_regenerate_preview".
Object ProductionScheduleRegeneratePreviewObject `json:"object" api:"required"`
// The instant the fresh solve planned from.
//
// Unless the caller names an instant, a regenerate plans from now rather than
// replaying the one the draft was first generated against, so demand overrides
// added since then are taken into account and the horizon re-anchors to today.
PlanningAsOfAt time.Time `json:"planning_as_of_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
ProductionSchedule Entity `json:"production_schedule" api:"required"`
// Campaigns the current plan has that the fresh solve does not want.
RemovedCount int64 `json:"removed_count" api:"required"`
// Which solver produced the proposal.
SolverVersion string `json:"solver_version" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AddedCount respjson.Field
ChangedCount respjson.Field
DiscardedManualCount respjson.Field
Lines respjson.Field
ManualLineCount respjson.Field
Object respjson.Field
PlanningAsOfAt respjson.Field
ProductionSchedule respjson.Field
RemovedCount respjson.Field
SolverVersion respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
What a regenerate would change about a draft, without changing it.
A regenerate that silently discards hand-work is abandoned within two cycles, so the destructive mode states its cost as a number before it runs: `discarded_manual_count` is exactly how many hand-edited campaigns `replace_all` would destroy.
func (ProductionScheduleRegeneratePreview) RawJSON ¶
func (r ProductionScheduleRegeneratePreview) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleRegeneratePreview) UnmarshalJSON ¶
func (r *ProductionScheduleRegeneratePreview) UnmarshalJSON(data []byte) error
type ProductionScheduleRegeneratePreviewObject ¶
type ProductionScheduleRegeneratePreviewObject string
Resource type identifier.
const (
ProductionScheduleRegeneratePreviewObjectProductionScheduleRegeneratePreview ProductionScheduleRegeneratePreviewObject = "production_schedule_regenerate_preview"
)
type ProductionScheduleResourceSetting ¶
type ProductionScheduleResourceSetting struct {
// Resource setting ID.
ID string `json:"id" api:"required"`
// How many weeks after the step feeding it this resource's work starts.
//
// Read when downstream department work is derived from the constraint plan, so it
// is the production-step override that shifts a plan: without an offset every step
// lands in the same week as the step feeding it, and the offsets along a chain of
// steps add up. A schedule is planned in whole weeks, so a fractional offset is
// truncated.
LeadTimeOffsetWeeks float64 `json:"lead_time_offset_weeks" api:"required"`
// Weeks of lead time at this resource.
LeadTimeWeeks float64 `json:"lead_time_weeks" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_resource_setting".
Object ProductionScheduleResourceSettingObject `json:"object" api:"required"`
// Whether this resource takes part in planning.
//
// Machines are chosen by naming the constraint department, so an override is how
// one is taken out — a machine down for a rebuild — rather than how one is opted
// in. A machine with no override is planned.
//
// Any of "included", "excluded".
ParticipationStatus ProductionScheduleResourceSettingParticipationStatus `json:"participation_status" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Scope Entity `json:"scope" api:"required"`
// What kind of resource this override applies to.
//
// Any of "machine", "department", "production_step".
ScopeType ProductionScheduleResourceSettingScopeType `json:"scope_type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
LeadTimeOffsetWeeks respjson.Field
LeadTimeWeeks respjson.Field
Object respjson.Field
ParticipationStatus respjson.Field
Scope respjson.Field
ScopeType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A planning override for one machine, department or production step.
The account's settings apply to every resource; an override changes how one of them is treated — taking a machine out of the plan, or declaring how many weeks a downstream step's work starts after the step that feeds it. A resource has at most one override, and a resource without one is planned on the account settings alone.
func (ProductionScheduleResourceSetting) RawJSON ¶
func (r ProductionScheduleResourceSetting) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleResourceSetting) UnmarshalJSON ¶
func (r *ProductionScheduleResourceSetting) UnmarshalJSON(data []byte) error
type ProductionScheduleResourceSettingObject ¶
type ProductionScheduleResourceSettingObject string
Resource type identifier.
const (
ProductionScheduleResourceSettingObjectProductionScheduleResourceSetting ProductionScheduleResourceSettingObject = "production_schedule_resource_setting"
)
type ProductionScheduleResourceSettingParticipationStatus ¶
type ProductionScheduleResourceSettingParticipationStatus string
Whether this resource takes part in planning.
Machines are chosen by naming the constraint department, so an override is how one is taken out — a machine down for a rebuild — rather than how one is opted in. A machine with no override is planned.
const ( ProductionScheduleResourceSettingParticipationStatusIncluded ProductionScheduleResourceSettingParticipationStatus = "included" ProductionScheduleResourceSettingParticipationStatusExcluded ProductionScheduleResourceSettingParticipationStatus = "excluded" )
type ProductionScheduleResourceSettingScopeType ¶
type ProductionScheduleResourceSettingScopeType string
What kind of resource this override applies to.
const ( ProductionScheduleResourceSettingScopeTypeMachine ProductionScheduleResourceSettingScopeType = "machine" ProductionScheduleResourceSettingScopeTypeDepartment ProductionScheduleResourceSettingScopeType = "department" ProductionScheduleResourceSettingScopeTypeProductionStep ProductionScheduleResourceSettingScopeType = "production_step" )
type ProductionScheduleSettings ¶
type ProductionScheduleSettings struct {
// Whether a version produced by the cadence is published automatically.
//
// While active, a cadence run publishes as soon as it solves, committing its
// frozen weeks without anyone reviewing the plan. Otherwise the run leaves a draft
// for a planner to publish by hand. Versions generated on request are never
// published automatically.
//
// Any of "active", "inactive".
AutoPublishStatus ProductionScheduleSettingsAutoPublishStatus `json:"auto_publish_status" api:"required"`
// Whether schedules are generated automatically on a recurring cadence.
//
// While active, each due tick queues a new schedule version; a generation cron
// expression is required for the cadence to be saved.
//
// Any of "active", "inactive".
CadenceStatus ProductionScheduleSettingsCadenceStatus `json:"cadence_status" api:"required"`
// Share of machine time a plan may fill.
//
// Shifts, hours and work days give a machine's raw weekly hours; this trims them
// to what may actually be planned. The remainder absorbs changeovers, which are
// not scheduled as explicit blocks, so a value of 1 produces a plan that leaves no
// time to set anything up.
CapacityHeadroomPct float64 `json:"capacity_headroom_pct" api:"required"`
// Typical changeover duration.
//
// Changeover time is modeled as rising with the number of new inputs a product
// introduces, between the minimum and maximum below. The slope is calibrated from
// production history so the model reproduces this average across the transitions
// actually observed, which is why the value belongs at the changeover time the
// floor typically reports rather than at a worst case.
ChangeoverAvgMinutes float64 `json:"changeover_avg_minutes" api:"required"`
// Hourly labor rate charged to a changeover.
//
// This is a dedicated technician rate rather than an allocated production rate,
// because one person works a single machine through a changeover. Together with
// the typical changeover duration it prices the setup cost that decides economic
// campaign sizes. The constraint department's own labor rate takes precedence when
// it has one, leaving this as the fallback.
ChangeoverLaborRate float64 `json:"changeover_labor_rate" api:"required"`
// Longest plausible changeover, and the ceiling of the changeover model.
ChangeoverMaxMinutes float64 `json:"changeover_max_minutes" api:"required"`
// Shortest plausible changeover, and the floor of the changeover model.
ChangeoverMinMinutes float64 `json:"changeover_min_minutes" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ConstraintDepartment Entity `json:"constraint_department" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Weeks of lead time to assume at the constraint for an item with no measured
// history.
//
// An item's own lead time, measured from production history, is used instead
// whenever one can be observed.
DefaultConstraintLeadTimeWeeks float64 `json:"default_constraint_lead_time_weeks" api:"required"`
// Calendar days between an order being issued and it being due to ship.
//
// The last resort in the ship-by chain: a lead time set on the customer, on its
// parent account, or on the customer's account group takes precedence. Zero means
// same-day shipping.
DefaultCustomerLeadTimeDays int64 `json:"default_customer_lead_time_days" api:"required"`
// How a SKU is produced when neither it nor its product line says.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Any of "make_to_stock", "make_to_order".
DefaultFulfillmentPolicy ProductionScheduleSettingsDefaultFulfillmentPolicy `json:"default_fulfillment_policy" api:"required"`
// Units in a default production lot.
//
// The last resort in the lot-size chain: a lot set on the item, on its product
// line, or on the finished goods an intermediate item becomes all take precedence.
DefaultLotUnits float64 `json:"default_lot_units" api:"required"`
// How the demand a plan is solved against is derived from history.
//
// - `trailing_12`: the last twelve complete months of orders, spread evenly across
// the coming year.
// - `seasonal_ema`: a seasonally adjusted, exponentially smoothed projection that
// weights recent months more heavily. Falls back to the trailing baseline for an
// item with no history.
//
// Demand overrides are applied on top of whichever baseline is chosen.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis ProductionScheduleSettingsDemandBasis `json:"demand_basis" api:"required"`
// Months of production history the solver measures run rates, changeover behavior
// and lead times from.
DemandWindowMonths int64 `json:"demand_window_months" api:"required"`
// Weeks between coming off the constraint and being sellable.
//
// Added to the constraint's own lead time when reorder points are set, so a plan
// replenishes early enough for a decision made today to become sellable stock.
FinishLeadTimeWeeks float64 `json:"finish_lead_time_weeks" api:"required"`
// Months of order history the demand baseline is drawn from.
ForecastHistoryMonths int64 `json:"forecast_history_months" api:"required"`
// Months the forecast projects forward.
//
// Only applies to the `seasonal_ema` basis. A projection of anything other than
// twelve months is scaled to an annual rate, so the plan always reasons about a
// year of demand.
ForecastMonths int64 `json:"forecast_months" api:"required"`
// Z-score used for the confidence interval around the seasonal demand forecast.
//
// The plan is solved against the central forecast, so this widens or narrows that
// interval without changing what gets scheduled.
ForecastZ float64 `json:"forecast_z" api:"required"`
// How many leading weeks of the horizon become a commitment when a version is
// published.
//
// Nothing is frozen while a version is still a draft. Once published, changing a
// campaign inside the frozen window requires a reason and is recorded against the
// plan. Cannot be longer than the planning horizon.
FrozenWeeks int64 `json:"frozen_weeks" api:"required"`
// Standard cron expression driving the generation cadence.
GenerationCron string `json:"generation_cron" api:"required"`
// Timezone the cadence is interpreted in.
//
// Decides when "every Wednesday at 6am" actually happens. A timezone the platform
// does not recognize falls back to UTC.
GenerationTimezone string `json:"generation_timezone" api:"required"`
// Annual cost of holding stock, as a share of item value.
//
// Weighed against the cost of a changeover when campaigns are sized: a higher rate
// favors shorter, more frequent runs.
HoldingRatePct float64 `json:"holding_rate_pct" api:"required"`
// Hours in a shift.
HoursPerShift float64 `json:"hours_per_shift" api:"required"`
// When the cadence last fired.
//
// Stamped when a run is queued rather than when the plan finishes solving, and the
// next due time is measured from it.
LastGeneratedAt time.Time `json:"last_generated_at" api:"required" format:"date-time"`
// How many steps down the production flow a constraint item is traced to the
// finished goods it becomes.
//
// Demand, stock and lot conventions are pooled onto the constraint item from every
// finished good the trace reaches, so anything further down the flow than this
// contributes nothing to the plan. The limit is also what stops a routing that
// loops back on itself from being traced forever.
MaxFlowDepth int64 `json:"max_flow_depth" api:"required"`
// Ceiling on how far ahead any item is built.
//
// An item is only rebuilt once its projected stock falls below the lower of its
// reorder point and this many weeks of demand, so a slow mover whose statistical
// reorder point covers months of demand is not topped up ahead of items that are
// actually short.
MaxWeeksSupply float64 `json:"max_weeks_supply" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_settings".
Object ProductionScheduleSettingsObject `json:"object" api:"required"`
// How many weeks a generated plan covers.
PlanningHorizonWeeks int64 `json:"planning_horizon_weeks" api:"required"`
ReceiveCalendarID string `json:"receive_calendar_id" api:"required"`
// Z-score behind the safety stock targets.
//
// A higher value buys more cover against demand variability at both the constraint
// and the finished goods stage, at the cost of carrying more stock.
ServiceLevelZ float64 `json:"service_level_z" api:"required"`
// Whether the values returned were saved on the account or are the defaults
// applied when nothing has been saved.
//
// Any of "stored", "default".
SettingsStatus ProductionScheduleSettingsSettingsStatus `json:"settings_status" api:"required"`
// Shifts worked per day.
ShiftsPerDay int64 `json:"shifts_per_day" api:"required"`
// The account-wide operating calendars: the days the plant tenders freight, and
// the days a customer's dock accepts it.
//
// Behind the per-address and per-customer links and ahead of a plain
// Monday-to-Friday week. Null on both means every ship-by date is resolved against
// weekdays alone.
ShipCalendarID string `json:"ship_calendar_id" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Day a planning week starts, where 0 is Sunday.
WeekStartDay int64 `json:"week_start_day" api:"required"`
// Weeks worked per year.
WeeksPerYear int64 `json:"weeks_per_year" api:"required"`
// Days worked per week.
WorkDaysPerWeek int64 `json:"work_days_per_week" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AutoPublishStatus respjson.Field
CadenceStatus respjson.Field
CapacityHeadroomPct respjson.Field
ChangeoverAvgMinutes respjson.Field
ChangeoverLaborRate respjson.Field
ChangeoverMaxMinutes respjson.Field
ChangeoverMinMinutes respjson.Field
ConstraintDepartment respjson.Field
CreatedAt respjson.Field
DefaultConstraintLeadTimeWeeks respjson.Field
DefaultCustomerLeadTimeDays respjson.Field
DefaultFulfillmentPolicy respjson.Field
DefaultLotUnits respjson.Field
DemandBasis respjson.Field
DemandWindowMonths respjson.Field
FinishLeadTimeWeeks respjson.Field
ForecastHistoryMonths respjson.Field
ForecastMonths respjson.Field
ForecastZ respjson.Field
FrozenWeeks respjson.Field
GenerationCron respjson.Field
GenerationTimezone respjson.Field
HoldingRatePct respjson.Field
HoursPerShift respjson.Field
LastGeneratedAt respjson.Field
MaxFlowDepth respjson.Field
MaxWeeksSupply respjson.Field
Object respjson.Field
PlanningHorizonWeeks respjson.Field
ReceiveCalendarID respjson.Field
ServiceLevelZ respjson.Field
SettingsStatus respjson.Field
ShiftsPerDay respjson.Field
ShipCalendarID respjson.Field
UpdatedAt respjson.Field
WeekStartDay respjson.Field
WeeksPerYear respjson.Field
WorkDaysPerWeek respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The planning assumptions a production schedule is solved against.
The whole set is always returned. An account that has never saved settings reads back the values the solver would apply anyway, so a caller never has to know which assumptions are in play; `settings_status` says whether the values were saved on the account or are those defaults.
func (ProductionScheduleSettings) RawJSON ¶
func (r ProductionScheduleSettings) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionScheduleSettings) UnmarshalJSON ¶
func (r *ProductionScheduleSettings) UnmarshalJSON(data []byte) error
type ProductionScheduleSettingsAutoPublishStatus ¶
type ProductionScheduleSettingsAutoPublishStatus string
Whether a version produced by the cadence is published automatically.
While active, a cadence run publishes as soon as it solves, committing its frozen weeks without anyone reviewing the plan. Otherwise the run leaves a draft for a planner to publish by hand. Versions generated on request are never published automatically.
const ( ProductionScheduleSettingsAutoPublishStatusActive ProductionScheduleSettingsAutoPublishStatus = "active" ProductionScheduleSettingsAutoPublishStatusInactive ProductionScheduleSettingsAutoPublishStatus = "inactive" )
type ProductionScheduleSettingsCadenceStatus ¶
type ProductionScheduleSettingsCadenceStatus string
Whether schedules are generated automatically on a recurring cadence.
While active, each due tick queues a new schedule version; a generation cron expression is required for the cadence to be saved.
const ( ProductionScheduleSettingsCadenceStatusActive ProductionScheduleSettingsCadenceStatus = "active" ProductionScheduleSettingsCadenceStatusInactive ProductionScheduleSettingsCadenceStatus = "inactive" )
type ProductionScheduleSettingsDefaultFulfillmentPolicy ¶
type ProductionScheduleSettingsDefaultFulfillmentPolicy string
How a SKU is produced when neither it nor its product line says.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
const ( ProductionScheduleSettingsDefaultFulfillmentPolicyMakeToStock ProductionScheduleSettingsDefaultFulfillmentPolicy = "make_to_stock" ProductionScheduleSettingsDefaultFulfillmentPolicyMakeToOrder ProductionScheduleSettingsDefaultFulfillmentPolicy = "make_to_order" )
type ProductionScheduleSettingsDemandBasis ¶
type ProductionScheduleSettingsDemandBasis string
How the demand a plan is solved against is derived from history.
- `trailing_12`: the last twelve complete months of orders, spread evenly across the coming year.
- `seasonal_ema`: a seasonally adjusted, exponentially smoothed projection that weights recent months more heavily. Falls back to the trailing baseline for an item with no history.
Demand overrides are applied on top of whichever baseline is chosen.
const ( ProductionScheduleSettingsDemandBasisTrailing12 ProductionScheduleSettingsDemandBasis = "trailing_12" ProductionScheduleSettingsDemandBasisSeasonalEma ProductionScheduleSettingsDemandBasis = "seasonal_ema" )
type ProductionScheduleSettingsObject ¶
type ProductionScheduleSettingsObject string
Resource type identifier.
const (
ProductionScheduleSettingsObjectProductionScheduleSettings ProductionScheduleSettingsObject = "production_schedule_settings"
)
type ProductionScheduleSettingsSettingsStatus ¶
type ProductionScheduleSettingsSettingsStatus string
Whether the values returned were saved on the account or are the defaults applied when nothing has been saved.
const ( ProductionScheduleSettingsSettingsStatusStored ProductionScheduleSettingsSettingsStatus = "stored" ProductionScheduleSettingsSettingsStatusDefault ProductionScheduleSettingsSettingsStatus = "default" )
type ProductionScheduleStatus ¶
type ProductionScheduleStatus string
Where this version is in its lifecycle.
- `draft`: still editable and commits to nothing. - `generating`: a scheduled solve is still building this version. - `published`: live, with its leading weeks frozen as a commitment to the floor. - `superseded`: a later version was published over an overlapping horizon. - `archived`: retired without being replaced. - `failed`: the solver could not produce a plan; `error_message` says why.
const ( ProductionScheduleStatusDraft ProductionScheduleStatus = "draft" ProductionScheduleStatusGenerating ProductionScheduleStatus = "generating" ProductionScheduleStatusPublished ProductionScheduleStatus = "published" ProductionScheduleStatusSuperseded ProductionScheduleStatus = "superseded" ProductionScheduleStatusArchived ProductionScheduleStatus = "archived" ProductionScheduleStatusFailed ProductionScheduleStatus = "failed" )
type ProductionStep ¶
type ProductionStep struct {
// Production step ID.
ID string `json:"id" api:"required"`
// Allowance correction factor applied to labor time in cost calculations, as a
// decimal string.
//
// Effective labor time per unit is
// `labor_time × (1 + leveling_factor) × (1 + allowances)`.
Allowances string `json:"allowances" api:"required" format:"decimal"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Consumptions ListConsumption `json:"consumptions" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A functional area of a production operation, such as fabrication or packaging,
// that groups scanning stations and machines.
Department *Department `json:"department" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
InSteps *ListProductionStep `json:"in_steps" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
LaborRate Rate `json:"labor_rate" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
LaborTime Rate `json:"labor_time" api:"required"`
// Leveling correction factor applied to labor time in cost calculations, as a
// decimal string.
//
// Effective labor time per unit is
// `labor_time × (1 + leveling_factor) × (1 + allowances)`.
LevelingFactor string `json:"leveling_factor" api:"required" format:"decimal"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Machines *ListMachine `json:"machines" api:"required"`
// Display name of the step.
Name string `json:"name" api:"required"`
// Free-form notes about the step.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "production_step".
Object ProductionStepObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
OutSteps *ListProductionStep `json:"out_steps" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
OverheadRate Rate `json:"overhead_rate" api:"required"`
// The output of a production step: the item it produces and the quantity produced.
Production ProductionOutput `json:"production" api:"required"`
// A station on the production floor where operators scan batches to perform a
// batch operation, such as initializing or moving a batch.
ScanningStation *ScanningStation `json:"scanning_station" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Allowances respjson.Field
Consumptions respjson.Field
CreatedAt respjson.Field
Department respjson.Field
InSteps respjson.Field
LaborRate respjson.Field
LaborTime respjson.Field
LevelingFactor respjson.Field
Machines respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
OutSteps respjson.Field
OverheadRate respjson.Field
Production respjson.Field
ScanningStation respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single stage of work in an item's production flow, with its output, material inputs, cost rates, and graph connections.
func (ProductionStep) RawJSON ¶
func (r ProductionStep) RawJSON() string
Returns the unmodified JSON received from the API
func (*ProductionStep) UnmarshalJSON ¶
func (r *ProductionStep) UnmarshalJSON(data []byte) error
type ProductionStepObject ¶
type ProductionStepObject string
Resource type identifier.
const (
ProductionStepObjectProductionStep ProductionStepObject = "production_step"
)
type Property ¶
type Property struct {
// Property ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Attributes *ListAttribute `json:"attributes" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the property, such as `Color` or `Size`.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "property".
Object PropertyObject `json:"object" api:"required"`
// Last update timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Attributes respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named characteristic used to classify items, such as `Color` or `Size`.
Each property defines a set of attributes — the selectable values (e.g. `Red`, `Blue`) that can be assigned to items.
func (*Property) UnmarshalJSON ¶
type PropertyObject ¶
type PropertyObject string
Resource type identifier.
const (
PropertyObjectProperty PropertyObject = "property"
)
type Quantity ¶
type Quantity struct {
// Quantity ID.
ID string `json:"id" api:"required"`
// Formatted value with unit abbreviation (e.g. "$1,234.56" or "100 kg").
DisplayValue string `json:"display_value" api:"required"`
// Resource type identifier.
//
// Any of "quantity".
Object QuantityObject `json:"object" api:"required"`
// Unit of measurement used for conversions and product quantities.
Unit Unit `json:"unit" api:"required"`
// Raw decimal value of the quantity, as a string to preserve precision.
//
// This is the unformatted machine value; see `display_value` for the
// human-readable rendering with unit and thousands separators.
Value string `json:"value" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DisplayValue respjson.Field
Object respjson.Field
Unit respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A measured amount: a numeric value together with the unit it is expressed in.
Quantities are shared building blocks rather than standalone records — other resources point at them to report stock levels, ordered and packed amounts, money, weights, and durations.
func (*Quantity) UnmarshalJSON ¶
type QuantityInputParam ¶
type QuantityInputParam struct {
// ID of the unit of measure for the value.
UnitID string `json:"unit_id" api:"required"`
// Decimal value, as a string to preserve precision.
Value string `json:"value" api:"required" format:"decimal"`
// contains filtered or unexported fields
}
An amount together with the unit it is expressed in.
The unit may be a currency, so money amounts such as a credit limit are written the same way as physical amounts like weights or counts.
The properties UnitID, Value are required.
func (QuantityInputParam) MarshalJSON ¶
func (r QuantityInputParam) MarshalJSON() (data []byte, err error)
func (*QuantityInputParam) UnmarshalJSON ¶
func (r *QuantityInputParam) UnmarshalJSON(data []byte) error
type QuantityInputRequestParam ¶
type QuantityInputRequestParam struct {
// ID of the unit the value is expressed in.
UnitID string `json:"unit_id" api:"required"`
// Decimal value of the quantity.
Value string `json:"value" api:"required" format:"decimal"`
// contains filtered or unexported fields
}
A quantity, given as a decimal value and the unit it is measured in.
The properties UnitID, Value are required.
func (QuantityInputRequestParam) MarshalJSON ¶
func (r QuantityInputRequestParam) MarshalJSON() (data []byte, err error)
func (*QuantityInputRequestParam) UnmarshalJSON ¶
func (r *QuantityInputRequestParam) UnmarshalJSON(data []byte) error
type QuantityObject ¶
type QuantityObject string
Resource type identifier.
const (
QuantityObjectQuantity QuantityObject = "quantity"
)
type QuotaInfo ¶
type QuotaInfo struct {
// Limit is the maximum number of resources allowed by the current plan.
Limit int64 `json:"limit" api:"required"`
// ResetAt is the time when the quota resets, if applicable. Nil for static
// (non-metered) limits.
ResetAt time.Time `json:"reset_at" api:"required" format:"date-time"`
// Used is the number of resources currently consumed.
Used int64 `json:"used" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Limit respjson.Field
ResetAt respjson.Field
Used respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
QuotaInfo provides machine-readable details about a plan-imposed resource limit. Included in limit_exceeded errors so clients can display upgrade prompts, usage bars, or implement programmatic retry/backoff logic.
func (*QuotaInfo) UnmarshalJSON ¶
type QuoteSalesOrderCommitmentRequestParam ¶
type QuoteSalesOrderCommitmentRequestParam struct {
// The buying account, used to resolve its lead time and receiving days.
BuyerAccountID param.Opt[string] `json:"buyer_account_id,omitzero"`
// Carrier for the shipment.
CarrierID param.Opt[string] `json:"carrier_id,omitzero"`
// When the order would be issued. Defaults to the date sales_order_id was issued
// on, or to now for an order that has not been issued — a lead time is measured
// from issue, so an order built today but issued next week commits to next week's
// date, and re-committing one issued last week still counts from last week.
IssuedAt param.Opt[time.Time] `json:"issued_at,omitzero" format:"date-time"`
// Days between issue and the order being due to ship, in place of the customer's
// standing lead time.
LeadTimeOverrideDays param.Opt[int64] `json:"lead_time_override_days,omitzero"`
// Date delivery would be promised to the customer.
PromisedAt param.Opt[time.Time] `json:"promised_at,omitzero" format:"date-time"`
// An existing order to preview against. Its customer, ship-to address, carrier,
// and service level are used, and the commitment fields below replace whatever it
// currently carries.
//
// Omit it to preview an order that has not been created yet, supplying the parts
// directly.
SalesOrderID param.Opt[string] `json:"sales_order_id,omitzero"`
// Service level for the shipment, which the lane's transit estimate is keyed on.
ServiceLevelID param.Opt[string] `json:"service_level_id,omitzero"`
// The exact date the order would be due to ship.
ShipByOverrideDate param.Opt[time.Time] `json:"ship_by_override_date,omitzero" format:"date-time"`
// The ship-to address, which decides the destination timezone and the lane transit
// is quoted on.
ShipToAddressID param.Opt[string] `json:"ship_to_address_id,omitzero"`
// contains filtered or unexported fields
}
Request to preview the ship-by date a set of commitment inputs would produce.
func (QuoteSalesOrderCommitmentRequestParam) MarshalJSON ¶
func (r QuoteSalesOrderCommitmentRequestParam) MarshalJSON() (data []byte, err error)
func (*QuoteSalesOrderCommitmentRequestParam) UnmarshalJSON ¶
func (r *QuoteSalesOrderCommitmentRequestParam) UnmarshalJSON(data []byte) error
type QuoteSalesOrderCommitmentResponse ¶
type QuoteSalesOrderCommitmentResponse struct {
// Commitment describes when a record is due to ship: what was asked for, what that
// resolved to, and which rule decided.
//
// It is a generic, reusable sub-resource shared by anything carrying a ship-by
// commitment — a sales order, the pick that fulfills it, or a preview of an order
// that does not exist yet.
//
// The three inputs are alternative answers to the same question and at most one is
// ever set; `lead_time_source` reports which of them, or which level of the
// customer chain, produced the date. They are written flat on the create and
// update bodies, the way a carrier is written as `carrier_id` and read back under
// `freight`.
Commitment Commitment `json:"commitment" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_commitment_quote".
Object QuoteSalesOrderCommitmentResponseObject `json:"object" api:"required"`
// The derivation in order, one entry per rule that moved the date.
Steps []CommitmentQuoteStep `json:"steps" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Commitment respjson.Field
Object respjson.Field
Steps respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The ship-by date a set of commitment inputs would produce, and how it was reached.
func (QuoteSalesOrderCommitmentResponse) RawJSON ¶
func (r QuoteSalesOrderCommitmentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteSalesOrderCommitmentResponse) UnmarshalJSON ¶
func (r *QuoteSalesOrderCommitmentResponse) UnmarshalJSON(data []byte) error
type QuoteSalesOrderCommitmentResponseObject ¶
type QuoteSalesOrderCommitmentResponseObject string
Resource type identifier.
const (
QuoteSalesOrderCommitmentResponseObjectSalesOrderCommitmentQuote QuoteSalesOrderCommitmentResponseObject = "sales_order_commitment_quote"
)
type QuoteSalesOrderFreightResponse ¶
type QuoteSalesOrderFreightResponse struct {
// Resource type identifier.
//
// Any of "sales_order_freight_quote".
Object QuoteSalesOrderFreightResponseObject `json:"object" api:"required"`
// A rate calculated on demand rather than stored.
//
// The same shape as a rate minus the fields only a persisted row can have: it
// carries no ID and no timestamps because nothing was written. Used where a figure
// is derived per request, such as an analysis comparing one customer's price
// against the median other customers pay.
UnitPrice ComputedRate `json:"unit_price" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The freshly estimated freight charge for a sales order.
func (QuoteSalesOrderFreightResponse) RawJSON ¶
func (r QuoteSalesOrderFreightResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteSalesOrderFreightResponse) UnmarshalJSON ¶
func (r *QuoteSalesOrderFreightResponse) UnmarshalJSON(data []byte) error
type QuoteSalesOrderFreightResponseObject ¶
type QuoteSalesOrderFreightResponseObject string
Resource type identifier.
const (
QuoteSalesOrderFreightResponseObjectSalesOrderFreightQuote QuoteSalesOrderFreightResponseObject = "sales_order_freight_quote"
)
type QuoteSalesOrderLineInputParam ¶
type QuoteSalesOrderLineInputParam struct {
// ID of the product to price.
ProductID string `json:"product_id" api:"required"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Quantity QuantityInputParam `json:"quantity,omitzero" api:"required"`
// contains filtered or unexported fields
}
A line to price in a quote request.
The properties ProductID, Quantity are required.
func (QuoteSalesOrderLineInputParam) MarshalJSON ¶
func (r QuoteSalesOrderLineInputParam) MarshalJSON() (data []byte, err error)
func (*QuoteSalesOrderLineInputParam) UnmarshalJSON ¶
func (r *QuoteSalesOrderLineInputParam) UnmarshalJSON(data []byte) error
type QuoteSalesOrderPricesRequestParam ¶
type QuoteSalesOrderPricesRequestParam struct {
// ID of the customer account the prices are for.
BuyerAccountID string `json:"buyer_account_id" api:"required"`
// Lines to price.
Lines []QuoteSalesOrderLineInputParam `json:"lines,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to quote sales-order line prices without creating an order.
The properties BuyerAccountID, Lines are required.
func (QuoteSalesOrderPricesRequestParam) MarshalJSON ¶
func (r QuoteSalesOrderPricesRequestParam) MarshalJSON() (data []byte, err error)
func (*QuoteSalesOrderPricesRequestParam) UnmarshalJSON ¶
func (r *QuoteSalesOrderPricesRequestParam) UnmarshalJSON(data []byte) error
type QuoteSalesOrderPricesResponse ¶
type QuoteSalesOrderPricesResponse struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListQuotedSalesOrderLine `json:"lines" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_price_quote".
Object QuoteSalesOrderPricesResponseObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Lines respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Quoted unit prices for the requested lines, in request order.
func (QuoteSalesOrderPricesResponse) RawJSON ¶
func (r QuoteSalesOrderPricesResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuoteSalesOrderPricesResponse) UnmarshalJSON ¶
func (r *QuoteSalesOrderPricesResponse) UnmarshalJSON(data []byte) error
type QuoteSalesOrderPricesResponseObject ¶
type QuoteSalesOrderPricesResponseObject string
Resource type identifier.
const (
QuoteSalesOrderPricesResponseObjectSalesOrderPriceQuote QuoteSalesOrderPricesResponseObject = "sales_order_price_quote"
)
type QuotedSalesOrderLine ¶
type QuotedSalesOrderLine struct {
// Resource type identifier.
//
// Any of "sales_order_price_quote_line".
Object QuotedSalesOrderLineObject `json:"object" api:"required"`
// A catalog entry as it is sold: an inventory item together with its product type,
// product line, and customer portal visibility.
//
// Every product is backed by exactly one item, which carries the SKU, description,
// pricing, attributes, and inventory position. Creating a product creates that
// item; deleting the product deletes it.
Product Product `json:"product" api:"required"`
// A rate calculated on demand rather than stored.
//
// The same shape as a rate minus the fields only a persisted row can have: it
// carries no ID and no timestamps because nothing was written. Used where a figure
// is derived per request, such as an analysis comparing one customer's price
// against the median other customers pay.
UnitPrice ComputedRate `json:"unit_price" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
Product respjson.Field
UnitPrice respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One priced line in a quote response.
func (QuotedSalesOrderLine) RawJSON ¶
func (r QuotedSalesOrderLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*QuotedSalesOrderLine) UnmarshalJSON ¶
func (r *QuotedSalesOrderLine) UnmarshalJSON(data []byte) error
type QuotedSalesOrderLineObject ¶
type QuotedSalesOrderLineObject string
Resource type identifier.
const (
QuotedSalesOrderLineObjectSalesOrderPriceQuoteLine QuotedSalesOrderLineObject = "sales_order_price_quote_line"
)
type Rate ¶
type Rate struct {
// Rate ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Unit of measurement used for conversions and product quantities.
DenominatorUnit Unit `json:"denominator_unit" api:"required"`
// Human-readable formatted value (e.g. "$25.50 / kg" or "100 kg / hr").
DisplayValue string `json:"display_value" api:"required"`
// Unit of measurement used for conversions and product quantities.
NumeratorUnit Unit `json:"numerator_unit" api:"required"`
// Resource type identifier.
//
// Any of "rate".
Object RateObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Decimal value of the rate, as a string to preserve precision.
//
// Expressed as the amount of the numerator unit per one denominator unit.
Value string `json:"value" api:"required" format:"decimal"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DenominatorUnit respjson.Field
DisplayValue respjson.Field
NumeratorUnit respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Value expressed as a ratio of two units, such as a price per kilogram or a throughput per hour.
func (*Rate) UnmarshalJSON ¶
type RateInputParam ¶
type RateInputParam struct {
// ID of the unit for the rate's denominator (the per-unit basis).
DenominatorUnitID string `json:"denominator_unit_id" api:"required"`
// ID of the unit for the rate's numerator (e.g. the currency of a price).
NumeratorUnitID string `json:"numerator_unit_id" api:"required"`
// Decimal value of the rate, expressed as the amount of the numerator unit per one
// denominator unit.
Value string `json:"value" api:"required" format:"decimal"`
// contains filtered or unexported fields
}
A value expressed as a ratio of two units, supplied on create and update requests.
A unit price, for example, has a currency as its numerator unit and the unit the product is bought or sold by as its denominator.
The properties DenominatorUnitID, NumeratorUnitID, Value are required.
func (RateInputParam) MarshalJSON ¶
func (r RateInputParam) MarshalJSON() (data []byte, err error)
func (*RateInputParam) UnmarshalJSON ¶
func (r *RateInputParam) UnmarshalJSON(data []byte) error
type RateObject ¶
type RateObject string
Resource type identifier.
const (
RateObjectRate RateObject = "rate"
)
type RateShopOption ¶
type RateShopOption struct {
// A shipping carrier configured for fulfilling orders.
//
// Carriers with a Shippo-supported `code` (`fedex`, `ups`, `usps`) are connected
// through Shippo for live rating and label purchase; other carriers represent
// self-managed shipping methods such as will call or local delivery.
Carrier Carrier `json:"carrier" api:"required"`
// Estimated number of days until delivery, when the carrier provides an estimate.
EstimatedDays int64 `json:"estimated_days" api:"required"`
// Resource type identifier.
//
// Any of "rate_shop_option".
Object RateShopOptionObject `json:"object" api:"required"`
// Quoted shipping rate for this carrier and service level.
//
// `0` when the carrier is not linked to a live-rating account, or when the
// shipping term's free-shipping minimum order value has been met and this option
// qualifies for free shipping. When the customer's shipping term applies a flat
// rate, that amount replaces the rate on every option that is not already free.
Rate float64 `json:"rate" api:"required"`
// A shipping speed or method offered by a carrier, such as ground or overnight.
//
// Carriers connected through Shippo have their service levels synced from the
// carrier itself; any carrier can also have service levels you create by hand.
ServiceLevel ServiceLevel `json:"service_level" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Carrier respjson.Field
EstimatedDays respjson.Field
Object respjson.Field
Rate respjson.Field
ServiceLevel respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single carrier and service level option returned by rate shopping.
func (RateShopOption) RawJSON ¶
func (r RateShopOption) RawJSON() string
Returns the unmodified JSON received from the API
func (*RateShopOption) UnmarshalJSON ¶
func (r *RateShopOption) UnmarshalJSON(data []byte) error
type RateShopOptionObject ¶
type RateShopOptionObject string
Resource type identifier.
const (
RateShopOptionObjectRateShopOption RateShopOptionObject = "rate_shop_option"
)
type RateShopRequestParam ¶
type RateShopRequestParam struct {
// Parcels to rate shop.
Parcels []ParcelInputParam `json:"parcels,omitzero" api:"required"`
// Address details supplied when creating an address, either on its own or inline
// on another resource.
//
// A few requests, such as shipping rate estimates, take these same fields for a
// one-off address that is never saved to the account.
ToAddress AddressInputParam `json:"to_address,omitzero" api:"required"`
// ID of the customer the shipment is for, used to apply the customer's freight
// policy and default shipping term.
//
// A customer that is freight exempt through its own policy or through one of its
// groups, or whose shipping term is free freight, returns no options with
// `exemption_type` set to `freight_exempt`; a flat-rate shipping term replaces
// carrier rates with the flat rate. Omitting the customer skips all of these rules
// and returns plain carrier rates.
CustomerID param.Opt[string] `json:"customer_id,omitzero"`
// Total value of the order, used to evaluate the free-shipping minimum order value
// on the customer's shipping term.
//
// Free shipping applies only when the total is strictly above the threshold, and
// only for the service levels the shipping term allows.
OrderTotal param.Opt[float64] `json:"order_total,omitzero"`
// Address details supplied when creating an address, either on its own or inline
// on another resource.
//
// A few requests, such as shipping rate estimates, take these same fields for a
// one-off address that is never saved to the account.
FromAddress AddressInputParam `json:"from_address,omitzero"`
// Product lines of the items being shipped, used to apply freight exemptions.
//
// If any listed product line is freight exempt, no options are returned and
// `exemption_type` is `freight_exempt`.
ProductLineIDs []string `json:"product_line_ids,omitzero"`
// contains filtered or unexported fields
}
Request to rate shop across carriers.
The properties Parcels, ToAddress are required.
func (RateShopRequestParam) MarshalJSON ¶
func (r RateShopRequestParam) MarshalJSON() (data []byte, err error)
func (*RateShopRequestParam) UnmarshalJSON ¶
func (r *RateShopRequestParam) UnmarshalJSON(data []byte) error
type RateShopResult ¶
type RateShopResult struct {
// Why a special freight outcome was applied to these options, if any.
//
// - `freight_exempt`: the order is exempt from freight; no options are returned.
// - `minimum_order_met`: the customer's shipping term sets a free-shipping minimum
// order value and the order total exceeded it, so options are rated at zero. If
// the shipping term restricts free shipping to specific service levels, only
// those options are zeroed and the rest keep their carrier or flat rate.
// - `flat_rate`: the customer's shipping term applies a flat shipping rate, which
// replaced every option's carrier rate.
// - `none`: standard carrier rates apply with no exemption.
//
// Any of "freight_exempt", "minimum_order_met", "flat_rate", "none".
ExemptionType RateShopResultExemptionType `json:"exemption_type" api:"required"`
// Flat shipping amount applied to the options.
//
// Set when the customer's shipping term applies a flat rate, including when a met
// free-shipping minimum has already rated some options at zero.
FlatRate float64 `json:"flat_rate" api:"required"`
// Resource type identifier.
//
// Any of "rate_shop_result".
Object RateShopResultObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Options ListRateShopOption `json:"options" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExemptionType respjson.Field
FlatRate respjson.Field
Object respjson.Field
Options respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The carrier and service level options returned by rate shopping, along with the freight rule that shaped their rates.
func (RateShopResult) RawJSON ¶
func (r RateShopResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*RateShopResult) UnmarshalJSON ¶
func (r *RateShopResult) UnmarshalJSON(data []byte) error
type RateShopResultExemptionType ¶ added in v0.17.1
type RateShopResultExemptionType string
Why a special freight outcome was applied to these options, if any.
- `freight_exempt`: the order is exempt from freight; no options are returned.
- `minimum_order_met`: the customer's shipping term sets a free-shipping minimum order value and the order total exceeded it, so options are rated at zero. If the shipping term restricts free shipping to specific service levels, only those options are zeroed and the rest keep their carrier or flat rate.
- `flat_rate`: the customer's shipping term applies a flat shipping rate, which replaced every option's carrier rate.
- `none`: standard carrier rates apply with no exemption.
const ( RateShopResultExemptionTypeFreightExempt RateShopResultExemptionType = "freight_exempt" RateShopResultExemptionTypeMinimumOrderMet RateShopResultExemptionType = "minimum_order_met" RateShopResultExemptionTypeFlatRate RateShopResultExemptionType = "flat_rate" RateShopResultExemptionTypeNone RateShopResultExemptionType = "none" )
type RateShopResultObject ¶
type RateShopResultObject string
Resource type identifier.
const (
RateShopResultObjectRateShopResult RateShopResultObject = "rate_shop_result"
)
type ReadCursor ¶
type ReadCursor struct {
// The id of the last message the participant has read.
MessageID string `json:"message_id" api:"required"`
// Resource type identifier.
//
// Any of "read_cursor".
Object ReadCursorObject `json:"object" api:"required"`
// When the participant last advanced their read cursor.
ReadAt time.Time `json:"read_at" api:"required" format:"date-time"`
// The sequence number of the last message the participant has read in the
// conversation.
//
// A message is "seen" by this participant when its `sequence` is `<=` this value.
// `0` means they have not read any message in the conversation yet.
Sequence int64 `json:"sequence" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
MessageID respjson.Field
Object respjson.Field
ReadAt respjson.Field
Sequence respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A participant's read position in a conversation — the basis for read receipts ("who has seen this").
func (ReadCursor) RawJSON ¶
func (r ReadCursor) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReadCursor) UnmarshalJSON ¶
func (r *ReadCursor) UnmarshalJSON(data []byte) error
type ReadCursorObject ¶
type ReadCursorObject string
Resource type identifier.
const (
ReadCursorObjectReadCursor ReadCursorObject = "read_cursor"
)
type ReconcileErrorResult ¶
type ReconcileErrorResult struct {
// Error message.
Error string `json:"error" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "reconcile_error_result".
Object ReconcileErrorResultObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
Item respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A submitted row that could not be reconciled.
func (ReconcileErrorResult) RawJSON ¶
func (r ReconcileErrorResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReconcileErrorResult) UnmarshalJSON ¶
func (r *ReconcileErrorResult) UnmarshalJSON(data []byte) error
type ReconcileErrorResultObject ¶ added in v0.22.3
type ReconcileErrorResultObject string
Resource type identifier.
const (
ReconcileErrorResultObjectReconcileErrorResult ReconcileErrorResultObject = "reconcile_error_result"
)
type ReconciledItemResult ¶
type ReconciledItemResult struct {
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
NewQuantity ComputedQuantity `json:"new_quantity" api:"required"`
// Resource type identifier.
//
// Any of "reconciled_item_result".
Object ReconciledItemResultObject `json:"object" api:"required"`
// An amount calculated on demand rather than stored.
//
// The same shape as a quantity minus the ID, because nothing was written: it is
// derived per request, such as a total rolled up across invoiced lines for one
// analysis.
PreviousQuantity ComputedQuantity `json:"previous_quantity" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Item respjson.Field
NewQuantity respjson.Field
Object respjson.Field
PreviousQuantity respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An item whose on-hand quantity was successfully reconciled.
Both quantities are expressed in the item's own base unit, not in the unit submitted with the request, and both arrive with that unit resolved.
func (ReconciledItemResult) RawJSON ¶
func (r ReconciledItemResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReconciledItemResult) UnmarshalJSON ¶
func (r *ReconciledItemResult) UnmarshalJSON(data []byte) error
type ReconciledItemResultObject ¶ added in v0.22.3
type ReconciledItemResultObject string
Resource type identifier.
const (
ReconciledItemResultObjectReconciledItemResult ReconciledItemResultObject = "reconciled_item_result"
)
type Record ¶
type Record struct {
// Unique identifier for the record.
ID string `json:"id" api:"required"`
// Type-specific metadata.
//
// The set of keys varies by record type.
Metadata map[string]string `json:"metadata" api:"required"`
// Human-readable record number, when the record has one.
Number string `json:"number" api:"required"`
// Resource type identifier.
//
// Any of "record".
Object RecordObject `json:"object" api:"required"`
// Type-specific status code, when applicable.
Status string `json:"status" api:"required"`
// The kind of business record referenced.
//
// Determines how to resolve the record and which `status` and `metadata` keys may
// appear.
//
// - `sales_order`: a customer order.
// - `purchase_order`: an order placed with a supplier.
// - `receiving_order`: an inbound order being received into inventory.
// - `pick`: a warehouse pick task.
// - `shipment`: an outbound shipment.
// - `delivery`: a delivery of one or more shipments to a destination.
// - `production_run`: a manufacturing production run.
// - `invoice`: a customer invoice.
// - `transaction`: a payment or financial transaction.
// - `settlement`: a settlement reconciling transactions against invoices.
//
// Any of "sales_order", "purchase_order", "receiving_order", "pick", "shipment",
// "delivery", "production_run", "invoice", "transaction", "settlement".
Type RecordType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Metadata respjson.Field
Number respjson.Field
Object respjson.Field
Status respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Record is a lightweight reference to a business record — a sales order, purchase order, pick, shipment, production run, invoice, etc.
Like the `actor` and `entity` references, it carries just enough to identify and label the referenced record without embedding its full resource. The `status` and `metadata` fields hold type-specific detail that varies by the kind of record referenced.
func (*Record) UnmarshalJSON ¶
type RecordObject ¶
type RecordObject string
Resource type identifier.
const (
RecordObjectRecord RecordObject = "record"
)
type RecordType ¶
type RecordType string
The kind of business record referenced.
Determines how to resolve the record and which `status` and `metadata` keys may appear.
- `sales_order`: a customer order. - `purchase_order`: an order placed with a supplier. - `receiving_order`: an inbound order being received into inventory. - `pick`: a warehouse pick task. - `shipment`: an outbound shipment. - `delivery`: a delivery of one or more shipments to a destination. - `production_run`: a manufacturing production run. - `invoice`: a customer invoice. - `transaction`: a payment or financial transaction. - `settlement`: a settlement reconciling transactions against invoices.
const ( RecordTypeSalesOrder RecordType = "sales_order" RecordTypePurchaseOrder RecordType = "purchase_order" RecordTypeReceivingOrder RecordType = "receiving_order" RecordTypePick RecordType = "pick" RecordTypeShipment RecordType = "shipment" RecordTypeDelivery RecordType = "delivery" RecordTypeProductionRun RecordType = "production_run" RecordTypeInvoice RecordType = "invoice" RecordTypeTransaction RecordType = "transaction" RecordTypeSettlement RecordType = "settlement" )
type RegenerateProductionScheduleRequestDemandBasis ¶
type RegenerateProductionScheduleRequestDemandBasis string
How future demand is derived, defaulting to the basis this version was solved with.
- `trailing_12`: demand is the trailing twelve months of orders.
- `seasonal_ema`: demand is a seasonal exponential moving average, which follows a season arriving early or late rather than flattening it.
const ( RegenerateProductionScheduleRequestDemandBasisTrailing12 RegenerateProductionScheduleRequestDemandBasis = "trailing_12" RegenerateProductionScheduleRequestDemandBasisSeasonalEma RegenerateProductionScheduleRequestDemandBasis = "seasonal_ema" )
type RegenerateProductionScheduleRequestMergeMode ¶
type RegenerateProductionScheduleRequestMergeMode string
What happens to the campaigns someone placed or edited by hand.
- `preserve_manual`: hand-edited campaigns are kept, and the fresh solve plans around them — their stock and machine time are facts the rest of the plan responds to.
- `replace_all`: hand edits are discarded and the fresh solve is taken whole.
Omitting this keeps hand edits, because the alternative destroys work silently.
const ( RegenerateProductionScheduleRequestMergeModePreserveManual RegenerateProductionScheduleRequestMergeMode = "preserve_manual" RegenerateProductionScheduleRequestMergeModeReplaceAll RegenerateProductionScheduleRequestMergeMode = "replace_all" )
type RegenerateProductionScheduleRequestParam ¶
type RegenerateProductionScheduleRequestParam struct {
// Number of weeks the re-solve should cover, defaulting to the horizon this
// version already has.
HorizonWeeks param.Opt[int64] `json:"horizon_weeks,omitzero"`
// The instant to plan against, which is what stock, demand history and active
// demand overrides are read as of.
//
// Defaults to now rather than to the instant the version was first generated, so a
// plain call answers "what would the solver say today". Because the horizon
// re-anchors to the week containing this instant, a kept campaign keeps the
// calendar week it was planned in but can end up under a different `week_index`.
PlanningAsOf param.Opt[time.Time] `json:"planning_as_of,omitzero" format:"date-time"`
// How future demand is derived, defaulting to the basis this version was solved
// with.
//
// - `trailing_12`: demand is the trailing twelve months of orders.
// - `seasonal_ema`: demand is a seasonal exponential moving average, which follows
// a season arriving early or late rather than flattening it.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis RegenerateProductionScheduleRequestDemandBasis `json:"demand_basis,omitzero"`
// What happens to the campaigns someone placed or edited by hand.
//
// - `preserve_manual`: hand-edited campaigns are kept, and the fresh solve plans
// around them — their stock and machine time are facts the rest of the plan
// responds to.
// - `replace_all`: hand edits are discarded and the fresh solve is taken whole.
//
// Omitting this keeps hand edits, because the alternative destroys work silently.
//
// Any of "preserve_manual", "replace_all".
MergeMode RegenerateProductionScheduleRequestMergeMode `json:"merge_mode,omitzero"`
// contains filtered or unexported fields
}
Request to re-solve a draft in place.
func (RegenerateProductionScheduleRequestParam) MarshalJSON ¶
func (r RegenerateProductionScheduleRequestParam) MarshalJSON() (data []byte, err error)
func (*RegenerateProductionScheduleRequestParam) UnmarshalJSON ¶
func (r *RegenerateProductionScheduleRequestParam) UnmarshalJSON(data []byte) error
type ReleaseProductionScheduleWeekRequestParam ¶
type ReleaseProductionScheduleWeekRequestParam struct {
// ID of the account user accountable for executing the run.
//
// Accepts either an account user ID or a user ID; it is resolved and stored as the
// account user.
ResponsibleUserID string `json:"responsible_user_id" api:"required"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// ID of the scanning station the batches will be scanned at.
//
// Applied to every batch this release creates, across all machines in the week.
ScanningStationID param.Opt[string] `json:"scanning_station_id,omitzero"`
// Issue the whole week as new batches, leaving an earlier week's unworked lots
// where they are.
//
// Off unless you ask for it: reprinting a ticket the floor is already holding is
// exactly what carrying work forward exists to prevent, so it takes a deliberate
// choice to do it.
SkipCarryForward param.Opt[bool] `json:"skip_carry_forward,omitzero"`
// contains filtered or unexported fields
}
Request to release one week of a production schedule to the floor.
The properties ResponsibleUserID, WeekIndex are required.
func (ReleaseProductionScheduleWeekRequestParam) MarshalJSON ¶
func (r ReleaseProductionScheduleWeekRequestParam) MarshalJSON() (data []byte, err error)
func (*ReleaseProductionScheduleWeekRequestParam) UnmarshalJSON ¶
func (r *ReleaseProductionScheduleWeekRequestParam) UnmarshalJSON(data []byte) error
type ReleaseScheduleBatch ¶
type ReleaseScheduleBatch struct {
// Entity is a polymorphic reference to any resource in the system.
Batch Entity `json:"batch" api:"required"`
// The number of the run this ticket came off, when the batch already existed.
//
// Present on a lot carried forward from an earlier week that the floor never
// worked. The ticket is already printed and on the floor, so the release moves it
// into the new run rather than issuing a replacement.
CarriedForwardFrom string `json:"carried_forward_from" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Units in this lot.
//
// The last lot of a campaign is short when the planned quantity is not a whole
// number of lots.
Quantity float64 `json:"quantity" api:"required"`
// The item's SKU, as it stood when the plan was generated.
SKU string `json:"sku" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Batch respjson.Field
CarriedForwardFrom respjson.Field
Item respjson.Field
Quantity respjson.Field
SKU respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One batch a release created, or would create: a single lot off one planned campaign.
func (ReleaseScheduleBatch) RawJSON ¶
func (r ReleaseScheduleBatch) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReleaseScheduleBatch) UnmarshalJSON ¶
func (r *ReleaseScheduleBatch) UnmarshalJSON(data []byte) error
type ReleaseScheduleWeekPreview ¶
type ReleaseScheduleWeekPreview struct {
// How many batches the run would hold, created and carried forward together.
BatchCount int64 `json:"batch_count" api:"required"`
// Why the week cannot be released, phrased for display.
//
// A week is blocked when it has already been released to the floor, or when it
// holds nothing to release.
BlockedReason string `json:"blocked_reason" api:"required"`
// How many of `batch_count` would be moved off an earlier run rather than created.
CarriedForwardBatchCount int64 `json:"carried_forward_batch_count" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ExistingProductionRun Entity `json:"existing_production_run" api:"required"`
// Whether the week can be released.
IsReleasable bool `json:"is_releasable" api:"required"`
// How many campaigns would be released.
LineCount int64 `json:"line_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListReleasedScheduleLine `json:"lines" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_week_release_preview".
Object ReleaseScheduleWeekPreviewObject `json:"object" api:"required"`
// Total units that would be released.
TotalQuantity float64 `json:"total_quantity" api:"required"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// First instant of the week.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BatchCount respjson.Field
BlockedReason respjson.Field
CarriedForwardBatchCount respjson.Field
ExistingProductionRun respjson.Field
IsReleasable respjson.Field
LineCount respjson.Field
Lines respjson.Field
Object respjson.Field
TotalQuantity respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
What releasing a week would create, with nothing written.
A release makes a numbered production run and every batch under it, which is real work to undo by hand, so the confirmation is driven by this rather than by a count computed in the browser.
func (ReleaseScheduleWeekPreview) RawJSON ¶
func (r ReleaseScheduleWeekPreview) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReleaseScheduleWeekPreview) UnmarshalJSON ¶
func (r *ReleaseScheduleWeekPreview) UnmarshalJSON(data []byte) error
type ReleaseScheduleWeekPreviewObject ¶
type ReleaseScheduleWeekPreviewObject string
Resource type identifier.
const (
ReleaseScheduleWeekPreviewObjectProductionScheduleWeekReleasePreview ReleaseScheduleWeekPreviewObject = "production_schedule_week_release_preview"
)
type ReleaseScheduleWeekResult ¶
type ReleaseScheduleWeekResult struct {
// How many batches the run holds across all campaigns, created and carried forward
// together.
BatchCount int64 `json:"batch_count" api:"required"`
// How many of `batch_count` were moved off an earlier run rather than created.
//
// Tickets for these are already printed and on the floor.
CarriedForwardBatchCount int64 `json:"carried_forward_batch_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListReleasedScheduleLine `json:"lines" api:"required"`
// Resource type identifier.
//
// Any of "production_schedule_week_release".
Object ReleaseScheduleWeekResultObject `json:"object" api:"required"`
// A production run: the group of shop-floor batches that are executed together,
// tracked from the first batch scan through to completion.
ProductionRun ProductionRun `json:"production_run" api:"required"`
// How many campaigns were released.
ReleasedLineCount int64 `json:"released_line_count" api:"required"`
// Total units released.
TotalQuantity float64 `json:"total_quantity" api:"required"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// First instant of the released week.
WeekStartsAt time.Time `json:"week_starts_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BatchCount respjson.Field
CarriedForwardBatchCount respjson.Field
Lines respjson.Field
Object respjson.Field
ProductionRun respjson.Field
ReleasedLineCount respjson.Field
TotalQuantity respjson.Field
WeekIndex respjson.Field
WeekStartsAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The production run created from one week of a schedule.
Each planned campaign becomes one batch per lot, so a 360-unit week at a 60-unit lot arrives on the floor as six batches rather than one instruction to make 360.
func (ReleaseScheduleWeekResult) RawJSON ¶
func (r ReleaseScheduleWeekResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReleaseScheduleWeekResult) UnmarshalJSON ¶
func (r *ReleaseScheduleWeekResult) UnmarshalJSON(data []byte) error
type ReleaseScheduleWeekResultObject ¶
type ReleaseScheduleWeekResultObject string
Resource type identifier.
const (
ReleaseScheduleWeekResultObjectProductionScheduleWeekRelease ReleaseScheduleWeekResultObject = "production_schedule_week_release"
)
type ReleasedScheduleLine ¶
type ReleasedScheduleLine struct {
// How many batches the campaign broke into.
BatchCount int64 `json:"batch_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Batches ListReleaseScheduleBatch `json:"batches" api:"required"`
// How much of `planned_quantity` is covered by tickets an earlier week already
// issued.
CarriedForwardQuantity float64 `json:"carried_forward_quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Line Entity `json:"line" api:"required"`
// Units in one lot.
LotUnits float64 `json:"lot_units" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Total units planned for the campaign.
PlannedQuantity float64 `json:"planned_quantity" api:"required"`
// The item's SKU, as it stood when the plan was generated.
SKU string `json:"sku" api:"required"`
// Abbreviation of the unit the quantity and the lot are counted in.
//
// `6 × 60` is not an instruction until it says 6 × 60 of what.
Unit string `json:"unit" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BatchCount respjson.Field
Batches respjson.Field
CarriedForwardQuantity respjson.Field
Item respjson.Field
Line respjson.Field
LotUnits respjson.Field
Machine respjson.Field
PlannedQuantity respjson.Field
SKU respjson.Field
Unit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One planned campaign and the lots it broke into.
func (ReleasedScheduleLine) RawJSON ¶
func (r ReleasedScheduleLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ReleasedScheduleLine) UnmarshalJSON ¶
func (r *ReleasedScheduleLine) UnmarshalJSON(data []byte) error
type ReorderSalesOrderLinesRequestParam ¶
type ReorderSalesOrderLinesRequestParam struct {
// The order's product-line IDs in the desired display order.
//
// Every product line on the order must be listed exactly once. The automatically
// generated discount and freight lines are kept at the bottom of the list and must
// not be included.
LineIDs []string `json:"line_ids,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to reorder a sales order's lines.
The property LineIDs is required.
func (ReorderSalesOrderLinesRequestParam) MarshalJSON ¶
func (r ReorderSalesOrderLinesRequestParam) MarshalJSON() (data []byte, err error)
func (*ReorderSalesOrderLinesRequestParam) UnmarshalJSON ¶
func (r *ReorderSalesOrderLinesRequestParam) UnmarshalJSON(data []byte) error
type ReportConversationRequestParam ¶
type ReportConversationRequestParam struct {
// Why the conversation or message is being reported, in free-form text.
Reason string `json:"reason" api:"required"`
// The specific message being reported.
//
// Omit to report the conversation as a whole.
MessageID param.Opt[string] `json:"message_id,omitzero"`
// contains filtered or unexported fields
}
Request to report a conversation (optionally a specific message) for abuse.
The property Reason is required.
func (ReportConversationRequestParam) MarshalJSON ¶
func (r ReportConversationRequestParam) MarshalJSON() (data []byte, err error)
func (*ReportConversationRequestParam) UnmarshalJSON ¶
func (r *ReportConversationRequestParam) UnmarshalJSON(data []byte) error
type RequestLog ¶
type RequestLog struct {
// Request log ID.
ID string `json:"id" api:"required"`
// An organization on OpenMRP, including its branding and customer portal
// sub-resources.
//
// Your own account and any customer or supplier account you trade with are both
// represented by this object.
Account Account `json:"account" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
Actor Actor `json:"actor" api:"required"`
// The API version the request was served with.
//
// Taken from the `OpenMRP-Version` header the caller sent; requests rejected for
// omitting that header record no version.
APIVersion string `json:"api_version" api:"required"`
// Client IP address the request came from.
//
// Not recorded for requests an OpenMRP agent made on your behalf, since those
// originate inside OpenMRP's own network.
ClientIP string `json:"client_ip" api:"required"`
// When the log entry was written.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Machine-readable API error code.
//
// Matches the `code` of the error response the caller received. Populated only for
// failed requests.
//
// Any of "expired_token", "api_key_expired", "api_key_revoked",
// "invalid_credentials", "insufficient_permissions", "payment_required",
// "agent_spending_cap_reached", "validation_failed", "missing_field",
// "invalid_format", "method_not_allowed", "resource_not_found", "resource_exists",
// "resource_conflict", "resource_gone", "idempotency_in_progress",
// "limit_exceeded", "registration_closed", "rate_limit_exceeded",
// "parameter_missing", "parameter_invalid", "parameter_unknown",
// "parameters_exclusive", "internal_error", "service_unavailable",
// "external_service_error", "timeout", "connection_error", "request_timeout",
// "client_closed_request", "api_version_required", "api_version_invalid",
// "api_version_too_old".
ErrorCode RequestLogErrorCode `json:"error_code" api:"required"`
// Human-readable error message.
//
// The same message the caller received. Populated only for failed requests.
ErrorMessage string `json:"error_message" api:"required"`
// Request host.
//
// Usually `api.openmrp.ai`.
Host string `json:"host" api:"required"`
// User-provided idempotency key.
IdempotencyKey string `json:"idempotency_key" api:"required"`
// Request latency in microseconds.
//
// Measured at the API edge, from the moment the request was received until the
// response was written, so it excludes network time between your client and
// OpenMRP.
LatencyUs int64 `json:"latency_us" api:"required"`
// HTTP method.
//
// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS".
Method RequestLogMethod `json:"method" api:"required"`
// The route template the request matched, with path parameters left as
// placeholders.
//
// For example `/v1/sales/customers/{id}` is the normalized route for the request
// path `/v1/sales/customers/ac_...`. Falls back to the raw path when the request
// did not match a registered route.
NormalizedRoute string `json:"normalized_route" api:"required"`
// Resource type identifier.
//
// Any of "request_log".
Object RequestLogObject `json:"object" api:"required"`
// When the request was received.
//
// Request logs are ordered and date-filtered by this timestamp rather than by
// `created_at`.
OccurredAt time.Time `json:"occurred_at" api:"required" format:"date-time"`
// The exact path the request was made to, including path parameter values.
Path string `json:"path" api:"required"`
// Query-string parameters the request was made with, as a JSON object. Encoded as
// a JSON value (object, array, string, number, boolean, or null), not a
// JSON-encoded string.
QueryParams any `json:"query_params" api:"required"`
// Referrer header.
Referrer string `json:"referrer" api:"required"`
// The JSON body the request was sent with.
//
// Sensitive values such as passwords, tokens, and secrets are redacted before the
// body is stored. Bodies larger than 256 KB are not stored in full; a small marker
// object with `_truncated` set to `true` is stored in their place. Encoded as a
// JSON value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
RequestBody any `json:"request_body" api:"required"`
// The JSON body OpenMRP responded with.
//
// Sensitive values such as generated API key secrets are redacted before the body
// is stored. Bodies larger than 256 KB are not stored in full; a small marker
// object with `_truncated` set to `true` is stored in their place. Encoded as a
// JSON value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
ResponseBody any `json:"response_body" api:"required"`
// HTTP response status code (e.g. `200`, `404`).
StatusCode int64 `json:"status_code" api:"required"`
// User agent.
UserAgent string `json:"user_agent" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Account respjson.Field
Actor respjson.Field
APIVersion respjson.Field
ClientIP respjson.Field
CreatedAt respjson.Field
ErrorCode respjson.Field
ErrorMessage respjson.Field
Host respjson.Field
IdempotencyKey respjson.Field
LatencyUs respjson.Field
Method respjson.Field
NormalizedRoute respjson.Field
Object respjson.Field
OccurredAt respjson.Field
Path respjson.Field
QueryParams respjson.Field
Referrer respjson.Field
RequestBody respjson.Field
ResponseBody respjson.Field
StatusCode respjson.Field
UserAgent respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A log of a single API request, capturing its route, outcome, latency, and actor.
Logs are written after the response has been sent, so a new entry may take a moment to become readable.
func (RequestLog) RawJSON ¶
func (r RequestLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*RequestLog) UnmarshalJSON ¶
func (r *RequestLog) UnmarshalJSON(data []byte) error
type RequestLogErrorCode ¶ added in v0.17.1
type RequestLogErrorCode string
Machine-readable API error code.
Matches the `code` of the error response the caller received. Populated only for failed requests.
const ( RequestLogErrorCodeExpiredToken RequestLogErrorCode = "expired_token" RequestLogErrorCodeAPIKeyExpired RequestLogErrorCode = "api_key_expired" RequestLogErrorCodeAPIKeyRevoked RequestLogErrorCode = "api_key_revoked" RequestLogErrorCodeInvalidCredentials RequestLogErrorCode = "invalid_credentials" RequestLogErrorCodeInsufficientPermissions RequestLogErrorCode = "insufficient_permissions" RequestLogErrorCodePaymentRequired RequestLogErrorCode = "payment_required" RequestLogErrorCodeAgentSpendingCapReached RequestLogErrorCode = "agent_spending_cap_reached" RequestLogErrorCodeValidationFailed RequestLogErrorCode = "validation_failed" RequestLogErrorCodeMissingField RequestLogErrorCode = "missing_field" RequestLogErrorCodeInvalidFormat RequestLogErrorCode = "invalid_format" RequestLogErrorCodeMethodNotAllowed RequestLogErrorCode = "method_not_allowed" RequestLogErrorCodeResourceNotFound RequestLogErrorCode = "resource_not_found" RequestLogErrorCodeResourceExists RequestLogErrorCode = "resource_exists" RequestLogErrorCodeResourceConflict RequestLogErrorCode = "resource_conflict" RequestLogErrorCodeResourceGone RequestLogErrorCode = "resource_gone" RequestLogErrorCodeIdempotencyInProgress RequestLogErrorCode = "idempotency_in_progress" RequestLogErrorCodeLimitExceeded RequestLogErrorCode = "limit_exceeded" RequestLogErrorCodeRegistrationClosed RequestLogErrorCode = "registration_closed" RequestLogErrorCodeRateLimitExceeded RequestLogErrorCode = "rate_limit_exceeded" RequestLogErrorCodeParameterMissing RequestLogErrorCode = "parameter_missing" RequestLogErrorCodeParameterInvalid RequestLogErrorCode = "parameter_invalid" RequestLogErrorCodeParameterUnknown RequestLogErrorCode = "parameter_unknown" RequestLogErrorCodeParametersExclusive RequestLogErrorCode = "parameters_exclusive" RequestLogErrorCodeInternalError RequestLogErrorCode = "internal_error" RequestLogErrorCodeExternalServiceError RequestLogErrorCode = "external_service_error" RequestLogErrorCodeTimeout RequestLogErrorCode = "timeout" RequestLogErrorCodeConnectionError RequestLogErrorCode = "connection_error" RequestLogErrorCodeRequestTimeout RequestLogErrorCode = "request_timeout" RequestLogErrorCodeClientClosedRequest RequestLogErrorCode = "client_closed_request" RequestLogErrorCodeAPIVersionRequired RequestLogErrorCode = "api_version_required" RequestLogErrorCodeAPIVersionInvalid RequestLogErrorCode = "api_version_invalid" RequestLogErrorCodeAPIVersionTooOld RequestLogErrorCode = "api_version_too_old" )
type RequestLogMethod ¶ added in v0.17.1
type RequestLogMethod string
HTTP method.
const ( RequestLogMethodGet RequestLogMethod = "GET" RequestLogMethodPost RequestLogMethod = "POST" RequestLogMethodPut RequestLogMethod = "PUT" RequestLogMethodPatch RequestLogMethod = "PATCH" RequestLogMethodDelete RequestLogMethod = "DELETE" RequestLogMethodHead RequestLogMethod = "HEAD" RequestLogMethodOptions RequestLogMethod = "OPTIONS" )
type RequestLogObject ¶
type RequestLogObject string
Resource type identifier.
const (
RequestLogObjectRequestLog RequestLogObject = "request_log"
)
type ResponseError ¶
type ResponseError struct {
// A machine-readable code for the error.
//
// Any of "expired_token", "api_key_expired", "api_key_revoked",
// "invalid_credentials", "insufficient_permissions", "payment_required",
// "agent_spending_cap_reached", "validation_failed", "missing_field",
// "invalid_format", "method_not_allowed", "resource_not_found", "resource_exists",
// "resource_conflict", "resource_gone", "idempotency_in_progress",
// "limit_exceeded", "registration_closed", "rate_limit_exceeded",
// "parameter_missing", "parameter_invalid", "parameter_unknown",
// "parameters_exclusive", "internal_error", "service_unavailable",
// "external_service_error", "timeout", "connection_error", "request_timeout",
// "client_closed_request", "api_version_required", "api_version_invalid",
// "api_version_too_old".
Code ResponseErrorCode `json:"code" api:"required"`
// A URL to documentation about the error.
DocURL string `json:"doc_url" api:"required"`
// Whether this error is transient and the request can be retried.
IsTransient bool `json:"is_transient" api:"required"`
// A human-readable message providing more details about the error.
Message string `json:"message" api:"required"`
// The parameter that caused the error, if applicable.
Param string `json:"param" api:"required"`
// QuotaInfo provides machine-readable details about a plan-imposed resource limit.
// Included in limit_exceeded errors so clients can display upgrade prompts, usage
// bars, or implement programmatic retry/backoff logic.
Quota QuotaInfo `json:"quota" api:"required"`
// RequestLogURL is a link to the dashboard page for this request's log entry. Nil
// when no request log is available.
RequestLogURL string `json:"request_log_url" api:"required"`
// The type of error.
//
// Any of "api_error", "idempotency_error", "invalid_request_error".
Type ResponseErrorType `json:"type" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
DocURL respjson.Field
IsTransient respjson.Field
Message respjson.Field
Param respjson.Field
Quota respjson.Field
RequestLogURL respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
ResponseError is the JSON-serializable error body returned to API clients. It contains only public information. This struct is used by the OpenAPI schema generator to produce documentation.
func (ResponseError) RawJSON ¶
func (r ResponseError) RawJSON() string
Returns the unmodified JSON received from the API
func (*ResponseError) UnmarshalJSON ¶
func (r *ResponseError) UnmarshalJSON(data []byte) error
type ResponseErrorCode ¶
type ResponseErrorCode string
A machine-readable code for the error.
const ( ResponseErrorCodeExpiredToken ResponseErrorCode = "expired_token" ResponseErrorCodeAPIKeyExpired ResponseErrorCode = "api_key_expired" ResponseErrorCodeAPIKeyRevoked ResponseErrorCode = "api_key_revoked" ResponseErrorCodeInvalidCredentials ResponseErrorCode = "invalid_credentials" ResponseErrorCodeInsufficientPermissions ResponseErrorCode = "insufficient_permissions" ResponseErrorCodePaymentRequired ResponseErrorCode = "payment_required" ResponseErrorCodeAgentSpendingCapReached ResponseErrorCode = "agent_spending_cap_reached" ResponseErrorCodeValidationFailed ResponseErrorCode = "validation_failed" ResponseErrorCodeMissingField ResponseErrorCode = "missing_field" ResponseErrorCodeInvalidFormat ResponseErrorCode = "invalid_format" ResponseErrorCodeMethodNotAllowed ResponseErrorCode = "method_not_allowed" ResponseErrorCodeResourceNotFound ResponseErrorCode = "resource_not_found" ResponseErrorCodeResourceExists ResponseErrorCode = "resource_exists" ResponseErrorCodeResourceConflict ResponseErrorCode = "resource_conflict" ResponseErrorCodeResourceGone ResponseErrorCode = "resource_gone" ResponseErrorCodeIdempotencyInProgress ResponseErrorCode = "idempotency_in_progress" ResponseErrorCodeLimitExceeded ResponseErrorCode = "limit_exceeded" ResponseErrorCodeRegistrationClosed ResponseErrorCode = "registration_closed" ResponseErrorCodeRateLimitExceeded ResponseErrorCode = "rate_limit_exceeded" ResponseErrorCodeParameterMissing ResponseErrorCode = "parameter_missing" ResponseErrorCodeParameterInvalid ResponseErrorCode = "parameter_invalid" ResponseErrorCodeParameterUnknown ResponseErrorCode = "parameter_unknown" ResponseErrorCodeParametersExclusive ResponseErrorCode = "parameters_exclusive" ResponseErrorCodeInternalError ResponseErrorCode = "internal_error" ResponseErrorCodeExternalServiceError ResponseErrorCode = "external_service_error" ResponseErrorCodeTimeout ResponseErrorCode = "timeout" ResponseErrorCodeConnectionError ResponseErrorCode = "connection_error" ResponseErrorCodeRequestTimeout ResponseErrorCode = "request_timeout" ResponseErrorCodeClientClosedRequest ResponseErrorCode = "client_closed_request" ResponseErrorCodeAPIVersionRequired ResponseErrorCode = "api_version_required" ResponseErrorCodeAPIVersionInvalid ResponseErrorCode = "api_version_invalid" ResponseErrorCodeAPIVersionTooOld ResponseErrorCode = "api_version_too_old" )
type ResponseErrorType ¶
type ResponseErrorType string
The type of error.
const ( ResponseErrorTypeAPIError ResponseErrorType = "api_error" ResponseErrorTypeIdempotencyError ResponseErrorType = "idempotency_error" ResponseErrorTypeInvalidRequestError ResponseErrorType = "invalid_request_error" )
type Role ¶
type Role struct {
// Role ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the role.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "role".
Object RoleObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Permissions granted by this role, in `{permission}:{action}` format, such as
// `customers:read`.
Permissions []string `json:"permissions" api:"required"`
// The kind of role.
//
// The type gates behavior that individual permissions do not cover, and some
// actions are reserved for a single role type.
//
// - `admin`: full administrative access. Sensitive areas such as API keys,
// billing, and third-party integrations are restricted to admins no matter what
// permissions another role holds.
// - `user`: a custom role tailored to a specific need, with its permissions
// defined explicitly. Roles created through the API always have this type.
// - `scanner`: the role used by shop-floor scanning stations, assigned
// automatically when a scanning-station user is created.
// - `sales_rep`: a role for sales representatives. Order analytics are scoped to
// the rep's own orders.
// - `agent`: a role assigned to an automated agent rather than a person.
//
// Any of "admin", "user", "scanner", "sales_rep", "agent".
Type RoleType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
Permissions respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named set of permissions that can be assigned to users to control what they can access.
func (*Role) UnmarshalJSON ¶
type RoleObject ¶
type RoleObject string
Resource type identifier.
const (
RoleObjectRole RoleObject = "role"
)
type RoleType ¶
type RoleType string
The kind of role.
The type gates behavior that individual permissions do not cover, and some actions are reserved for a single role type.
- `admin`: full administrative access. Sensitive areas such as API keys, billing, and third-party integrations are restricted to admins no matter what permissions another role holds.
- `user`: a custom role tailored to a specific need, with its permissions defined explicitly. Roles created through the API always have this type.
- `scanner`: the role used by shop-floor scanning stations, assigned automatically when a scanning-station user is created.
- `sales_rep`: a role for sales representatives. Order analytics are scoped to the rep's own orders.
- `agent`: a role assigned to an automated agent rather than a person.
type RotateAPIKeyRequestParam ¶
type RotateAPIKeyRequestParam struct {
// When the replacement key should expire.
//
// If omitted, the replacement inherits the expiration of the key being rotated.
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
// When the old key should stop authenticating requests.
//
// If omitted, the old key is revoked immediately. Set a future timestamp — up to
// 30 days out — to keep the old key working during a migration window; a timestamp
// in the past revokes it immediately.
RevokeAt param.Opt[time.Time] `json:"revoke_at,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
Request to rotate an API key.
func (RotateAPIKeyRequestParam) MarshalJSON ¶
func (r RotateAPIKeyRequestParam) MarshalJSON() (data []byte, err error)
func (*RotateAPIKeyRequestParam) UnmarshalJSON ¶
func (r *RotateAPIKeyRequestParam) UnmarshalJSON(data []byte) error
type SaleAccountGroupDeleteResponse ¶
type SaleAccountGroupDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleAccountGroupDeleteResponse) RawJSON ¶
func (r SaleAccountGroupDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleAccountGroupDeleteResponse) UnmarshalJSON ¶
func (r *SaleAccountGroupDeleteResponse) UnmarshalJSON(data []byte) error
type SaleAccountGroupListParams ¶
type SaleAccountGroupListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filters results to account groups of the given type.
//
// Any of "pricing_group", "type_group".
Type SaleAccountGroupListParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountGroupListParams) URLQuery ¶
func (r SaleAccountGroupListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountGroupListParams's query parameters as `url.Values`.
type SaleAccountGroupListParamsType ¶
type SaleAccountGroupListParamsType string
Filters results to account groups of the given type.
const ( SaleAccountGroupListParamsTypePricingGroup SaleAccountGroupListParamsType = "pricing_group" SaleAccountGroupListParamsTypeTypeGroup SaleAccountGroupListParamsType = "type_group" )
type SaleAccountGroupNewParams ¶
type SaleAccountGroupNewParams struct {
// Request to create an account group.
CreateAccountGroupRequest CreateAccountGroupRequestParam
// contains filtered or unexported fields
}
func (SaleAccountGroupNewParams) MarshalJSON ¶
func (r SaleAccountGroupNewParams) MarshalJSON() (data []byte, err error)
func (*SaleAccountGroupNewParams) UnmarshalJSON ¶
func (r *SaleAccountGroupNewParams) UnmarshalJSON(data []byte) error
type SaleAccountGroupService ¶
type SaleAccountGroupService struct {
// contains filtered or unexported fields
}
List and manage account groups.
SaleAccountGroupService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountGroupService method instead.
func NewSaleAccountGroupService ¶
func NewSaleAccountGroupService(opts ...option.RequestOption) (r SaleAccountGroupService)
NewSaleAccountGroupService 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 (*SaleAccountGroupService) Delete ¶
func (r *SaleAccountGroupService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAccountGroupDeleteResponse, err error)
Deletes an account group.
Deletion fails with a validation error while the group is still in use: a `type_group` that is set as a customer's type cannot be deleted, and no group can be deleted while it grants product line access, backs a volume discount, or is attached to a customer registration flow.
Deleting a `pricing_group` first unassigns it from every customer it was applied to, so those customers immediately stop receiving its pricing.
This endpoint requires the permission: `customer_groups:delete`.
func (*SaleAccountGroupService) Get ¶
func (r *SaleAccountGroupService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountGroup, err error)
Returns an account group by ID.
This endpoint requires the permission: `customer_groups:read`.
func (*SaleAccountGroupService) List ¶
func (r *SaleAccountGroupService) List(ctx context.Context, query SaleAccountGroupListParams, opts ...option.RequestOption) (res *ListAccountGroup, err error)
Returns a paginated list of account groups, newest first.
The `q` search term matches the group's name and description.
This endpoint requires the permission: `customer_groups:read`.
func (*SaleAccountGroupService) New ¶
func (r *SaleAccountGroupService) New(ctx context.Context, body SaleAccountGroupNewParams, opts ...option.RequestOption) (res *AccountGroup, err error)
Creates an account group.
Returns a conflict error if an account group with the same name already exists.
This endpoint requires the permission: `customer_groups:create`.
func (*SaleAccountGroupService) Update ¶
func (r *SaleAccountGroupService) Update(ctx context.Context, id string, body SaleAccountGroupUpdateParams, opts ...option.RequestOption) (res *AccountGroup, err error)
Partially updates an account group.
Only the provided fields are changed. The account group's `type` cannot be changed after creation, and renaming the group to a name another group in your account already uses returns a conflict error.
A new commission or freight policy takes effect for every account already in the group, not just accounts added afterwards.
This endpoint requires the permission: `customer_groups:update`.
type SaleAccountGroupUpdateParams ¶
type SaleAccountGroupUpdateParams struct {
// Request to partially update an account group.
UpdateAccountGroupRequest UpdateAccountGroupRequestParam
// contains filtered or unexported fields
}
func (SaleAccountGroupUpdateParams) MarshalJSON ¶
func (r SaleAccountGroupUpdateParams) MarshalJSON() (data []byte, err error)
func (*SaleAccountGroupUpdateParams) UnmarshalJSON ¶
func (r *SaleAccountGroupUpdateParams) UnmarshalJSON(data []byte) error
type SaleAccountPriceActionExportPriceListParams ¶
type SaleAccountPriceActionExportPriceListParams struct {
// Request to export a customer's price list.
ExportPriceListRequest ExportPriceListRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "created_by", "created_by.role".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountPriceActionExportPriceListParams) MarshalJSON ¶
func (r SaleAccountPriceActionExportPriceListParams) MarshalJSON() (data []byte, err error)
func (SaleAccountPriceActionExportPriceListParams) URLQuery ¶
func (r SaleAccountPriceActionExportPriceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountPriceActionExportPriceListParams's query parameters as `url.Values`.
func (*SaleAccountPriceActionExportPriceListParams) UnmarshalJSON ¶
func (r *SaleAccountPriceActionExportPriceListParams) UnmarshalJSON(data []byte) error
type SaleAccountPriceActionService ¶
type SaleAccountPriceActionService struct {
// contains filtered or unexported fields
}
List and manage account prices.
SaleAccountPriceActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountPriceActionService method instead.
func NewSaleAccountPriceActionService ¶
func NewSaleAccountPriceActionService(opts ...option.RequestOption) (r SaleAccountPriceActionService)
NewSaleAccountPriceActionService 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 (*SaleAccountPriceActionService) ExportPriceList ¶
func (r *SaleAccountPriceActionService) ExportPriceList(ctx context.Context, params SaleAccountPriceActionExportPriceListParams, opts ...option.RequestOption) (res *Job, err error)
Starts a customer's price list and returns the job that tracks it.
The document covers every product the customer may order, grouped by product line and then by the SKUs that share a price, with the attributes that vary shown as columns. Prices are calculated by the same engine that prices a sales order, so they include the customer's contracted prices and any volume discount they qualify for; a volume break becomes its own price column only where it actually changes a price.
Pricing a whole catalog takes too long to hold a request open for, so the PDF is rendered in the background. Poll the returned job and download the file it names once it completes.
This endpoint requires the permission: `discounts:read`.
type SaleAccountPriceDeleteResponse ¶
type SaleAccountPriceDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleAccountPriceDeleteResponse) RawJSON ¶
func (r SaleAccountPriceDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleAccountPriceDeleteResponse) UnmarshalJSON ¶
func (r *SaleAccountPriceDeleteResponse) UnmarshalJSON(data []byte) error
type SaleAccountPriceGetParams ¶
type SaleAccountPriceGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "recipient_account", "product_line", "categories", "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountPriceGetParams) URLQuery ¶
func (r SaleAccountPriceGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountPriceGetParams's query parameters as `url.Values`.
type SaleAccountPriceListParams ¶
type SaleAccountPriceListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filters results to prices whose recipient is this customer account.
//
// A child account also matches the prices recorded against its parent, since those
// price its orders too.
RecipientAccountID param.Opt[string] `query:"recipient_account_id,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "recipient_account", "product_line", "categories", "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountPriceListParams) URLQuery ¶
func (r SaleAccountPriceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountPriceListParams's query parameters as `url.Values`.
type SaleAccountPriceNewParams ¶
type SaleAccountPriceNewParams struct {
// Request to create an account price.
CreateAccountPriceRequest CreateAccountPriceRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "recipient_account", "product_line", "categories", "attributes".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountPriceNewParams) MarshalJSON ¶
func (r SaleAccountPriceNewParams) MarshalJSON() (data []byte, err error)
func (SaleAccountPriceNewParams) URLQuery ¶
func (r SaleAccountPriceNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountPriceNewParams's query parameters as `url.Values`.
func (*SaleAccountPriceNewParams) UnmarshalJSON ¶
func (r *SaleAccountPriceNewParams) UnmarshalJSON(data []byte) error
type SaleAccountPriceService ¶
type SaleAccountPriceService struct {
// List and manage account prices.
Actions SaleAccountPriceActionService
// contains filtered or unexported fields
}
List and manage account prices.
SaleAccountPriceService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountPriceService method instead.
func NewSaleAccountPriceService ¶
func NewSaleAccountPriceService(opts ...option.RequestOption) (r SaleAccountPriceService)
NewSaleAccountPriceService 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 (*SaleAccountPriceService) Delete ¶
func (r *SaleAccountPriceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAccountPriceDeleteResponse, err error)
Deletes an account price.
The price's category and attribute associations and its rate record are removed with it. Deletion is permanent; further requests against the deleted ID return an error.
Order lines that have already been priced keep the unit price they were given; only lines priced after the deletion revert to standard pricing.
This endpoint requires the permission: `discounts:delete`.
func (*SaleAccountPriceService) Get ¶
func (r *SaleAccountPriceService) Get(ctx context.Context, id string, query SaleAccountPriceGetParams, opts ...option.RequestOption) (res *AccountPrice, err error)
Returns an account price by ID.
A customer portal user can only retrieve a price whose recipient is their own account or its parent; any other price is reported as not found.
This endpoint requires the permissions: `discounts:read`, `customers:read`, `suppliers:read`.
func (*SaleAccountPriceService) List ¶
func (r *SaleAccountPriceService) List(ctx context.Context, query SaleAccountPriceListParams, opts ...option.RequestOption) (res *ListAccountPrice, err error)
Returns a paginated list of account prices, newest first.
The search term matches the recipient customer's name or their customer number. Customer portal users always see only the prices that apply to their own account, whatever `recipient_account_id` is set to.
This endpoint requires the permissions: `discounts:read`, `customers:read`, `suppliers:read`.
func (*SaleAccountPriceService) New ¶
func (r *SaleAccountPriceService) New(ctx context.Context, params SaleAccountPriceNewParams, opts ...option.RequestOption) (res *AccountPrice, err error)
Creates a customer-specific price for a product line.
When a sales order line for the recipient matches the price's product line and attributes, this price replaces the unit price the line would otherwise be given, including the effect of any volume discount. If more than one account price matches a line, the most recently created one wins.
This endpoint requires the permission: `discounts:create`.
func (*SaleAccountPriceService) Update ¶
func (r *SaleAccountPriceService) Update(ctx context.Context, id string, params SaleAccountPriceUpdateParams, opts ...option.RequestOption) (res *AccountPrice, err error)
Partially updates an account price.
Only the provided fields are changed. If `category_ids` or `attribute_ids` are provided, they replace the existing set entirely.
Order lines that have already been priced keep the unit price they were given; the new price applies to lines priced after the change.
This endpoint requires the permission: `discounts:update`.
type SaleAccountPriceUpdateParams ¶
type SaleAccountPriceUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "recipient_account", "product_line", "categories", "attributes".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update an account price.
UpdateAccountPriceRequest UpdateAccountPriceRequestParam
// contains filtered or unexported fields
}
func (SaleAccountPriceUpdateParams) MarshalJSON ¶
func (r SaleAccountPriceUpdateParams) MarshalJSON() (data []byte, err error)
func (SaleAccountPriceUpdateParams) URLQuery ¶
func (r SaleAccountPriceUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountPriceUpdateParams's query parameters as `url.Values`.
func (*SaleAccountPriceUpdateParams) UnmarshalJSON ¶
func (r *SaleAccountPriceUpdateParams) UnmarshalJSON(data []byte) error
type SaleAccountStatusGetParams ¶
type SaleAccountStatusGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountStatusGetParams) URLQuery ¶
func (r SaleAccountStatusGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountStatusGetParams's query parameters as `url.Values`.
type SaleAccountStatusListParams ¶
type SaleAccountStatusListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountStatusListParams) URLQuery ¶
func (r SaleAccountStatusListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountStatusListParams's query parameters as `url.Values`.
type SaleAccountStatusService ¶
type SaleAccountStatusService struct {
// contains filtered or unexported fields
}
List and retrieve account statuses.
SaleAccountStatusService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountStatusService method instead.
func NewSaleAccountStatusService ¶
func NewSaleAccountStatusService(opts ...option.RequestOption) (r SaleAccountStatusService)
NewSaleAccountStatusService 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 (*SaleAccountStatusService) Get ¶
func (r *SaleAccountStatusService) Get(ctx context.Context, id string, query SaleAccountStatusGetParams, opts ...option.RequestOption) (res *AccountStatus, err error)
Returns a single account status, looked up by either its ID or its code.
func (*SaleAccountStatusService) List ¶
func (r *SaleAccountStatusService) List(ctx context.Context, query SaleAccountStatusListParams, opts ...option.RequestOption) (res *ListAccountStatus, err error)
Returns a paginated list of account statuses.
Account statuses are system-provided lookup values shared across all accounts, used to set a customer's status (for example, placing a customer on a credit hold). The list is fixed — statuses cannot be created, edited, or deleted — so use it to populate a status picker or to resolve a code to its display name.
type SaleAccountUserSalesTargetListParams ¶
type SaleAccountUserSalesTargetListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAccountUserSalesTargetListParams) URLQuery ¶
func (r SaleAccountUserSalesTargetListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAccountUserSalesTargetListParams's query parameters as `url.Values`.
type SaleAccountUserSalesTargetNewParams ¶
type SaleAccountUserSalesTargetNewParams struct {
// Request to create a sales target.
CreateSalesTargetRequest CreateSalesTargetRequestParam
// contains filtered or unexported fields
}
func (SaleAccountUserSalesTargetNewParams) MarshalJSON ¶
func (r SaleAccountUserSalesTargetNewParams) MarshalJSON() (data []byte, err error)
func (*SaleAccountUserSalesTargetNewParams) UnmarshalJSON ¶
func (r *SaleAccountUserSalesTargetNewParams) UnmarshalJSON(data []byte) error
type SaleAccountUserSalesTargetService ¶
type SaleAccountUserSalesTargetService struct {
// contains filtered or unexported fields
}
List and manage sales targets for account users.
SaleAccountUserSalesTargetService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountUserSalesTargetService method instead.
func NewSaleAccountUserSalesTargetService ¶
func NewSaleAccountUserSalesTargetService(opts ...option.RequestOption) (r SaleAccountUserSalesTargetService)
NewSaleAccountUserSalesTargetService 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 (*SaleAccountUserSalesTargetService) List ¶
func (r *SaleAccountUserSalesTargetService) List(ctx context.Context, id string, query SaleAccountUserSalesTargetListParams, opts ...option.RequestOption) (res *ListSalesTarget, err error)
Returns the revenue goals set for one sales rep, most recent period first.
This endpoint does not support cursor pagination; passing a `cursor` returns a validation error, and the response carries no page cursors. Requesting targets for someone who is not an active account user in your account returns a not-found error.
Pass `q` to narrow the list to targets whose ID or goal amount contains the search text.
This endpoint requires the permission: `sales_targets:read`.
func (*SaleAccountUserSalesTargetService) New ¶
func (r *SaleAccountUserSalesTargetService) New(ctx context.Context, id string, body SaleAccountUserSalesTargetNewParams, opts ...option.RequestOption) (res *SalesTarget, err error)
Creates a revenue goal for a sales rep covering a given period.
The sales rep must be an active account user in your account, otherwise the request returns a not-found error. Periods are not checked for overlap, so a rep can hold several targets covering the same dates; use the upsert endpoint to change an existing target rather than adding another.
This endpoint requires the permission: `sales_targets:create`.
func (*SaleAccountUserSalesTargetService) Update ¶
func (r *SaleAccountUserSalesTargetService) Update(ctx context.Context, targetID string, params SaleAccountUserSalesTargetUpdateParams, opts ...option.RequestOption) (res *SalesTarget, err error)
Creates or updates a sales rep's revenue goal at an ID you choose.
If no target with the given ID exists, one is created with the supplied dates, amount, and unit. If it already exists, only the amount value is updated — the dates and unit are left unchanged, so raising or lowering a goal mid-period is the intended use. The sales rep must be an active account user in your account, and the target ID must belong to that account, otherwise the request returns a not-found error.
This endpoint requires the permission: `sales_targets:update`.
type SaleAccountUserSalesTargetUpdateParams ¶
type SaleAccountUserSalesTargetUpdateParams struct {
ID string `path:"id" api:"required" json:"-"`
// Request to create or update a sales target.
UpsertSalesTargetRequest UpsertSalesTargetRequestParam
// contains filtered or unexported fields
}
func (SaleAccountUserSalesTargetUpdateParams) MarshalJSON ¶
func (r SaleAccountUserSalesTargetUpdateParams) MarshalJSON() (data []byte, err error)
func (*SaleAccountUserSalesTargetUpdateParams) UnmarshalJSON ¶
func (r *SaleAccountUserSalesTargetUpdateParams) UnmarshalJSON(data []byte) error
type SaleAccountUserService ¶
type SaleAccountUserService struct {
// List and manage sales targets for account users.
SalesTargets SaleAccountUserSalesTargetService
// contains filtered or unexported fields
}
SaleAccountUserService contains methods and other services that help with interacting with the openmrp 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 NewSaleAccountUserService method instead.
func NewSaleAccountUserService ¶
func NewSaleAccountUserService(opts ...option.RequestOption) (r SaleAccountUserService)
NewSaleAccountUserService 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.
type SaleAddressDeleteResponse ¶
type SaleAddressDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleAddressDeleteResponse) RawJSON ¶
func (r SaleAddressDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleAddressDeleteResponse) UnmarshalJSON ¶
func (r *SaleAddressDeleteResponse) UnmarshalJSON(data []byte) error
type SaleAddressListParams ¶
type SaleAddressListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filters results to addresses of the given type.
//
// Any of "standard", "drop_ship".
Type SaleAddressListParamsType `query:"type,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleAddressListParams) URLQuery ¶
func (r SaleAddressListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleAddressListParams's query parameters as `url.Values`.
type SaleAddressListParamsType ¶
type SaleAddressListParamsType string
Filters results to addresses of the given type.
const ( SaleAddressListParamsTypeStandard SaleAddressListParamsType = "standard" SaleAddressListParamsTypeDropShip SaleAddressListParamsType = "drop_ship" )
type SaleAddressNewParams ¶
type SaleAddressNewParams struct {
// Address details supplied when creating an address, either on its own or inline
// on another resource.
//
// A few requests, such as shipping rate estimates, take these same fields for a
// one-off address that is never saved to the account.
AddressInput AddressInputParam
// contains filtered or unexported fields
}
func (SaleAddressNewParams) MarshalJSON ¶
func (r SaleAddressNewParams) MarshalJSON() (data []byte, err error)
func (*SaleAddressNewParams) UnmarshalJSON ¶
func (r *SaleAddressNewParams) UnmarshalJSON(data []byte) error
type SaleAddressService ¶
type SaleAddressService struct {
// contains filtered or unexported fields
}
List and manage addresses for accounts.
SaleAddressService contains methods and other services that help with interacting with the openmrp 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 NewSaleAddressService method instead.
func NewSaleAddressService ¶
func NewSaleAddressService(opts ...option.RequestOption) (r SaleAddressService)
NewSaleAddressService 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 (*SaleAddressService) Delete ¶
func (r *SaleAddressService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleAddressDeleteResponse, err error)
Deletes an address.
Deletion fails if the address is in use as a billing or shipping address on a sales order, invoice, or shipment, or as a default account address.
This endpoint requires the permissions: `addresses:delete`, `customers:update`, `suppliers:update`.
func (*SaleAddressService) Get ¶
func (r *SaleAddressService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *Address, err error)
Retrieves an address by ID.
This endpoint requires the permissions: `addresses:read`, `customers:read`, `suppliers:read`.
func (*SaleAddressService) List ¶
func (r *SaleAddressService) List(ctx context.Context, query SaleAddressListParams, opts ...option.RequestOption) (res *ListAddress, err error)
Returns a paginated list of addresses.
Addresses belonging to the account you are acting in are returned newest first. The `q` search term matches the address name, street lines, city, state, postal code, and country.
This endpoint requires the permissions: `addresses:read`, `customers:read`, `suppliers:read`.
func (*SaleAddressService) New ¶
func (r *SaleAddressService) New(ctx context.Context, body SaleAddressNewParams, opts ...option.RequestOption) (res *Address, err error)
Creates an address.
The address is saved to the account you are acting in, which may be your own account or a customer or supplier account you manage, and can then be used as a billing or shipping address on sales orders, invoices, and shipments.
This endpoint requires the permissions: `addresses:create`, `customers:update`, `suppliers:update`.
func (*SaleAddressService) Update ¶
func (r *SaleAddressService) Update(ctx context.Context, id string, body SaleAddressUpdateParams, opts ...option.RequestOption) (res *Address, err error)
Partially updates an address.
Changing a street, locality, state, postal code, or country field may replace the address's geolocation, so the geolocation `id` in the response can change.
This endpoint requires the permissions: `addresses:update`, `customers:update`, `suppliers:update`.
type SaleAddressUpdateParams ¶
type SaleAddressUpdateParams struct {
// Request to partially update an address.
//
// Omitted fields are left unchanged.
UpdateAddressRequest UpdateAddressRequestParam
// contains filtered or unexported fields
}
func (SaleAddressUpdateParams) MarshalJSON ¶
func (r SaleAddressUpdateParams) MarshalJSON() (data []byte, err error)
func (*SaleAddressUpdateParams) UnmarshalJSON ¶
func (r *SaleAddressUpdateParams) UnmarshalJSON(data []byte) error
type SaleContactActionFindByEmailParams ¶
type SaleContactActionFindByEmailParams struct {
// Request to find contacts by email.
FindContactByEmailRequest FindContactByEmailRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account_user", "account_user.user", "account_user.role",
// "account_user.department", "account".
Include []string `query:"include,omitzero" json:"-"`
// Restricts the results to matches whose relationship to your account is one of
// these.
//
// Leaving it out returns matches of every relationship.
//
// Any of "customer", "supplier", "self".
Relationships []string `query:"relationships,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleContactActionFindByEmailParams) MarshalJSON ¶
func (r SaleContactActionFindByEmailParams) MarshalJSON() (data []byte, err error)
func (SaleContactActionFindByEmailParams) URLQuery ¶
func (r SaleContactActionFindByEmailParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleContactActionFindByEmailParams's query parameters as `url.Values`.
func (*SaleContactActionFindByEmailParams) UnmarshalJSON ¶
func (r *SaleContactActionFindByEmailParams) UnmarshalJSON(data []byte) error
type SaleContactActionService ¶
type SaleContactActionService struct {
// contains filtered or unexported fields
}
Look up the people you do business with.
SaleContactActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleContactActionService method instead.
func NewSaleContactActionService ¶
func NewSaleContactActionService(opts ...option.RequestOption) (r SaleContactActionService)
NewSaleContactActionService 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 (*SaleContactActionService) FindByEmail ¶
func (r *SaleContactActionService) FindByEmail(ctx context.Context, params SaleContactActionFindByEmailParams, opts ...option.RequestOption) (res *ListContactMatch, err error)
Finds the contacts that match an email address.
Only active people on accounts you have a relationship with are returned — your customers, your suppliers, or your own account. A match's `relationship` says how you relate to the account it belongs to. The same person can be set up on several accounts under one email, so this can return more than one match, and an email that belongs to no one you deal with simply returns no matches rather than an error.
This endpoint requires the permission: `customers:read`.
type SaleContactService ¶
type SaleContactService struct {
// Look up the people you do business with.
Actions SaleContactActionService
// contains filtered or unexported fields
}
SaleContactService contains methods and other services that help with interacting with the openmrp 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 NewSaleContactService method instead.
func NewSaleContactService ¶
func NewSaleContactService(opts ...option.RequestOption) (r SaleContactService)
NewSaleContactService 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.
type SaleCustomerActionMergeParams ¶
type SaleCustomerActionMergeParams struct {
// Request to merge source customers into a target customer.
MergeCustomersRequest MergeCustomersRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
// "freight_preferences.carrier", "freight_preferences.carrier.service_levels",
// "freight_preferences.service_level", "defaults.payment_term",
// "defaults.shipping_term", "defaults.sales_rep", "defaults.sales_rep.user",
// "defaults.priority", "contact_info", "freight_preferences", "defaults",
// "notification_preferences", "price_groups", "child_accounts", "credit_limit",
// "credit_limit.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleCustomerActionMergeParams) MarshalJSON ¶
func (r SaleCustomerActionMergeParams) MarshalJSON() (data []byte, err error)
func (SaleCustomerActionMergeParams) URLQuery ¶
func (r SaleCustomerActionMergeParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerActionMergeParams's query parameters as `url.Values`.
func (*SaleCustomerActionMergeParams) UnmarshalJSON ¶
func (r *SaleCustomerActionMergeParams) UnmarshalJSON(data []byte) error
type SaleCustomerActionService ¶
type SaleCustomerActionService struct {
// contains filtered or unexported fields
}
Manage customer accounts.
SaleCustomerActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleCustomerActionService method instead.
func NewSaleCustomerActionService ¶
func NewSaleCustomerActionService(opts ...option.RequestOption) (r SaleCustomerActionService)
NewSaleCustomerActionService 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 (*SaleCustomerActionService) Merge ¶
func (r *SaleCustomerActionService) Merge(ctx context.Context, id string, params SaleCustomerActionMergeParams, opts ...option.RequestOption) (res *Customer, err error)
Merges one or more source customers into a target customer.
Sales orders, invoices, shipments, deliveries, and other transaction records from the source customers are reassigned to the target; price groups, product line access, addresses, and users are consolidated without duplicates; child accounts of the sources are re-parented to the target; the source customers are then deleted.
The target keeps its own name, number, default addresses, and default settings — none of those are copied over from the sources, and the sources' notification recipients are discarded rather than transferred.
This endpoint requires the permissions: `customers:update`, `customers:delete`.
type SaleCustomerDeleteResponse ¶
type SaleCustomerDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleCustomerDeleteResponse) RawJSON ¶
func (r SaleCustomerDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleCustomerDeleteResponse) UnmarshalJSON ¶
func (r *SaleCustomerDeleteResponse) UnmarshalJSON(data []byte) error
type SaleCustomerGetLeadTimeParams ¶
type SaleCustomerGetLeadTimeParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "account_group", "parent_customer".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleCustomerGetLeadTimeParams) URLQuery ¶
func (r SaleCustomerGetLeadTimeParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerGetLeadTimeParams's query parameters as `url.Values`.
type SaleCustomerGetParams ¶
type SaleCustomerGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
// "freight_preferences.carrier", "freight_preferences.carrier.service_levels",
// "freight_preferences.service_level", "defaults.payment_term",
// "defaults.shipping_term", "defaults.sales_rep", "defaults.sales_rep.user",
// "defaults.priority", "contact_info", "freight_preferences", "defaults",
// "notification_preferences", "price_groups", "child_accounts", "credit_limit",
// "credit_limit.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleCustomerGetParams) URLQuery ¶
func (r SaleCustomerGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerGetParams's query parameters as `url.Values`.
type SaleCustomerListParams ¶
type SaleCustomerListParams struct {
// Filter to customers with any address in this city (exact match).
//
// When combined with `state` or `postal_code`, a single address must match all
// provided values.
City param.Opt[string] `query:"city,omitzero" json:"-"`
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Filter to customers created at or before this timestamp (inclusive).
EndsAt param.Opt[time.Time] `query:"ends_at,omitzero" format:"date-time" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter to customers with any address in this postal code (exact match).
PostalCode param.Opt[string] `query:"postal_code,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Filter to customers created at or after this timestamp (inclusive).
StartsAt param.Opt[time.Time] `query:"starts_at,omitzero" format:"date-time" json:"-"`
// Filter to customers with any address in this state (exact match).
State param.Opt[string] `query:"state,omitzero" json:"-"`
// Filter by default carrier IDs.
CarrierIDs []string `query:"carrier_ids,omitzero" json:"-"`
// Filter by the commission policy set on the customer itself.
//
// Policies inherited from the customer's type group or price groups are not
// considered here.
//
// Any of "commission_applied", "commission_exempt".
CommissionStatusCodes []string `query:"commission_status_codes,omitzero" json:"-"`
// Filter by customer type group IDs (the account group of type `type_group`
// returned in the customer's `type` field).
CustomerGroupIDs []string `query:"customer_group_ids,omitzero" json:"-"`
// Filter by the freight policy set on the customer itself.
//
// Policies inherited from the customer's type group or price groups are not
// considered here.
//
// Any of "free_freight", "billed_freight".
FreightStatusCodes []string `query:"freight_status_codes,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
// "freight_preferences.carrier", "freight_preferences.carrier.service_levels",
// "freight_preferences.service_level", "defaults.payment_term",
// "defaults.shipping_term", "defaults.sales_rep", "defaults.sales_rep.user",
// "defaults.priority", "contact_info", "freight_preferences", "defaults",
// "notification_preferences", "price_groups", "child_accounts", "credit_limit",
// "credit_limit.unit".
Include []string `query:"include,omitzero" json:"-"`
// Filter by whether the customer has child accounts.
//
// Any of "parent", "non_parent".
ParentAccountStatus SaleCustomerListParamsParentAccountStatus `query:"parent_account_status,omitzero" json:"-"`
// Filter by default payment term IDs.
PaymentTermIDs []string `query:"payment_term_ids,omitzero" json:"-"`
// Filter to customers that belong to any of these pricing groups.
PricingGroupIDs []string `query:"pricing_group_ids,omitzero" json:"-"`
// Filter to customers whose default sales rep is one of these account users.
SalesRepIDs []string `query:"sales_rep_ids,omitzero" json:"-"`
// Filter by default service level IDs.
ServiceLevelIDs []string `query:"service_level_ids,omitzero" json:"-"`
// Filter by default shipping term IDs.
ShippingTermIDs []string `query:"shipping_term_ids,omitzero" json:"-"`
// Filter by the customer's account standing.
//
// Any of "normal", "preferred", "hold_shipment", "hold_all".
StatusCodes []string `query:"status_codes,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleCustomerListParams) URLQuery ¶
func (r SaleCustomerListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerListParams's query parameters as `url.Values`.
type SaleCustomerListParamsParentAccountStatus ¶
type SaleCustomerListParamsParentAccountStatus string
Filter by whether the customer has child accounts.
const ( SaleCustomerListParamsParentAccountStatusParent SaleCustomerListParamsParentAccountStatus = "parent" SaleCustomerListParamsParentAccountStatusNonParent SaleCustomerListParamsParentAccountStatus = "non_parent" )
type SaleCustomerNewParams ¶
type SaleCustomerNewParams struct {
// Request to create a customer.
CreateCustomerRequest CreateCustomerRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
// "freight_preferences.carrier", "freight_preferences.carrier.service_levels",
// "freight_preferences.service_level", "defaults.payment_term",
// "defaults.shipping_term", "defaults.sales_rep", "defaults.sales_rep.user",
// "defaults.priority", "contact_info", "freight_preferences", "defaults",
// "notification_preferences", "price_groups", "child_accounts", "credit_limit",
// "credit_limit.unit".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleCustomerNewParams) MarshalJSON ¶
func (r SaleCustomerNewParams) MarshalJSON() (data []byte, err error)
func (SaleCustomerNewParams) URLQuery ¶
func (r SaleCustomerNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerNewParams's query parameters as `url.Values`.
func (*SaleCustomerNewParams) UnmarshalJSON ¶
func (r *SaleCustomerNewParams) UnmarshalJSON(data []byte) error
type SaleCustomerService ¶
type SaleCustomerService struct {
// Manage customer accounts.
Actions SaleCustomerActionService
// contains filtered or unexported fields
}
Manage customer accounts.
SaleCustomerService contains methods and other services that help with interacting with the openmrp 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 NewSaleCustomerService method instead.
func NewSaleCustomerService ¶
func NewSaleCustomerService(opts ...option.RequestOption) (r SaleCustomerService)
NewSaleCustomerService 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 (*SaleCustomerService) Delete ¶
func (r *SaleCustomerService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleCustomerDeleteResponse, err error)
Deletes a customer.
Fails with a conflict error if any sales orders still reference the customer; delete or reassign those orders, or merge the customer into another first.
This endpoint requires the permission: `customers:delete`.
func (*SaleCustomerService) Get ¶
func (r *SaleCustomerService) Get(ctx context.Context, id string, query SaleCustomerGetParams, opts ...option.RequestOption) (res *Customer, err error)
Returns a customer by ID.
This endpoint requires the permissions: `customers:read`, `suppliers:read`.
func (*SaleCustomerService) GetLeadTime ¶
func (r *SaleCustomerService) GetLeadTime(ctx context.Context, id string, query SaleCustomerGetLeadTimeParams, opts ...option.RequestOption) (res *CustomerLeadTime, err error)
Returns the ship-by lead time a new order for this customer would be committed to.
Resolved through the same chain the issue path stamps onto an order, most specific first: a lead time set on the customer, then on its parent account, then on the customer's account group, then the account-wide default. `source` names which rule applied, so a form can show where the number came from rather than leaving a rep to guess.
A lead time set on a parent account therefore governs every child account under it that has not set its own, which is how a head office's terms are given to its locations without repeating them on each one.
This is a preview of a commitment, not the commitment itself. An order takes its own `ship_by_date` when it is issued and keeps it afterwards, so changing a lead time here moves what future orders will promise and leaves promises already made alone.
This endpoint requires the permission: `customers:read`.
func (*SaleCustomerService) List ¶
func (r *SaleCustomerService) List(ctx context.Context, query SaleCustomerListParams, opts ...option.RequestOption) (res *ListCustomer, err error)
Returns a paginated list of customers for the current account.
This endpoint requires the permission: `customers:read`.
func (*SaleCustomerService) New ¶
func (r *SaleCustomerService) New(ctx context.Context, params SaleCustomerNewParams, opts ...option.RequestOption) (res *Customer, err error)
Creates a customer account with its default addresses, fulfillment settings, and order policies.
If `number` is omitted, the next sequential customer number is assigned automatically.
This endpoint requires the permission: `customers:create`.
func (*SaleCustomerService) Update ¶
func (r *SaleCustomerService) Update(ctx context.Context, id string, params SaleCustomerUpdateParams, opts ...option.RequestOption) (res *Customer, err error)
Partially updates a customer account.
Only the fields provided in the request are changed. Nullable fields can be set to `null` to clear their current value.
This endpoint requires the permission: `customers:update`.
type SaleCustomerUpdateParams ¶
type SaleCustomerUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "bill_to_address", "ship_to_address", "type", "parent_account",
// "freight_preferences.carrier", "freight_preferences.carrier.service_levels",
// "freight_preferences.service_level", "defaults.payment_term",
// "defaults.shipping_term", "defaults.sales_rep", "defaults.sales_rep.user",
// "defaults.priority", "contact_info", "freight_preferences", "defaults",
// "notification_preferences", "price_groups", "child_accounts", "credit_limit",
// "credit_limit.unit".
Include []string `query:"include,omitzero" json:"-"`
// Request to partially update a customer.
UpdateCustomerRequest UpdateCustomerRequestParam
// contains filtered or unexported fields
}
func (SaleCustomerUpdateParams) MarshalJSON ¶
func (r SaleCustomerUpdateParams) MarshalJSON() (data []byte, err error)
func (SaleCustomerUpdateParams) URLQuery ¶
func (r SaleCustomerUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleCustomerUpdateParams's query parameters as `url.Values`.
func (*SaleCustomerUpdateParams) UnmarshalJSON ¶
func (r *SaleCustomerUpdateParams) UnmarshalJSON(data []byte) error
type SaleOrderDiscountActionFindByCodeParams ¶
type SaleOrderDiscountActionFindByCodeParams struct {
// Request to find an order discount by code.
FindOrderDiscountByCodeRequest FindOrderDiscountByCodeRequestParam
// contains filtered or unexported fields
}
func (SaleOrderDiscountActionFindByCodeParams) MarshalJSON ¶
func (r SaleOrderDiscountActionFindByCodeParams) MarshalJSON() (data []byte, err error)
func (*SaleOrderDiscountActionFindByCodeParams) UnmarshalJSON ¶
func (r *SaleOrderDiscountActionFindByCodeParams) UnmarshalJSON(data []byte) error
type SaleOrderDiscountActionService ¶
type SaleOrderDiscountActionService struct {
// contains filtered or unexported fields
}
List and manage order discounts.
SaleOrderDiscountActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleOrderDiscountActionService method instead.
func NewSaleOrderDiscountActionService ¶
func NewSaleOrderDiscountActionService(opts ...option.RequestOption) (r SaleOrderDiscountActionService)
NewSaleOrderDiscountActionService 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 (*SaleOrderDiscountActionService) FindByCode ¶
func (r *SaleOrderDiscountActionService) FindByCode(ctx context.Context, body SaleOrderDiscountActionFindByCodeParams, opts ...option.RequestOption) (res *OrderDiscount, err error)
Validates a discount code and returns the matching order discount, so a code a buyer typed can be attached to an order.
When `buyer_account_id` is provided, or the caller is a customer user, the lookup also verifies that the buyer has not already redeemed the discount on another order, and reports an already-redeemed code as not found. Pass `sales_order_id` to exclude an order the buyer is currently editing from that check.
This endpoint requires the permission: `discounts:read`.
type SaleOrderDiscountListParams ¶
type SaleOrderDiscountListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleOrderDiscountListParams) URLQuery ¶
func (r SaleOrderDiscountListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleOrderDiscountListParams's query parameters as `url.Values`.
type SaleOrderDiscountNewParams ¶
type SaleOrderDiscountNewParams struct {
// Request to create an order discount.
CreateOrderDiscountRequest CreateOrderDiscountRequestParam
// contains filtered or unexported fields
}
func (SaleOrderDiscountNewParams) MarshalJSON ¶
func (r SaleOrderDiscountNewParams) MarshalJSON() (data []byte, err error)
func (*SaleOrderDiscountNewParams) UnmarshalJSON ¶
func (r *SaleOrderDiscountNewParams) UnmarshalJSON(data []byte) error
type SaleOrderDiscountService ¶
type SaleOrderDiscountService struct {
// List and manage order discounts.
Actions SaleOrderDiscountActionService
// contains filtered or unexported fields
}
List and manage order discounts.
SaleOrderDiscountService contains methods and other services that help with interacting with the openmrp 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 NewSaleOrderDiscountService method instead.
func NewSaleOrderDiscountService ¶
func NewSaleOrderDiscountService(opts ...option.RequestOption) (r SaleOrderDiscountService)
NewSaleOrderDiscountService 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 (*SaleOrderDiscountService) Delete ¶
func (r *SaleOrderDiscountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderDiscount, err error)
Deletes an order discount and returns it as it was just before deletion.
Deletion is permanent; further requests against the deleted ID return an error.
The code can no longer be redeemed, but sales orders that already used the discount keep the reduction that was applied to them; their totals are not recalculated.
This endpoint requires the permission: `discounts:delete`.
func (*SaleOrderDiscountService) Get ¶
func (r *SaleOrderDiscountService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OrderDiscount, err error)
Returns an order discount by ID.
This endpoint requires the permission: `discounts:read`.
func (*SaleOrderDiscountService) List ¶
func (r *SaleOrderDiscountService) List(ctx context.Context, query SaleOrderDiscountListParams, opts ...option.RequestOption) (res *ListOrderDiscount, err error)
Returns a paginated list of the order discounts defined for the current account, newest first.
Pass `q` to narrow the list to discounts whose name or code contains the search text.
This endpoint requires the permissions: `discounts:read`, `customers:read`, `suppliers:read`.
func (*SaleOrderDiscountService) New ¶
func (r *SaleOrderDiscountService) New(ctx context.Context, body SaleOrderDiscountNewParams, opts ...option.RequestOption) (res *OrderDiscount, err error)
Creates an order discount that buyers can then redeem on a sales order by its code.
The code must be unique within your account; reusing a code that another discount already holds returns a conflict error. Creating the discount does not apply it to anything — a discount only affects an order once that order references it.
This endpoint requires the permission: `discounts:create`.
func (*SaleOrderDiscountService) Update ¶
func (r *SaleOrderDiscountService) Update(ctx context.Context, id string, body SaleOrderDiscountUpdateParams, opts ...option.RequestOption) (res *OrderDiscount, err error)
Partially updates an order discount.
Only the fields you send are changed; the rest keep their current values. Changing `code` to one another discount already holds returns a conflict error. Edits apply to future orders only — orders that already used this discount keep the reduction they were given.
This endpoint requires the permission: `discounts:update`.
type SaleOrderDiscountUpdateParams ¶
type SaleOrderDiscountUpdateParams struct {
// Request to partially update an order discount.
UpdateOrderDiscountRequest UpdateOrderDiscountRequestParam
// contains filtered or unexported fields
}
func (SaleOrderDiscountUpdateParams) MarshalJSON ¶
func (r SaleOrderDiscountUpdateParams) MarshalJSON() (data []byte, err error)
func (*SaleOrderDiscountUpdateParams) UnmarshalJSON ¶
func (r *SaleOrderDiscountUpdateParams) UnmarshalJSON(data []byte) error
type SalePriorityGetParams ¶
type SalePriorityGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SalePriorityGetParams) URLQuery ¶
func (r SalePriorityGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SalePriorityGetParams's query parameters as `url.Values`.
type SalePriorityListParams ¶
type SalePriorityListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SalePriorityListParams) URLQuery ¶
func (r SalePriorityListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SalePriorityListParams's query parameters as `url.Values`.
type SalePriorityService ¶
type SalePriorityService struct {
// contains filtered or unexported fields
}
List and retrieve priorities.
SalePriorityService contains methods and other services that help with interacting with the openmrp 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 NewSalePriorityService method instead.
func NewSalePriorityService ¶
func NewSalePriorityService(opts ...option.RequestOption) (r SalePriorityService)
NewSalePriorityService 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 (*SalePriorityService) Get ¶
func (r *SalePriorityService) Get(ctx context.Context, id string, query SalePriorityGetParams, opts ...option.RequestOption) (res *Priority, err error)
Retrieves a single priority level by ID or by code.
Looking one up by code is usually more convenient, because other resources refer to a priority by code rather than by ID.
This endpoint requires the permission: `priorities:read`.
func (*SalePriorityService) List ¶
func (r *SalePriorityService) List(ctx context.Context, query SalePriorityListParams, opts ...option.RequestOption) (res *ListPriority, err error)
Lists the priority levels that can be set on a sales order or purchase order.
The levels are platform-provided and the same for every account, so the result is small and stable enough to cache. Results are ordered newest first rather than by urgency.
This endpoint requires the permission: `priorities:read`.
type SaleSalesOrderActionBulkDeleteParams ¶
type SaleSalesOrderActionBulkDeleteParams struct {
// Request to bulk delete sales orders.
BulkDeleteSalesOrdersRequest BulkDeleteSalesOrdersRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderActionBulkDeleteParams) MarshalJSON ¶
func (r SaleSalesOrderActionBulkDeleteParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderActionBulkDeleteParams) UnmarshalJSON ¶
func (r *SaleSalesOrderActionBulkDeleteParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderActionBulkDeleteResponse ¶
type SaleSalesOrderActionBulkDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleSalesOrderActionBulkDeleteResponse) RawJSON ¶
func (r SaleSalesOrderActionBulkDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleSalesOrderActionBulkDeleteResponse) UnmarshalJSON ¶
func (r *SaleSalesOrderActionBulkDeleteResponse) UnmarshalJSON(data []byte) error
type SaleSalesOrderActionIssueParams ¶
type SaleSalesOrderActionIssueParams struct {
// Request to issue a sales order.
IssueSalesOrderRequest IssueSalesOrderRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderActionIssueParams) MarshalJSON ¶
func (r SaleSalesOrderActionIssueParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderActionIssueParams) UnmarshalJSON ¶
func (r *SaleSalesOrderActionIssueParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderActionNewProductionRunParams ¶
type SaleSalesOrderActionNewProductionRunParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "responsible_user", "responsible_user.user".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderActionNewProductionRunParams) URLQuery ¶
func (r SaleSalesOrderActionNewProductionRunParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderActionNewProductionRunParams's query parameters as `url.Values`.
type SaleSalesOrderActionQuoteCommitmentParams ¶
type SaleSalesOrderActionQuoteCommitmentParams struct {
// Request to preview the ship-by date a set of commitment inputs would produce.
QuoteSalesOrderCommitmentRequest QuoteSalesOrderCommitmentRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderActionQuoteCommitmentParams) MarshalJSON ¶
func (r SaleSalesOrderActionQuoteCommitmentParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderActionQuoteCommitmentParams) UnmarshalJSON ¶
func (r *SaleSalesOrderActionQuoteCommitmentParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderActionService ¶
type SaleSalesOrderActionService struct {
// contains filtered or unexported fields
}
List, view, create, update, and delete sales orders.
SaleSalesOrderActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleSalesOrderActionService method instead.
func NewSaleSalesOrderActionService ¶
func NewSaleSalesOrderActionService(opts ...option.RequestOption) (r SaleSalesOrderActionService)
NewSaleSalesOrderActionService 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 (*SaleSalesOrderActionService) BulkDelete ¶
func (r *SaleSalesOrderActionService) BulkDelete(ctx context.Context, body SaleSalesOrderActionBulkDeleteParams, opts ...option.RequestOption) (res *SaleSalesOrderActionBulkDeleteResponse, err error)
Deletes multiple sales orders in a single atomic operation.
Each order is torn down exactly as it would be by deleting it on its own. Fulfilled orders cannot be deleted; if any requested order fails this check, no orders are deleted.
This endpoint requires the permission: `sales_orders:delete`.
func (*SaleSalesOrderActionService) Close ¶
func (r *SaleSalesOrderActionService) Close(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
Closes a sales order, transitioning it from `issued` to `fulfilled`.
Stamps the order's completion timestamp and closes its pick, packing every pick line that is still open so the pick reads as complete alongside the order. Only an order in `issued` can be closed, and once it is fulfilled it can no longer be deleted, nor can its lines be removed, until it is reopened.
This endpoint requires the permission: `sales_orders:update`.
func (*SaleSalesOrderActionService) Issue ¶
func (r *SaleSalesOrderActionService) Issue(ctx context.Context, id string, body SaleSalesOrderActionIssueParams, opts ...option.RequestOption) (res *SalesOrder, err error)
Issues a sales order, transitioning it from `estimate` to `issued`.
Issuing commits the order for fulfillment: a pick is created for the order's sale lines and inventory is reserved for each line tied to an inventory item. Only an order still in `estimate` can be issued.
This endpoint requires the permission: `sales_orders:update`.
func (*SaleSalesOrderActionService) NewProductionRun ¶
func (r *SaleSalesOrderActionService) NewProductionRun(ctx context.Context, id string, body SaleSalesOrderActionNewProductionRunParams, opts ...option.RequestOption) (res *ProductionRun, err error)
Creates a production run from a sales order.
Walks the production flow behind each item-backed line to work out what actually has to be made, then creates one batch for each item that is produced directly from raw materials, sized to cover every line that needs it. Reserves the material inventory those batches consume and links the run to the order. The caller becomes the run's responsible user. An order can have at most one production run, and a line whose item has no production flow contributes no batches.
This endpoint requires the permission: `production_runs:create`.
func (*SaleSalesOrderActionService) Open ¶
func (r *SaleSalesOrderActionService) Open(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
Reopens a sales order, transitioning it from `fulfilled` back to `issued`.
Clears the order's completion timestamp and reopens its pick, unpacking every pick line that is not yet fully picked so the outstanding work can be resumed; lines already picked in full stay packed. Only an order in `fulfilled` can be reopened.
This endpoint requires the permission: `sales_orders:update`.
func (*SaleSalesOrderActionService) QuoteCommitment ¶
func (r *SaleSalesOrderActionService) QuoteCommitment(ctx context.Context, body SaleSalesOrderActionQuoteCommitmentParams, opts ...option.RequestOption) (res *QuoteSalesOrderCommitmentResponse, err error)
Previews the ship-by date a set of commitment inputs would produce, without creating or changing anything.
Runs the same resolution an order runs when it is issued: a promised delivery date has the customer's receiving days, the carrier's transit, and the plant's shipping days worked back through it, while a lead time or a pinned ship date is snapped onto the next earlier day the plant ships. The returned steps are that derivation in order, so a caller can show why a date is what it is rather than restating the rules.
At most one of `promised_at`, `lead_time_override_days`, and `ship_by_override_date` may be set; they are alternative answers to the same question.
Advisory rather than binding. Carrier transit comes from a lane cache warmed in the background, so a lane nobody has shipped yet quotes against the service level's default or against no transit at all, and the date stamped at issue may differ once the lane has been rated.
This endpoint requires the permission: `sales_orders:read`.
func (*SaleSalesOrderActionService) QuoteFreight ¶
func (r *SaleSalesOrderActionService) QuoteFreight(ctx context.Context, id string, opts ...option.RequestOption) (res *QuoteSalesOrderFreightResponse, err error)
Re-estimates the freight (shipping) charge for an order using the latest carrier rates.
Computes what the order's freight charge would be from its current ship-to address, carrier, service level, and line items — applying the same freight-exemption, flat-rate, and live carrier-rate logic used when the order is created. The order is not modified: the returned amount is a quote to review, and callers apply it by updating the order's shipping line. Use this to refresh freight after changing the address or line items, or at any time to re-price against current rates.
This endpoint requires the permission: `sales_orders:read`.
func (*SaleSalesOrderActionService) Unissue ¶
func (r *SaleSalesOrderActionService) Unissue(ctx context.Context, id string, opts ...option.RequestOption) (res *SalesOrder, err error)
Unissues a sales order, transitioning it from `issued` back to `estimate`.
Deletes the order's pick, discarding any picking progress recorded against it, and releases the inventory reserved when the order was issued. Only an order in `issued` can be unissued.
This endpoint requires the permission: `sales_orders:update`.
type SaleSalesOrderCheckoutParams ¶
type SaleSalesOrderCheckoutParams struct {
// Request to create a checkout session for a sales order.
CheckoutSalesOrderRequest CheckoutSalesOrderRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderCheckoutParams) MarshalJSON ¶
func (r SaleSalesOrderCheckoutParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderCheckoutParams) UnmarshalJSON ¶
func (r *SaleSalesOrderCheckoutParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderDeleteResponse ¶
type SaleSalesOrderDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleSalesOrderDeleteResponse) RawJSON ¶
func (r SaleSalesOrderDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleSalesOrderDeleteResponse) UnmarshalJSON ¶
func (r *SaleSalesOrderDeleteResponse) UnmarshalJSON(data []byte) error
type SaleSalesOrderGetParams ¶
type SaleSalesOrderGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "sales_rep", "created_by", "bill_to_address",
// "ship_to_address", "freight", "payment_term", "shipping_term", "order_discount",
// "totals", "contacts", "related.pick", "related.production_run",
// "related.shipments", "related.invoices", "lines", "lines.product",
// "lines.product.item", "lines.product.item.category",
// "lines.product.item.category.properties",
// "lines.product.item.category.unit_group",
// "lines.product.item.category.unit_group.base_unit",
// "lines.product.item.category.unit_group.associated_units",
// "lines.product.item.category.unit_group.associated_units.unit",
// "lines.product.product_line", "lines.quantity_ordered",
// "lines.quantity_ordered.unit", "lines.unit_price",
// "lines.unit_price.numerator_unit", "lines.unit_price.denominator_unit",
// "lines.unit_cost", "lines.unit_cost.numerator_unit",
// "lines.unit_cost.denominator_unit", "lines.totals".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderGetParams) URLQuery ¶
func (r SaleSalesOrderGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderGetParams's query parameters as `url.Values`.
type SaleSalesOrderGetStatusesParams ¶
type SaleSalesOrderGetStatusesParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "owner".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderGetStatusesParams) URLQuery ¶
func (r SaleSalesOrderGetStatusesParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderGetStatusesParams's query parameters as `url.Values`.
type SaleSalesOrderLineActionReorderParams ¶
type SaleSalesOrderLineActionReorderParams struct {
// Request to reorder a sales order's lines.
ReorderSalesOrderLinesRequest ReorderSalesOrderLinesRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderLineActionReorderParams) MarshalJSON ¶
func (r SaleSalesOrderLineActionReorderParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderLineActionReorderParams) UnmarshalJSON ¶
func (r *SaleSalesOrderLineActionReorderParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderLineActionReorderResponse ¶
type SaleSalesOrderLineActionReorderResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleSalesOrderLineActionReorderResponse) RawJSON ¶
func (r SaleSalesOrderLineActionReorderResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleSalesOrderLineActionReorderResponse) UnmarshalJSON ¶
func (r *SaleSalesOrderLineActionReorderResponse) UnmarshalJSON(data []byte) error
type SaleSalesOrderLineActionService ¶
type SaleSalesOrderLineActionService struct {
// contains filtered or unexported fields
}
List, view, create, update, and delete sales orders.
SaleSalesOrderLineActionService contains methods and other services that help with interacting with the openmrp 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 NewSaleSalesOrderLineActionService method instead.
func NewSaleSalesOrderLineActionService ¶
func NewSaleSalesOrderLineActionService(opts ...option.RequestOption) (r SaleSalesOrderLineActionService)
NewSaleSalesOrderLineActionService 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 (*SaleSalesOrderLineActionService) Reorder ¶
func (r *SaleSalesOrderLineActionService) Reorder(ctx context.Context, id string, body SaleSalesOrderLineActionReorderParams, opts ...option.RequestOption) (res *SaleSalesOrderLineActionReorderResponse, err error)
Reorders the product lines on a sales order to match the sequence supplied.
The lines are renumbered from `1` in the given order. Discount and freight lines always stay at the bottom of the list regardless of the sequence given here.
This endpoint requires the permissions: `customers:update`, `suppliers:update`, `sales_orders:update`.
type SaleSalesOrderLineDeleteParams ¶
type SaleSalesOrderLineDeleteParams struct {
ID string `path:"id" api:"required" json:"-"`
// contains filtered or unexported fields
}
type SaleSalesOrderLineDeleteResponse ¶
type SaleSalesOrderLineDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleSalesOrderLineDeleteResponse) RawJSON ¶
func (r SaleSalesOrderLineDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleSalesOrderLineDeleteResponse) UnmarshalJSON ¶
func (r *SaleSalesOrderLineDeleteResponse) UnmarshalJSON(data []byte) error
type SaleSalesOrderLineNewParams ¶
type SaleSalesOrderLineNewParams struct {
// Request to create a line on a sales order.
CreateSalesOrderLineRequest CreateSalesOrderLineRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product", "quantity_ordered", "unit_price", "unit_cost", "totals".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderLineNewParams) MarshalJSON ¶
func (r SaleSalesOrderLineNewParams) MarshalJSON() (data []byte, err error)
func (SaleSalesOrderLineNewParams) URLQuery ¶
func (r SaleSalesOrderLineNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderLineNewParams's query parameters as `url.Values`.
func (*SaleSalesOrderLineNewParams) UnmarshalJSON ¶
func (r *SaleSalesOrderLineNewParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderLineService ¶
type SaleSalesOrderLineService struct {
// List, view, create, update, and delete sales orders.
Actions SaleSalesOrderLineActionService
// contains filtered or unexported fields
}
List, view, create, update, and delete sales orders.
SaleSalesOrderLineService contains methods and other services that help with interacting with the openmrp 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 NewSaleSalesOrderLineService method instead.
func NewSaleSalesOrderLineService ¶
func NewSaleSalesOrderLineService(opts ...option.RequestOption) (r SaleSalesOrderLineService)
NewSaleSalesOrderLineService 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 (*SaleSalesOrderLineService) Delete ¶
func (r *SaleSalesOrderLineService) Delete(ctx context.Context, lineID string, body SaleSalesOrderLineDeleteParams, opts ...option.RequestOption) (res *SaleSalesOrderLineDeleteResponse, err error)
Deletes a sales order line and its pick lines.
A line cannot be removed once it has been packed onto a shipment, or once the order is fulfilled, and removing one from an order that is already completed or has a shipped shipment requires an admin. The remaining lines are renumbered so the sequence stays contiguous, and if this was the last line left to pick, the order's pick is deleted and the order falls back to `estimate` with its reserved inventory released.
This endpoint requires the permissions: `customers:update`, `suppliers:update`, `sales_orders:update`.
func (*SaleSalesOrderLineService) New ¶
func (r *SaleSalesOrderLineService) New(ctx context.Context, id string, params SaleSalesOrderLineNewParams, opts ...option.RequestOption) (res *SalesOrderLine, err error)
Adds a line item to a sales order.
The new line is appended below the existing product lines, keeping the order's freight and discount lines at the bottom. When the order has already been issued, the line is added to its pick as outstanding work and the pick is reopened if it had been finished.
This endpoint requires the permissions: `customers:update`, `suppliers:update`, `sales_orders:update`.
func (*SaleSalesOrderLineService) Update ¶
func (r *SaleSalesOrderLineService) Update(ctx context.Context, lineID string, params SaleSalesOrderLineUpdateParams, opts ...option.RequestOption) (res *SalesOrderLine, err error)
Partially updates a sales order line item.
Changing the quantity flows through to fulfillment: the order's pick is reconciled against what is still outstanding — reopening it when the new quantity leaves work to do, or dropping the surplus pick line and finishing it when everything ordered is already packed. Shipment and invoice lines that still carry the full previously ordered quantity follow the new value, while partial ones keep the amount that actually moved.
This endpoint requires the permissions: `customers:update`, `suppliers:update`, `sales_orders:update`.
type SaleSalesOrderLineUpdateParams ¶
type SaleSalesOrderLineUpdateParams struct {
ID string `path:"id" api:"required" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "product", "quantity_ordered", "unit_price", "unit_cost", "totals".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a sales order line.
UpdateSalesOrderLineRequest UpdateSalesOrderLineRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderLineUpdateParams) MarshalJSON ¶
func (r SaleSalesOrderLineUpdateParams) MarshalJSON() (data []byte, err error)
func (SaleSalesOrderLineUpdateParams) URLQuery ¶
func (r SaleSalesOrderLineUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderLineUpdateParams's query parameters as `url.Values`.
func (*SaleSalesOrderLineUpdateParams) UnmarshalJSON ¶
func (r *SaleSalesOrderLineUpdateParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderListParams ¶
type SaleSalesOrderListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Latest order creation date to include, in `YYYY-MM-DD` format.
//
// Compared against the creation timestamp at the start of that day, so orders
// created later on the end date itself are excluded; pass the following day to
// include them.
EndsAt param.Opt[string] `query:"ends_at,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Restricts results to orders that are, or are not, past their ship-by date.
//
// An order is past due when it is still `issued` and its ship-by date has passed.
// A fulfilled order that shipped late is not past due — it is delivered, and how
// late it was is a delivery-performance question rather than a backlog one.
PastDue param.Opt[bool] `query:"past_due,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Earliest ship-by date to include, in `YYYY-MM-DD` format. Inclusive of the date
// itself.
ShipByAfter param.Opt[string] `query:"ship_by_after,omitzero" json:"-"`
// Latest ship-by date to include, in `YYYY-MM-DD` format. Inclusive of the date
// itself.
ShipByBefore param.Opt[string] `query:"ship_by_before,omitzero" json:"-"`
// Earliest order creation date to include, in `YYYY-MM-DD` format.
StartsAt param.Opt[string] `query:"starts_at,omitzero" json:"-"`
// Restricts results to orders placed by customers belonging to any of these
// account groups.
CustomerGroupIDs []string `query:"customer_group_ids,omitzero" json:"-"`
// Restricts results to orders placed by any of these customers.
CustomerIDs []string `query:"customer_ids,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "sales_rep", "created_by", "bill_to_address",
// "ship_to_address", "freight", "payment_term", "shipping_term", "order_discount",
// "totals", "contacts", "related.pick", "related.production_run",
// "related.shipments", "related.invoices", "lines", "lines.product",
// "lines.product.item", "lines.product.item.category",
// "lines.product.item.category.properties",
// "lines.product.item.category.unit_group",
// "lines.product.item.category.unit_group.base_unit",
// "lines.product.item.category.unit_group.associated_units",
// "lines.product.item.category.unit_group.associated_units.unit",
// "lines.product.product_line", "lines.quantity_ordered",
// "lines.quantity_ordered.unit", "lines.unit_price",
// "lines.unit_price.numerator_unit", "lines.unit_price.denominator_unit",
// "lines.unit_cost", "lines.unit_cost.numerator_unit",
// "lines.unit_cost.denominator_unit", "lines.totals".
Include []string `query:"include,omitzero" json:"-"`
// Restricts results to orders that have at least one line for any of these
// inventory items.
ItemIDs []string `query:"item_ids,omitzero" json:"-"`
// Restricts results to orders that have at least one line whose product belongs to
// any of these product lines.
ProductLineIDs []string `query:"product_line_ids,omitzero" json:"-"`
// Restricts results to orders credited to any of these sales reps.
//
// These are account user IDs, matching the `sales_rep` on the order.
SalesRepIDs []string `query:"sales_rep_ids,omitzero" json:"-"`
// Restricts results to orders in any of these lifecycle statuses.
//
// Any of "estimate", "issued", "fulfilled".
StatusCodes []string `query:"status_codes,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderListParams) URLQuery ¶
func (r SaleSalesOrderListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderListParams's query parameters as `url.Values`.
type SaleSalesOrderNewParams ¶
type SaleSalesOrderNewParams struct {
// Request to create a sales order.
CreateSalesOrderRequest CreateSalesOrderRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "sales_rep", "bill_to_address", "ship_to_address", "freight",
// "payment_term", "shipping_term", "order_discount", "totals", "contacts",
// "related.pick", "related.production_run", "related.shipments",
// "related.invoices", "lines", "lines.product", "lines.quantity_ordered",
// "lines.quantity_ordered.unit", "lines.unit_price",
// "lines.unit_price.numerator_unit", "lines.unit_price.denominator_unit",
// "lines.unit_cost", "lines.unit_cost.numerator_unit",
// "lines.unit_cost.denominator_unit", "lines.totals".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleSalesOrderNewParams) MarshalJSON ¶
func (r SaleSalesOrderNewParams) MarshalJSON() (data []byte, err error)
func (SaleSalesOrderNewParams) URLQuery ¶
func (r SaleSalesOrderNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderNewParams's query parameters as `url.Values`.
func (*SaleSalesOrderNewParams) UnmarshalJSON ¶
func (r *SaleSalesOrderNewParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderPriceQuoteParams ¶
type SaleSalesOrderPriceQuoteParams struct {
// Request to quote sales-order line prices without creating an order.
QuoteSalesOrderPricesRequest QuoteSalesOrderPricesRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderPriceQuoteParams) MarshalJSON ¶
func (r SaleSalesOrderPriceQuoteParams) MarshalJSON() (data []byte, err error)
func (*SaleSalesOrderPriceQuoteParams) UnmarshalJSON ¶
func (r *SaleSalesOrderPriceQuoteParams) UnmarshalJSON(data []byte) error
type SaleSalesOrderService ¶
type SaleSalesOrderService struct {
// List, view, create, update, and delete sales orders.
Actions SaleSalesOrderActionService
// List, view, create, update, and delete sales orders.
Lines SaleSalesOrderLineService
// contains filtered or unexported fields
}
SaleSalesOrderService contains methods and other services that help with interacting with the openmrp 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 NewSaleSalesOrderService method instead.
func NewSaleSalesOrderService ¶
func NewSaleSalesOrderService(opts ...option.RequestOption) (r SaleSalesOrderService)
NewSaleSalesOrderService 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 (*SaleSalesOrderService) Checkout ¶
func (r *SaleSalesOrderService) Checkout(ctx context.Context, id string, body SaleSalesOrderCheckoutParams, opts ...option.RequestOption) (res *CheckoutSalesOrderResponse, err error)
Creates a hosted payment checkout session for a sales order.
Requires an active Stripe integration on the account and a customer that already exists in Stripe. The customer is charged a single amount covering every line on the order, including its freight and discount lines, and the checkout link is emailed to the address provided. Fails with a conflict if the order already has a payment.
This endpoint requires the permission: `sales_orders:update`.
func (*SaleSalesOrderService) Delete ¶
func (r *SaleSalesOrderService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleSalesOrderDeleteResponse, err error)
Deletes a sales order and all its related records.
Removes the order's lines, pick, shipment and invoice lines, and email contacts, and releases any inventory it had reserved. Fulfilled orders cannot be deleted.
This endpoint requires the permission: `sales_orders:delete`.
func (*SaleSalesOrderService) Get ¶
func (r *SaleSalesOrderService) Get(ctx context.Context, id string, query SaleSalesOrderGetParams, opts ...option.RequestOption) (res *SalesOrder, err error)
Returns a sales order by ID.
This endpoint requires the permissions: `customers:read`, `suppliers:read`, `sales_orders:read`.
func (*SaleSalesOrderService) GetStatuses ¶
func (r *SaleSalesOrderService) GetStatuses(ctx context.Context, query SaleSalesOrderGetStatusesParams, opts ...option.RequestOption) (res *ListSalesOrderStatus, err error)
Lists the statuses a sales order can be in.
The statuses are platform-provided and the same for every account, so the result is small and stable enough to cache. Use it to label orders in your own interface; an order moves between statuses through its issue, unissue, close, and reopen actions rather than by being assigned a status.
func (*SaleSalesOrderService) List ¶
func (r *SaleSalesOrderService) List(ctx context.Context, query SaleSalesOrderListParams, opts ...option.RequestOption) (res *ListSalesOrder, err error)
Returns a paginated list of sales orders for the current account, newest first.
A free-text search term (`q`) is matched as an exact value against the order number and the customer purchase order number, and still respects the other filters. Customer accounts calling this endpoint only ever see their own orders.
This endpoint requires the permissions: `sales_orders:read`, `customers:read`, `suppliers:read`.
func (*SaleSalesOrderService) New ¶
func (r *SaleSalesOrderService) New(ctx context.Context, params SaleSalesOrderNewParams, opts ...option.RequestOption) (res *SalesOrder, err error)
Creates a sales order in `estimate` status.
The order number is assigned automatically, and a sales rep is auto-assigned when none is provided. Line prices and costs are resolved server-side from each product. A shipping line carrying the estimated freight charge is added to the order, plus a negative-priced discount line when an order discount is supplied. The order is not committed for fulfillment until it is issued.
This endpoint requires the permission: `sales_orders:create`.
func (*SaleSalesOrderService) PriceQuote ¶
func (r *SaleSalesOrderService) PriceQuote(ctx context.Context, body SaleSalesOrderPriceQuoteParams, opts ...option.RequestOption) (res *QuoteSalesOrderPricesResponse, err error)
Calculates the unit price for each line without creating an order.
Use this to display prices to users as they build an order. Prices are computed server-side from the product's list price, contracted account prices, and applicable discounts — the same logic used when an order is created. Internal price overrides are not accepted here; the calculated price is always returned.
This endpoint requires the permission: `sales_orders:read`.
func (*SaleSalesOrderService) Update ¶
func (r *SaleSalesOrderService) Update(ctx context.Context, id string, params SaleSalesOrderUpdateParams, opts ...option.RequestOption) (res *SalesOrder, err error)
Partially updates a sales order.
Changing the carrier, service level, or ship-to address propagates to the order's existing shipments, but never re-prices the freight line: request a fresh estimate from the quote-freight endpoint and apply it to the shipping line yourself. Order status is changed through the issue, unissue, close, and reopen actions instead of this endpoint.
This endpoint requires the permission: `sales_orders:update`.
type SaleSalesOrderUpdateParams ¶
type SaleSalesOrderUpdateParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer", "sales_rep", "bill_to_address", "ship_to_address", "freight",
// "payment_term", "shipping_term", "order_discount", "totals", "contacts",
// "related.pick", "related.production_run", "related.shipments",
// "related.invoices", "lines", "lines.product", "lines.quantity_ordered",
// "lines.quantity_ordered.unit", "lines.unit_price",
// "lines.unit_price.numerator_unit", "lines.unit_price.denominator_unit",
// "lines.unit_cost", "lines.unit_cost.numerator_unit",
// "lines.unit_cost.denominator_unit", "lines.totals".
Include []string `query:"include,omitzero" json:"-"`
// Request to update a sales order.
UpdateSalesOrderRequest UpdateSalesOrderRequestParam
// contains filtered or unexported fields
}
func (SaleSalesOrderUpdateParams) MarshalJSON ¶
func (r SaleSalesOrderUpdateParams) MarshalJSON() (data []byte, err error)
func (SaleSalesOrderUpdateParams) URLQuery ¶
func (r SaleSalesOrderUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleSalesOrderUpdateParams's query parameters as `url.Values`.
func (*SaleSalesOrderUpdateParams) UnmarshalJSON ¶
func (r *SaleSalesOrderUpdateParams) UnmarshalJSON(data []byte) error
type SaleService ¶
type SaleService struct {
// List and manage account groups.
AccountGroups SaleAccountGroupService
// List and manage account prices.
AccountPrices SaleAccountPriceService
// List and manage addresses for accounts.
Addresses SaleAddressService
// List and retrieve account statuses.
AccountStatuses SaleAccountStatusService
AccountUsers SaleAccountUserService
// List and retrieve priorities.
Priorities SalePriorityService
// Manage customer accounts.
Customers SaleCustomerService
Contacts SaleContactService
// List and manage order discounts.
OrderDiscounts SaleOrderDiscountService
SalesOrders SaleSalesOrderService
// List and manage volume discounts.
VolumeDiscounts SaleVolumeDiscountService
// contains filtered or unexported fields
}
SaleService contains methods and other services that help with interacting with the openmrp 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 NewSaleService method instead.
func NewSaleService ¶
func NewSaleService(opts ...option.RequestOption) (r SaleService)
NewSaleService 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.
type SaleVolumeDiscountDeleteResponse ¶
type SaleVolumeDiscountDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SaleVolumeDiscountDeleteResponse) RawJSON ¶
func (r SaleVolumeDiscountDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SaleVolumeDiscountDeleteResponse) UnmarshalJSON ¶
func (r *SaleVolumeDiscountDeleteResponse) UnmarshalJSON(data []byte) error
type SaleVolumeDiscountGetParams ¶
type SaleVolumeDiscountGetParams struct {
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer_groups", "product_lines", "categories",
// "categories.properties", "attributes", "acceptable_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleVolumeDiscountGetParams) URLQuery ¶
func (r SaleVolumeDiscountGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleVolumeDiscountGetParams's query parameters as `url.Values`.
type SaleVolumeDiscountListParams ¶
type SaleVolumeDiscountListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer_groups", "product_lines", "categories",
// "categories.properties", "attributes", "acceptable_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleVolumeDiscountListParams) URLQuery ¶
func (r SaleVolumeDiscountListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleVolumeDiscountListParams's query parameters as `url.Values`.
type SaleVolumeDiscountNewParams ¶
type SaleVolumeDiscountNewParams struct {
// Request to create a volume discount.
CreateVolumeDiscountRequest CreateVolumeDiscountRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer_groups", "product_lines", "categories",
// "categories.properties", "attributes", "acceptable_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleVolumeDiscountNewParams) MarshalJSON ¶
func (r SaleVolumeDiscountNewParams) MarshalJSON() (data []byte, err error)
func (SaleVolumeDiscountNewParams) URLQuery ¶
func (r SaleVolumeDiscountNewParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleVolumeDiscountNewParams's query parameters as `url.Values`.
func (*SaleVolumeDiscountNewParams) UnmarshalJSON ¶
func (r *SaleVolumeDiscountNewParams) UnmarshalJSON(data []byte) error
type SaleVolumeDiscountService ¶
type SaleVolumeDiscountService struct {
// contains filtered or unexported fields
}
List and manage volume discounts.
SaleVolumeDiscountService contains methods and other services that help with interacting with the openmrp 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 NewSaleVolumeDiscountService method instead.
func NewSaleVolumeDiscountService ¶
func NewSaleVolumeDiscountService(opts ...option.RequestOption) (r SaleVolumeDiscountService)
NewSaleVolumeDiscountService 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 (*SaleVolumeDiscountService) Delete ¶
func (r *SaleVolumeDiscountService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SaleVolumeDiscountDeleteResponse, err error)
Deletes a volume discount along with its tiers and scoping associations.
Deletion is permanent; further requests against the deleted ID return an error.
Order lines that have already been priced keep the unit price they were given; only lines priced after the deletion lose the discount.
This endpoint requires the permission: `discounts:delete`.
func (*SaleVolumeDiscountService) Get ¶
func (r *SaleVolumeDiscountService) Get(ctx context.Context, id string, query SaleVolumeDiscountGetParams, opts ...option.RequestOption) (res *VolumeDiscount, err error)
Returns a volume discount by ID.
This endpoint requires the permissions: `discounts:read`, `customers:read`, `suppliers:read`.
func (*SaleVolumeDiscountService) List ¶
func (r *SaleVolumeDiscountService) List(ctx context.Context, query SaleVolumeDiscountListParams, opts ...option.RequestOption) (res *ListVolumeDiscount, err error)
Returns a paginated list of volume discounts, newest first.
The search term matches the discount name, the name of a customer group it is scoped to, or the name of a product line it is scoped to. Customer portal users see only discounts with no customer-group restriction plus those scoped to a group their own account belongs to.
This endpoint requires the permissions: `discounts:read`, `customers:read`, `suppliers:read`.
func (*SaleVolumeDiscountService) New ¶
func (r *SaleVolumeDiscountService) New(ctx context.Context, params SaleVolumeDiscountNewParams, opts ...option.RequestOption) (res *VolumeDiscount, err error)
Creates a volume discount with its tiers and scoping associations.
The discount name must be unique within the account; creating a discount with an existing name returns a conflict error.
Each scoping list narrows the order lines the discount applies to, and an empty list places no restriction on that dimension. Because tier thresholds are compared against quantities converted into `unit_ids`, a discount created without any units never reaches a threshold above zero.
This endpoint requires the permission: `discounts:create`.
func (*SaleVolumeDiscountService) Update ¶
func (r *SaleVolumeDiscountService) Update(ctx context.Context, id string, params SaleVolumeDiscountUpdateParams, opts ...option.RequestOption) (res *VolumeDiscount, err error)
Partially updates a volume discount.
The tier and association lists are only applied when their corresponding `has_*` flag is `true`, in which case they replace the existing set entirely. Tiers use upsert semantics: tiers with an `id` are updated, tiers without one are created, and existing tiers omitted from the list are deleted.
The name must remain unique within the account; reusing another discount's name returns a conflict error. Order lines that have already been priced keep the unit price they were given; the revised discount applies to lines priced after the change.
This endpoint requires the permission: `discounts:update`.
type SaleVolumeDiscountUpdateParams ¶
type SaleVolumeDiscountUpdateParams struct {
// Request to partially update a volume discount.
UpdateVolumeDiscountRequest UpdateVolumeDiscountRequestParam
// Sub-objects to expand in the response. When omitted, sub-objects are returned as
// `null`.
//
// Any of "customer_groups", "product_lines", "categories",
// "categories.properties", "attributes", "acceptable_units".
Include []string `query:"include,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SaleVolumeDiscountUpdateParams) MarshalJSON ¶
func (r SaleVolumeDiscountUpdateParams) MarshalJSON() (data []byte, err error)
func (SaleVolumeDiscountUpdateParams) URLQuery ¶
func (r SaleVolumeDiscountUpdateParams) URLQuery() (v url.Values, err error)
URLQuery serializes SaleVolumeDiscountUpdateParams's query parameters as `url.Values`.
func (*SaleVolumeDiscountUpdateParams) UnmarshalJSON ¶
func (r *SaleVolumeDiscountUpdateParams) UnmarshalJSON(data []byte) error
type SalesOrder ¶
type SalesOrder struct {
// Sales order ID.
ID string `json:"id" api:"required"`
// Whether an order acknowledgment has been sent to the customer.
//
// Becomes `sent` when the order is issued with customer notification requested and
// the order has acknowledgement contacts to send to. It can also be set directly
// when an acknowledgement was sent outside OpenMRP.
//
// Any of "not_sent", "sent".
AcknowledgmentStatus SalesOrderAcknowledgmentStatus `json:"acknowledgment_status" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
BillToAddress Address `json:"bill_to_address" api:"required"`
// Commitment describes when a record is due to ship: what was asked for, what that
// resolved to, and which rule decided.
//
// It is a generic, reusable sub-resource shared by anything carrying a ship-by
// commitment — a sales order, the pick that fulfills it, or a preview of an order
// that does not exist yet.
//
// The three inputs are alternative answers to the same question and at most one is
// ever set; `lead_time_source` reports which of them, or which level of the
// customer chain, produced the date. They are written flat on the create and
// update bodies, the way a carrier is written as `carrier_id` and read back under
// `freight`.
Commitment Commitment `json:"commitment" api:"required"`
// When the order was fulfilled and closed.
CompletedAt time.Time `json:"completed_at" api:"required" format:"date-time"`
// A sales order's email recipients, grouped by the notification they receive.
Contacts OrderContact `json:"contacts" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// CreatedBy describes who created a resource and their relationship to the account
// that owns it.
//
// It is resolved from the resource's create audit event.
CreatedBy CreatedBy `json:"created_by" api:"required"`
// A business you sell to, with its contact details, default fulfillment settings,
// and order policies.
Customer Customer `json:"customer" api:"required"`
// The customer's own purchase order number, for cross-referencing.
//
// Unique among this customer's orders.
CustomerPurchaseOrderNumber string `json:"customer_purchase_order_number" api:"required"`
// When this estimate expires, if an expiration was set.
ExpiredAt time.Time `json:"expired_at" api:"required" format:"date-time"`
// When the first shipment against this order went out.
FirstShipAt time.Time `json:"first_ship_at" api:"required" format:"date-time"`
// Freight describes the carrier selection and freight billing for a record.
//
// It is a generic, reusable sub-resource shared by anything that carries shipping
// configuration — a sales order, a purchase order, or a shipment.
Freight Freight `json:"freight" api:"required"`
// When the order was issued (moved out of `estimate`).
IssuedAt time.Time `json:"issued_at" api:"required" format:"date-time"`
// Number of lines on this order.
LineCount int64 `json:"line_count" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Lines ListSalesOrderLine `json:"lines" api:"required"`
// Free-form note about the order.
Note string `json:"note" api:"required"`
// Human-readable order number, e.g. `SO-001`.
//
// Assigned automatically when the order is created; unique within your account.
Number string `json:"number" api:"required"`
// Resource type identifier.
//
// Any of "sales_order".
Object SalesOrderObject `json:"object" api:"required"`
// A discount code that can be applied to a sales order.
//
// An order discount reduces the order total by either a percentage or a fixed
// amount, depending on `discount_type`. The reduction is capped at the order total
// and rounded to the nearest cent.
OrderDiscount OrderDiscount `json:"order_discount" api:"required"`
// Stripe payment intent IDs recorded against this order.
PaymentIntentIDs []string `json:"payment_intent_ids" api:"required"`
// Payment state of the order, derived from settlement allocations, invoices, and
// Stripe payments.
//
// Any of "unpaid", "partially_paid", "paid".
PaymentStatus SalesOrderPaymentStatus `json:"payment_status" api:"required"`
// A payment term describing when payment is due (e.g. `Net 30`), assignable to
// customers, sales orders, purchase orders, and invoices.
PaymentTerm PaymentTerm `json:"payment_term" api:"required"`
// Fulfillment priority, used to rank orders on the shop floor.
//
// Any of "low", "normal", "high".
Priority SalesOrderPriority `json:"priority" api:"required"`
// The fulfillment records produced from a sales order.
//
// The group itself is returned only when at least one of its members has been
// expanded.
Related SalesOrderRelated `json:"related" api:"required"`
// Reference to an actor — the user, API key, agent, or group identity associated
// with an action.
SalesRep Actor `json:"sales_rep" api:"required"`
// A saved address that can be used for billing and shipping on sales orders,
// invoices, and shipments.
ShipToAddress Address `json:"ship_to_address" api:"required"`
// A named freight pricing rule that decides what a buyer pays for shipping.
//
// A customer's default shipping term is evaluated whenever freight is quoted for
// one of their orders. Freight exemptions on the customer, its type group, or any
// of its price groups are checked first and zero the freight charge before the
// shipping term is considered.
ShippingTerm ShippingTerm `json:"shipping_term" api:"required"`
// Order lifecycle status.
//
// - `estimate`: a draft quote that has not yet been committed; not counted as a
// real order.
// - `issued`: the order has been issued and is being fulfilled.
// - `fulfilled`: the order has been completed and closed.
//
// Status changes are made through the issue, unissue, close, and reopen action
// endpoints rather than by updating this field.
//
// Any of "estimate", "issued", "fulfilled".
Status SalesOrderStatus `json:"status" api:"required"`
// Derived monetary totals for a sales order or one of its lines.
//
// Fulfillment runs ordered -> picked -> packed -> invoiced, and each downstream
// stage reports both the money that has reached it and its progress against the
// ordered baseline.
Totals SalesOrderTotals `json:"totals" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AcknowledgmentStatus respjson.Field
BillToAddress respjson.Field
Commitment respjson.Field
CompletedAt respjson.Field
Contacts respjson.Field
CreatedAt respjson.Field
CreatedBy respjson.Field
Customer respjson.Field
CustomerPurchaseOrderNumber respjson.Field
ExpiredAt respjson.Field
FirstShipAt respjson.Field
Freight respjson.Field
IssuedAt respjson.Field
LineCount respjson.Field
Lines respjson.Field
Note respjson.Field
Number respjson.Field
Object respjson.Field
OrderDiscount respjson.Field
PaymentIntentIDs respjson.Field
PaymentStatus respjson.Field
PaymentTerm respjson.Field
Priority respjson.Field
Related respjson.Field
SalesRep respjson.Field
ShipToAddress respjson.Field
ShippingTerm respjson.Field
Status respjson.Field
Totals respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An order placed by a customer, tracked from estimate through fulfillment.
func (SalesOrder) RawJSON ¶
func (r SalesOrder) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesOrder) UnmarshalJSON ¶
func (r *SalesOrder) UnmarshalJSON(data []byte) error
type SalesOrderAcknowledgmentStatus ¶
type SalesOrderAcknowledgmentStatus string
Whether an order acknowledgment has been sent to the customer.
Becomes `sent` when the order is issued with customer notification requested and the order has acknowledgement contacts to send to. It can also be set directly when an acknowledgement was sent outside OpenMRP.
const ( SalesOrderAcknowledgmentStatusNotSent SalesOrderAcknowledgmentStatus = "not_sent" SalesOrderAcknowledgmentStatusSent SalesOrderAcknowledgmentStatus = "sent" )
type SalesOrderEmailContactInputParam ¶
type SalesOrderEmailContactInputParam struct {
// ID of the account user who should receive the notification.
AccountUserID string `json:"account_user_id" api:"required"`
// contains filtered or unexported fields
}
A user subscribed to one of a sales order's email notifications.
The property AccountUserID is required.
func (SalesOrderEmailContactInputParam) MarshalJSON ¶
func (r SalesOrderEmailContactInputParam) MarshalJSON() (data []byte, err error)
func (*SalesOrderEmailContactInputParam) UnmarshalJSON ¶
func (r *SalesOrderEmailContactInputParam) UnmarshalJSON(data []byte) error
type SalesOrderLine ¶
type SalesOrderLine struct {
// Sales order line ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// An entry in your catalog: something you sell, consume, or build with.
Item Item `json:"item" api:"required"`
// Position of the line on the order.
//
// Assigned automatically in sequence, starting at `1`. Product lines are numbered
// first and the automatically generated freight and discount lines always sit at
// the bottom; removing a line renumbers the rest so the sequence stays contiguous.
LineItemNumber int64 `json:"line_item_number" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_line".
Object SalesOrderLineObject `json:"object" api:"required"`
// A catalog entry as it is sold: an inventory item together with its product type,
// product line, and customer portal visibility.
//
// Every product is backed by exactly one item, which carries the SKU, description,
// pricing, attributes, and inventory position. Creating a product creates that
// item; deleting the product deletes it.
Product Product `json:"product" api:"required"`
// Description recorded on this line, taken from the product unless the line
// supplies its own.
ProductDescription string `json:"product_description" api:"required"`
// SKU recorded on this line.
//
// Taken from the product unless the line supplies its own, and editable
// afterwards, so it preserves what was sold even if the product's SKU later
// changes.
ProductSKU string `json:"product_sku" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
QuantityOrdered Quantity `json:"quantity_ordered" api:"required"`
// Derived monetary totals for a sales order or one of its lines.
//
// Fulfillment runs ordered -> picked -> packed -> invoiced, and each downstream
// stage reports both the money that has reached it and its progress against the
// ordered baseline.
Totals SalesOrderTotals `json:"totals" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
UnitCost Rate `json:"unit_cost" api:"required"`
// Value expressed as a ratio of two units, such as a price per kilogram or a
// throughput per hour.
UnitPrice Rate `json:"unit_price" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Item respjson.Field
LineItemNumber respjson.Field
Object respjson.Field
Product respjson.Field
ProductDescription respjson.Field
ProductSKU respjson.Field
QuantityOrdered respjson.Field
Totals respjson.Field
UnitCost respjson.Field
UnitPrice respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single line item on a sales order.
func (SalesOrderLine) RawJSON ¶
func (r SalesOrderLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesOrderLine) UnmarshalJSON ¶
func (r *SalesOrderLine) UnmarshalJSON(data []byte) error
type SalesOrderLineObject ¶
type SalesOrderLineObject string
Resource type identifier.
const (
SalesOrderLineObjectSalesOrderLine SalesOrderLineObject = "sales_order_line"
)
type SalesOrderObject ¶
type SalesOrderObject string
Resource type identifier.
const (
SalesOrderObjectSalesOrder SalesOrderObject = "sales_order"
)
type SalesOrderPaymentStatus ¶
type SalesOrderPaymentStatus string
Payment state of the order, derived from settlement allocations, invoices, and Stripe payments.
const ( SalesOrderPaymentStatusUnpaid SalesOrderPaymentStatus = "unpaid" SalesOrderPaymentStatusPartiallyPaid SalesOrderPaymentStatus = "partially_paid" SalesOrderPaymentStatusPaid SalesOrderPaymentStatus = "paid" )
type SalesOrderPriority ¶
type SalesOrderPriority string
Fulfillment priority, used to rank orders on the shop floor.
const ( SalesOrderPriorityLow SalesOrderPriority = "low" SalesOrderPriorityNormal SalesOrderPriority = "normal" SalesOrderPriorityHigh SalesOrderPriority = "high" )
type SalesOrderRelated ¶
type SalesOrderRelated struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Invoices ListRecord `json:"invoices" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_related".
Object SalesOrderRelatedObject `json:"object" api:"required"`
// Record is a lightweight reference to a business record — a sales order, purchase
// order, pick, shipment, production run, invoice, etc.
//
// Like the `actor` and `entity` references, it carries just enough to identify and
// label the referenced record without embedding its full resource. The `status`
// and `metadata` fields hold type-specific detail that varies by the kind of
// record referenced.
Pick Record `json:"pick" api:"required"`
// Record is a lightweight reference to a business record — a sales order, purchase
// order, pick, shipment, production run, invoice, etc.
//
// Like the `actor` and `entity` references, it carries just enough to identify and
// label the referenced record without embedding its full resource. The `status`
// and `metadata` fields hold type-specific detail that varies by the kind of
// record referenced.
ProductionRun Record `json:"production_run" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Shipments ListRecord `json:"shipments" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Invoices respjson.Field
Object respjson.Field
Pick respjson.Field
ProductionRun respjson.Field
Shipments respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The fulfillment records produced from a sales order.
The group itself is returned only when at least one of its members has been expanded.
func (SalesOrderRelated) RawJSON ¶
func (r SalesOrderRelated) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesOrderRelated) UnmarshalJSON ¶
func (r *SalesOrderRelated) UnmarshalJSON(data []byte) error
type SalesOrderRelatedObject ¶
type SalesOrderRelatedObject string
Resource type identifier.
const (
SalesOrderRelatedObjectSalesOrderRelated SalesOrderRelatedObject = "sales_order_related"
)
type SalesOrderStageTotal ¶
type SalesOrderStageTotal struct {
// Amount that has reached this stage, as a decimal string (unit price times the
// quantity at this stage).
Amount string `json:"amount" api:"required" format:"decimal"`
// Progress through this stage, as a fraction between 0 and 1.
//
// Calculated as the quantity that has reached this stage divided by the quantity
// ordered, so `1` means the whole order has cleared the stage and `0` means
// nothing has reached it yet.
Completion float64 `json:"completion" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_stage_total".
Object SalesOrderStageTotalObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Amount respjson.Field
Completion respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The monetary amount that has reached one fulfillment stage, together with how far that stage has progressed.
func (SalesOrderStageTotal) RawJSON ¶
func (r SalesOrderStageTotal) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesOrderStageTotal) UnmarshalJSON ¶
func (r *SalesOrderStageTotal) UnmarshalJSON(data []byte) error
type SalesOrderStageTotalObject ¶
type SalesOrderStageTotalObject string
Resource type identifier.
const (
SalesOrderStageTotalObjectSalesOrderStageTotal SalesOrderStageTotalObject = "sales_order_stage_total"
)
type SalesOrderStatus ¶
type SalesOrderStatus string
Order lifecycle status.
- `estimate`: a draft quote that has not yet been committed; not counted as a real order.
- `issued`: the order has been issued and is being fulfilled.
- `fulfilled`: the order has been completed and closed.
Status changes are made through the issue, unissue, close, and reopen action endpoints rather than by updating this field.
const ( SalesOrderStatusEstimate SalesOrderStatus = "estimate" SalesOrderStatusIssued SalesOrderStatus = "issued" SalesOrderStatusFulfilled SalesOrderStatus = "fulfilled" )
type SalesOrderTotals ¶
type SalesOrderTotals struct {
// The monetary amount that has reached one fulfillment stage, together with how
// far that stage has progressed.
Invoiced SalesOrderStageTotal `json:"invoiced" api:"required"`
// Resource type identifier.
//
// Any of "sales_order_totals".
Object SalesOrderTotalsObject `json:"object" api:"required"`
// Total ordered amount as a decimal string (unit price x quantity ordered).
//
// This is the baseline the stage completions are measured against.
Ordered string `json:"ordered" api:"required" format:"decimal"`
// The monetary amount that has reached one fulfillment stage, together with how
// far that stage has progressed.
Packed SalesOrderStageTotal `json:"packed" api:"required"`
// The monetary amount that has reached one fulfillment stage, together with how
// far that stage has progressed.
Picked SalesOrderStageTotal `json:"picked" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Invoiced respjson.Field
Object respjson.Field
Ordered respjson.Field
Packed respjson.Field
Picked respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Derived monetary totals for a sales order or one of its lines.
Fulfillment runs ordered -> picked -> packed -> invoiced, and each downstream stage reports both the money that has reached it and its progress against the ordered baseline.
func (SalesOrderTotals) RawJSON ¶
func (r SalesOrderTotals) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesOrderTotals) UnmarshalJSON ¶
func (r *SalesOrderTotals) UnmarshalJSON(data []byte) error
type SalesOrderTotalsObject ¶
type SalesOrderTotalsObject string
Resource type identifier.
const (
SalesOrderTotalsObjectSalesOrderTotals SalesOrderTotalsObject = "sales_order_totals"
)
type SalesTarget ¶
type SalesTarget struct {
// Sales target ID.
ID string `json:"id" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
Amount Quantity `json:"amount" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// End of the period this target applies to (e.g. the close of a quarter).
EndAt time.Time `json:"end_at" api:"required" format:"date-time"`
// Resource type identifier.
//
// Any of "sales_target".
Object SalesTargetObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
SalesRep Entity `json:"sales_rep" api:"required"`
// Start of the period this target applies to (inclusive).
StartAt time.Time `json:"start_at" api:"required" format:"date-time"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Amount respjson.Field
CreatedAt respjson.Field
EndAt respjson.Field
Object respjson.Field
SalesRep respjson.Field
StartAt respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A revenue goal assigned to a sales rep for a specific time period.
func (SalesTarget) RawJSON ¶
func (r SalesTarget) RawJSON() string
Returns the unmodified JSON received from the API
func (*SalesTarget) UnmarshalJSON ¶
func (r *SalesTarget) UnmarshalJSON(data []byte) error
type SalesTargetObject ¶
type SalesTargetObject string
Resource type identifier.
const (
SalesTargetObjectSalesTarget SalesTargetObject = "sales_target"
)
type Sandbox ¶
type Sandbox struct {
// Sandbox ID.
ID string `json:"id" api:"required"`
// When this sandbox was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the sandbox.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "sandbox".
Object SandboxObject `json:"object" api:"required"`
// An organization on OpenMRP, including its branding and customer portal
// sub-resources.
//
// Your own account and any customer or supplier account you trade with are both
// represented by this object.
OwnerAccount Account `json:"owner_account" api:"required"`
// When this sandbox was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
OwnerAccount respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An isolated test account owned by a production account.
A sandbox is a full account with its own data, so anything created or changed inside it leaves your production data untouched.
func (*Sandbox) UnmarshalJSON ¶
type SandboxObject ¶
type SandboxObject string
Resource type identifier.
const (
SandboxObjectSandbox SandboxObject = "sandbox"
)
type ScanningStation ¶
type ScanningStation struct {
// Scanning station ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A functional area of a production operation, such as fabrication or packaging,
// that groups scanning stations and machines.
Department *Department `json:"department" api:"required"`
// Size of the labels printed at this station, given as width-by-height (for
// example, `1x1`).
//
// Any of "1x1", "1x3", "1x4", "2x4".
LabelSize ScanningStationLabelSize `json:"label_size" api:"required"`
// Type of label printed at this station.
//
// - `tag`: a label attached to the physical product.
// - `traveler`: a routing sheet that accompanies the batch through every
// production step.
//
// Any of "tag", "traveler".
LabelType ScanningStationLabelType `json:"label_type" api:"required"`
// Display name of the scanning station.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Free-form notes about the scanning station.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "scanning_station".
Object ScanningStationObject `json:"object" api:"required"`
// Whether operators must perform a material check at this station.
//
// - `none`: no additional operator check is required.
// - `material_check`: a material check is expected before the operation.
//
// Any of "none", "material_check".
OperatorRequirement ScanningStationOperatorRequirement `json:"operator_requirement" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ProductionSteps *ListProductionStep `json:"production_steps" api:"required"`
// Scanning station type, determining which batch operation an operator performs
// when they scan here.
//
// - `init_batch`: starts a new batch at the beginning of a production flow.
// - `merge_batch`: combines several scanned batches into one.
// - `move_batch`: advances a batch through a production step connected to this
// station.
// - `split_batch`: divides a batch into several batches.
//
// Fixed when the station is created.
//
// Any of "init_batch", "merge_batch", "move_batch", "split_batch".
Type ScanningStationType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Department respjson.Field
LabelSize respjson.Field
LabelType respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
OperatorRequirement respjson.Field
ProductionSteps respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A station on the production floor where operators scan batches to perform a batch operation, such as initializing or moving a batch.
func (ScanningStation) RawJSON ¶
func (r ScanningStation) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScanningStation) UnmarshalJSON ¶
func (r *ScanningStation) UnmarshalJSON(data []byte) error
type ScanningStationLabelSize ¶
type ScanningStationLabelSize string
Size of the labels printed at this station, given as width-by-height (for example, `1x1`).
const ( ScanningStationLabelSize1x1 ScanningStationLabelSize = "1x1" ScanningStationLabelSize1x3 ScanningStationLabelSize = "1x3" ScanningStationLabelSize1x4 ScanningStationLabelSize = "1x4" ScanningStationLabelSize2x4 ScanningStationLabelSize = "2x4" )
type ScanningStationLabelType ¶
type ScanningStationLabelType string
Type of label printed at this station.
- `tag`: a label attached to the physical product.
- `traveler`: a routing sheet that accompanies the batch through every production step.
const ( ScanningStationLabelTypeTag ScanningStationLabelType = "tag" ScanningStationLabelTypeTraveler ScanningStationLabelType = "traveler" )
type ScanningStationObject ¶
type ScanningStationObject string
Resource type identifier.
const (
ScanningStationObjectScanningStation ScanningStationObject = "scanning_station"
)
type ScanningStationOperatorRequirement ¶
type ScanningStationOperatorRequirement string
Whether operators must perform a material check at this station.
- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.
const ( ScanningStationOperatorRequirementNone ScanningStationOperatorRequirement = "none" ScanningStationOperatorRequirementMaterialCheck ScanningStationOperatorRequirement = "material_check" )
type ScanningStationType ¶
type ScanningStationType string
Scanning station type, determining which batch operation an operator performs when they scan here.
- `init_batch`: starts a new batch at the beginning of a production flow.
- `merge_batch`: combines several scanned batches into one.
- `move_batch`: advances a batch through a production step connected to this station.
- `split_batch`: divides a batch into several batches.
Fixed when the station is created.
const ( ScanningStationTypeInitBatch ScanningStationType = "init_batch" ScanningStationTypeMergeBatch ScanningStationType = "merge_batch" ScanningStationTypeMoveBatch ScanningStationType = "move_batch" ScanningStationTypeSplitBatch ScanningStationType = "split_batch" )
type ScheduleAppliedOverride ¶
type ScheduleAppliedOverride struct {
// How the override was expressed.
//
// - `absolute`: the override replaced the forecast for the month outright.
// - `delta_units`: the override was added to the forecast.
// - `delta_percent`: the override scaled the forecast.
//
// Any of "absolute", "delta_units", "delta_percent".
Adjustment ScheduleAppliedOverrideAdjustment `json:"adjustment" api:"required"`
// Demand after the override.
After float64 `json:"after" api:"required"`
// Demand before the override.
Before float64 `json:"before" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// The first instant of the month the override applied to.
MonthStartsAt time.Time `json:"month_starts_at" api:"required" format:"date-time"`
// Entity is a polymorphic reference to any resource in the system.
Override Entity `json:"override" api:"required"`
// Why the override exists.
//
// Any of "new_customer", "lost_account", "promotion", "seasonal_shift",
// "new_product", "discontinued", "market_intelligence", "other".
Reason ScheduleAppliedOverrideReason `json:"reason" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Adjustment respjson.Field
After respjson.Field
Before respjson.Field
Item respjson.Field
MonthStartsAt respjson.Field
Override respjson.Field
Reason respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A demand override that changed a number, recorded so the plan can explain itself.
func (ScheduleAppliedOverride) RawJSON ¶
func (r ScheduleAppliedOverride) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleAppliedOverride) UnmarshalJSON ¶
func (r *ScheduleAppliedOverride) UnmarshalJSON(data []byte) error
type ScheduleAppliedOverrideAdjustment ¶
type ScheduleAppliedOverrideAdjustment string
How the override was expressed.
- `absolute`: the override replaced the forecast for the month outright. - `delta_units`: the override was added to the forecast. - `delta_percent`: the override scaled the forecast.
const ( ScheduleAppliedOverrideAdjustmentAbsolute ScheduleAppliedOverrideAdjustment = "absolute" ScheduleAppliedOverrideAdjustmentDeltaUnits ScheduleAppliedOverrideAdjustment = "delta_units" ScheduleAppliedOverrideAdjustmentDeltaPercent ScheduleAppliedOverrideAdjustment = "delta_percent" )
type ScheduleAppliedOverrideReason ¶
type ScheduleAppliedOverrideReason string
Why the override exists.
const ( ScheduleAppliedOverrideReasonNewCustomer ScheduleAppliedOverrideReason = "new_customer" ScheduleAppliedOverrideReasonLostAccount ScheduleAppliedOverrideReason = "lost_account" ScheduleAppliedOverrideReasonPromotion ScheduleAppliedOverrideReason = "promotion" ScheduleAppliedOverrideReasonSeasonalShift ScheduleAppliedOverrideReason = "seasonal_shift" ScheduleAppliedOverrideReasonNewProduct ScheduleAppliedOverrideReason = "new_product" ScheduleAppliedOverrideReasonDiscontinued ScheduleAppliedOverrideReason = "discontinued" ScheduleAppliedOverrideReasonMarketIntelligence ScheduleAppliedOverrideReason = "market_intelligence" ScheduleAppliedOverrideReasonOther ScheduleAppliedOverrideReason = "other" )
type ScheduleAtRiskOrder ¶
type ScheduleAtRiskOrder struct {
// Horizon week the constraint stage has to finish in for the order to ship on
// time.
DueWeek int64 `json:"due_week" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "schedule_at_risk_order".
Object ScheduleAtRiskOrderObject `json:"object" api:"required"`
// Why the commitment is at risk.
//
// - `past_due`: production needed to start before this plan begins.
// - `undated`: the order carries no ship-by commitment, so it is treated as owed
// now.
// - `short`: the plan projects less stock than the order needs in the week it is
// needed.
//
// Any of "past_due", "undated", "short".
Reason ScheduleAtRiskOrderReason `json:"reason" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
SalesOrder Entity `json:"sales_order" api:"required"`
// SKU of that item.
SKU string `json:"sku" api:"required"`
// Outstanding quantity still owed.
Units float64 `json:"units" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DueWeek respjson.Field
Item respjson.Field
Object respjson.Field
Reason respjson.Field
SalesOrder respjson.Field
SKU respjson.Field
Units respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An order commitment the plan does not meet.
func (ScheduleAtRiskOrder) RawJSON ¶
func (r ScheduleAtRiskOrder) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleAtRiskOrder) UnmarshalJSON ¶
func (r *ScheduleAtRiskOrder) UnmarshalJSON(data []byte) error
type ScheduleAtRiskOrderObject ¶
type ScheduleAtRiskOrderObject string
Resource type identifier.
const (
ScheduleAtRiskOrderObjectScheduleAtRiskOrder ScheduleAtRiskOrderObject = "schedule_at_risk_order"
)
type ScheduleAtRiskOrderReason ¶
type ScheduleAtRiskOrderReason string
Why the commitment is at risk.
- `past_due`: production needed to start before this plan begins.
- `undated`: the order carries no ship-by commitment, so it is treated as owed now.
- `short`: the plan projects less stock than the order needs in the week it is needed.
const ( ScheduleAtRiskOrderReasonPastDue ScheduleAtRiskOrderReason = "past_due" ScheduleAtRiskOrderReasonUndated ScheduleAtRiskOrderReason = "undated" ScheduleAtRiskOrderReasonShort ScheduleAtRiskOrderReason = "short" )
type ScheduleCampaign ¶
type ScheduleCampaign struct {
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Whole lots the quantity rounds to.
Lots int64 `json:"lots" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Constraint hours the campaign consumes.
RunHours float64 `json:"run_hours" api:"required"`
// SKU of the item.
SKU string `json:"sku" api:"required"`
// Quantity to produce.
Units float64 `json:"units" api:"required"`
// Zero-based week offset from the start of the horizon.
WeekIndex int64 `json:"week_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Item respjson.Field
Lots respjson.Field
Machine respjson.Field
RunHours respjson.Field
SKU respjson.Field
Units respjson.Field
WeekIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One planned production block: make this item, on this machine, in this week.
func (ScheduleCampaign) RawJSON ¶
func (r ScheduleCampaign) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleCampaign) UnmarshalJSON ¶
func (r *ScheduleCampaign) UnmarshalJSON(data []byte) error
type ScheduleDeviationType ¶
type ScheduleDeviationType struct {
// Deviation type ID.
ID string `json:"id" api:"required"`
// Stable code recorded on a deviation.
//
// Any of "line_added", "line_removed", "quantity_changed", "machine_changed",
// "resequenced", "week_moved".
Code ScheduleDeviationTypeCode `json:"code" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the type.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "schedule_deviation_type".
Object ScheduleDeviationTypeObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A kind of hand change to a plan.
func (ScheduleDeviationType) RawJSON ¶
func (r ScheduleDeviationType) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleDeviationType) UnmarshalJSON ¶
func (r *ScheduleDeviationType) UnmarshalJSON(data []byte) error
type ScheduleDeviationTypeCode ¶
type ScheduleDeviationTypeCode string
Stable code recorded on a deviation.
const ( ScheduleDeviationTypeCodeLineAdded ScheduleDeviationTypeCode = "line_added" ScheduleDeviationTypeCodeLineRemoved ScheduleDeviationTypeCode = "line_removed" ScheduleDeviationTypeCodeQuantityChanged ScheduleDeviationTypeCode = "quantity_changed" ScheduleDeviationTypeCodeMachineChanged ScheduleDeviationTypeCode = "machine_changed" ScheduleDeviationTypeCodeResequenced ScheduleDeviationTypeCode = "resequenced" ScheduleDeviationTypeCodeWeekMoved ScheduleDeviationTypeCode = "week_moved" )
type ScheduleDeviationTypeObject ¶
type ScheduleDeviationTypeObject string
Resource type identifier.
const (
ScheduleDeviationTypeObjectScheduleDeviationType ScheduleDeviationTypeObject = "schedule_deviation_type"
)
type ScheduleDiagnostics ¶
type ScheduleDiagnostics struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
AppliedOverrides ListScheduleAppliedOverride `json:"applied_overrides" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
AtRiskOrders ListScheduleAtRiskOrder `json:"at_risk_orders" api:"required"`
// Average inputs a product transition introduces, measured from history.
AverageInputsAdded float64 `json:"average_inputs_added" api:"required"`
// Items below their reorder point that never won a slot in the horizon.
//
// This is the signal that the plant is short of capacity.
CapacityStarvedSKUs []string `json:"capacity_starved_skus" api:"required"`
// Minutes of changeover the model adds for each new input a product transition
// introduces.
//
// Calibrated from measured production against `average_inputs_added`, so the
// modeled changeover lands on the time the floor actually reports rather than on a
// fixed allowance.
ChangeoverSlopeMinutes float64 `json:"changeover_slope_minutes" api:"required"`
// Machines the constraint department contributed to this solve.
ConstraintMachineCount int64 `json:"constraint_machine_count" api:"required"`
// Items whose economic lot size was reduced to fit one machine-week, meaning
// shorter and more frequent campaigns.
EoqCappedSKUs []string `json:"eoq_capped_skus" api:"required"`
// Number of items the merchant has excluded from planning.
ExcludedItemCount int64 `json:"excluded_item_count" api:"required"`
// How the second stage fared: what it could not make, and which of the two things
// it ran out of.
//
// The two starvation lists are the point of planning in two stages at all. A
// finished good held back for want of greige is a knitting problem — knit more of
// it, or knit it sooner — and one held back for want of hours is a finishing
// problem: another shift, or a different mix. A single "short" list would throw
// that distinction away, and it is the only thing this model knows that a
// one-stage plan does not.
Finishing ScheduleFinishingDiagnostics `json:"finishing" api:"required"`
// Whether the second stage's capacity was estimated rather than counted from
// machines.
FinishingCapacityIsEstimated bool `json:"finishing_capacity_is_estimated" api:"required"`
// Machines outside the constraint department that the second stage was sized from.
//
// Zero means its capacity was estimated from the shift pattern alone rather than
// counted.
FinishingMachineCount int64 `json:"finishing_machine_count" api:"required"`
// Outstanding order quantity this plan owes, expressed in the constraint item's
// own unit.
//
// Zero means nothing is on order and the plan is driven purely by the forecast.
FirmDemandUnits float64 `json:"firm_demand_units" api:"required"`
// Items with no measured run rate, which cannot be scheduled because their machine
// time is unknown.
ItemsWithoutRunRate []string `json:"items_without_run_rate" api:"required"`
// Machines in the constraint department with no production step.
//
// Their campaigns derive no downstream department work.
MachinesWithoutStep int64 `json:"machines_without_step" api:"required"`
// Planned items built only against the order book rather than to a forecast.
MakeToOrderItemCount int64 `json:"make_to_order_item_count" api:"required"`
// Batches found on those machines in the demand window.
//
// Zero means nothing has been scanned there, which is why a plan can be empty even
// with machines configured.
MeasuredBatchCount int64 `json:"measured_batch_count" api:"required"`
// Open orders carrying no ship-by commitment, dated at the front of the horizon
// because they are issued and unshipped.
//
// A non-zero count means orders placed before commitments were tracked still need
// a ship-by date.
UndatedFirmOrderCount int64 `json:"undated_firm_order_count" api:"required"`
// Items that cannot fit even a single lot into a machine-week and are therefore
// never scheduled.
UnschedulableSKUs []string `json:"unschedulable_skus" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AppliedOverrides respjson.Field
AtRiskOrders respjson.Field
AverageInputsAdded respjson.Field
CapacityStarvedSKUs respjson.Field
ChangeoverSlopeMinutes respjson.Field
ConstraintMachineCount respjson.Field
EoqCappedSKUs respjson.Field
ExcludedItemCount respjson.Field
Finishing respjson.Field
FinishingCapacityIsEstimated respjson.Field
FinishingMachineCount respjson.Field
FirmDemandUnits respjson.Field
ItemsWithoutRunRate respjson.Field
MachinesWithoutStep respjson.Field
MakeToOrderItemCount respjson.Field
MeasuredBatchCount respjson.Field
UndatedFirmOrderCount respjson.Field
UnschedulableSKUs respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
What the solver could not do, and why the plan differs from raw history.
func (ScheduleDiagnostics) RawJSON ¶
func (r ScheduleDiagnostics) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleDiagnostics) UnmarshalJSON ¶
func (r *ScheduleDiagnostics) UnmarshalJSON(data []byte) error
type ScheduleDiffLine ¶
type ScheduleDiffLine struct {
// What the regenerate would do to this campaign.
//
// - `added`: the fresh solve wants a campaign the current plan does not have.
// - `removed`: the current plan holds a campaign the fresh solve does not want.
// - `changed`: both hold the campaign, in different quantities.
// - `unchanged`: both agree on it.
//
// Any of "added", "removed", "changed", "unchanged".
Change ScheduleDiffLineChange `json:"change" api:"required"`
// Whether the current campaign was created or edited by a person.
CurrentIsManual bool `json:"current_is_manual" api:"required"`
// Units the current plan asks for.
//
// Zero when the campaign is being added.
CurrentQuantity float64 `json:"current_quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Units the fresh solve asks for.
//
// Zero when the campaign is being removed.
ProposedQuantity float64 `json:"proposed_quantity" api:"required"`
// SKU of that item.
SKU string `json:"sku" api:"required"`
// Zero-based horizon week.
WeekIndex int64 `json:"week_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Change respjson.Field
CurrentIsManual respjson.Field
CurrentQuantity respjson.Field
Item respjson.Field
Machine respjson.Field
ProposedQuantity respjson.Field
SKU respjson.Field
WeekIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One campaign as the current plan and a fresh solve each see it.
func (ScheduleDiffLine) RawJSON ¶
func (r ScheduleDiffLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleDiffLine) UnmarshalJSON ¶
func (r *ScheduleDiffLine) UnmarshalJSON(data []byte) error
type ScheduleDiffLineChange ¶
type ScheduleDiffLineChange string
What the regenerate would do to this campaign.
- `added`: the fresh solve wants a campaign the current plan does not have. - `removed`: the current plan holds a campaign the fresh solve does not want. - `changed`: both hold the campaign, in different quantities. - `unchanged`: both agree on it.
const ( ScheduleDiffLineChangeAdded ScheduleDiffLineChange = "added" ScheduleDiffLineChangeRemoved ScheduleDiffLineChange = "removed" ScheduleDiffLineChangeChanged ScheduleDiffLineChange = "changed" ScheduleDiffLineChangeUnchanged ScheduleDiffLineChange = "unchanged" )
type ScheduleFinishingDiagnostics ¶
type ScheduleFinishingDiagnostics struct {
// Finished goods that had greige and never had hours.
CapacityStarvedSKUs []string `json:"capacity_starved_skus" api:"required"`
// Finished goods that wanted building across the whole horizon and never had
// greige to build from.
GreigeStarvedSKUs []string `json:"greige_starved_skus" api:"required"`
// Finished goods with no measured finishing rate, which cannot be leveled because
// the hours they cost are unknown.
ItemsWithoutRunRate []string `json:"items_without_run_rate" api:"required"`
// How many finishing lines the plan holds.
LineCount int64 `json:"line_count" api:"required"`
// Hours the plan asks of it, week by week.
PlannedHoursByWeek []float64 `json:"planned_hours_by_week" api:"required"`
// Total finished units the stage plans across the horizon.
TotalPlannedUnits float64 `json:"total_planned_units" api:"required"`
// Constraint output the horizon never converts into anything.
//
// A large figure means the two stages are planned against different demand, which
// is worth looking at rather than leaving as an unexplained pile of greige.
UnusedGreigeUnits float64 `json:"unused_greige_units" api:"required"`
// Those hours as a fraction of capacity, week by week.
UtilisationByWeek []float64 `json:"utilisation_by_week" api:"required"`
// Hours the second stage can work in one week.
WeeklyCapacityHours float64 `json:"weekly_capacity_hours" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CapacityStarvedSKUs respjson.Field
GreigeStarvedSKUs respjson.Field
ItemsWithoutRunRate respjson.Field
LineCount respjson.Field
PlannedHoursByWeek respjson.Field
TotalPlannedUnits respjson.Field
UnusedGreigeUnits respjson.Field
UtilisationByWeek respjson.Field
WeeklyCapacityHours respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
How the second stage fared: what it could not make, and which of the two things it ran out of.
The two starvation lists are the point of planning in two stages at all. A finished good held back for want of greige is a knitting problem — knit more of it, or knit it sooner — and one held back for want of hours is a finishing problem: another shift, or a different mix. A single "short" list would throw that distinction away, and it is the only thing this model knows that a one-stage plan does not.
func (ScheduleFinishingDiagnostics) RawJSON ¶
func (r ScheduleFinishingDiagnostics) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleFinishingDiagnostics) UnmarshalJSON ¶
func (r *ScheduleFinishingDiagnostics) UnmarshalJSON(data []byte) error
type ScheduleOrderCoverage ¶
type ScheduleOrderCoverage struct {
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
CoveringLines ListScheduleOrderCoverageLine `json:"covering_lines" api:"required"`
// Horizon week the constraint stage has to finish in for the order to ship on
// time.
DueWeek int64 `json:"due_week" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Resource type identifier.
//
// Any of "schedule_order_coverage".
Object ScheduleOrderCoverageObject `json:"object" api:"required"`
// Why the commitment is at risk.
//
// Any of "past_due", "undated", "short".
Reason ScheduleOrderCoverageReason `json:"reason" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
SalesOrder Entity `json:"sales_order" api:"required"`
// The date this order is contractually due to ship.
ShipByDate time.Time `json:"ship_by_date" api:"required" format:"date-time"`
// SKU of that item.
SKU string `json:"sku" api:"required"`
// Quantity the plan does not build in time.
//
// Less than the whole order when the plan builds part of it — a mostly-built order
// is mostly built, and reporting the full quantity would read as a total miss.
UnitsAtRisk float64 `json:"units_at_risk" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CoveringLines respjson.Field
DueWeek respjson.Field
Item respjson.Field
Object respjson.Field
Reason respjson.Field
SalesOrder respjson.Field
ShipByDate respjson.Field
SKU respjson.Field
UnitsAtRisk respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An order this schedule does not build in time, with the campaigns covering the part it does.
func (ScheduleOrderCoverage) RawJSON ¶
func (r ScheduleOrderCoverage) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleOrderCoverage) UnmarshalJSON ¶
func (r *ScheduleOrderCoverage) UnmarshalJSON(data []byte) error
type ScheduleOrderCoverageLine ¶
type ScheduleOrderCoverageLine struct {
// Quantity of that campaign earmarked for this order.
AllocatedQuantity float64 `json:"allocated_quantity" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Machine Entity `json:"machine" api:"required"`
// Resource type identifier.
//
// Any of "schedule_order_coverage_line".
Object ScheduleOrderCoverageLineObject `json:"object" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
ProductionScheduleLine Entity `json:"production_schedule_line" api:"required"`
// Horizon week it runs in.
WeekIndex int64 `json:"week_index" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AllocatedQuantity respjson.Field
Machine respjson.Field
Object respjson.Field
ProductionScheduleLine respjson.Field
WeekIndex respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
One campaign earmarked for an order.
func (ScheduleOrderCoverageLine) RawJSON ¶
func (r ScheduleOrderCoverageLine) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleOrderCoverageLine) UnmarshalJSON ¶
func (r *ScheduleOrderCoverageLine) UnmarshalJSON(data []byte) error
type ScheduleOrderCoverageLineObject ¶
type ScheduleOrderCoverageLineObject string
Resource type identifier.
const (
ScheduleOrderCoverageLineObjectScheduleOrderCoverageLine ScheduleOrderCoverageLineObject = "schedule_order_coverage_line"
)
type ScheduleOrderCoverageObject ¶
type ScheduleOrderCoverageObject string
Resource type identifier.
const (
ScheduleOrderCoverageObjectScheduleOrderCoverage ScheduleOrderCoverageObject = "schedule_order_coverage"
)
type ScheduleOrderCoverageReason ¶
type ScheduleOrderCoverageReason string
Why the commitment is at risk.
const ( ScheduleOrderCoverageReasonPastDue ScheduleOrderCoverageReason = "past_due" ScheduleOrderCoverageReasonUndated ScheduleOrderCoverageReason = "undated" ScheduleOrderCoverageReasonShort ScheduleOrderCoverageReason = "short" )
type SchedulePolicy ¶
type SchedulePolicy struct {
// ABC class by share of constraint run hours.
//
// - `a`: consumes the largest share of constraint capacity.
// - `b`: moderate constraint consumption.
// - `c`: consumes little constraint capacity.
//
// Any of "a", "b", "c".
AbcClass SchedulePolicyAbcClass `json:"abc_class" api:"required"`
// Demand used for planning, annualized.
AnnualDemand float64 `json:"annual_demand" api:"required"`
// Constraint hours this item's annual demand consumes.
AnnualRunHours float64 `json:"annual_run_hours" api:"required"`
// What the constraint stage holds on average: its buffer plus half a campaign.
AverageGreigeInventory float64 `json:"average_greige_inventory" api:"required"`
// Observed or default lead time at the constraint.
ConstraintLeadTimeWeeks float64 `json:"constraint_lead_time_weeks" api:"required"`
// Economic order quantity: the campaign size that balances the cost of a
// changeover against the cost of holding what it produces.
EoqUnits float64 `json:"eoq_units" api:"required"`
// Lead time from the constraint to sellable stock.
FinishLeadTimeWeeks float64 `json:"finish_lead_time_weeks" api:"required"`
// Outstanding quantity the order book already owed for this item over the horizon.
FirmDemandUnits float64 `json:"firm_demand_units" api:"required"`
// Quantity the forecast projected for the same window.
ForecastDemandUnits float64 `json:"forecast_demand_units" api:"required"`
// How this item was planned.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer, so its safety stocks and reorder point are all zero.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy SchedulePolicyFulfillmentPolicy `json:"fulfillment_policy" api:"required"`
// Annual cost of holding one unit.
HoldingCost float64 `json:"holding_cost" api:"required"`
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// What the constraint stage holds at its peak: its buffer plus a whole campaign.
MaxGreigeInventory float64 `json:"max_greige_inventory" api:"required"`
// Stock on hand at the constraint plus everything downstream of it.
OnHandEchelon float64 `json:"on_hand_echelon" api:"required"`
// Stock sitting at the constraint stage on its own.
OnHandGreige float64 `json:"on_hand_greige" api:"required"`
// Ceiling on how far ahead this item is built.
OrderUpTo float64 `json:"order_up_to" api:"required"`
// Which rule decided that policy: the item itself, its product line, or the
// account default.
//
// Any of "item", "product_line", "account_default".
PolicySource SchedulePolicyPolicySource `json:"policy_source" api:"required"`
// Stock position at which a campaign is triggered.
ReorderPoint float64 `json:"reorder_point" api:"required"`
// Buffer held as finished goods.
SafetyStockDownstream float64 `json:"safety_stock_downstream" api:"required"`
// Buffer held at the constraint, pooled across the finished goods it feeds.
SafetyStockPrimary float64 `json:"safety_stock_primary" api:"required"`
// How long one unit occupies the constraint.
SecondsPerUnit float64 `json:"seconds_per_unit" api:"required"`
// Cost of one changeover, used as the setup cost in the lot-size calculation.
SetupCost float64 `json:"setup_cost" api:"required"`
// SKU of the item.
SKU string `json:"sku" api:"required"`
// Standard cost per unit.
UnitCost float64 `json:"unit_cost" api:"required"`
// Demand used for planning, per week.
WeeklyDemand float64 `json:"weekly_demand" api:"required"`
// Weeks of demand the current stock covers.
WeeksOfCover float64 `json:"weeks_of_cover" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AbcClass respjson.Field
AnnualDemand respjson.Field
AnnualRunHours respjson.Field
AverageGreigeInventory respjson.Field
ConstraintLeadTimeWeeks respjson.Field
EoqUnits respjson.Field
FinishLeadTimeWeeks respjson.Field
FirmDemandUnits respjson.Field
ForecastDemandUnits respjson.Field
FulfillmentPolicy respjson.Field
HoldingCost respjson.Field
Item respjson.Field
MaxGreigeInventory respjson.Field
OnHandEchelon respjson.Field
OnHandGreige respjson.Field
OrderUpTo respjson.Field
PolicySource respjson.Field
ReorderPoint respjson.Field
SafetyStockDownstream respjson.Field
SafetyStockPrimary respjson.Field
SecondsPerUnit respjson.Field
SetupCost respjson.Field
SKU respjson.Field
UnitCost respjson.Field
WeeklyDemand respjson.Field
WeeksOfCover respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The inventory policy computed for one item.
func (SchedulePolicy) RawJSON ¶
func (r SchedulePolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*SchedulePolicy) UnmarshalJSON ¶
func (r *SchedulePolicy) UnmarshalJSON(data []byte) error
type SchedulePolicyAbcClass ¶
type SchedulePolicyAbcClass string
ABC class by share of constraint run hours.
- `a`: consumes the largest share of constraint capacity. - `b`: moderate constraint consumption. - `c`: consumes little constraint capacity.
const ( SchedulePolicyAbcClassA SchedulePolicyAbcClass = "a" SchedulePolicyAbcClassB SchedulePolicyAbcClass = "b" SchedulePolicyAbcClassC SchedulePolicyAbcClass = "c" )
type SchedulePolicyFulfillmentPolicy ¶
type SchedulePolicyFulfillmentPolicy string
How this item was planned.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer, so its safety stocks and reorder point are all zero.
const ( SchedulePolicyFulfillmentPolicyMakeToStock SchedulePolicyFulfillmentPolicy = "make_to_stock" SchedulePolicyFulfillmentPolicyMakeToOrder SchedulePolicyFulfillmentPolicy = "make_to_order" )
type SchedulePolicyPolicySource ¶
type SchedulePolicyPolicySource string
Which rule decided that policy: the item itself, its product line, or the account default.
const ( SchedulePolicyPolicySourceItem SchedulePolicyPolicySource = "item" SchedulePolicyPolicySourceProductLine SchedulePolicyPolicySource = "product_line" SchedulePolicyPolicySourceAccountDefault SchedulePolicyPolicySource = "account_default" )
type ScheduleProjection ¶
type ScheduleProjection struct {
// Entity is a polymorphic reference to any resource in the system.
Item Entity `json:"item" api:"required"`
// Projected stock at the end of each week of the horizon.
OnHandByWeek []float64 `json:"on_hand_by_week" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Item respjson.Field
OnHandByWeek respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An item's projected stock position across the horizon.
func (ScheduleProjection) RawJSON ¶
func (r ScheduleProjection) RawJSON() string
Returns the unmodified JSON received from the API
func (*ScheduleProjection) UnmarshalJSON ¶
func (r *ScheduleProjection) UnmarshalJSON(data []byte) error
type SendMessageRequestAudience ¶
type SendMessageRequestAudience string
Who the message is addressed to on a customer-facing case.
- `customer`: a reply the customer sees, shown to them as coming from "Customer Service" and delivered as email when the case is bridged to an inbox.
- `internal`: a team-only note the customer never sees.
Messages are team-only unless you ask for `customer`, so an internal note can never leak by omission. Asking for `customer` on a conversation that has no customer is rejected.
On a case bridged to an email inbox, a customer reply goes out as mail carrying only the body, subject, and copied recipients — attachments, mentions, resource links, and replies are dropped.
const ( SendMessageRequestAudienceInternal SendMessageRequestAudience = "internal" SendMessageRequestAudienceCustomer SendMessageRequestAudience = "customer" )
type SendMessageRequestChannel ¶
type SendMessageRequestChannel string
The channel a draft will be sent over once it is approved (`mode` = `draft`).
- `message`: appears in the customer's conversation timeline.
- `email`: goes out as an email from the inbox the case is bridged to. Falls back to the conversation timeline if the case has no bridged inbox.
const ( SendMessageRequestChannelMessage SendMessageRequestChannel = "message" SendMessageRequestChannelEmail SendMessageRequestChannel = "email" )
type SendMessageRequestLinkResourceType ¶
type SendMessageRequestLinkResourceType string
Type of a resource to link in the message, paired with `link_resource_id`.
Linking a record lets clients render the message as a reference to it. A link counts in place of text, so a message may consist of nothing but the link.
const ( SendMessageRequestLinkResourceTypeAccount SendMessageRequestLinkResourceType = "account" SendMessageRequestLinkResourceTypeActor SendMessageRequestLinkResourceType = "actor" SendMessageRequestLinkResourceTypeEntity SendMessageRequestLinkResourceType = "entity" SendMessageRequestLinkResourceTypeRecord SendMessageRequestLinkResourceType = "record" SendMessageRequestLinkResourceTypeFreight SendMessageRequestLinkResourceType = "freight" SendMessageRequestLinkResourceTypeCommitment SendMessageRequestLinkResourceType = "commitment" SendMessageRequestLinkResourceTypeSalesOrderTotals SendMessageRequestLinkResourceType = "sales_order_totals" SendMessageRequestLinkResourceTypeSalesOrderStageTotal SendMessageRequestLinkResourceType = "sales_order_stage_total" SendMessageRequestLinkResourceTypeSalesOrderRelated SendMessageRequestLinkResourceType = "sales_order_related" SendMessageRequestLinkResourceTypeOrderContact SendMessageRequestLinkResourceType = "order_contact" SendMessageRequestLinkResourceTypeUser SendMessageRequestLinkResourceType = "user" SendMessageRequestLinkResourceTypeAddress SendMessageRequestLinkResourceType = "address" SendMessageRequestLinkResourceTypeAPIKey SendMessageRequestLinkResourceType = "api_key" SendMessageRequestLinkResourceTypeCreatedAPIKey SendMessageRequestLinkResourceType = "created_api_key" SendMessageRequestLinkResourceTypeRefreshToken SendMessageRequestLinkResourceType = "refresh_token" SendMessageRequestLinkResourceTypeList SendMessageRequestLinkResourceType = "list" SendMessageRequestLinkResourceTypeSandbox SendMessageRequestLinkResourceType = "sandbox" SendMessageRequestLinkResourceTypeRegistrationSession SendMessageRequestLinkResourceType = "registration_session" SendMessageRequestLinkResourceTypePricingPlan SendMessageRequestLinkResourceType = "pricing_plan" SendMessageRequestLinkResourceTypeAccountPlan SendMessageRequestLinkResourceType = "account_plan" SendMessageRequestLinkResourceTypePlanChange SendMessageRequestLinkResourceType = "plan_change" SendMessageRequestLinkResourceTypeEnterpriseInquiry SendMessageRequestLinkResourceType = "enterprise_inquiry" SendMessageRequestLinkResourceTypeRequestLog SendMessageRequestLinkResourceType = "request_log" SendMessageRequestLinkResourceTypeAuditEvent SendMessageRequestLinkResourceType = "audit_event" SendMessageRequestLinkResourceTypeAuditFieldChange SendMessageRequestLinkResourceType = "audit_field_change" SendMessageRequestLinkResourceTypeRole SendMessageRequestLinkResourceType = "role" SendMessageRequestLinkResourceTypeUnit SendMessageRequestLinkResourceType = "unit" SendMessageRequestLinkResourceTypeAccountAffiliation SendMessageRequestLinkResourceType = "account_affiliation" SendMessageRequestLinkResourceTypeAgentDefinition SendMessageRequestLinkResourceType = "agent_definition" SendMessageRequestLinkResourceTypeAvailableTool SendMessageRequestLinkResourceType = "available_tool" SendMessageRequestLinkResourceTypeAgentDefinitionTool SendMessageRequestLinkResourceType = "agent_definition_tool" SendMessageRequestLinkResourceTypeAgentAccountStatus SendMessageRequestLinkResourceType = "agent_account_status" SendMessageRequestLinkResourceTypeAgentRun SendMessageRequestLinkResourceType = "agent_run" SendMessageRequestLinkResourceTypeAgentAction SendMessageRequestLinkResourceType = "agent_action" SendMessageRequestLinkResourceTypeAgentRunStep SendMessageRequestLinkResourceType = "agent_run_step" SendMessageRequestLinkResourceTypeAgentTokenUsage SendMessageRequestLinkResourceType = "agent_token_usage" SendMessageRequestLinkResourceTypeAgentMemory SendMessageRequestLinkResourceType = "agent_memory" SendMessageRequestLinkResourceTypeNotification SendMessageRequestLinkResourceType = "notification" SendMessageRequestLinkResourceTypeNotificationUnreadCount SendMessageRequestLinkResourceType = "notification_unread_count" SendMessageRequestLinkResourceTypeNotificationSendResult SendMessageRequestLinkResourceType = "notification_send_result" SendMessageRequestLinkResourceTypeNotificationUnreadSummary SendMessageRequestLinkResourceType = "notification_unread_summary" SendMessageRequestLinkResourceTypeAnnouncement SendMessageRequestLinkResourceType = "announcement" SendMessageRequestLinkResourceTypeConversation SendMessageRequestLinkResourceType = "conversation" SendMessageRequestLinkResourceTypeSupportCase SendMessageRequestLinkResourceType = "support_case" SendMessageRequestLinkResourceTypeConversationParticipant SendMessageRequestLinkResourceType = "conversation_participant" SendMessageRequestLinkResourceTypeReadCursor SendMessageRequestLinkResourceType = "read_cursor" SendMessageRequestLinkResourceTypeChatMessage SendMessageRequestLinkResourceType = "chat_message" SendMessageRequestLinkResourceTypeNotificationUnreadSummaryAccount SendMessageRequestLinkResourceType = "notification_unread_summary_account" SendMessageRequestLinkResourceTypeMessagingBlock SendMessageRequestLinkResourceType = "messaging_block" SendMessageRequestLinkResourceTypeNotificationPreference SendMessageRequestLinkResourceType = "notification_preference" SendMessageRequestLinkResourceTypeMessageAttachment SendMessageRequestLinkResourceType = "message_attachment" SendMessageRequestLinkResourceTypeAttachmentUploadTarget SendMessageRequestLinkResourceType = "attachment_upload_target" SendMessageRequestLinkResourceTypeScheduledMessage SendMessageRequestLinkResourceType = "scheduled_message" SendMessageRequestLinkResourceTypeMessagingContact SendMessageRequestLinkResourceType = "messaging_contact" SendMessageRequestLinkResourceTypeMessageReport SendMessageRequestLinkResourceType = "message_report" SendMessageRequestLinkResourceTypeToolGroup SendMessageRequestLinkResourceType = "tool_group" SendMessageRequestLinkResourceTypeModel SendMessageRequestLinkResourceType = "model" SendMessageRequestLinkResourceTypePaymentTerm SendMessageRequestLinkResourceType = "payment_term" SendMessageRequestLinkResourceTypeShippingTerm SendMessageRequestLinkResourceType = "shipping_term" SendMessageRequestLinkResourceTypeQuantity SendMessageRequestLinkResourceType = "quantity" SendMessageRequestLinkResourceTypeAccountGroup SendMessageRequestLinkResourceType = "account_group" SendMessageRequestLinkResourceTypeSupportRoute SendMessageRequestLinkResourceType = "support_route" SendMessageRequestLinkResourceTypeSupportAvailability SendMessageRequestLinkResourceType = "support_availability" SendMessageRequestLinkResourceTypeAccountStatus SendMessageRequestLinkResourceType = "account_status" SendMessageRequestLinkResourceTypeGeolocation SendMessageRequestLinkResourceType = "geolocation" SendMessageRequestLinkResourceTypeAccountUser SendMessageRequestLinkResourceType = "account_user" SendMessageRequestLinkResourceTypeDepartment SendMessageRequestLinkResourceType = "department" SendMessageRequestLinkResourceTypeAccountIntegration SendMessageRequestLinkResourceType = "account_integration" SendMessageRequestLinkResourceTypeAccountPrice SendMessageRequestLinkResourceType = "account_price" SendMessageRequestLinkResourceTypeProductLine SendMessageRequestLinkResourceType = "product_line" SendMessageRequestLinkResourceTypeItemCategory SendMessageRequestLinkResourceType = "item_category" SendMessageRequestLinkResourceTypeAttribute SendMessageRequestLinkResourceType = "attribute" SendMessageRequestLinkResourceTypeRate SendMessageRequestLinkResourceType = "rate" SendMessageRequestLinkResourceTypeAccountGroupProductLineAccess SendMessageRequestLinkResourceType = "account_group_product_line_access" SendMessageRequestLinkResourceTypeSalesTarget SendMessageRequestLinkResourceType = "sales_target" SendMessageRequestLinkResourceTypeAdjustmentType SendMessageRequestLinkResourceType = "adjustment_type" SendMessageRequestLinkResourceTypeAccountBranding SendMessageRequestLinkResourceType = "account_branding" SendMessageRequestLinkResourceTypeAccountPortal SendMessageRequestLinkResourceType = "account_portal" SendMessageRequestLinkResourceTypeAccountLogoURL SendMessageRequestLinkResourceType = "account_logo_url" SendMessageRequestLinkResourceTypeAccountFaviconURL SendMessageRequestLinkResourceType = "account_favicon_url" SendMessageRequestLinkResourceTypePublicAccount SendMessageRequestLinkResourceType = "public_account" SendMessageRequestLinkResourceTypeProperty SendMessageRequestLinkResourceType = "property" SendMessageRequestLinkResourceTypeCarrier SendMessageRequestLinkResourceType = "carrier" SendMessageRequestLinkResourceTypeServiceLevel SendMessageRequestLinkResourceType = "service_level" SendMessageRequestLinkResourceTypeItem SendMessageRequestLinkResourceType = "item" SendMessageRequestLinkResourceTypeItemLotDefault SendMessageRequestLinkResourceType = "item_lot_default" SendMessageRequestLinkResourceTypeItemInventory SendMessageRequestLinkResourceType = "item_inventory" SendMessageRequestLinkResourceTypeProduct SendMessageRequestLinkResourceType = "product" SendMessageRequestLinkResourceTypeBatch SendMessageRequestLinkResourceType = "batch" SendMessageRequestLinkResourceTypeBatchFlowNode SendMessageRequestLinkResourceType = "batch_flow_node" SendMessageRequestLinkResourceTypeScanningConsumption SendMessageRequestLinkResourceType = "scanning_consumption" SendMessageRequestLinkResourceTypeOpenBatchSummary SendMessageRequestLinkResourceType = "open_batch_summary" SendMessageRequestLinkResourceTypeScanningProductionStepInfo SendMessageRequestLinkResourceType = "scanning_production_step_info" SendMessageRequestLinkResourceTypeScanningStation SendMessageRequestLinkResourceType = "scanning_station" SendMessageRequestLinkResourceTypeProductionStep SendMessageRequestLinkResourceType = "production_step" SendMessageRequestLinkResourceTypeProductionRun SendMessageRequestLinkResourceType = "production_run" SendMessageRequestLinkResourceTypeMachine SendMessageRequestLinkResourceType = "machine" SendMessageRequestLinkResourceTypeMachineStatus SendMessageRequestLinkResourceType = "machine_status" SendMessageRequestLinkResourceTypeMachineDowntimeEvent SendMessageRequestLinkResourceType = "machine_downtime_event" SendMessageRequestLinkResourceTypeDemandOverride SendMessageRequestLinkResourceType = "demand_override" SendMessageRequestLinkResourceTypeDemandOverrideType SendMessageRequestLinkResourceType = "demand_override_type" SendMessageRequestLinkResourceTypeMachineDowntimeReason SendMessageRequestLinkResourceType = "machine_downtime_reason" SendMessageRequestLinkResourceTypeProductionSchedulePreview SendMessageRequestLinkResourceType = "production_schedule_preview" SendMessageRequestLinkResourceTypeProductionScheduleRegeneratePreview SendMessageRequestLinkResourceType = "production_schedule_regenerate_preview" SendMessageRequestLinkResourceTypeProductionSchedule SendMessageRequestLinkResourceType = "production_schedule" SendMessageRequestLinkResourceTypeProductionScheduleLine SendMessageRequestLinkResourceType = "production_schedule_line" SendMessageRequestLinkResourceTypeProductionScheduleDeviation SendMessageRequestLinkResourceType = "production_schedule_deviation" SendMessageRequestLinkResourceTypeProductionScheduleDerivedLine SendMessageRequestLinkResourceType = "production_schedule_derived_line" SendMessageRequestLinkResourceTypeProductionScheduleSettings SendMessageRequestLinkResourceType = "production_schedule_settings" SendMessageRequestLinkResourceTypeProductionScheduleResourceSetting SendMessageRequestLinkResourceType = "production_schedule_resource_setting" SendMessageRequestLinkResourceTypeProductionScheduleItemSetting SendMessageRequestLinkResourceType = "production_schedule_item_setting" SendMessageRequestLinkResourceTypeFulfillmentRecommendation SendMessageRequestLinkResourceType = "fulfillment_recommendation" SendMessageRequestLinkResourceTypeAnalyzeDeliveryPerformanceResponse SendMessageRequestLinkResourceType = "analyze_delivery_performance_response" SendMessageRequestLinkResourceTypeDeliveryPerformance SendMessageRequestLinkResourceType = "delivery_performance" SendMessageRequestLinkResourceTypeDeliveryBacklogBucket SendMessageRequestLinkResourceType = "delivery_backlog_bucket" SendMessageRequestLinkResourceTypeDeliveryLatenessBucket SendMessageRequestLinkResourceType = "delivery_lateness_bucket" SendMessageRequestLinkResourceTypeDeliveryBreakdown SendMessageRequestLinkResourceType = "delivery_breakdown" SendMessageRequestLinkResourceTypeAnalyzeSalesBreakdownResponse SendMessageRequestLinkResourceType = "analyze_sales_breakdown_response" SendMessageRequestLinkResourceTypeSalesTotals SendMessageRequestLinkResourceType = "sales_totals" SendMessageRequestLinkResourceTypeSalesBreakdown SendMessageRequestLinkResourceType = "sales_breakdown" SendMessageRequestLinkResourceTypeScheduleOrderCoverage SendMessageRequestLinkResourceType = "schedule_order_coverage" SendMessageRequestLinkResourceTypeScheduleOrderCoverageLine SendMessageRequestLinkResourceType = "schedule_order_coverage_line" SendMessageRequestLinkResourceTypeScheduleDeviationType SendMessageRequestLinkResourceType = "schedule_deviation_type" SendMessageRequestLinkResourceTypeScheduleAtRiskOrder SendMessageRequestLinkResourceType = "schedule_at_risk_order" SendMessageRequestLinkResourceTypeProductionScheduleFinishedPolicy SendMessageRequestLinkResourceType = "production_schedule_finished_policy" SendMessageRequestLinkResourceTypeProductionScheduleFinishingLine SendMessageRequestLinkResourceType = "production_schedule_finishing_line" SendMessageRequestLinkResourceTypeProductionScheduleWeekRelease SendMessageRequestLinkResourceType = "production_schedule_week_release" SendMessageRequestLinkResourceTypeProductionScheduleWeekReleasePreview SendMessageRequestLinkResourceType = "production_schedule_week_release_preview" SendMessageRequestLinkResourceTypeProductionScheduleItemPolicy SendMessageRequestLinkResourceType = "production_schedule_item_policy" SendMessageRequestLinkResourceTypeChildAccount SendMessageRequestLinkResourceType = "child_account" SendMessageRequestLinkResourceTypeUnitGroup SendMessageRequestLinkResourceType = "unit_group" SendMessageRequestLinkResourceTypeUnitGroupUnit SendMessageRequestLinkResourceType = "unit_group_unit" SendMessageRequestLinkResourceTypeConsumption SendMessageRequestLinkResourceType = "consumption" SendMessageRequestLinkResourceTypeCustomerProductLineAccess SendMessageRequestLinkResourceType = "customer_product_line_access" SendMessageRequestLinkResourceTypeCustomer SendMessageRequestLinkResourceType = "customer" SendMessageRequestLinkResourceTypeFrequentlyOrderedProduct SendMessageRequestLinkResourceType = "frequently_ordered_product" SendMessageRequestLinkResourceTypePriority SendMessageRequestLinkResourceType = "priority" SendMessageRequestLinkResourceTypeDelivery SendMessageRequestLinkResourceType = "delivery" SendMessageRequestLinkResourceTypeDeliveryLine SendMessageRequestLinkResourceType = "delivery_line" SendMessageRequestLinkResourceTypeDeliveryRelated SendMessageRequestLinkResourceType = "delivery_related" SendMessageRequestLinkResourceTypeSalesOrder SendMessageRequestLinkResourceType = "sales_order" SendMessageRequestLinkResourceTypeLocation SendMessageRequestLinkResourceType = "location" SendMessageRequestLinkResourceTypeLocationType SendMessageRequestLinkResourceType = "location_type" SendMessageRequestLinkResourceTypeLot SendMessageRequestLinkResourceType = "lot" SendMessageRequestLinkResourceTypeEmailLog SendMessageRequestLinkResourceType = "email_log" SendMessageRequestLinkResourceTypeEmailDomain SendMessageRequestLinkResourceType = "email_domain" SendMessageRequestLinkResourceTypeEmailInbox SendMessageRequestLinkResourceType = "email_inbox" SendMessageRequestLinkResourceTypeEmailSender SendMessageRequestLinkResourceType = "email_sender" SendMessageRequestLinkResourceTypePortalDomain SendMessageRequestLinkResourceType = "portal_domain" SendMessageRequestLinkResourceTypeDNSRecord SendMessageRequestLinkResourceType = "dns_record" SendMessageRequestLinkResourceTypeInventoryChangeLog SendMessageRequestLinkResourceType = "inventory_change_log" SendMessageRequestLinkResourceTypeInvoice SendMessageRequestLinkResourceType = "invoice" SendMessageRequestLinkResourceTypeInvoiceSummary SendMessageRequestLinkResourceType = "invoice_summary" SendMessageRequestLinkResourceTypeInvoiceLine SendMessageRequestLinkResourceType = "invoice_line" SendMessageRequestLinkResourceTypeInvoiceAllocation SendMessageRequestLinkResourceType = "invoice_allocation" SendMessageRequestLinkResourceTypeInvoiceForPayment SendMessageRequestLinkResourceType = "invoice_for_payment" SendMessageRequestLinkResourceTypeShipment SendMessageRequestLinkResourceType = "shipment" SendMessageRequestLinkResourceTypeShipmentSummary SendMessageRequestLinkResourceType = "shipment_summary" SendMessageRequestLinkResourceTypeShipmentLine SendMessageRequestLinkResourceType = "shipment_line" SendMessageRequestLinkResourceTypeShippingCase SendMessageRequestLinkResourceType = "shipping_case" SendMessageRequestLinkResourceTypeShippingCaseLabelURL SendMessageRequestLinkResourceType = "shipping_case_label_url" SendMessageRequestLinkResourceTypeSettlement SendMessageRequestLinkResourceType = "settlement" SendMessageRequestLinkResourceTypeSettlementSummary SendMessageRequestLinkResourceType = "settlement_summary" SendMessageRequestLinkResourceTypeRolePermission SendMessageRequestLinkResourceType = "role_permission" SendMessageRequestLinkResourceTypeRegistrationFlow SendMessageRequestLinkResourceType = "registration_flow" SendMessageRequestLinkResourceTypeRegistrationFlowOption SendMessageRequestLinkResourceType = "registration_flow_option" SendMessageRequestLinkResourceTypeTransaction SendMessageRequestLinkResourceType = "transaction" SendMessageRequestLinkResourceTypeTransactionSummary SendMessageRequestLinkResourceType = "transaction_summary" SendMessageRequestLinkResourceTypeTransactionMethod SendMessageRequestLinkResourceType = "transaction_method" SendMessageRequestLinkResourceTypeTransactionType SendMessageRequestLinkResourceType = "transaction_type" SendMessageRequestLinkResourceTypeTransactionAllocation SendMessageRequestLinkResourceType = "transaction_allocation" SendMessageRequestLinkResourceTypeUsageItem SendMessageRequestLinkResourceType = "usage_item" SendMessageRequestLinkResourceTypeAccountUsageResponse SendMessageRequestLinkResourceType = "account_usage_response" SendMessageRequestLinkResourceTypeSubscriptionInfo SendMessageRequestLinkResourceType = "subscription_info" SendMessageRequestLinkResourceTypeBillingPortalSessionResponse SendMessageRequestLinkResourceType = "billing_portal_session_response" SendMessageRequestLinkResourceTypeSwitchPlanResponse SendMessageRequestLinkResourceType = "switch_plan_response" SendMessageRequestLinkResourceTypeEnsureBillingCustomerResponse SendMessageRequestLinkResourceType = "ensure_billing_customer_response" SendMessageRequestLinkResourceTypeSpendingCapResponse SendMessageRequestLinkResourceType = "spending_cap_response" SendMessageRequestLinkResourceTypeAgentSpendInfo SendMessageRequestLinkResourceType = "agent_spend_info" SendMessageRequestLinkResourceTypeWebhookResponse SendMessageRequestLinkResourceType = "webhook_response" SendMessageRequestLinkResourceTypeAddressSuggestion SendMessageRequestLinkResourceType = "address_suggestion" SendMessageRequestLinkResourceTypeAddressComponents SendMessageRequestLinkResourceType = "address_components" SendMessageRequestLinkResourceTypeAddressDetailsResult SendMessageRequestLinkResourceType = "address_details_result" SendMessageRequestLinkResourceTypeValidatedAddress SendMessageRequestLinkResourceType = "validated_address" SendMessageRequestLinkResourceTypePlanLimit SendMessageRequestLinkResourceType = "plan_limit" SendMessageRequestLinkResourceTypePlanChangeProration SendMessageRequestLinkResourceType = "plan_change_proration" SendMessageRequestLinkResourceTypePlanChangeLineItem SendMessageRequestLinkResourceType = "plan_change_line_item" SendMessageRequestLinkResourceTypeSetupBillingResponse SendMessageRequestLinkResourceType = "setup_billing_response" SendMessageRequestLinkResourceTypeConfirmPaymentResponse SendMessageRequestLinkResourceType = "confirm_payment_response" SendMessageRequestLinkResourceTypeOAuthResponse SendMessageRequestLinkResourceType = "oauth_response" SendMessageRequestLinkResourceTypeOAuthStatusResponse SendMessageRequestLinkResourceType = "oauth_status_response" SendMessageRequestLinkResourceTypeStripePublishableKey SendMessageRequestLinkResourceType = "stripe_publishable_key" SendMessageRequestLinkResourceTypeStripeStatus SendMessageRequestLinkResourceType = "stripe_status" SendMessageRequestLinkResourceTypeHealthcheck SendMessageRequestLinkResourceType = "healthcheck" SendMessageRequestLinkResourceTypeAgentDefinitionConfig SendMessageRequestLinkResourceType = "agent_definition_config" SendMessageRequestLinkResourceTypeTriggerConfig SendMessageRequestLinkResourceType = "trigger_config" SendMessageRequestLinkResourceTypeCustomerContactInfo SendMessageRequestLinkResourceType = "customer_contact_info" SendMessageRequestLinkResourceTypeCustomerFreightPreferences SendMessageRequestLinkResourceType = "customer_freight_preferences" SendMessageRequestLinkResourceTypeCustomerDefaults SendMessageRequestLinkResourceType = "customer_defaults" SendMessageRequestLinkResourceTypeCustomerLeadTime SendMessageRequestLinkResourceType = "customer_lead_time" SendMessageRequestLinkResourceTypeCustomerNotificationPreferences SendMessageRequestLinkResourceType = "customer_notification_preferences" SendMessageRequestLinkResourceTypeOrderNotificationRecipient SendMessageRequestLinkResourceType = "order_notification_recipient" SendMessageRequestLinkResourceTypeOrderDiscount SendMessageRequestLinkResourceType = "order_discount" SendMessageRequestLinkResourceTypeSalesOrderLine SendMessageRequestLinkResourceType = "sales_order_line" SendMessageRequestLinkResourceTypeSalesOrderType SendMessageRequestLinkResourceType = "sales_order_type" SendMessageRequestLinkResourceTypeSalesOrderStatus SendMessageRequestLinkResourceType = "sales_order_status" SendMessageRequestLinkResourceTypeMaterial SendMessageRequestLinkResourceType = "material" SendMessageRequestLinkResourceTypeSupplierMaterial SendMessageRequestLinkResourceType = "supplier_material" SendMessageRequestLinkResourceTypePart SendMessageRequestLinkResourceType = "part" SendMessageRequestLinkResourceTypePermissionGroup SendMessageRequestLinkResourceType = "permission_group" SendMessageRequestLinkResourceTypePermission SendMessageRequestLinkResourceType = "permission" SendMessageRequestLinkResourceTypePick SendMessageRequestLinkResourceType = "pick" SendMessageRequestLinkResourceTypePickLine SendMessageRequestLinkResourceType = "pick_line" SendMessageRequestLinkResourceTypeProductType SendMessageRequestLinkResourceType = "product_type" SendMessageRequestLinkResourceTypeProduction SendMessageRequestLinkResourceType = "production" SendMessageRequestLinkResourceTypeProductionFlow SendMessageRequestLinkResourceType = "production_flow" SendMessageRequestLinkResourceTypeMap SendMessageRequestLinkResourceType = "map" SendMessageRequestLinkResourceTypePurchaseOrder SendMessageRequestLinkResourceType = "purchase_order" SendMessageRequestLinkResourceTypePurchaseOrderLine SendMessageRequestLinkResourceType = "purchase_order_line" SendMessageRequestLinkResourceTypePurchaseOrderRelated SendMessageRequestLinkResourceType = "purchase_order_related" SendMessageRequestLinkResourceTypeSupplier SendMessageRequestLinkResourceType = "supplier" SendMessageRequestLinkResourceTypeReceivableEntry SendMessageRequestLinkResourceType = "receivable_entry" SendMessageRequestLinkResourceTypeReceivingOrder SendMessageRequestLinkResourceType = "receiving_order" SendMessageRequestLinkResourceTypeReceivingOrderLine SendMessageRequestLinkResourceType = "receiving_order_line" SendMessageRequestLinkResourceTypeReceivingOrderTotals SendMessageRequestLinkResourceType = "receiving_order_totals" SendMessageRequestLinkResourceTypeReceivingOrderStageTotal SendMessageRequestLinkResourceType = "receiving_order_stage_total" SendMessageRequestLinkResourceTypeReceivingOrderRelated SendMessageRequestLinkResourceType = "receiving_order_related" SendMessageRequestLinkResourceTypeEmailContact SendMessageRequestLinkResourceType = "email_contact" SendMessageRequestLinkResourceTypeAllocationEntry SendMessageRequestLinkResourceType = "allocation_entry" SendMessageRequestLinkResourceTypeOpenCreditEntry SendMessageRequestLinkResourceType = "open_credit_entry" SendMessageRequestLinkResourceTypeVolumeDiscount SendMessageRequestLinkResourceType = "volume_discount" SendMessageRequestLinkResourceTypeVolumeDiscountTier SendMessageRequestLinkResourceType = "volume_discount_tier" SendMessageRequestLinkResourceTypeAnalyzeDeliveriesResponse SendMessageRequestLinkResourceType = "analyze_deliveries_response" SendMessageRequestLinkResourceTypeAnalyzeManufacturingResponse SendMessageRequestLinkResourceType = "analyze_manufacturing_response" SendMessageRequestLinkResourceTypeAnalyzeManufacturingBatchResponse SendMessageRequestLinkResourceType = "analyze_manufacturing_batch_response" SendMessageRequestLinkResourceTypeAnalyzeQuarterlyOrdersResponse SendMessageRequestLinkResourceType = "analyze_quarterly_orders_response" SendMessageRequestLinkResourceTypeAnalyzeNewCustomersResponse SendMessageRequestLinkResourceType = "analyze_new_customers_response" SendMessageRequestLinkResourceTypeAnalyzeDemandForecastResponse SendMessageRequestLinkResourceType = "analyze_demand_forecast_response" SendMessageRequestLinkResourceTypeAnalyzeOeeResponse SendMessageRequestLinkResourceType = "analyze_oee_response" SendMessageRequestLinkResourceTypeAnalyzeOeeTrendResponse SendMessageRequestLinkResourceType = "analyze_oee_trend_response" SendMessageRequestLinkResourceTypeAnalyzeScheduleAttainmentResponse SendMessageRequestLinkResourceType = "analyze_schedule_attainment_response" SendMessageRequestLinkResourceTypeCatalogProductLine SendMessageRequestLinkResourceType = "catalog_product_line" SendMessageRequestLinkResourceTypeCatalogCategory SendMessageRequestLinkResourceType = "catalog_category" SendMessageRequestLinkResourceTypeCatalogProduct SendMessageRequestLinkResourceType = "catalog_product" SendMessageRequestLinkResourceTypeCatalogProperty SendMessageRequestLinkResourceType = "catalog_property" SendMessageRequestLinkResourceTypeCatalogAttribute SendMessageRequestLinkResourceType = "catalog_attribute" SendMessageRequestLinkResourceTypeDcLocation SendMessageRequestLinkResourceType = "dc_location" SendMessageRequestLinkResourceTypeEdiRun SendMessageRequestLinkResourceType = "edi_run" SendMessageRequestLinkResourceTypeInventoryItem SendMessageRequestLinkResourceType = "inventory_item" SendMessageRequestLinkResourceTypeAnalyzeWeeksOfSalesResponse SendMessageRequestLinkResourceType = "analyze_weeks_of_sales_response" SendMessageRequestLinkResourceTypeBulkReconcileItemsResponse SendMessageRequestLinkResourceType = "bulk_reconcile_items_response" SendMessageRequestLinkResourceTypeSysProperty SendMessageRequestLinkResourceType = "sys_property" SendMessageRequestLinkResourceTypeSysPropertyType SendMessageRequestLinkResourceType = "sys_property_type" SendMessageRequestLinkResourceTypeSysPropertyValue SendMessageRequestLinkResourceType = "sys_property_value" SendMessageRequestLinkResourceTypeTerritory SendMessageRequestLinkResourceType = "territory" SendMessageRequestLinkResourceTypeTenancy SendMessageRequestLinkResourceType = "tenancy" SendMessageRequestLinkResourceTypeCheckoutSession SendMessageRequestLinkResourceType = "checkout_session" SendMessageRequestLinkResourceTypeEstimateRateResult SendMessageRequestLinkResourceType = "estimate_rate_result" SendMessageRequestLinkResourceTypeRateShopOption SendMessageRequestLinkResourceType = "rate_shop_option" SendMessageRequestLinkResourceTypeRateShopResult SendMessageRequestLinkResourceType = "rate_shop_result" SendMessageRequestLinkResourceTypeOwner SendMessageRequestLinkResourceType = "owner" SendMessageRequestLinkResourceTypeCreatedBy SendMessageRequestLinkResourceType = "created_by" SendMessageRequestLinkResourceTypeMessage SendMessageRequestLinkResourceType = "message" SendMessageRequestLinkResourceTypeAccountPhotoUploadResult SendMessageRequestLinkResourceType = "account_photo_upload_result" SendMessageRequestLinkResourceTypeUserPhotoUploadResult SendMessageRequestLinkResourceType = "user_photo_upload_result" SendMessageRequestLinkResourceTypeUserPhotoURL SendMessageRequestLinkResourceType = "user_photo_url" SendMessageRequestLinkResourceTypeBatchLot SendMessageRequestLinkResourceType = "batch_lot" SendMessageRequestLinkResourceTypeCheckDuplicateResult SendMessageRequestLinkResourceType = "check_duplicate_result" SendMessageRequestLinkResourceTypeItemCosts SendMessageRequestLinkResourceType = "item_costs" SendMessageRequestLinkResourceTypeItemTrends SendMessageRequestLinkResourceType = "item_trends" SendMessageRequestLinkResourceTypeReconciledItemResult SendMessageRequestLinkResourceType = "reconciled_item_result" SendMessageRequestLinkResourceTypeSkippedItemResult SendMessageRequestLinkResourceType = "skipped_item_result" SendMessageRequestLinkResourceTypeReconcileErrorResult SendMessageRequestLinkResourceType = "reconcile_error_result" SendMessageRequestLinkResourceTypeItemTrendPoint SendMessageRequestLinkResourceType = "item_trend_point" SendMessageRequestLinkResourceTypeTenancyPendingRegistration SendMessageRequestLinkResourceType = "tenancy_pending_registration" SendMessageRequestLinkResourceTypeInvoiceAllocationEntry SendMessageRequestLinkResourceType = "invoice_allocation_entry" SendMessageRequestLinkResourceTypeAllocationCustomer SendMessageRequestLinkResourceType = "allocation_customer" SendMessageRequestLinkResourceTypeCheckoutSalesOrder SendMessageRequestLinkResourceType = "checkout_sales_order" SendMessageRequestLinkResourceTypeSalesOrderPriceQuote SendMessageRequestLinkResourceType = "sales_order_price_quote" SendMessageRequestLinkResourceTypeSalesOrderFreightQuote SendMessageRequestLinkResourceType = "sales_order_freight_quote" SendMessageRequestLinkResourceTypeSalesOrderCommitmentQuote SendMessageRequestLinkResourceType = "sales_order_commitment_quote" SendMessageRequestLinkResourceTypeOperatingCalendar SendMessageRequestLinkResourceType = "operating_calendar" SendMessageRequestLinkResourceTypeOperatingCalendarClosure SendMessageRequestLinkResourceType = "operating_calendar_closure" SendMessageRequestLinkResourceTypeSalesOrderPriceQuoteLine SendMessageRequestLinkResourceType = "sales_order_price_quote_line" SendMessageRequestLinkResourceTypeHubspotSyncJob SendMessageRequestLinkResourceType = "hubspot_sync_job" SendMessageRequestLinkResourceTypeHubspotSyncReport SendMessageRequestLinkResourceType = "hubspot_sync_report" SendMessageRequestLinkResourceTypeHubspotCompanyReview SendMessageRequestLinkResourceType = "hubspot_company_review" SendMessageRequestLinkResourceTypeHubspotCompanyCandidate SendMessageRequestLinkResourceType = "hubspot_company_candidate" SendMessageRequestLinkResourceTypeHubspotSyncRecord SendMessageRequestLinkResourceType = "hubspot_sync_record" SendMessageRequestLinkResourceTypeContactMatch SendMessageRequestLinkResourceType = "contact_match" SendMessageRequestLinkResourceTypeReplyDraft SendMessageRequestLinkResourceType = "reply_draft" SendMessageRequestLinkResourceTypeConversationLink SendMessageRequestLinkResourceType = "conversation_link" SendMessageRequestLinkResourceTypeMessagingGroup SendMessageRequestLinkResourceType = "messaging_group" SendMessageRequestLinkResourceTypeMessagingGroupMember SendMessageRequestLinkResourceType = "messaging_group_member" SendMessageRequestLinkResourceTypePortalProfile SendMessageRequestLinkResourceType = "portal_profile" SendMessageRequestLinkResourceTypePortalRegistrationSession SendMessageRequestLinkResourceType = "portal_registration_session" SendMessageRequestLinkResourceTypePortalRegistrationSessionData SendMessageRequestLinkResourceType = "portal_registration_session_data" SendMessageRequestLinkResourceTypePackList SendMessageRequestLinkResourceType = "pack_list" SendMessageRequestLinkResourceTypePackListParty SendMessageRequestLinkResourceType = "pack_list_party" SendMessageRequestLinkResourceTypePackListLineItem SendMessageRequestLinkResourceType = "pack_list_line_item" SendMessageRequestLinkResourceTypePackListBackOrder SendMessageRequestLinkResourceType = "pack_list_back_order" SendMessageRequestLinkResourceTypePackListCase SendMessageRequestLinkResourceType = "pack_list_case" SendMessageRequestLinkResourceTypeJob SendMessageRequestLinkResourceType = "job" SendMessageRequestLinkResourceTypeJobResult SendMessageRequestLinkResourceType = "job_result" SendMessageRequestLinkResourceTypeJobExport SendMessageRequestLinkResourceType = "job_export" SendMessageRequestLinkResourceTypeAnalyzeCustomerPricingResponse SendMessageRequestLinkResourceType = "analyze_customer_pricing_response" SendMessageRequestLinkResourceTypeCustomerPricingFinding SendMessageRequestLinkResourceType = "customer_pricing_finding" SendMessageRequestLinkResourceTypeCustomerPricingSummary SendMessageRequestLinkResourceType = "customer_pricing_summary" SendMessageRequestLinkResourceTypeComputedRate SendMessageRequestLinkResourceType = "computed_rate" SendMessageRequestLinkResourceTypeComputedQuantity SendMessageRequestLinkResourceType = "computed_quantity" SendMessageRequestLinkResourceTypeAnalyzeRealizedMarginsResponse SendMessageRequestLinkResourceType = "analyze_realized_margins_response" SendMessageRequestLinkResourceTypeRealizedMarginFinding SendMessageRequestLinkResourceType = "realized_margin_finding" SendMessageRequestLinkResourceTypeRealizedMarginSummary SendMessageRequestLinkResourceType = "realized_margin_summary" SendMessageRequestLinkResourceTypeShipmentRelated SendMessageRequestLinkResourceType = "shipment_related" SendMessageRequestLinkResourceTypeInvoiceRelated SendMessageRequestLinkResourceType = "invoice_related" SendMessageRequestLinkResourceTypePickRelated SendMessageRequestLinkResourceType = "pick_related" SendMessageRequestLinkResourceTypePickTotals SendMessageRequestLinkResourceType = "pick_totals" SendMessageRequestLinkResourceTypePickStageTotal SendMessageRequestLinkResourceType = "pick_stage_total" )
type SendMessageRequestMode ¶
type SendMessageRequestMode string
Whether to deliver the message now or hold it as a customer-reply draft.
- `send`: delivers the message, immediately or at `scheduled_at`.
- `draft`: proposes a reply to the customer on a customer-facing case and holds it for a teammate to approve before it goes out. Requires `channel`.
A draft is built from `body`, `subject`, `channel`, and `source_thread_message_id` only — attachments, mentions, copied recipients, resource links, replies, and scheduling are not carried onto it.
const ( SendMessageRequestModeSend SendMessageRequestMode = "send" SendMessageRequestModeDraft SendMessageRequestMode = "draft" )
type SendMessageRequestParam ¶
type SendMessageRequestParam struct {
// Message body.
//
// Required unless the message carries at least one attachment or a resource link.
Body string `json:"body" api:"required"`
// Client-supplied dedupe key.
//
// Repeating an immediate send with the same value returns the message created by
// the first request instead of posting a second one, so a retry after a network
// failure is safe. Required when sending (`mode` = `send`); ignored for drafts.
ClientMessageID string `json:"client_message_id" api:"required"`
// ID of a resource to link in the message, paired with `link_resource_type`.
LinkResourceID param.Opt[string] `json:"link_resource_id,omitzero"`
// The message this one is a reply to.
ReplyToMessageID param.Opt[string] `json:"reply_to_message_id,omitzero"`
// When set, hold the message and deliver it at this future time instead of sending
// it now.
//
// Only the body is carried into a scheduled send — attachments, mentions, copied
// recipients, resource links, replies, and audience are dropped, and it is
// delivered as an ordinary team-visible message. If you are no longer an active
// participant when it comes due, it is canceled instead of sent.
ScheduledAt param.Opt[time.Time] `json:"scheduled_at,omitzero" format:"date-time"`
// The internal thread message a draft is composed from, when drafting from a
// thread (`mode` = `draft`).
SourceThreadMessageID param.Opt[string] `json:"source_thread_message_id,omitzero"`
// The subject line for a customer reply sent by email.
//
// When omitted, the reply goes out as "Re:" the case title.
Subject param.Opt[string] `json:"subject,omitzero"`
// Attachments to include with the message.
Attachments []MessageAttachmentInputParam `json:"attachments,omitzero"`
// Who the message is addressed to on a customer-facing case.
//
// - `customer`: a reply the customer sees, shown to them as coming from "Customer
// Service" and delivered as email when the case is bridged to an inbox.
// - `internal`: a team-only note the customer never sees.
//
// Messages are team-only unless you ask for `customer`, so an internal note can
// never leak by omission. Asking for `customer` on a conversation that has no
// customer is rejected.
//
// On a case bridged to an email inbox, a customer reply goes out as mail carrying
// only the body, subject, and copied recipients — attachments, mentions, resource
// links, and replies are dropped.
//
// Any of "internal", "customer".
Audience SendMessageRequestAudience `json:"audience,omitzero"`
// Additional email addresses to copy on a customer reply sent by email.
Cc []string `json:"cc,omitzero"`
// The channel a draft will be sent over once it is approved (`mode` = `draft`).
//
// - `message`: appears in the customer's conversation timeline.
// - `email`: goes out as an email from the inbox the case is bridged to. Falls
// back to the conversation timeline if the case has no bridged inbox.
//
// Any of "message", "email".
Channel SendMessageRequestChannel `json:"channel,omitzero"`
// Type of a resource to link in the message, paired with `link_resource_id`.
//
// Linking a record lets clients render the message as a reference to it. A link
// counts in place of text, so a message may consist of nothing but the link.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
LinkResourceType SendMessageRequestLinkResourceType `json:"link_resource_type,omitzero"`
// Account user ids explicitly @mentioned in the message.
//
// A mention notifies the person even when they have muted the conversation.
Mentions []string `json:"mentions,omitzero"`
// Whether to deliver the message now or hold it as a customer-reply draft.
//
// - `send`: delivers the message, immediately or at `scheduled_at`.
// - `draft`: proposes a reply to the customer on a customer-facing case and holds
// it for a teammate to approve before it goes out. Requires `channel`.
//
// A draft is built from `body`, `subject`, `channel`, and
// `source_thread_message_id` only — attachments, mentions, copied recipients,
// resource links, replies, and scheduling are not carried onto it.
//
// Any of "send", "draft".
Mode SendMessageRequestMode `json:"mode,omitzero"`
// contains filtered or unexported fields
}
Request to post a message to a conversation.
The properties Body, ClientMessageID are required.
func (SendMessageRequestParam) MarshalJSON ¶
func (r SendMessageRequestParam) MarshalJSON() (data []byte, err error)
func (*SendMessageRequestParam) UnmarshalJSON ¶
func (r *SendMessageRequestParam) UnmarshalJSON(data []byte) error
type SendNotificationRequestCategory ¶
type SendNotificationRequestCategory string
The kind of event the notification represents, such as `order.updated`.
Categories are how clients group and filter the feed, so reuse an existing one where it fits.
const ( SendNotificationRequestCategoryChatMessage SendNotificationRequestCategory = "chat.message" SendNotificationRequestCategoryChatMention SendNotificationRequestCategory = "chat.mention" SendNotificationRequestCategoryChatAdded SendNotificationRequestCategory = "chat.added" SendNotificationRequestCategoryOrderUpdated SendNotificationRequestCategory = "order.updated" SendNotificationRequestCategoryAgentRunCompleted SendNotificationRequestCategory = "agent.run_completed" SendNotificationRequestCategoryAgentAlert SendNotificationRequestCategory = "agent.alert" SendNotificationRequestCategorySystemBroadcast SendNotificationRequestCategory = "system.broadcast" SendNotificationRequestCategoryCustomerRegistered SendNotificationRequestCategory = "customer.registered" )
type SendNotificationRequestLinkResourceType ¶
type SendNotificationRequestLinkResourceType string
Type of the resource the notification should link to, such as `sales_order`.
Set it together with `link_resource_id` to point the notification at something the recipient can open; supplying only one of the two produces a notification with no link.
const ( SendNotificationRequestLinkResourceTypeAccount SendNotificationRequestLinkResourceType = "account" SendNotificationRequestLinkResourceTypeActor SendNotificationRequestLinkResourceType = "actor" SendNotificationRequestLinkResourceTypeEntity SendNotificationRequestLinkResourceType = "entity" SendNotificationRequestLinkResourceTypeRecord SendNotificationRequestLinkResourceType = "record" SendNotificationRequestLinkResourceTypeFreight SendNotificationRequestLinkResourceType = "freight" SendNotificationRequestLinkResourceTypeCommitment SendNotificationRequestLinkResourceType = "commitment" SendNotificationRequestLinkResourceTypeSalesOrderTotals SendNotificationRequestLinkResourceType = "sales_order_totals" SendNotificationRequestLinkResourceTypeSalesOrderStageTotal SendNotificationRequestLinkResourceType = "sales_order_stage_total" SendNotificationRequestLinkResourceTypeSalesOrderRelated SendNotificationRequestLinkResourceType = "sales_order_related" SendNotificationRequestLinkResourceTypeOrderContact SendNotificationRequestLinkResourceType = "order_contact" SendNotificationRequestLinkResourceTypeUser SendNotificationRequestLinkResourceType = "user" SendNotificationRequestLinkResourceTypeAddress SendNotificationRequestLinkResourceType = "address" SendNotificationRequestLinkResourceTypeAPIKey SendNotificationRequestLinkResourceType = "api_key" SendNotificationRequestLinkResourceTypeCreatedAPIKey SendNotificationRequestLinkResourceType = "created_api_key" SendNotificationRequestLinkResourceTypeRefreshToken SendNotificationRequestLinkResourceType = "refresh_token" SendNotificationRequestLinkResourceTypeList SendNotificationRequestLinkResourceType = "list" SendNotificationRequestLinkResourceTypeSandbox SendNotificationRequestLinkResourceType = "sandbox" SendNotificationRequestLinkResourceTypeRegistrationSession SendNotificationRequestLinkResourceType = "registration_session" SendNotificationRequestLinkResourceTypePricingPlan SendNotificationRequestLinkResourceType = "pricing_plan" SendNotificationRequestLinkResourceTypeAccountPlan SendNotificationRequestLinkResourceType = "account_plan" SendNotificationRequestLinkResourceTypePlanChange SendNotificationRequestLinkResourceType = "plan_change" SendNotificationRequestLinkResourceTypeEnterpriseInquiry SendNotificationRequestLinkResourceType = "enterprise_inquiry" SendNotificationRequestLinkResourceTypeRequestLog SendNotificationRequestLinkResourceType = "request_log" SendNotificationRequestLinkResourceTypeAuditEvent SendNotificationRequestLinkResourceType = "audit_event" SendNotificationRequestLinkResourceTypeAuditFieldChange SendNotificationRequestLinkResourceType = "audit_field_change" SendNotificationRequestLinkResourceTypeRole SendNotificationRequestLinkResourceType = "role" SendNotificationRequestLinkResourceTypeUnit SendNotificationRequestLinkResourceType = "unit" SendNotificationRequestLinkResourceTypeAccountAffiliation SendNotificationRequestLinkResourceType = "account_affiliation" SendNotificationRequestLinkResourceTypeAgentDefinition SendNotificationRequestLinkResourceType = "agent_definition" SendNotificationRequestLinkResourceTypeAvailableTool SendNotificationRequestLinkResourceType = "available_tool" SendNotificationRequestLinkResourceTypeAgentDefinitionTool SendNotificationRequestLinkResourceType = "agent_definition_tool" SendNotificationRequestLinkResourceTypeAgentAccountStatus SendNotificationRequestLinkResourceType = "agent_account_status" SendNotificationRequestLinkResourceTypeAgentRun SendNotificationRequestLinkResourceType = "agent_run" SendNotificationRequestLinkResourceTypeAgentAction SendNotificationRequestLinkResourceType = "agent_action" SendNotificationRequestLinkResourceTypeAgentRunStep SendNotificationRequestLinkResourceType = "agent_run_step" SendNotificationRequestLinkResourceTypeAgentTokenUsage SendNotificationRequestLinkResourceType = "agent_token_usage" SendNotificationRequestLinkResourceTypeAgentMemory SendNotificationRequestLinkResourceType = "agent_memory" SendNotificationRequestLinkResourceTypeNotification SendNotificationRequestLinkResourceType = "notification" SendNotificationRequestLinkResourceTypeNotificationUnreadCount SendNotificationRequestLinkResourceType = "notification_unread_count" SendNotificationRequestLinkResourceTypeNotificationSendResult SendNotificationRequestLinkResourceType = "notification_send_result" SendNotificationRequestLinkResourceTypeNotificationUnreadSummary SendNotificationRequestLinkResourceType = "notification_unread_summary" SendNotificationRequestLinkResourceTypeAnnouncement SendNotificationRequestLinkResourceType = "announcement" SendNotificationRequestLinkResourceTypeConversation SendNotificationRequestLinkResourceType = "conversation" SendNotificationRequestLinkResourceTypeSupportCase SendNotificationRequestLinkResourceType = "support_case" SendNotificationRequestLinkResourceTypeConversationParticipant SendNotificationRequestLinkResourceType = "conversation_participant" SendNotificationRequestLinkResourceTypeReadCursor SendNotificationRequestLinkResourceType = "read_cursor" SendNotificationRequestLinkResourceTypeChatMessage SendNotificationRequestLinkResourceType = "chat_message" SendNotificationRequestLinkResourceTypeNotificationUnreadSummaryAccount SendNotificationRequestLinkResourceType = "notification_unread_summary_account" SendNotificationRequestLinkResourceTypeMessagingBlock SendNotificationRequestLinkResourceType = "messaging_block" SendNotificationRequestLinkResourceTypeNotificationPreference SendNotificationRequestLinkResourceType = "notification_preference" SendNotificationRequestLinkResourceTypeMessageAttachment SendNotificationRequestLinkResourceType = "message_attachment" SendNotificationRequestLinkResourceTypeAttachmentUploadTarget SendNotificationRequestLinkResourceType = "attachment_upload_target" SendNotificationRequestLinkResourceTypeScheduledMessage SendNotificationRequestLinkResourceType = "scheduled_message" SendNotificationRequestLinkResourceTypeMessagingContact SendNotificationRequestLinkResourceType = "messaging_contact" SendNotificationRequestLinkResourceTypeMessageReport SendNotificationRequestLinkResourceType = "message_report" SendNotificationRequestLinkResourceTypeToolGroup SendNotificationRequestLinkResourceType = "tool_group" SendNotificationRequestLinkResourceTypeModel SendNotificationRequestLinkResourceType = "model" SendNotificationRequestLinkResourceTypePaymentTerm SendNotificationRequestLinkResourceType = "payment_term" SendNotificationRequestLinkResourceTypeShippingTerm SendNotificationRequestLinkResourceType = "shipping_term" SendNotificationRequestLinkResourceTypeQuantity SendNotificationRequestLinkResourceType = "quantity" SendNotificationRequestLinkResourceTypeAccountGroup SendNotificationRequestLinkResourceType = "account_group" SendNotificationRequestLinkResourceTypeSupportRoute SendNotificationRequestLinkResourceType = "support_route" SendNotificationRequestLinkResourceTypeSupportAvailability SendNotificationRequestLinkResourceType = "support_availability" SendNotificationRequestLinkResourceTypeAccountStatus SendNotificationRequestLinkResourceType = "account_status" SendNotificationRequestLinkResourceTypeGeolocation SendNotificationRequestLinkResourceType = "geolocation" SendNotificationRequestLinkResourceTypeAccountUser SendNotificationRequestLinkResourceType = "account_user" SendNotificationRequestLinkResourceTypeDepartment SendNotificationRequestLinkResourceType = "department" SendNotificationRequestLinkResourceTypeAccountIntegration SendNotificationRequestLinkResourceType = "account_integration" SendNotificationRequestLinkResourceTypeAccountPrice SendNotificationRequestLinkResourceType = "account_price" SendNotificationRequestLinkResourceTypeProductLine SendNotificationRequestLinkResourceType = "product_line" SendNotificationRequestLinkResourceTypeItemCategory SendNotificationRequestLinkResourceType = "item_category" SendNotificationRequestLinkResourceTypeAttribute SendNotificationRequestLinkResourceType = "attribute" SendNotificationRequestLinkResourceTypeRate SendNotificationRequestLinkResourceType = "rate" SendNotificationRequestLinkResourceTypeAccountGroupProductLineAccess SendNotificationRequestLinkResourceType = "account_group_product_line_access" SendNotificationRequestLinkResourceTypeSalesTarget SendNotificationRequestLinkResourceType = "sales_target" SendNotificationRequestLinkResourceTypeAdjustmentType SendNotificationRequestLinkResourceType = "adjustment_type" SendNotificationRequestLinkResourceTypeAccountBranding SendNotificationRequestLinkResourceType = "account_branding" SendNotificationRequestLinkResourceTypeAccountPortal SendNotificationRequestLinkResourceType = "account_portal" SendNotificationRequestLinkResourceTypeAccountLogoURL SendNotificationRequestLinkResourceType = "account_logo_url" SendNotificationRequestLinkResourceTypeAccountFaviconURL SendNotificationRequestLinkResourceType = "account_favicon_url" SendNotificationRequestLinkResourceTypePublicAccount SendNotificationRequestLinkResourceType = "public_account" SendNotificationRequestLinkResourceTypeProperty SendNotificationRequestLinkResourceType = "property" SendNotificationRequestLinkResourceTypeCarrier SendNotificationRequestLinkResourceType = "carrier" SendNotificationRequestLinkResourceTypeServiceLevel SendNotificationRequestLinkResourceType = "service_level" SendNotificationRequestLinkResourceTypeItem SendNotificationRequestLinkResourceType = "item" SendNotificationRequestLinkResourceTypeItemLotDefault SendNotificationRequestLinkResourceType = "item_lot_default" SendNotificationRequestLinkResourceTypeItemInventory SendNotificationRequestLinkResourceType = "item_inventory" SendNotificationRequestLinkResourceTypeProduct SendNotificationRequestLinkResourceType = "product" SendNotificationRequestLinkResourceTypeBatch SendNotificationRequestLinkResourceType = "batch" SendNotificationRequestLinkResourceTypeBatchFlowNode SendNotificationRequestLinkResourceType = "batch_flow_node" SendNotificationRequestLinkResourceTypeScanningConsumption SendNotificationRequestLinkResourceType = "scanning_consumption" SendNotificationRequestLinkResourceTypeOpenBatchSummary SendNotificationRequestLinkResourceType = "open_batch_summary" SendNotificationRequestLinkResourceTypeScanningProductionStepInfo SendNotificationRequestLinkResourceType = "scanning_production_step_info" SendNotificationRequestLinkResourceTypeScanningStation SendNotificationRequestLinkResourceType = "scanning_station" SendNotificationRequestLinkResourceTypeProductionStep SendNotificationRequestLinkResourceType = "production_step" SendNotificationRequestLinkResourceTypeProductionRun SendNotificationRequestLinkResourceType = "production_run" SendNotificationRequestLinkResourceTypeMachine SendNotificationRequestLinkResourceType = "machine" SendNotificationRequestLinkResourceTypeMachineStatus SendNotificationRequestLinkResourceType = "machine_status" SendNotificationRequestLinkResourceTypeMachineDowntimeEvent SendNotificationRequestLinkResourceType = "machine_downtime_event" SendNotificationRequestLinkResourceTypeDemandOverride SendNotificationRequestLinkResourceType = "demand_override" SendNotificationRequestLinkResourceTypeDemandOverrideType SendNotificationRequestLinkResourceType = "demand_override_type" SendNotificationRequestLinkResourceTypeMachineDowntimeReason SendNotificationRequestLinkResourceType = "machine_downtime_reason" SendNotificationRequestLinkResourceTypeProductionSchedulePreview SendNotificationRequestLinkResourceType = "production_schedule_preview" SendNotificationRequestLinkResourceTypeProductionScheduleRegeneratePreview SendNotificationRequestLinkResourceType = "production_schedule_regenerate_preview" SendNotificationRequestLinkResourceTypeProductionSchedule SendNotificationRequestLinkResourceType = "production_schedule" SendNotificationRequestLinkResourceTypeProductionScheduleLine SendNotificationRequestLinkResourceType = "production_schedule_line" SendNotificationRequestLinkResourceTypeProductionScheduleDeviation SendNotificationRequestLinkResourceType = "production_schedule_deviation" SendNotificationRequestLinkResourceTypeProductionScheduleDerivedLine SendNotificationRequestLinkResourceType = "production_schedule_derived_line" SendNotificationRequestLinkResourceTypeProductionScheduleSettings SendNotificationRequestLinkResourceType = "production_schedule_settings" SendNotificationRequestLinkResourceTypeProductionScheduleResourceSetting SendNotificationRequestLinkResourceType = "production_schedule_resource_setting" SendNotificationRequestLinkResourceTypeProductionScheduleItemSetting SendNotificationRequestLinkResourceType = "production_schedule_item_setting" SendNotificationRequestLinkResourceTypeFulfillmentRecommendation SendNotificationRequestLinkResourceType = "fulfillment_recommendation" SendNotificationRequestLinkResourceTypeAnalyzeDeliveryPerformanceResponse SendNotificationRequestLinkResourceType = "analyze_delivery_performance_response" SendNotificationRequestLinkResourceTypeDeliveryPerformance SendNotificationRequestLinkResourceType = "delivery_performance" SendNotificationRequestLinkResourceTypeDeliveryBacklogBucket SendNotificationRequestLinkResourceType = "delivery_backlog_bucket" SendNotificationRequestLinkResourceTypeDeliveryLatenessBucket SendNotificationRequestLinkResourceType = "delivery_lateness_bucket" SendNotificationRequestLinkResourceTypeDeliveryBreakdown SendNotificationRequestLinkResourceType = "delivery_breakdown" SendNotificationRequestLinkResourceTypeAnalyzeSalesBreakdownResponse SendNotificationRequestLinkResourceType = "analyze_sales_breakdown_response" SendNotificationRequestLinkResourceTypeSalesTotals SendNotificationRequestLinkResourceType = "sales_totals" SendNotificationRequestLinkResourceTypeSalesBreakdown SendNotificationRequestLinkResourceType = "sales_breakdown" SendNotificationRequestLinkResourceTypeScheduleOrderCoverage SendNotificationRequestLinkResourceType = "schedule_order_coverage" SendNotificationRequestLinkResourceTypeScheduleOrderCoverageLine SendNotificationRequestLinkResourceType = "schedule_order_coverage_line" SendNotificationRequestLinkResourceTypeScheduleDeviationType SendNotificationRequestLinkResourceType = "schedule_deviation_type" SendNotificationRequestLinkResourceTypeScheduleAtRiskOrder SendNotificationRequestLinkResourceType = "schedule_at_risk_order" SendNotificationRequestLinkResourceTypeProductionScheduleFinishedPolicy SendNotificationRequestLinkResourceType = "production_schedule_finished_policy" SendNotificationRequestLinkResourceTypeProductionScheduleFinishingLine SendNotificationRequestLinkResourceType = "production_schedule_finishing_line" SendNotificationRequestLinkResourceTypeProductionScheduleWeekRelease SendNotificationRequestLinkResourceType = "production_schedule_week_release" SendNotificationRequestLinkResourceTypeProductionScheduleWeekReleasePreview SendNotificationRequestLinkResourceType = "production_schedule_week_release_preview" SendNotificationRequestLinkResourceTypeProductionScheduleItemPolicy SendNotificationRequestLinkResourceType = "production_schedule_item_policy" SendNotificationRequestLinkResourceTypeChildAccount SendNotificationRequestLinkResourceType = "child_account" SendNotificationRequestLinkResourceTypeUnitGroup SendNotificationRequestLinkResourceType = "unit_group" SendNotificationRequestLinkResourceTypeUnitGroupUnit SendNotificationRequestLinkResourceType = "unit_group_unit" SendNotificationRequestLinkResourceTypeConsumption SendNotificationRequestLinkResourceType = "consumption" SendNotificationRequestLinkResourceTypeCustomerProductLineAccess SendNotificationRequestLinkResourceType = "customer_product_line_access" SendNotificationRequestLinkResourceTypeCustomer SendNotificationRequestLinkResourceType = "customer" SendNotificationRequestLinkResourceTypeFrequentlyOrderedProduct SendNotificationRequestLinkResourceType = "frequently_ordered_product" SendNotificationRequestLinkResourceTypePriority SendNotificationRequestLinkResourceType = "priority" SendNotificationRequestLinkResourceTypeDelivery SendNotificationRequestLinkResourceType = "delivery" SendNotificationRequestLinkResourceTypeDeliveryLine SendNotificationRequestLinkResourceType = "delivery_line" SendNotificationRequestLinkResourceTypeDeliveryRelated SendNotificationRequestLinkResourceType = "delivery_related" SendNotificationRequestLinkResourceTypeSalesOrder SendNotificationRequestLinkResourceType = "sales_order" SendNotificationRequestLinkResourceTypeLocation SendNotificationRequestLinkResourceType = "location" SendNotificationRequestLinkResourceTypeLocationType SendNotificationRequestLinkResourceType = "location_type" SendNotificationRequestLinkResourceTypeLot SendNotificationRequestLinkResourceType = "lot" SendNotificationRequestLinkResourceTypeEmailLog SendNotificationRequestLinkResourceType = "email_log" SendNotificationRequestLinkResourceTypeEmailDomain SendNotificationRequestLinkResourceType = "email_domain" SendNotificationRequestLinkResourceTypeEmailInbox SendNotificationRequestLinkResourceType = "email_inbox" SendNotificationRequestLinkResourceTypeEmailSender SendNotificationRequestLinkResourceType = "email_sender" SendNotificationRequestLinkResourceTypePortalDomain SendNotificationRequestLinkResourceType = "portal_domain" SendNotificationRequestLinkResourceTypeDNSRecord SendNotificationRequestLinkResourceType = "dns_record" SendNotificationRequestLinkResourceTypeInventoryChangeLog SendNotificationRequestLinkResourceType = "inventory_change_log" SendNotificationRequestLinkResourceTypeInvoice SendNotificationRequestLinkResourceType = "invoice" SendNotificationRequestLinkResourceTypeInvoiceSummary SendNotificationRequestLinkResourceType = "invoice_summary" SendNotificationRequestLinkResourceTypeInvoiceLine SendNotificationRequestLinkResourceType = "invoice_line" SendNotificationRequestLinkResourceTypeInvoiceAllocation SendNotificationRequestLinkResourceType = "invoice_allocation" SendNotificationRequestLinkResourceTypeInvoiceForPayment SendNotificationRequestLinkResourceType = "invoice_for_payment" SendNotificationRequestLinkResourceTypeShipment SendNotificationRequestLinkResourceType = "shipment" SendNotificationRequestLinkResourceTypeShipmentSummary SendNotificationRequestLinkResourceType = "shipment_summary" SendNotificationRequestLinkResourceTypeShipmentLine SendNotificationRequestLinkResourceType = "shipment_line" SendNotificationRequestLinkResourceTypeShippingCase SendNotificationRequestLinkResourceType = "shipping_case" SendNotificationRequestLinkResourceTypeShippingCaseLabelURL SendNotificationRequestLinkResourceType = "shipping_case_label_url" SendNotificationRequestLinkResourceTypeSettlement SendNotificationRequestLinkResourceType = "settlement" SendNotificationRequestLinkResourceTypeSettlementSummary SendNotificationRequestLinkResourceType = "settlement_summary" SendNotificationRequestLinkResourceTypeRolePermission SendNotificationRequestLinkResourceType = "role_permission" SendNotificationRequestLinkResourceTypeRegistrationFlow SendNotificationRequestLinkResourceType = "registration_flow" SendNotificationRequestLinkResourceTypeRegistrationFlowOption SendNotificationRequestLinkResourceType = "registration_flow_option" SendNotificationRequestLinkResourceTypeTransaction SendNotificationRequestLinkResourceType = "transaction" SendNotificationRequestLinkResourceTypeTransactionSummary SendNotificationRequestLinkResourceType = "transaction_summary" SendNotificationRequestLinkResourceTypeTransactionMethod SendNotificationRequestLinkResourceType = "transaction_method" SendNotificationRequestLinkResourceTypeTransactionType SendNotificationRequestLinkResourceType = "transaction_type" SendNotificationRequestLinkResourceTypeTransactionAllocation SendNotificationRequestLinkResourceType = "transaction_allocation" SendNotificationRequestLinkResourceTypeUsageItem SendNotificationRequestLinkResourceType = "usage_item" SendNotificationRequestLinkResourceTypeAccountUsageResponse SendNotificationRequestLinkResourceType = "account_usage_response" SendNotificationRequestLinkResourceTypeSubscriptionInfo SendNotificationRequestLinkResourceType = "subscription_info" SendNotificationRequestLinkResourceTypeBillingPortalSessionResponse SendNotificationRequestLinkResourceType = "billing_portal_session_response" SendNotificationRequestLinkResourceTypeSwitchPlanResponse SendNotificationRequestLinkResourceType = "switch_plan_response" SendNotificationRequestLinkResourceTypeEnsureBillingCustomerResponse SendNotificationRequestLinkResourceType = "ensure_billing_customer_response" SendNotificationRequestLinkResourceTypeSpendingCapResponse SendNotificationRequestLinkResourceType = "spending_cap_response" SendNotificationRequestLinkResourceTypeAgentSpendInfo SendNotificationRequestLinkResourceType = "agent_spend_info" SendNotificationRequestLinkResourceTypeWebhookResponse SendNotificationRequestLinkResourceType = "webhook_response" SendNotificationRequestLinkResourceTypeAddressSuggestion SendNotificationRequestLinkResourceType = "address_suggestion" SendNotificationRequestLinkResourceTypeAddressComponents SendNotificationRequestLinkResourceType = "address_components" SendNotificationRequestLinkResourceTypeAddressDetailsResult SendNotificationRequestLinkResourceType = "address_details_result" SendNotificationRequestLinkResourceTypeValidatedAddress SendNotificationRequestLinkResourceType = "validated_address" SendNotificationRequestLinkResourceTypePlanLimit SendNotificationRequestLinkResourceType = "plan_limit" SendNotificationRequestLinkResourceTypePlanChangeProration SendNotificationRequestLinkResourceType = "plan_change_proration" SendNotificationRequestLinkResourceTypePlanChangeLineItem SendNotificationRequestLinkResourceType = "plan_change_line_item" SendNotificationRequestLinkResourceTypeSetupBillingResponse SendNotificationRequestLinkResourceType = "setup_billing_response" SendNotificationRequestLinkResourceTypeConfirmPaymentResponse SendNotificationRequestLinkResourceType = "confirm_payment_response" SendNotificationRequestLinkResourceTypeOAuthResponse SendNotificationRequestLinkResourceType = "oauth_response" SendNotificationRequestLinkResourceTypeOAuthStatusResponse SendNotificationRequestLinkResourceType = "oauth_status_response" SendNotificationRequestLinkResourceTypeStripePublishableKey SendNotificationRequestLinkResourceType = "stripe_publishable_key" SendNotificationRequestLinkResourceTypeStripeStatus SendNotificationRequestLinkResourceType = "stripe_status" SendNotificationRequestLinkResourceTypeHealthcheck SendNotificationRequestLinkResourceType = "healthcheck" SendNotificationRequestLinkResourceTypeAgentDefinitionConfig SendNotificationRequestLinkResourceType = "agent_definition_config" SendNotificationRequestLinkResourceTypeTriggerConfig SendNotificationRequestLinkResourceType = "trigger_config" SendNotificationRequestLinkResourceTypeCustomerContactInfo SendNotificationRequestLinkResourceType = "customer_contact_info" SendNotificationRequestLinkResourceTypeCustomerFreightPreferences SendNotificationRequestLinkResourceType = "customer_freight_preferences" SendNotificationRequestLinkResourceTypeCustomerDefaults SendNotificationRequestLinkResourceType = "customer_defaults" SendNotificationRequestLinkResourceTypeCustomerLeadTime SendNotificationRequestLinkResourceType = "customer_lead_time" SendNotificationRequestLinkResourceTypeCustomerNotificationPreferences SendNotificationRequestLinkResourceType = "customer_notification_preferences" SendNotificationRequestLinkResourceTypeOrderNotificationRecipient SendNotificationRequestLinkResourceType = "order_notification_recipient" SendNotificationRequestLinkResourceTypeOrderDiscount SendNotificationRequestLinkResourceType = "order_discount" SendNotificationRequestLinkResourceTypeSalesOrderLine SendNotificationRequestLinkResourceType = "sales_order_line" SendNotificationRequestLinkResourceTypeSalesOrderType SendNotificationRequestLinkResourceType = "sales_order_type" SendNotificationRequestLinkResourceTypeSalesOrderStatus SendNotificationRequestLinkResourceType = "sales_order_status" SendNotificationRequestLinkResourceTypeMaterial SendNotificationRequestLinkResourceType = "material" SendNotificationRequestLinkResourceTypeSupplierMaterial SendNotificationRequestLinkResourceType = "supplier_material" SendNotificationRequestLinkResourceTypePart SendNotificationRequestLinkResourceType = "part" SendNotificationRequestLinkResourceTypePermissionGroup SendNotificationRequestLinkResourceType = "permission_group" SendNotificationRequestLinkResourceTypePermission SendNotificationRequestLinkResourceType = "permission" SendNotificationRequestLinkResourceTypePick SendNotificationRequestLinkResourceType = "pick" SendNotificationRequestLinkResourceTypePickLine SendNotificationRequestLinkResourceType = "pick_line" SendNotificationRequestLinkResourceTypeProductType SendNotificationRequestLinkResourceType = "product_type" SendNotificationRequestLinkResourceTypeProduction SendNotificationRequestLinkResourceType = "production" SendNotificationRequestLinkResourceTypeProductionFlow SendNotificationRequestLinkResourceType = "production_flow" SendNotificationRequestLinkResourceTypeMap SendNotificationRequestLinkResourceType = "map" SendNotificationRequestLinkResourceTypePurchaseOrder SendNotificationRequestLinkResourceType = "purchase_order" SendNotificationRequestLinkResourceTypePurchaseOrderLine SendNotificationRequestLinkResourceType = "purchase_order_line" SendNotificationRequestLinkResourceTypePurchaseOrderRelated SendNotificationRequestLinkResourceType = "purchase_order_related" SendNotificationRequestLinkResourceTypeSupplier SendNotificationRequestLinkResourceType = "supplier" SendNotificationRequestLinkResourceTypeReceivableEntry SendNotificationRequestLinkResourceType = "receivable_entry" SendNotificationRequestLinkResourceTypeReceivingOrder SendNotificationRequestLinkResourceType = "receiving_order" SendNotificationRequestLinkResourceTypeReceivingOrderLine SendNotificationRequestLinkResourceType = "receiving_order_line" SendNotificationRequestLinkResourceTypeReceivingOrderTotals SendNotificationRequestLinkResourceType = "receiving_order_totals" SendNotificationRequestLinkResourceTypeReceivingOrderStageTotal SendNotificationRequestLinkResourceType = "receiving_order_stage_total" SendNotificationRequestLinkResourceTypeReceivingOrderRelated SendNotificationRequestLinkResourceType = "receiving_order_related" SendNotificationRequestLinkResourceTypeEmailContact SendNotificationRequestLinkResourceType = "email_contact" SendNotificationRequestLinkResourceTypeAllocationEntry SendNotificationRequestLinkResourceType = "allocation_entry" SendNotificationRequestLinkResourceTypeOpenCreditEntry SendNotificationRequestLinkResourceType = "open_credit_entry" SendNotificationRequestLinkResourceTypeVolumeDiscount SendNotificationRequestLinkResourceType = "volume_discount" SendNotificationRequestLinkResourceTypeVolumeDiscountTier SendNotificationRequestLinkResourceType = "volume_discount_tier" SendNotificationRequestLinkResourceTypeAnalyzeDeliveriesResponse SendNotificationRequestLinkResourceType = "analyze_deliveries_response" SendNotificationRequestLinkResourceTypeAnalyzeManufacturingResponse SendNotificationRequestLinkResourceType = "analyze_manufacturing_response" SendNotificationRequestLinkResourceTypeAnalyzeManufacturingBatchResponse SendNotificationRequestLinkResourceType = "analyze_manufacturing_batch_response" SendNotificationRequestLinkResourceTypeAnalyzeQuarterlyOrdersResponse SendNotificationRequestLinkResourceType = "analyze_quarterly_orders_response" SendNotificationRequestLinkResourceTypeAnalyzeNewCustomersResponse SendNotificationRequestLinkResourceType = "analyze_new_customers_response" SendNotificationRequestLinkResourceTypeAnalyzeDemandForecastResponse SendNotificationRequestLinkResourceType = "analyze_demand_forecast_response" SendNotificationRequestLinkResourceTypeAnalyzeOeeResponse SendNotificationRequestLinkResourceType = "analyze_oee_response" SendNotificationRequestLinkResourceTypeAnalyzeOeeTrendResponse SendNotificationRequestLinkResourceType = "analyze_oee_trend_response" SendNotificationRequestLinkResourceTypeAnalyzeScheduleAttainmentResponse SendNotificationRequestLinkResourceType = "analyze_schedule_attainment_response" SendNotificationRequestLinkResourceTypeCatalogProductLine SendNotificationRequestLinkResourceType = "catalog_product_line" SendNotificationRequestLinkResourceTypeCatalogCategory SendNotificationRequestLinkResourceType = "catalog_category" SendNotificationRequestLinkResourceTypeCatalogProduct SendNotificationRequestLinkResourceType = "catalog_product" SendNotificationRequestLinkResourceTypeCatalogProperty SendNotificationRequestLinkResourceType = "catalog_property" SendNotificationRequestLinkResourceTypeCatalogAttribute SendNotificationRequestLinkResourceType = "catalog_attribute" SendNotificationRequestLinkResourceTypeDcLocation SendNotificationRequestLinkResourceType = "dc_location" SendNotificationRequestLinkResourceTypeEdiRun SendNotificationRequestLinkResourceType = "edi_run" SendNotificationRequestLinkResourceTypeInventoryItem SendNotificationRequestLinkResourceType = "inventory_item" SendNotificationRequestLinkResourceTypeAnalyzeWeeksOfSalesResponse SendNotificationRequestLinkResourceType = "analyze_weeks_of_sales_response" SendNotificationRequestLinkResourceTypeBulkReconcileItemsResponse SendNotificationRequestLinkResourceType = "bulk_reconcile_items_response" SendNotificationRequestLinkResourceTypeSysProperty SendNotificationRequestLinkResourceType = "sys_property" SendNotificationRequestLinkResourceTypeSysPropertyType SendNotificationRequestLinkResourceType = "sys_property_type" SendNotificationRequestLinkResourceTypeSysPropertyValue SendNotificationRequestLinkResourceType = "sys_property_value" SendNotificationRequestLinkResourceTypeTerritory SendNotificationRequestLinkResourceType = "territory" SendNotificationRequestLinkResourceTypeTenancy SendNotificationRequestLinkResourceType = "tenancy" SendNotificationRequestLinkResourceTypeCheckoutSession SendNotificationRequestLinkResourceType = "checkout_session" SendNotificationRequestLinkResourceTypeEstimateRateResult SendNotificationRequestLinkResourceType = "estimate_rate_result" SendNotificationRequestLinkResourceTypeRateShopOption SendNotificationRequestLinkResourceType = "rate_shop_option" SendNotificationRequestLinkResourceTypeRateShopResult SendNotificationRequestLinkResourceType = "rate_shop_result" SendNotificationRequestLinkResourceTypeOwner SendNotificationRequestLinkResourceType = "owner" SendNotificationRequestLinkResourceTypeCreatedBy SendNotificationRequestLinkResourceType = "created_by" SendNotificationRequestLinkResourceTypeMessage SendNotificationRequestLinkResourceType = "message" SendNotificationRequestLinkResourceTypeAccountPhotoUploadResult SendNotificationRequestLinkResourceType = "account_photo_upload_result" SendNotificationRequestLinkResourceTypeUserPhotoUploadResult SendNotificationRequestLinkResourceType = "user_photo_upload_result" SendNotificationRequestLinkResourceTypeUserPhotoURL SendNotificationRequestLinkResourceType = "user_photo_url" SendNotificationRequestLinkResourceTypeBatchLot SendNotificationRequestLinkResourceType = "batch_lot" SendNotificationRequestLinkResourceTypeCheckDuplicateResult SendNotificationRequestLinkResourceType = "check_duplicate_result" SendNotificationRequestLinkResourceTypeItemCosts SendNotificationRequestLinkResourceType = "item_costs" SendNotificationRequestLinkResourceTypeItemTrends SendNotificationRequestLinkResourceType = "item_trends" SendNotificationRequestLinkResourceTypeReconciledItemResult SendNotificationRequestLinkResourceType = "reconciled_item_result" SendNotificationRequestLinkResourceTypeSkippedItemResult SendNotificationRequestLinkResourceType = "skipped_item_result" SendNotificationRequestLinkResourceTypeReconcileErrorResult SendNotificationRequestLinkResourceType = "reconcile_error_result" SendNotificationRequestLinkResourceTypeItemTrendPoint SendNotificationRequestLinkResourceType = "item_trend_point" SendNotificationRequestLinkResourceTypeTenancyPendingRegistration SendNotificationRequestLinkResourceType = "tenancy_pending_registration" SendNotificationRequestLinkResourceTypeInvoiceAllocationEntry SendNotificationRequestLinkResourceType = "invoice_allocation_entry" SendNotificationRequestLinkResourceTypeAllocationCustomer SendNotificationRequestLinkResourceType = "allocation_customer" SendNotificationRequestLinkResourceTypeCheckoutSalesOrder SendNotificationRequestLinkResourceType = "checkout_sales_order" SendNotificationRequestLinkResourceTypeSalesOrderPriceQuote SendNotificationRequestLinkResourceType = "sales_order_price_quote" SendNotificationRequestLinkResourceTypeSalesOrderFreightQuote SendNotificationRequestLinkResourceType = "sales_order_freight_quote" SendNotificationRequestLinkResourceTypeSalesOrderCommitmentQuote SendNotificationRequestLinkResourceType = "sales_order_commitment_quote" SendNotificationRequestLinkResourceTypeOperatingCalendar SendNotificationRequestLinkResourceType = "operating_calendar" SendNotificationRequestLinkResourceTypeOperatingCalendarClosure SendNotificationRequestLinkResourceType = "operating_calendar_closure" SendNotificationRequestLinkResourceTypeSalesOrderPriceQuoteLine SendNotificationRequestLinkResourceType = "sales_order_price_quote_line" SendNotificationRequestLinkResourceTypeHubspotSyncJob SendNotificationRequestLinkResourceType = "hubspot_sync_job" SendNotificationRequestLinkResourceTypeHubspotSyncReport SendNotificationRequestLinkResourceType = "hubspot_sync_report" SendNotificationRequestLinkResourceTypeHubspotCompanyReview SendNotificationRequestLinkResourceType = "hubspot_company_review" SendNotificationRequestLinkResourceTypeHubspotCompanyCandidate SendNotificationRequestLinkResourceType = "hubspot_company_candidate" SendNotificationRequestLinkResourceTypeHubspotSyncRecord SendNotificationRequestLinkResourceType = "hubspot_sync_record" SendNotificationRequestLinkResourceTypeContactMatch SendNotificationRequestLinkResourceType = "contact_match" SendNotificationRequestLinkResourceTypeReplyDraft SendNotificationRequestLinkResourceType = "reply_draft" SendNotificationRequestLinkResourceTypeConversationLink SendNotificationRequestLinkResourceType = "conversation_link" SendNotificationRequestLinkResourceTypeMessagingGroup SendNotificationRequestLinkResourceType = "messaging_group" SendNotificationRequestLinkResourceTypeMessagingGroupMember SendNotificationRequestLinkResourceType = "messaging_group_member" SendNotificationRequestLinkResourceTypePortalProfile SendNotificationRequestLinkResourceType = "portal_profile" SendNotificationRequestLinkResourceTypePortalRegistrationSession SendNotificationRequestLinkResourceType = "portal_registration_session" SendNotificationRequestLinkResourceTypePortalRegistrationSessionData SendNotificationRequestLinkResourceType = "portal_registration_session_data" SendNotificationRequestLinkResourceTypePackList SendNotificationRequestLinkResourceType = "pack_list" SendNotificationRequestLinkResourceTypePackListParty SendNotificationRequestLinkResourceType = "pack_list_party" SendNotificationRequestLinkResourceTypePackListLineItem SendNotificationRequestLinkResourceType = "pack_list_line_item" SendNotificationRequestLinkResourceTypePackListBackOrder SendNotificationRequestLinkResourceType = "pack_list_back_order" SendNotificationRequestLinkResourceTypePackListCase SendNotificationRequestLinkResourceType = "pack_list_case" SendNotificationRequestLinkResourceTypeJob SendNotificationRequestLinkResourceType = "job" SendNotificationRequestLinkResourceTypeJobResult SendNotificationRequestLinkResourceType = "job_result" SendNotificationRequestLinkResourceTypeJobExport SendNotificationRequestLinkResourceType = "job_export" SendNotificationRequestLinkResourceTypeAnalyzeCustomerPricingResponse SendNotificationRequestLinkResourceType = "analyze_customer_pricing_response" SendNotificationRequestLinkResourceTypeCustomerPricingFinding SendNotificationRequestLinkResourceType = "customer_pricing_finding" SendNotificationRequestLinkResourceTypeCustomerPricingSummary SendNotificationRequestLinkResourceType = "customer_pricing_summary" SendNotificationRequestLinkResourceTypeComputedRate SendNotificationRequestLinkResourceType = "computed_rate" SendNotificationRequestLinkResourceTypeComputedQuantity SendNotificationRequestLinkResourceType = "computed_quantity" SendNotificationRequestLinkResourceTypeAnalyzeRealizedMarginsResponse SendNotificationRequestLinkResourceType = "analyze_realized_margins_response" SendNotificationRequestLinkResourceTypeRealizedMarginFinding SendNotificationRequestLinkResourceType = "realized_margin_finding" SendNotificationRequestLinkResourceTypeRealizedMarginSummary SendNotificationRequestLinkResourceType = "realized_margin_summary" SendNotificationRequestLinkResourceTypeShipmentRelated SendNotificationRequestLinkResourceType = "shipment_related" SendNotificationRequestLinkResourceTypeInvoiceRelated SendNotificationRequestLinkResourceType = "invoice_related" SendNotificationRequestLinkResourceTypePickRelated SendNotificationRequestLinkResourceType = "pick_related" SendNotificationRequestLinkResourceTypePickTotals SendNotificationRequestLinkResourceType = "pick_totals" SendNotificationRequestLinkResourceTypePickStageTotal SendNotificationRequestLinkResourceType = "pick_stage_total" )
type SendNotificationRequestParam ¶
type SendNotificationRequestParam struct {
// The kind of event the notification represents, such as `order.updated`.
//
// Categories are how clients group and filter the feed, so reuse an existing one
// where it fits.
//
// Any of "chat.message", "chat.mention", "chat.added", "order.updated",
// "agent.run_completed", "agent.alert", "system.broadcast", "customer.registered".
Category SendNotificationRequestCategory `json:"category,omitzero" api:"required"`
// Who a notification is aimed at.
Target NotificationTargetInputParam `json:"target,omitzero" api:"required"`
// Short headline shown in the recipient's feed.
Title string `json:"title" api:"required"`
// Supporting detail shown beneath the title.
Body param.Opt[string] `json:"body,omitzero"`
// ID of the resource the notification should link to.
LinkResourceID param.Opt[string] `json:"link_resource_id,omitzero"`
// Type of the resource the notification should link to, such as `sales_order`.
//
// Set it together with `link_resource_id` to point the notification at something
// the recipient can open; supplying only one of the two produces a notification
// with no link.
//
// Any of "account", "actor", "entity", "record", "freight", "commitment",
// "sales_order_totals", "sales_order_stage_total", "sales_order_related",
// "order_contact", "user", "address", "api_key", "created_api_key",
// "refresh_token", "list", "sandbox", "registration_session", "pricing_plan",
// "account_plan", "plan_change", "enterprise_inquiry", "request_log",
// "audit_event", "audit_field_change", "role", "unit", "account_affiliation",
// "agent_definition", "available_tool", "agent_definition_tool",
// "agent_account_status", "agent_run", "agent_action", "agent_run_step",
// "agent_token_usage", "agent_memory", "notification",
// "notification_unread_count", "notification_send_result",
// "notification_unread_summary", "announcement", "conversation", "support_case",
// "conversation_participant", "read_cursor", "chat_message",
// "notification_unread_summary_account", "messaging_block",
// "notification_preference", "message_attachment", "attachment_upload_target",
// "scheduled_message", "messaging_contact", "message_report", "tool_group",
// "model", "payment_term", "shipping_term", "quantity", "account_group",
// "support_route", "support_availability", "account_status", "geolocation",
// "account_user", "department", "account_integration", "account_price",
// "product_line", "item_category", "attribute", "rate",
// "account_group_product_line_access", "sales_target", "adjustment_type",
// "account_branding", "account_portal", "account_logo_url", "account_favicon_url",
// "public_account", "property", "carrier", "service_level", "item",
// "item_lot_default", "item_inventory", "product", "batch", "batch_flow_node",
// "scanning_consumption", "open_batch_summary", "scanning_production_step_info",
// "scanning_station", "production_step", "production_run", "machine",
// "machine_status", "machine_downtime_event", "demand_override",
// "demand_override_type", "machine_downtime_reason",
// "production_schedule_preview", "production_schedule_regenerate_preview",
// "production_schedule", "production_schedule_line",
// "production_schedule_deviation", "production_schedule_derived_line",
// "production_schedule_settings", "production_schedule_resource_setting",
// "production_schedule_item_setting", "fulfillment_recommendation",
// "analyze_delivery_performance_response", "delivery_performance",
// "delivery_backlog_bucket", "delivery_lateness_bucket", "delivery_breakdown",
// "analyze_sales_breakdown_response", "sales_totals", "sales_breakdown",
// "schedule_order_coverage", "schedule_order_coverage_line",
// "schedule_deviation_type", "schedule_at_risk_order",
// "production_schedule_finished_policy", "production_schedule_finishing_line",
// "production_schedule_week_release", "production_schedule_week_release_preview",
// "production_schedule_item_policy", "child_account", "unit_group",
// "unit_group_unit", "consumption", "customer_product_line_access", "customer",
// "frequently_ordered_product", "priority", "delivery", "delivery_line",
// "delivery_related", "sales_order", "location", "location_type", "lot",
// "email_log", "email_domain", "email_inbox", "email_sender", "portal_domain",
// "dns_record", "inventory_change_log", "invoice", "invoice_summary",
// "invoice_line", "invoice_allocation", "invoice_for_payment", "shipment",
// "shipment_summary", "shipment_line", "shipping_case", "shipping_case_label_url",
// "settlement", "settlement_summary", "role_permission", "registration_flow",
// "registration_flow_option", "transaction", "transaction_summary",
// "transaction_method", "transaction_type", "transaction_allocation",
// "usage_item", "account_usage_response", "subscription_info",
// "billing_portal_session_response", "switch_plan_response",
// "ensure_billing_customer_response", "spending_cap_response", "agent_spend_info",
// "webhook_response", "address_suggestion", "address_components",
// "address_details_result", "validated_address", "plan_limit",
// "plan_change_proration", "plan_change_line_item", "setup_billing_response",
// "confirm_payment_response", "oauth_response", "oauth_status_response",
// "stripe_publishable_key", "stripe_status", "healthcheck",
// "agent_definition_config", "trigger_config", "customer_contact_info",
// "customer_freight_preferences", "customer_defaults", "customer_lead_time",
// "customer_notification_preferences", "order_notification_recipient",
// "order_discount", "sales_order_line", "sales_order_type", "sales_order_status",
// "material", "supplier_material", "part", "permission_group", "permission",
// "pick", "pick_line", "product_type", "production", "production_flow", "map",
// "purchase_order", "purchase_order_line", "purchase_order_related", "supplier",
// "receivable_entry", "receiving_order", "receiving_order_line",
// "receiving_order_totals", "receiving_order_stage_total",
// "receiving_order_related", "email_contact", "allocation_entry",
// "open_credit_entry", "volume_discount", "volume_discount_tier",
// "analyze_deliveries_response", "analyze_manufacturing_response",
// "analyze_manufacturing_batch_response", "analyze_quarterly_orders_response",
// "analyze_new_customers_response", "analyze_demand_forecast_response",
// "analyze_oee_response", "analyze_oee_trend_response",
// "analyze_schedule_attainment_response", "catalog_product_line",
// "catalog_category", "catalog_product", "catalog_property", "catalog_attribute",
// "dc_location", "edi_run", "inventory_item", "analyze_weeks_of_sales_response",
// "bulk_reconcile_items_response", "sys_property", "sys_property_type",
// "sys_property_value", "territory", "tenancy", "checkout_session",
// "estimate_rate_result", "rate_shop_option", "rate_shop_result", "owner",
// "created_by", "message", "account_photo_upload_result",
// "user_photo_upload_result", "user_photo_url", "batch_lot",
// "check_duplicate_result", "item_costs", "item_trends", "reconciled_item_result",
// "skipped_item_result", "reconcile_error_result", "item_trend_point",
// "tenancy_pending_registration", "invoice_allocation_entry",
// "allocation_customer", "checkout_sales_order", "sales_order_price_quote",
// "sales_order_freight_quote", "sales_order_commitment_quote",
// "operating_calendar", "operating_calendar_closure",
// "sales_order_price_quote_line", "hubspot_sync_job", "hubspot_sync_report",
// "hubspot_company_review", "hubspot_company_candidate", "hubspot_sync_record",
// "contact_match", "reply_draft", "conversation_link", "messaging_group",
// "messaging_group_member", "portal_profile", "portal_registration_session",
// "portal_registration_session_data", "pack_list", "pack_list_party",
// "pack_list_line_item", "pack_list_back_order", "pack_list_case", "job",
// "job_result", "job_export", "analyze_customer_pricing_response",
// "customer_pricing_finding", "customer_pricing_summary", "computed_rate",
// "computed_quantity", "analyze_realized_margins_response",
// "realized_margin_finding", "realized_margin_summary", "shipment_related",
// "invoice_related", "pick_related", "pick_totals", "pick_stage_total".
LinkResourceType SendNotificationRequestLinkResourceType `json:"link_resource_type,omitzero"`
// How prominently the notification should be surfaced, from `low` through
// `urgent`.
//
// Any of "low", "normal", "high", "urgent".
Priority SendNotificationRequestPriority `json:"priority,omitzero"`
// contains filtered or unexported fields
}
Request to send an in-app notification.
The target decides whether the notification goes to one member of the account or to everyone in it.
The properties Category, Target, Title are required.
func (SendNotificationRequestParam) MarshalJSON ¶
func (r SendNotificationRequestParam) MarshalJSON() (data []byte, err error)
func (*SendNotificationRequestParam) UnmarshalJSON ¶
func (r *SendNotificationRequestParam) UnmarshalJSON(data []byte) error
type SendNotificationRequestPriority ¶
type SendNotificationRequestPriority string
How prominently the notification should be surfaced, from `low` through `urgent`.
const ( SendNotificationRequestPriorityLow SendNotificationRequestPriority = "low" SendNotificationRequestPriorityNormal SendNotificationRequestPriority = "normal" SendNotificationRequestPriorityHigh SendNotificationRequestPriority = "high" SendNotificationRequestPriorityUrgent SendNotificationRequestPriority = "urgent" )
type ServiceLevel ¶
type ServiceLevel struct {
// Service level ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether customers can see and select this service level at checkout in the
// customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility ServiceLevelCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
// Business days this service typically takes in transit, used to work an order's
// ship-by date back from a promised delivery date.
//
// A fallback for lanes the carrier has not quoted. Null means transit is unknown
// for this service rather than instant, so a ship-by date falls back to the
// promised delivery date itself.
DefaultTransitDays int64 `json:"default_transit_days" api:"required"`
// Whether this is the carrier's default service level, pre-selected when the
// carrier is chosen.
//
// Each carrier has at most one default; setting a new default clears the previous
// one. A default service level cannot be deleted until another service level takes
// its place or the flag is cleared.
IsDefault bool `json:"is_default" api:"required"`
// Human-readable name for the service level, shown to customers at checkout when
// the service level is visible.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "service_level".
Object ServiceLevelObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Carrier-specific code identifying this service level (e.g. `fedex_ground`,
// `ups_next_day_air`).
//
// For service levels synced from a connected carrier this is the carrier's own
// token, which is what rate shopping and label purchase are keyed on; for service
// levels you create yourself it is the `code` you supplied.
ServiceLevelToken string `json:"service_level_token" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CustomerPortalVisibility respjson.Field
DefaultTransitDays respjson.Field
IsDefault respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
ServiceLevelToken respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A shipping speed or method offered by a carrier, such as ground or overnight.
Carriers connected through Shippo have their service levels synced from the carrier itself; any carrier can also have service levels you create by hand.
func (ServiceLevel) RawJSON ¶
func (r ServiceLevel) RawJSON() string
Returns the unmodified JSON received from the API
func (*ServiceLevel) UnmarshalJSON ¶
func (r *ServiceLevel) UnmarshalJSON(data []byte) error
type ServiceLevelCustomerPortalVisibility ¶
type ServiceLevelCustomerPortalVisibility string
Whether customers can see and select this service level at checkout in the customer portal.
const ( ServiceLevelCustomerPortalVisibilityVisible ServiceLevelCustomerPortalVisibility = "visible" ServiceLevelCustomerPortalVisibilityHidden ServiceLevelCustomerPortalVisibility = "hidden" )
type ServiceLevelObject ¶
type ServiceLevelObject string
Resource type identifier.
const (
ServiceLevelObjectServiceLevel ServiceLevelObject = "service_level"
)
type SetEmailSenderRequestParam ¶ added in v0.22.0
type SetEmailSenderRequestParam struct {
// The verified email domain to send from.
EmailDomainID string `json:"email_domain_id" api:"required"`
// The mailbox name before the `@`, for example `orders`.
LocalPart string `json:"local_part" api:"required"`
// The name shown in a mail client's sender column. When unset, mail shows the bare
// address.
FromName param.Opt[string] `json:"from_name,omitzero"`
// Where customer replies are delivered. When unset, replies go to the sending
// address.
ReplyTo param.Opt[string] `json:"reply_to,omitzero"`
// contains filtered or unexported fields
}
Request to configure the address the account's customer-facing email is sent from.
The properties EmailDomainID, LocalPart are required.
func (SetEmailSenderRequestParam) MarshalJSON ¶ added in v0.22.0
func (r SetEmailSenderRequestParam) MarshalJSON() (data []byte, err error)
func (*SetEmailSenderRequestParam) UnmarshalJSON ¶ added in v0.22.0
func (r *SetEmailSenderRequestParam) UnmarshalJSON(data []byte) error
type SetLegalHoldRequestLegalHold ¶
type SetLegalHoldRequestLegalHold string
Whether to place the conversation under legal hold or release it.
- `held`: the conversation is preserved — exempt from automatic retention purging and from redaction.
- `released`: normal retention and redaction apply again.
const ( SetLegalHoldRequestLegalHoldReleased SetLegalHoldRequestLegalHold = "released" SetLegalHoldRequestLegalHoldHeld SetLegalHoldRequestLegalHold = "held" )
type SetLegalHoldRequestParam ¶
type SetLegalHoldRequestParam struct {
// Whether to place the conversation under legal hold or release it.
//
// - `held`: the conversation is preserved — exempt from automatic retention
// purging and from redaction.
// - `released`: normal retention and redaction apply again.
//
// Any of "released", "held".
LegalHold SetLegalHoldRequestLegalHold `json:"legal_hold,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to place a conversation under legal hold or release it.
The property LegalHold is required.
func (SetLegalHoldRequestParam) MarshalJSON ¶
func (r SetLegalHoldRequestParam) MarshalJSON() (data []byte, err error)
func (*SetLegalHoldRequestParam) UnmarshalJSON ¶
func (r *SetLegalHoldRequestParam) UnmarshalJSON(data []byte) error
type SetWorkflowStatusRequestParam ¶
type SetWorkflowStatusRequestParam struct {
// The triage lane to move the case to.
//
// - `new`: opened but nobody has triaged it yet.
// - `open`: actively being worked.
// - `waiting_internal`: blocked on the internal team.
// - `waiting_external`: blocked on a reply from the customer.
// - `needs_approval`: a drafted reply is waiting for a human to approve it.
// - `resolved`: closed out.
//
// Any of "new", "open", "waiting_internal", "waiting_external", "needs_approval",
// "resolved".
WorkflowStatus SetWorkflowStatusRequestWorkflowStatus `json:"workflow_status,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to set the triage lane of a customer-service case.
The property WorkflowStatus is required.
func (SetWorkflowStatusRequestParam) MarshalJSON ¶
func (r SetWorkflowStatusRequestParam) MarshalJSON() (data []byte, err error)
func (*SetWorkflowStatusRequestParam) UnmarshalJSON ¶
func (r *SetWorkflowStatusRequestParam) UnmarshalJSON(data []byte) error
type SetWorkflowStatusRequestWorkflowStatus ¶
type SetWorkflowStatusRequestWorkflowStatus string
The triage lane to move the case to.
- `new`: opened but nobody has triaged it yet. - `open`: actively being worked. - `waiting_internal`: blocked on the internal team. - `waiting_external`: blocked on a reply from the customer. - `needs_approval`: a drafted reply is waiting for a human to approve it. - `resolved`: closed out.
const ( SetWorkflowStatusRequestWorkflowStatusNew SetWorkflowStatusRequestWorkflowStatus = "new" SetWorkflowStatusRequestWorkflowStatusOpen SetWorkflowStatusRequestWorkflowStatus = "open" SetWorkflowStatusRequestWorkflowStatusWaitingInternal SetWorkflowStatusRequestWorkflowStatus = "waiting_internal" SetWorkflowStatusRequestWorkflowStatusWaitingExternal SetWorkflowStatusRequestWorkflowStatus = "waiting_external" SetWorkflowStatusRequestWorkflowStatusNeedsApproval SetWorkflowStatusRequestWorkflowStatus = "needs_approval" SetWorkflowStatusRequestWorkflowStatusResolved SetWorkflowStatusRequestWorkflowStatus = "resolved" )
type SettingIntegrationListParams ¶
type SettingIntegrationListParams struct {
// Opaque cursor token identifying where the page of results starts.
//
// Use the `cursor` value embedded in a previous response's `next_page_url` or
// `previous_page_url` to fetch the adjacent page. Omit to start from the first
// page.
Cursor param.Opt[string] `query:"cursor,omitzero" json:"-"`
// Maximum number of results to return in a single page.
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Free-text search term used to filter results.
//
// Which fields are matched against the term varies by endpoint.
Q param.Opt[string] `query:"q,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (SettingIntegrationListParams) URLQuery ¶
func (r SettingIntegrationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes SettingIntegrationListParams's query parameters as `url.Values`.
type SettingIntegrationNewParams ¶
type SettingIntegrationNewParams struct {
// Request to create or upsert an account integration.
CreateAccountIntegrationRequest CreateAccountIntegrationRequestParam
// contains filtered or unexported fields
}
func (SettingIntegrationNewParams) MarshalJSON ¶
func (r SettingIntegrationNewParams) MarshalJSON() (data []byte, err error)
func (*SettingIntegrationNewParams) UnmarshalJSON ¶
func (r *SettingIntegrationNewParams) UnmarshalJSON(data []byte) error
type SettingIntegrationService ¶
type SettingIntegrationService struct {
// contains filtered or unexported fields
}
List and manage third-party account integrations.
SettingIntegrationService contains methods and other services that help with interacting with the openmrp 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 NewSettingIntegrationService method instead.
func NewSettingIntegrationService ¶
func NewSettingIntegrationService(opts ...option.RequestOption) (r SettingIntegrationService)
NewSettingIntegrationService 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 (*SettingIntegrationService) Delete ¶
func (r *SettingIntegrationService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AccountIntegration, err error)
Disconnects a third-party provider from the account and returns the deleted integration.
The stored credentials go with it, so any feature that relies on the provider stops working until the integration is created again. Deleting an integration that is already deleted returns an error rather than succeeding silently. To pause a provider without discarding its credentials, set the integration's status to `inactive` instead.
This endpoint requires the `admin` role type.
func (*SettingIntegrationService) List ¶
func (r *SettingIntegrationService) List(ctx context.Context, query SettingIntegrationListParams, opts ...option.RequestOption) (res *ListAccountIntegration, err error)
Returns a paginated list of the third-party providers connected to the target account.
Stored credentials are never included in the response.
This endpoint requires the `admin` role type.
func (*SettingIntegrationService) New ¶
func (r *SettingIntegrationService) New(ctx context.Context, body SettingIntegrationNewParams, opts ...option.RequestOption) (res *AccountIntegration, err error)
Connects a third-party provider to the account, or replaces the name and credentials of the provider's existing connection.
An account can have at most one integration per `provider`, so calling this again for a provider that is already connected rotates its credentials in place and returns the same integration rather than creating a second one. Credentials are checked for the provider's expected key format, encrypted at rest, and never returned in API responses.
This endpoint requires the `admin` role type.
func (*SettingIntegrationService) Update ¶
func (r *SettingIntegrationService) Update(ctx context.Context, id string, body SettingIntegrationUpdateParams, opts ...option.RequestOption) (res *AccountIntegration, err error)
Renames an account integration, or activates or deactivates it.
Omitted fields are left unchanged. Credentials cannot be changed here; to rotate them, call Create Account Integration again with the same `provider`.
This endpoint requires the `admin` role type.
type SettingIntegrationUpdateParams ¶
type SettingIntegrationUpdateParams struct {
// Request to update an account integration.
UpdateAccountIntegrationRequest UpdateAccountIntegrationRequestParam
// contains filtered or unexported fields
}
func (SettingIntegrationUpdateParams) MarshalJSON ¶
func (r SettingIntegrationUpdateParams) MarshalJSON() (data []byte, err error)
func (*SettingIntegrationUpdateParams) UnmarshalJSON ¶
func (r *SettingIntegrationUpdateParams) UnmarshalJSON(data []byte) error
type SettingPortalDomainActionService ¶
type SettingPortalDomainActionService struct {
// contains filtered or unexported fields
}
Connect a custom domain to the account's customer portal, verify its DNS, and resolve custom hosts to portal accounts.
SettingPortalDomainActionService contains methods and other services that help with interacting with the openmrp 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 NewSettingPortalDomainActionService method instead.
func NewSettingPortalDomainActionService ¶
func NewSettingPortalDomainActionService(opts ...option.RequestOption) (r SettingPortalDomainActionService)
NewSettingPortalDomainActionService 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 (*SettingPortalDomainActionService) Verify ¶
func (r *SettingPortalDomainActionService) Verify(ctx context.Context, id string, opts ...option.RequestOption) (res *PortalDomain, err error)
Re-checks a portal domain against the serving provider and advances its status.
Run this after publishing the DNS records, and keep polling it: the domain stays `pending` while its records are missing or misconfigured, moves to `securing` once they are correct and its TLS certificate is being issued, and reaches `verified` only once that certificate is live and the portal answers on the domain. The response carries the updated domain along with the records still required. Verifying an already-verified domain returns it unchanged.
This endpoint requires the permission: `self:update`.
type SettingPortalDomainDeleteResponse ¶
type SettingPortalDomainDeleteResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (SettingPortalDomainDeleteResponse) RawJSON ¶
func (r SettingPortalDomainDeleteResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*SettingPortalDomainDeleteResponse) UnmarshalJSON ¶
func (r *SettingPortalDomainDeleteResponse) UnmarshalJSON(data []byte) error
type SettingPortalDomainNewParams ¶
type SettingPortalDomainNewParams struct {
// Request to connect a custom domain to the account's customer portal.
CreatePortalDomainRequest CreatePortalDomainRequestParam
// contains filtered or unexported fields
}
func (SettingPortalDomainNewParams) MarshalJSON ¶
func (r SettingPortalDomainNewParams) MarshalJSON() (data []byte, err error)
func (*SettingPortalDomainNewParams) UnmarshalJSON ¶
func (r *SettingPortalDomainNewParams) UnmarshalJSON(data []byte) error
type SettingPortalDomainService ¶
type SettingPortalDomainService struct {
// Connect a custom domain to the account's customer portal, verify its DNS, and
// resolve custom hosts to portal accounts.
Actions SettingPortalDomainActionService
// contains filtered or unexported fields
}
Connect a custom domain to the account's customer portal, verify its DNS, and resolve custom hosts to portal accounts.
SettingPortalDomainService contains methods and other services that help with interacting with the openmrp 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 NewSettingPortalDomainService method instead.
func NewSettingPortalDomainService ¶
func NewSettingPortalDomainService(opts ...option.RequestOption) (r SettingPortalDomainService)
NewSettingPortalDomainService 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 (*SettingPortalDomainService) Delete ¶
func (r *SettingPortalDomainService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *SettingPortalDomainDeleteResponse, err error)
Disconnects the custom domain from the account's customer portal.
The domain is detached from the serving infrastructure and immediately stops serving the portal; buyers must go back to the account's default slug-based portal address. Because an account may only hold one custom domain, this is how you free it up to connect a different one. The DNS records you published can then be removed.
This endpoint requires the permission: `self:update`.
func (*SettingPortalDomainService) Get ¶
func (r *SettingPortalDomainService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *PortalDomain, err error)
Returns a single portal domain, including its current status and the DNS records that must be published for it.
Reading a domain never re-checks it with the serving provider — the status is the one recorded when the domain was connected or last verified — so run the verify action to move a `pending` or `securing` domain forward.
This endpoint requires the permission: `self:read`.
func (*SettingPortalDomainService) List ¶
func (r *SettingPortalDomainService) List(ctx context.Context, opts ...option.RequestOption) (res *ListPortalDomain, err error)
Lists the account's portal domains.
An account can only hold one custom portal domain, so this returns either zero or one entry. Reading it is the usual way to discover whether a domain is connected and what state it is in.
This endpoint requires the permission: `self:read`.
func (*SettingPortalDomainService) New ¶
func (r *SettingPortalDomainService) New(ctx context.Context, body SettingPortalDomainNewParams, opts ...option.RequestOption) (res *PortalDomain, err error)
Connects a custom domain to the account's customer portal and returns the DNS records to publish.
An account can only have one custom domain at a time: adding a second one — or claiming a domain another account already uses — returns a conflict error. The new domain starts in `pending`; publish the returned records at your DNS provider, then run the verify action to move it towards serving.
This endpoint requires the permission: `self:update`.
type SettingService ¶
type SettingService struct {
// Connect a custom domain to the account's customer portal, verify its DNS, and
// resolve custom hosts to portal accounts.
PortalDomains SettingPortalDomainService
// List and manage third-party account integrations.
Integrations SettingIntegrationService
// contains filtered or unexported fields
}
SettingService contains methods and other services that help with interacting with the openmrp 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 NewSettingService method instead.
func NewSettingService ¶
func NewSettingService(opts ...option.RequestOption) (r SettingService)
NewSettingService 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.
type ShippingTerm ¶
type ShippingTerm struct {
// Shipping term ID.
ID string `json:"id" api:"required"`
// When this shipping term was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
FlatRate Quantity `json:"flat_rate" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
FreeShippingServiceLevels ListServiceLevel `json:"free_shipping_service_levels" api:"required"`
// A measured amount: a numeric value together with the unit it is expressed in.
//
// Quantities are shared building blocks rather than standalone records — other
// resources point at them to report stock levels, ordered and packed amounts,
// money, weights, and durations.
MinimumOrderValue Quantity `json:"minimum_order_value" api:"required"`
// Human-readable name for the shipping term, used to identify it when assigning
// shipping terms to customers and orders.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "shipping_term".
Object ShippingTermObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Freight pricing model applied by this shipping term.
//
// - `free_freight`: the buyer is never charged for shipping.
// - `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`,
// regardless of what the carrier would have charged.
// - `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for
// the order's carrier and service level.
//
// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
Type ShippingTermType `json:"type" api:"required"`
// When this shipping term was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
FlatRate respjson.Field
FreeShippingServiceLevels respjson.Field
MinimumOrderValue respjson.Field
Name respjson.Field
Object respjson.Field
Owner respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named freight pricing rule that decides what a buyer pays for shipping.
A customer's default shipping term is evaluated whenever freight is quoted for one of their orders. Freight exemptions on the customer, its type group, or any of its price groups are checked first and zero the freight charge before the shipping term is considered.
func (ShippingTerm) RawJSON ¶
func (r ShippingTerm) RawJSON() string
Returns the unmodified JSON received from the API
func (*ShippingTerm) UnmarshalJSON ¶
func (r *ShippingTerm) UnmarshalJSON(data []byte) error
type ShippingTermObject ¶
type ShippingTermObject string
Resource type identifier.
const (
ShippingTermObjectShippingTerm ShippingTermObject = "shipping_term"
)
type ShippingTermType ¶
type ShippingTermType string
Freight pricing model applied by this shipping term.
- `free_freight`: the buyer is never charged for shipping.
- `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`, regardless of what the carrier would have charged.
- `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for the order's carrier and service level.
const ( ShippingTermTypeFreeFreight ShippingTermType = "free_freight" ShippingTermTypeFlatRateFreight ShippingTermType = "flat_rate_freight" ShippingTermTypeCarrierRateFreight ShippingTermType = "carrier_rate_freight" )
type SkippedItemResult ¶
type SkippedItemResult struct {
// Resource type identifier.
//
// Any of "skipped_item_result".
Object SkippedItemResultObject `json:"object" api:"required"`
// Human-readable reason the item was skipped.
Reason string `json:"reason" api:"required"`
// Item SKU, as submitted.
SKU string `json:"sku" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Object respjson.Field
Reason respjson.Field
SKU respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A submitted row that was skipped rather than reconciled.
A skipped row is reported by the SKU it was submitted under rather than as an item reference, because the usual reason to skip one is that no item carries that SKU — there is nothing to point at.
func (SkippedItemResult) RawJSON ¶
func (r SkippedItemResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*SkippedItemResult) UnmarshalJSON ¶
func (r *SkippedItemResult) UnmarshalJSON(data []byte) error
type SkippedItemResultObject ¶ added in v0.22.3
type SkippedItemResultObject string
Resource type identifier.
const (
SkippedItemResultObjectSkippedItemResult SkippedItemResultObject = "skipped_item_result"
)
type ToolGroup ¶
type ToolGroup struct {
// Group ID.
ID string `json:"id" api:"required"`
// Description of what the tools in this group do.
Description string `json:"description" api:"required"`
// Icon identifier (e.g. a Material Icon name).
Icon string `json:"icon" api:"required"`
// Human-readable group name (e.g. `Product Tools`).
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "tool_group".
Object ToolGroupObject `json:"object" api:"required"`
// Machine-readable name for the group (e.g. `customer_tools`).
Slug string `json:"slug" api:"required"`
// Display sort order, lowest first.
SortOrder int64 `json:"sort_order" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Tools ListAvailableTool `json:"tools" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
Icon respjson.Field
Name respjson.Field
Object respjson.Field
Slug respjson.Field
SortOrder respjson.Field
Tools respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named grouping of the tools that can be granted to an agent, used to organize the tool catalog.
func (*ToolGroup) UnmarshalJSON ¶
type ToolGroupObject ¶
type ToolGroupObject string
Resource type identifier.
const (
ToolGroupObjectToolGroup ToolGroupObject = "tool_group"
)
type ToolInputParam ¶
type ToolInputParam struct {
// The built-in tool to attach.
//
// Only OpenMRP's built-in tools are attached here. Access to API-endpoint tools
// (creating a customer, listing orders, and so on) is granted separately through
// `config.endpoint_tool_slugs`. The List Tools endpoint (`GET /v1/ai/tools`)
// returns both kinds, with API-endpoint tools in the `api_endpoint` category.
//
// Any of "create_artifact", "read_doc", "fetch_url", "send_email", "draft_reply".
Tool ToolInputTool `json:"tool,omitzero" api:"required"`
// JSON-encoded configuration for this tool instance.
//
// The expected structure depends on the tool (see the tool's `config_schema`).
ConfigJson param.Opt[string] `json:"config_json,omitzero"`
// Whether actions from this tool require human review before they execute.
//
// When review is required, a call to this tool pauses the run in
// `awaiting_approval` and records an action in `pending_review` until someone
// approves or rejects it through the Continue Agent Run endpoint. Approvals are
// one-time, so a later call to the same tool pauses again.
RequireReview param.Opt[bool] `json:"require_review,omitzero"`
// Display order among the agent's tools (lower values appear first).
SortOrder param.Opt[int64] `json:"sort_order,omitzero"`
// contains filtered or unexported fields
}
Tool to attach to an agent definition.
The property Tool is required.
func (ToolInputParam) MarshalJSON ¶
func (r ToolInputParam) MarshalJSON() (data []byte, err error)
func (*ToolInputParam) UnmarshalJSON ¶
func (r *ToolInputParam) UnmarshalJSON(data []byte) error
type ToolInputTool ¶
type ToolInputTool string
The built-in tool to attach.
Only OpenMRP's built-in tools are attached here. Access to API-endpoint tools (creating a customer, listing orders, and so on) is granted separately through `config.endpoint_tool_slugs`. The List Tools endpoint (`GET /v1/ai/tools`) returns both kinds, with API-endpoint tools in the `api_endpoint` category.
const ( ToolInputToolCreateArtifact ToolInputTool = "create_artifact" ToolInputToolReadDoc ToolInputTool = "read_doc" ToolInputToolFetchURL ToolInputTool = "fetch_url" ToolInputToolSendEmail ToolInputTool = "send_email" ToolInputToolDraftReply ToolInputTool = "draft_reply" )
type TransactionMethod ¶
type TransactionMethod struct {
// Transaction method ID.
ID string `json:"id" api:"required"`
// Machine-readable code identifying how the transaction was made.
//
// Any of "cash", "check", "credit_card", "gift_card", "ach".
Code TransactionMethodCode `json:"code" api:"required"`
// Display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "transaction_method".
Object TransactionMethodObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
Name respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The payment method used to make a transaction, such as cash or check.
func (TransactionMethod) RawJSON ¶
func (r TransactionMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionMethod) UnmarshalJSON ¶
func (r *TransactionMethod) UnmarshalJSON(data []byte) error
type TransactionMethodCode ¶
type TransactionMethodCode string
Machine-readable code identifying how the transaction was made.
const ( TransactionMethodCodeCash TransactionMethodCode = "cash" TransactionMethodCodeCheck TransactionMethodCode = "check" TransactionMethodCodeCreditCard TransactionMethodCode = "credit_card" TransactionMethodCodeGiftCard TransactionMethodCode = "gift_card" TransactionMethodCodeACH TransactionMethodCode = "ach" )
type TransactionMethodObject ¶
type TransactionMethodObject string
Resource type identifier.
const (
TransactionMethodObjectTransactionMethod TransactionMethodObject = "transaction_method"
)
type TransactionType ¶
type TransactionType struct {
// Transaction type ID.
ID string `json:"id" api:"required"`
// Machine-readable code identifying the kind of transaction.
//
// - `payment`: money received from the customer.
// - `credit_memo`: a credit issued to the customer.
// - `adjustment`: a manual correction (see the transaction's `adjustment_type`).
// - `rebate`: a rebate granted to the customer.
//
// Any of "payment", "credit_memo", "adjustment", "rebate".
Code TransactionTypeCode `json:"code" api:"required"`
// Display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "transaction_type".
Object TransactionTypeObject `json:"object" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Code respjson.Field
Name respjson.Field
Object respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The category of a financial transaction, such as a payment or credit memo.
func (TransactionType) RawJSON ¶
func (r TransactionType) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionType) UnmarshalJSON ¶
func (r *TransactionType) UnmarshalJSON(data []byte) error
type TransactionTypeCode ¶
type TransactionTypeCode string
Machine-readable code identifying the kind of transaction.
- `payment`: money received from the customer. - `credit_memo`: a credit issued to the customer. - `adjustment`: a manual correction (see the transaction's `adjustment_type`). - `rebate`: a rebate granted to the customer.
const ( TransactionTypeCodePayment TransactionTypeCode = "payment" TransactionTypeCodeCreditMemo TransactionTypeCode = "credit_memo" TransactionTypeCodeAdjustment TransactionTypeCode = "adjustment" TransactionTypeCodeRebate TransactionTypeCode = "rebate" )
type TransactionTypeObject ¶
type TransactionTypeObject string
Resource type identifier.
const (
TransactionTypeObjectTransactionType TransactionTypeObject = "transaction_type"
)
type TriggerConfig ¶
type TriggerConfig struct {
// Cron expression for scheduled triggers (e.g. `0 9 * * *`).
CronSchedule string `json:"cron_schedule" api:"required"`
// Event types that trigger this agent (e.g.
// `["email.received", "order.created"]`).
EventFilters []string `json:"event_filters" api:"required"`
// Resource type identifier.
//
// Any of "trigger_config".
Object TriggerConfigObject `json:"object" api:"required"`
// IANA timezone for the cron schedule (e.g. `America/New_York`).
Timezone string `json:"timezone" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CronSchedule respjson.Field
EventFilters respjson.Field
Object respjson.Field
Timezone respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Trigger-type-specific configuration.
Which fields are populated depends on the agent's `trigger_type`:
- `scheduled`: `cron_schedule` (and optionally `timezone`) is set. - `event`: `event_filters` is set. - `manual`: all fields are empty.
func (TriggerConfig) RawJSON ¶
func (r TriggerConfig) RawJSON() string
Returns the unmodified JSON received from the API
func (*TriggerConfig) UnmarshalJSON ¶
func (r *TriggerConfig) UnmarshalJSON(data []byte) error
type TriggerConfigInputParam ¶
type TriggerConfigInputParam struct {
// Cron expression for scheduled triggers (e.g. `0 9 * * *`).
CronSchedule param.Opt[string] `json:"cron_schedule,omitzero"`
// IANA timezone for the cron schedule (e.g. `America/New_York`).
Timezone param.Opt[string] `json:"timezone,omitzero"`
// Event types that trigger this agent (e.g.
// `["email.received", "order.created"]`).
EventFilters []string `json:"event_filters,omitzero"`
// contains filtered or unexported fields
}
Trigger-type-specific settings for agent creation/update requests.
Required contents depend on the agent's `trigger_type`:
- `scheduled`: `cron_schedule` is required. - `event`: at least one entry in `event_filters` is required. - `manual` and `chat`: no trigger configuration is needed.
func (TriggerConfigInputParam) MarshalJSON ¶
func (r TriggerConfigInputParam) MarshalJSON() (data []byte, err error)
func (*TriggerConfigInputParam) UnmarshalJSON ¶
func (r *TriggerConfigInputParam) UnmarshalJSON(data []byte) error
type TriggerConfigObject ¶
type TriggerConfigObject string
Resource type identifier.
const (
TriggerConfigObjectTriggerConfig TriggerConfigObject = "trigger_config"
)
type TriggerRunRequestParam ¶
type TriggerRunRequestParam struct {
// ID of the agent definition to run.
//
// The agent must be active for the account; triggering an inactive agent returns a
// validation error.
AgentDefinitionID string `json:"agent_definition_id" api:"required"`
// Instruction text passed to the agent at the start of the run.
//
// Recorded on the run as `{"message": <input>}` in its `input` field.
Input param.Opt[string] `json:"input,omitzero"`
// contains filtered or unexported fields
}
Request to trigger an agent run.
The property AgentDefinitionID is required.
func (TriggerRunRequestParam) MarshalJSON ¶
func (r TriggerRunRequestParam) MarshalJSON() (data []byte, err error)
func (*TriggerRunRequestParam) UnmarshalJSON ¶
func (r *TriggerRunRequestParam) UnmarshalJSON(data []byte) error
type Unit ¶
type Unit struct {
// Unit ID.
ID string `json:"id" api:"required"`
// Short abbreviation for the unit (e.g. "g", "kg").
Abbreviation string `json:"abbreviation" api:"required"`
// When this unit was created.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether this is the base unit for its dimension.
//
// Every other unit's conversion ratio is expressed relative to the base unit. Base
// units are platform-defined; units created through the API are never base units.
IsBaseUnit bool `json:"is_base_unit" api:"required"`
// Display name of the unit (e.g. "Gram", "Kilogram").
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "unit".
Object UnitObject `json:"object" api:"required"`
// Denominator of the conversion offset applied after the ratio.
//
// Never zero; a unit with no offset carries a numerator of `0` over a denominator
// of `1`.
OffsetDenominator string `json:"offset_denominator" api:"required" format:"decimal"`
// Numerator of the conversion offset, applied after the ratio for scales that do
// not share a zero point, such as temperature.
//
// Zero for units that convert by ratio alone.
OffsetNumerator string `json:"offset_numerator" api:"required" format:"decimal"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// Denominator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// Cannot be zero.
RatioDenominator string `json:"ratio_denominator" api:"required" format:"decimal"`
// Numerator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// A quantity is converted with
// `value × (ratio_numerator / ratio_denominator) + (offset_numerator / offset_denominator)`,
// so a kilogram in a gram-based dimension has a numerator of `1000` and a
// denominator of `1`.
RatioNumerator string `json:"ratio_numerator" api:"required" format:"decimal"`
// The dimension this unit measures, such as mass, volume, or currency.
//
// A unit can only be converted to another unit of the same dimension. The
// `quantity` dimension is for discrete countable items rather than a physical
// measure.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type UnitType `json:"type" api:"required"`
// When this unit was last updated.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Abbreviation respjson.Field
CreatedAt respjson.Field
IsBaseUnit respjson.Field
Name respjson.Field
Object respjson.Field
OffsetDenominator respjson.Field
OffsetNumerator respjson.Field
Owner respjson.Field
RatioDenominator respjson.Field
RatioNumerator respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Unit of measurement used for conversions and product quantities.
func (*Unit) UnmarshalJSON ¶
type UnitGroup ¶
type UnitGroup struct {
// Unit group ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
AssociatedUnits ListUnitGroupUnit `json:"associated_units" api:"required"`
// Unit of measurement used for conversions and product quantities.
BaseUnit Unit `json:"base_unit" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Display name of the unit group.
//
// Unique within the account.
Name string `json:"name" api:"required"`
// Free-form notes about the unit group.
Notes string `json:"notes" api:"required"`
// Resource type identifier.
//
// Any of "unit_group".
Object UnitGroupObject `json:"object" api:"required"`
// Owner describes the provenance of a resource.
Owner Owner `json:"owner" api:"required"`
// The dimension shared by every unit in this group, such as mass, volume, or
// currency.
//
// Only units of this dimension can belong to the group, and the dimension is fixed
// once the group is created.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type UnitGroupType `json:"type" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AssociatedUnits respjson.Field
BaseUnit respjson.Field
CreatedAt respjson.Field
Name respjson.Field
Notes respjson.Field
Object respjson.Field
Owner respjson.Field
Type respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A named collection of units that share one dimension, defining which units a product can be ordered in.
Each associated unit carries its own discount and customer portal visibility, applied when an order line is priced in that unit. A product takes its unit group from its product line, falling back to its item category.
func (*UnitGroup) UnmarshalJSON ¶
type UnitGroupObject ¶
type UnitGroupObject string
Resource type identifier.
const (
UnitGroupObjectUnitGroup UnitGroupObject = "unit_group"
)
type UnitGroupType ¶
type UnitGroupType string
The dimension shared by every unit in this group, such as mass, volume, or currency.
Only units of this dimension can belong to the group, and the dimension is fixed once the group is created.
const ( UnitGroupTypeCurrency UnitGroupType = "currency" UnitGroupTypeQuantity UnitGroupType = "quantity" UnitGroupTypeTime UnitGroupType = "time" UnitGroupTypeMass UnitGroupType = "mass" UnitGroupTypeVolume UnitGroupType = "volume" UnitGroupTypeLength UnitGroupType = "length" UnitGroupTypeTemperature UnitGroupType = "temperature" UnitGroupTypeArea UnitGroupType = "area" )
type UnitGroupUnit ¶
type UnitGroupUnit struct {
// Unit group unit ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Whether this unit is shown to customers in the customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility UnitGroupUnitCustomerPortalVisibility `json:"customer_portal_visibility" api:"required"`
// Flat amount subtracted from the unit's price when an order is placed in this
// unit.
//
// Subtracted before `discount_percentage` is applied.
DiscountFixed float64 `json:"discount_fixed" api:"required"`
// Share of the unit's price removed when an order is placed in this unit.
//
// Expressed as a decimal fraction rather than a whole number, so `0.1` is a 10%
// discount and `0` is no discount.
DiscountPercentage float64 `json:"discount_percentage" api:"required"`
// Resource type identifier.
//
// Any of "unit_group_unit".
Object UnitGroupUnitObject `json:"object" api:"required"`
// Unit of measurement used for conversions and product quantities.
Unit Unit `json:"unit" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CustomerPortalVisibility respjson.Field
DiscountFixed respjson.Field
DiscountPercentage respjson.Field
Object respjson.Field
Unit respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Membership of a unit in a unit group, carrying the discount and customer portal visibility settings applied when ordering in that unit.
func (UnitGroupUnit) RawJSON ¶
func (r UnitGroupUnit) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnitGroupUnit) UnmarshalJSON ¶
func (r *UnitGroupUnit) UnmarshalJSON(data []byte) error
type UnitGroupUnitCustomerPortalVisibility ¶
type UnitGroupUnitCustomerPortalVisibility string
Whether this unit is shown to customers in the customer portal.
const ( UnitGroupUnitCustomerPortalVisibilityVisible UnitGroupUnitCustomerPortalVisibility = "visible" UnitGroupUnitCustomerPortalVisibilityHidden UnitGroupUnitCustomerPortalVisibility = "hidden" )
type UnitGroupUnitObject ¶
type UnitGroupUnitObject string
Resource type identifier.
const (
UnitGroupUnitObjectUnitGroupUnit UnitGroupUnitObject = "unit_group_unit"
)
type UnitIdentifierParam ¶
type UnitIdentifierParam struct {
// Unit ID.
ID string `json:"id" api:"required"`
// Unit abbreviation, matched case-insensitively against the account's units.
Abbreviation string `json:"abbreviation" api:"required"`
// Unit name, matched case-insensitively against the account's units.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
-------------------------- UNIT -------------------------- Identifies a unit by its id, its name, or its abbreviation, in that order of precedence.
The properties ID, Abbreviation, Name are required.
func (UnitIdentifierParam) MarshalJSON ¶
func (r UnitIdentifierParam) MarshalJSON() (data []byte, err error)
func (*UnitIdentifierParam) UnmarshalJSON ¶
func (r *UnitIdentifierParam) UnmarshalJSON(data []byte) error
type UnitObject ¶
type UnitObject string
Resource type identifier.
const (
UnitObjectUnit UnitObject = "unit"
)
type UnitType ¶
type UnitType string
The dimension this unit measures, such as mass, volume, or currency.
A unit can only be converted to another unit of the same dimension. The `quantity` dimension is for discrete countable items rather than a physical measure.
type UpdateAccountGroupRequestCommissionPolicy ¶
type UpdateAccountGroupRequestCommissionPolicy string
How sales commission applies to accounts in this group.
- `commission_applied`: sales commission is calculated on orders from accounts in this group.
- `commission_exempt`: orders from accounts in this group are exempt from commission.
const ( UpdateAccountGroupRequestCommissionPolicyCommissionApplied UpdateAccountGroupRequestCommissionPolicy = "commission_applied" UpdateAccountGroupRequestCommissionPolicyCommissionExempt UpdateAccountGroupRequestCommissionPolicy = "commission_exempt" )
type UpdateAccountGroupRequestFreightPolicy ¶
type UpdateAccountGroupRequestFreightPolicy string
How freight charges apply to orders from accounts in this group.
- `free_freight`: customers within this group will not have to pay for freight.
- `billed_freight`: freight will be applied to any order within this account group, unless overridden elsewhere.
const ( UpdateAccountGroupRequestFreightPolicyFreeFreight UpdateAccountGroupRequestFreightPolicy = "free_freight" UpdateAccountGroupRequestFreightPolicyBilledFreight UpdateAccountGroupRequestFreightPolicy = "billed_freight" )
type UpdateAccountGroupRequestParam ¶
type UpdateAccountGroupRequestParam struct {
// Calendar days between an order being issued and it being due to ship, inherited
// by every customer in this group that has not set its own. Clearing it returns
// the group's customers to the account default.
DefaultLeadTimeDays param.Opt[int64] `json:"default_lead_time_days,omitzero"`
// Free-form description of the account group.
Description param.Opt[string] `json:"description,omitzero"`
// Display name of the account group.
//
// Must be unique within your account.
Name param.Opt[string] `json:"name,omitzero"`
// How sales commission applies to accounts in this group.
//
// - `commission_applied`: sales commission is calculated on orders from accounts
// in this group.
// - `commission_exempt`: orders from accounts in this group are exempt from
// commission.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy UpdateAccountGroupRequestCommissionPolicy `json:"commission_policy,omitzero"`
// How freight charges apply to orders from accounts in this group.
//
// - `free_freight`: customers within this group will not have to pay for freight.
// - `billed_freight`: freight will be applied to any order within this account
// group, unless overridden elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy UpdateAccountGroupRequestFreightPolicy `json:"freight_policy,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an account group.
func (UpdateAccountGroupRequestParam) MarshalJSON ¶
func (r UpdateAccountGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAccountGroupRequestParam) UnmarshalJSON ¶
func (r *UpdateAccountGroupRequestParam) UnmarshalJSON(data []byte) error
type UpdateAccountIntegrationRequestParam ¶
type UpdateAccountIntegrationRequestParam struct {
// Display name of the integration.
Name param.Opt[string] `json:"name,omitzero"`
// Lifecycle status of the integration.
//
// Set to `inactive` to stop the provider being used while keeping its stored
// credentials, and back to `active` to resume without re-entering them.
//
// Any of "active", "inactive".
Status UpdateAccountIntegrationRequestStatus `json:"status,omitzero"`
// contains filtered or unexported fields
}
Request to update an account integration.
func (UpdateAccountIntegrationRequestParam) MarshalJSON ¶
func (r UpdateAccountIntegrationRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAccountIntegrationRequestParam) UnmarshalJSON ¶
func (r *UpdateAccountIntegrationRequestParam) UnmarshalJSON(data []byte) error
type UpdateAccountIntegrationRequestStatus ¶
type UpdateAccountIntegrationRequestStatus string
Lifecycle status of the integration.
Set to `inactive` to stop the provider being used while keeping its stored credentials, and back to `active` to resume without re-entering them.
const ( UpdateAccountIntegrationRequestStatusActive UpdateAccountIntegrationRequestStatus = "active" UpdateAccountIntegrationRequestStatusInactive UpdateAccountIntegrationRequestStatus = "inactive" )
type UpdateAccountPriceRequestParam ¶
type UpdateAccountPriceRequestParam struct {
// ID of the product line whose products this price applies to.
ProductLineID param.Opt[string] `json:"product_line_id,omitzero"`
// ID of the customer this price is offered to.
RecipientAccountID param.Opt[string] `json:"recipient_account_id,omitzero"`
// Attribute IDs to constrain this price to.
//
// When provided, replaces the existing set of attributes entirely; an empty list
// removes all attribute constraints.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// Item category IDs to record on this price.
//
// When provided, replaces the existing set of categories entirely; an empty list
// removes them all. Categories are recorded only — they do not narrow which
// products the price applies to.
CategoryIDs []string `json:"category_ids,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
Rate RateInputParam `json:"rate,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an account price.
func (UpdateAccountPriceRequestParam) MarshalJSON ¶
func (r UpdateAccountPriceRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAccountPriceRequestParam) UnmarshalJSON ¶
func (r *UpdateAccountPriceRequestParam) UnmarshalJSON(data []byte) error
type UpdateAccountUserRequestParam ¶
type UpdateAccountUserRequestParam struct {
// ID of the department to assign to the user.
//
// Set to `null` to clear the department. The department must already exist in the
// account.
DepartmentID param.Opt[string] `json:"department_id,omitzero"`
// ID of the role to assign to the user.
//
// Set to `null` to clear the role.
RoleID param.Opt[string] `json:"role_id,omitzero"`
// User email address.
//
// Must not already be in use by another user.
Email param.Opt[string] `json:"email,omitzero"`
// Whether the user can be assigned as a sales representative on orders,
// territories, and targets.
//
// Forced true for the `sales_rep` role type and rejected for scanner and agent
// roles. Cannot be turned off while the user stays on a `sales_rep` role.
IsCommissionEligible param.Opt[bool] `json:"is_commission_eligible,omitzero"`
// User display name.
Name param.Opt[string] `json:"name,omitzero"`
// Unique username.
//
// 3–255 characters; letters, numbers, underscores, and hyphens. Must not already
// be in use by another user.
Username param.Opt[string] `json:"username,omitzero"`
// Notification preference toggles to apply.
//
// Only allowed when updating a user in another account you manage (cross-account);
// rejected otherwise. Notification types omitted from the list are left unchanged.
Preferences []NotificationPreferenceItemParam `json:"preferences,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an account user.
func (UpdateAccountUserRequestParam) MarshalJSON ¶
func (r UpdateAccountUserRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAccountUserRequestParam) UnmarshalJSON ¶
func (r *UpdateAccountUserRequestParam) UnmarshalJSON(data []byte) error
type UpdateAddressRequestParam ¶
type UpdateAddressRequestParam struct {
// Email address associated with the address.
//
// Send `null` to clear.
Email param.Opt[string] `json:"email,omitzero"`
// Phone number associated with the address.
//
// Send `null` to clear.
Phone param.Opt[string] `json:"phone,omitzero"`
// The operating calendar naming the days this dock accepts freight, overriding the
// customer's own. Clearing it returns this address to the customer's own calendar.
ReceiveCalendarID param.Opt[string] `json:"receive_calendar_id,omitzero"`
// Second line of the street address.
//
// Send `null` to clear.
StreetLine2 param.Opt[string] `json:"street_line_2,omitzero"`
// Two-letter country code.
Country param.Opt[string] `json:"country,omitzero"`
// City or locality.
Locality param.Opt[string] `json:"locality,omitzero"`
// Display name of the address.
Name param.Opt[string] `json:"name,omitzero"`
// Postal or ZIP code.
PostalCode param.Opt[string] `json:"postal_code,omitzero"`
// State or administrative area.
State param.Opt[string] `json:"state,omitzero"`
// First line of the street address.
StreetLine1 param.Opt[string] `json:"street_line_1,omitzero"`
// How the address is used.
//
// - `standard`: a normal shipping or billing address.
// - `drop_ship`: an address an order is shipped to directly, typically a third
// party or end customer rather than the account itself.
//
// Any of "standard", "drop_ship".
Type UpdateAddressRequestType `json:"type,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an address.
Omitted fields are left unchanged.
func (UpdateAddressRequestParam) MarshalJSON ¶
func (r UpdateAddressRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAddressRequestParam) UnmarshalJSON ¶
func (r *UpdateAddressRequestParam) UnmarshalJSON(data []byte) error
type UpdateAddressRequestType ¶
type UpdateAddressRequestType string
How the address is used.
- `standard`: a normal shipping or billing address.
- `drop_ship`: an address an order is shipped to directly, typically a third party or end customer rather than the account itself.
const ( UpdateAddressRequestTypeStandard UpdateAddressRequestType = "standard" UpdateAddressRequestTypeDropShip UpdateAddressRequestType = "drop_ship" )
type UpdateAgentRequestParam ¶
type UpdateAgentRequestParam struct {
// Description of what the agent does.
//
// Send `null` to clear the description; omit to leave it unchanged.
Description param.Opt[string] `json:"description,omitzero"`
// ID of the role that defines the permissions the agent operates with.
//
// Send `null` to detach the role; omit to leave it unchanged. An agent with no
// role cannot execute, so detaching the role makes its runs fail immediately.
RoleID param.Opt[string] `json:"role_id,omitzero"`
// Category grouping for the agent (e.g. `order_processing`), used to organize
// agents in the UI.
CategoryCode param.Opt[string] `json:"category_code,omitzero"`
// Human-readable name of the agent.
Name param.Opt[string] `json:"name,omitzero"`
// URL-friendly identifier for the agent.
Slug param.Opt[string] `json:"slug,omitzero"`
// Agent-level configuration for creation/update requests.
Config ConfigInputParam `json:"config,omitzero"`
// Built-in tools to attach to the agent.
//
// Replaces the existing tool set when provided.
Tools []ToolInputParam `json:"tools,omitzero"`
// How runs of this agent are initiated.
//
// When changing the trigger type, also provide a `config` with a `trigger_config`
// appropriate for the new type (a cron schedule for `scheduled`, at least one
// event filter for `event`).
//
// Any of "scheduled", "manual", "event", "chat".
TriggerType UpdateAgentRequestTriggerType `json:"trigger_type,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an agent definition.
func (UpdateAgentRequestParam) MarshalJSON ¶
func (r UpdateAgentRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAgentRequestParam) UnmarshalJSON ¶
func (r *UpdateAgentRequestParam) UnmarshalJSON(data []byte) error
type UpdateAgentRequestTriggerType ¶
type UpdateAgentRequestTriggerType string
How runs of this agent are initiated.
When changing the trigger type, also provide a `config` with a `trigger_config` appropriate for the new type (a cron schedule for `scheduled`, at least one event filter for `event`).
const ( UpdateAgentRequestTriggerTypeScheduled UpdateAgentRequestTriggerType = "scheduled" UpdateAgentRequestTriggerTypeManual UpdateAgentRequestTriggerType = "manual" UpdateAgentRequestTriggerTypeEvent UpdateAgentRequestTriggerType = "event" UpdateAgentRequestTriggerTypeChat UpdateAgentRequestTriggerType = "chat" )
type UpdateAgentStatusRequestParam ¶
type UpdateAgentStatusRequestParam struct {
// Account-level status to set for the agent.
//
// Any of "active", "inactive".
Status UpdateAgentStatusRequestStatus `json:"status,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to update the per-account status of an agent.
The property Status is required.
func (UpdateAgentStatusRequestParam) MarshalJSON ¶
func (r UpdateAgentStatusRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAgentStatusRequestParam) UnmarshalJSON ¶
func (r *UpdateAgentStatusRequestParam) UnmarshalJSON(data []byte) error
type UpdateAgentStatusRequestStatus ¶ added in v0.17.1
type UpdateAgentStatusRequestStatus string
Account-level status to set for the agent.
const ( UpdateAgentStatusRequestStatusActive UpdateAgentStatusRequestStatus = "active" UpdateAgentStatusRequestStatusInactive UpdateAgentStatusRequestStatus = "inactive" )
type UpdateAttributeRequestColor ¶
type UpdateAttributeRequestColor string
Swatch color used to display this attribute in the UI.
const ( UpdateAttributeRequestColorBlue UpdateAttributeRequestColor = "blue" UpdateAttributeRequestColorBrown UpdateAttributeRequestColor = "brown" UpdateAttributeRequestColorDefault UpdateAttributeRequestColor = "default" UpdateAttributeRequestColorGray UpdateAttributeRequestColor = "gray" UpdateAttributeRequestColorGreen UpdateAttributeRequestColor = "green" UpdateAttributeRequestColorOrange UpdateAttributeRequestColor = "orange" UpdateAttributeRequestColorPink UpdateAttributeRequestColor = "pink" UpdateAttributeRequestColorPurple UpdateAttributeRequestColor = "purple" UpdateAttributeRequestColorRed UpdateAttributeRequestColor = "red" UpdateAttributeRequestColorYellow UpdateAttributeRequestColor = "yellow" )
type UpdateAttributeRequestParam ¶
type UpdateAttributeRequestParam struct {
// New position of this attribute relative to its siblings within the property,
// starting at `1`.
//
// Must be at most the property's current attribute count; the attributes between
// the old and new positions shift to make room.
SortOrder param.Opt[int64] `json:"sort_order,omitzero"`
// The selectable value this attribute represents, such as `Red`.
//
// Must be non-blank and unique across all attributes in the account, not just
// within the property.
Value param.Opt[string] `json:"value,omitzero"`
// Swatch color used to display this attribute in the UI.
//
// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
// "red", "yellow".
Color UpdateAttributeRequestColor `json:"color,omitzero"`
// contains filtered or unexported fields
}
Request to update an attribute.
func (UpdateAttributeRequestParam) MarshalJSON ¶
func (r UpdateAttributeRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateAttributeRequestParam) UnmarshalJSON ¶
func (r *UpdateAttributeRequestParam) UnmarshalJSON(data []byte) error
type UpdateCarrierRequestCustomerPortalVisibility ¶
type UpdateCarrierRequestCustomerPortalVisibility string
Whether customers can see and select this carrier at checkout in the customer portal.
Each of the carrier's service levels carries its own customer portal visibility, which this does not change.
const ( UpdateCarrierRequestCustomerPortalVisibilityVisible UpdateCarrierRequestCustomerPortalVisibility = "visible" UpdateCarrierRequestCustomerPortalVisibilityHidden UpdateCarrierRequestCustomerPortalVisibility = "hidden" )
type UpdateCarrierRequestParam ¶
type UpdateCarrierRequestParam struct {
// Human-readable name for the carrier.
//
// Must not match another carrier already visible to your account, including the
// system-provided ones.
Name param.Opt[string] `json:"name,omitzero"`
// Whether customers can see and select this carrier at checkout in the customer
// portal.
//
// Each of the carrier's service levels carries its own customer portal visibility,
// which this does not change.
//
// Any of "visible", "hidden".
CustomerPortalVisibility UpdateCarrierRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to update a carrier.
func (UpdateCarrierRequestParam) MarshalJSON ¶
func (r UpdateCarrierRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateCarrierRequestParam) UnmarshalJSON ¶
func (r *UpdateCarrierRequestParam) UnmarshalJSON(data []byte) error
type UpdateConversationRequestParam ¶
type UpdateConversationRequestParam struct {
// The group conversation's new display title.
//
// Send `null` to clear the title and leave the conversation unnamed.
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
Request to rename a conversation.
func (UpdateConversationRequestParam) MarshalJSON ¶
func (r UpdateConversationRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateConversationRequestParam) UnmarshalJSON ¶
func (r *UpdateConversationRequestParam) UnmarshalJSON(data []byte) error
type UpdateCustomerRequestCarrierBillingType ¶
type UpdateCustomerRequestCarrierBillingType string
Who pays the carrier for shipments.
- `sender`: the shipper (you) pays the carrier. - `third_party`: a third party is billed, using `carrier_billing_account`.
const ( UpdateCustomerRequestCarrierBillingTypeSender UpdateCustomerRequestCarrierBillingType = "sender" UpdateCustomerRequestCarrierBillingTypeThirdParty UpdateCustomerRequestCarrierBillingType = "third_party" )
type UpdateCustomerRequestCommissionPolicy ¶
type UpdateCustomerRequestCommissionPolicy string
How sales commission applies to this customer's orders.
- `commission_exempt`: this customer's orders are exempt from sales commission.
- `commission_applied`: sales commission is calculated on this customer's orders.
const ( UpdateCustomerRequestCommissionPolicyCommissionApplied UpdateCustomerRequestCommissionPolicy = "commission_applied" UpdateCustomerRequestCommissionPolicyCommissionExempt UpdateCustomerRequestCommissionPolicy = "commission_exempt" )
type UpdateCustomerRequestDefaultPriority ¶
type UpdateCustomerRequestDefaultPriority string
Priority used to pre-fill new orders for this customer.
const ( UpdateCustomerRequestDefaultPriorityLow UpdateCustomerRequestDefaultPriority = "low" UpdateCustomerRequestDefaultPriorityNormal UpdateCustomerRequestDefaultPriority = "normal" UpdateCustomerRequestDefaultPriorityHigh UpdateCustomerRequestDefaultPriority = "high" )
type UpdateCustomerRequestEdiStatus ¶
type UpdateCustomerRequestEdiStatus string
Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and documents with this customer.
const ( UpdateCustomerRequestEdiStatusEnabled UpdateCustomerRequestEdiStatus = "enabled" UpdateCustomerRequestEdiStatusDisabled UpdateCustomerRequestEdiStatus = "disabled" )
type UpdateCustomerRequestFreightPolicy ¶
type UpdateCustomerRequestFreightPolicy string
Whether this customer is billed for freight on their orders.
- `free_freight`: the customer is not billed for freight. - `billed_freight`: freight is billed to the customer.
Freight is also waived when the customer's type group, one of its price groups, or a product line the ordered products belong to is `free_freight`.
const ( UpdateCustomerRequestFreightPolicyFreeFreight UpdateCustomerRequestFreightPolicy = "free_freight" UpdateCustomerRequestFreightPolicyBilledFreight UpdateCustomerRequestFreightPolicy = "billed_freight" )
type UpdateCustomerRequestFulfillmentPolicy ¶ added in v0.19.0
type UpdateCustomerRequestFulfillmentPolicy string
How this customer's orders are produced.
- `make_to_stock`: their order history feeds the production-schedule forecast, so stock is built ahead of their demand.
- `make_to_order`: their history is left out of the forecast; their orders are produced only once placed, and fit into the schedule on their own ship-by dates.
Clearing it returns the customer to their account group policy, then the make-to-stock default.
const ( UpdateCustomerRequestFulfillmentPolicyMakeToStock UpdateCustomerRequestFulfillmentPolicy = "make_to_stock" UpdateCustomerRequestFulfillmentPolicyMakeToOrder UpdateCustomerRequestFulfillmentPolicy = "make_to_order" )
type UpdateCustomerRequestParam ¶
type UpdateCustomerRequestParam struct {
// ID of an existing address to use as the default billing address.
//
// The address is linked to the customer's account if it is not already.
BillToAddressID param.Opt[string] `json:"bill_to_address_id,omitzero"`
// Carrier billing account number charged when `carrier_billing_type` is
// `third_party`.
CarrierBillingAccount param.Opt[string] `json:"carrier_billing_account,omitzero"`
// The ID of the account user to credit as the sales rep on this customer's orders.
//
// Must be an account user on your own account.
DefaultSalesRepID param.Opt[string] `json:"default_sales_rep_id,omitzero"`
// ID of the carrier service level used when an order takes its carrier from this
// customer's default.
DefaultServiceLevelID param.Opt[string] `json:"default_service_level_id,omitzero"`
// Email address.
Email param.Opt[string] `json:"email,omitzero"`
// Calendar days between an order being issued and it being due to ship.
//
// Sets each order's `ship_by_date` when it is issued. Clear it to inherit the
// parent account's lead time, then the customer's account group lead time, then
// the account default.
LeadTimeDays param.Opt[int64] `json:"lead_time_days,omitzero"`
// Free-form note about the customer.
Note param.Opt[string] `json:"note,omitzero"`
// Phone number.
Phone param.Opt[string] `json:"phone,omitzero"`
// The operating calendar naming the days this customer's dock accepts freight.
// Clearing it returns the customer to their group's calendar, then the account
// default.
ReceiveCalendarID param.Opt[string] `json:"receive_calendar_id,omitzero"`
// ID of an existing address to use as the default shipping address.
//
// The address is linked to the customer's account if it is not already.
ShipToAddressID param.Opt[string] `json:"ship_to_address_id,omitzero"`
// Website URL.
URL param.Opt[string] `json:"url,omitzero"`
// ID of the account group of type `type_group` that categorizes this customer (for
// example "Distributors").
CustomerTypeGroupID param.Opt[string] `json:"customer_type_group_id,omitzero"`
// ID of the carrier used on this customer's orders when the order does not specify
// one.
DefaultCarrierID param.Opt[string] `json:"default_carrier_id,omitzero"`
// ID of the payment term used on this customer's orders when the order does not
// specify one.
DefaultPaymentTermID param.Opt[string] `json:"default_payment_term_id,omitzero"`
// ID of the shipping term used on this customer's orders when the order does not
// specify one.
DefaultShippingTermID param.Opt[string] `json:"default_shipping_term_id,omitzero"`
// The customer's business name, as shown throughout the app and on documents.
Name param.Opt[string] `json:"name,omitzero"`
// Human-readable customer number used to identify the account, distinct from the
// `id`.
//
// Must be unique within your account.
Number param.Opt[string] `json:"number,omitzero"`
// How this customer's orders are produced.
//
// - `make_to_stock`: their order history feeds the production-schedule forecast,
// so stock is built ahead of their demand.
// - `make_to_order`: their history is left out of the forecast; their orders are
// produced only once placed, and fit into the schedule on their own ship-by
// dates.
//
// Clearing it returns the customer to their account group policy, then the
// make-to-stock default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy UpdateCustomerRequestFulfillmentPolicy `json:"fulfillment_policy,omitzero"`
// Who pays the carrier for shipments.
//
// - `sender`: the shipper (you) pays the carrier.
// - `third_party`: a third party is billed, using `carrier_billing_account`.
//
// Any of "sender", "third_party".
CarrierBillingType UpdateCustomerRequestCarrierBillingType `json:"carrier_billing_type,omitzero"`
// How sales commission applies to this customer's orders.
//
// - `commission_exempt`: this customer's orders are exempt from sales commission.
// - `commission_applied`: sales commission is calculated on this customer's
// orders.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy UpdateCustomerRequestCommissionPolicy `json:"commission_policy,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
CreditLimit QuantityInputParam `json:"credit_limit,omitzero"`
// IDs of the account groups of type `pricing_group` to assign to this customer,
// used to apply pricing rules.
//
// When provided, replaces the customer's full set of existing price groups.
CustomerPriceGroupIDs []string `json:"customer_price_group_ids,omitzero"`
// Priority used to pre-fill new orders for this customer.
//
// Any of "low", "normal", "high".
DefaultPriority UpdateCustomerRequestDefaultPriority `json:"default_priority,omitzero"`
// Whether EDI (Electronic Data Interchange) is enabled for exchanging orders and
// documents with this customer.
//
// Any of "enabled", "disabled".
EdiStatus UpdateCustomerRequestEdiStatus `json:"edi_status,omitzero"`
// Whether this customer is billed for freight on their orders.
//
// - `free_freight`: the customer is not billed for freight.
// - `billed_freight`: freight is billed to the customer.
//
// Freight is also waived when the customer's type group, one of its price groups,
// or a product line the ordered products belong to is `free_freight`.
//
// Any of "free_freight", "billed_freight".
FreightPolicy UpdateCustomerRequestFreightPolicy `json:"freight_policy,omitzero"`
// The customer's account standing.
//
// - `normal`: standard account with no restrictions.
// - `preferred`: account flagged for prioritized handling.
// - `hold_shipment`: the customer's shipments should be held, typically over a
// credit problem, while orders can still be placed.
// - `hold_all`: all activity for the customer should be held.
//
// Any of "normal", "preferred", "hold_shipment", "hold_all".
Status UpdateCustomerRequestStatus `json:"status,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a customer.
func (UpdateCustomerRequestParam) MarshalJSON ¶
func (r UpdateCustomerRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateCustomerRequestParam) UnmarshalJSON ¶
func (r *UpdateCustomerRequestParam) UnmarshalJSON(data []byte) error
type UpdateCustomerRequestStatus ¶
type UpdateCustomerRequestStatus string
The customer's account standing.
- `normal`: standard account with no restrictions.
- `preferred`: account flagged for prioritized handling.
- `hold_shipment`: the customer's shipments should be held, typically over a credit problem, while orders can still be placed.
- `hold_all`: all activity for the customer should be held.
const ( UpdateCustomerRequestStatusNormal UpdateCustomerRequestStatus = "normal" UpdateCustomerRequestStatusPreferred UpdateCustomerRequestStatus = "preferred" UpdateCustomerRequestStatusHoldShipment UpdateCustomerRequestStatus = "hold_shipment" UpdateCustomerRequestStatusHoldAll UpdateCustomerRequestStatus = "hold_all" )
type UpdateDemandOverrideRequestAdjustment ¶
type UpdateDemandOverrideRequestAdjustment string
How the value adjusts the forecast.
- `absolute`: replaces the forecast for each month in the period. - `delta_units`: adds the value to each month in the period. - `delta_percent`: scales each month in the period by the value as a percentage.
const ( UpdateDemandOverrideRequestAdjustmentAbsolute UpdateDemandOverrideRequestAdjustment = "absolute" UpdateDemandOverrideRequestAdjustmentDeltaUnits UpdateDemandOverrideRequestAdjustment = "delta_units" UpdateDemandOverrideRequestAdjustmentDeltaPercent UpdateDemandOverrideRequestAdjustment = "delta_percent" )
type UpdateDemandOverrideRequestParam ¶
type UpdateDemandOverrideRequestParam struct {
// When the override stops being applied to newly generated schedules.
//
// Clear it to keep the override applying until it is deactivated or deleted.
ExpiresAt param.Opt[time.Time] `json:"expires_at,omitzero" format:"date-time"`
// Free-form notes about the adjustment.
Note param.Opt[string] `json:"note,omitzero"`
// ID of the unit the value is expressed in.
//
// Recorded for context only: the value is applied to the planned demand without
// unit conversion.
UnitID param.Opt[string] `json:"unit_id,omitzero"`
// Whether the override is taken into account when a schedule is generated.
//
// Deactivating parks the override without losing it; it is skipped whatever its
// effective window says, and can be reactivated later.
Active param.Opt[bool] `json:"active,omitzero"`
// Last day of the demand period the override applies to.
//
// Must fall on or after the override's start, whether that is sent here or already
// stored.
PeriodEndsAt param.Opt[time.Time] `json:"period_ends_at,omitzero" format:"date-time"`
// First day of the demand period the override applies to.
//
// Overrides are applied month by month, so every calendar month the period touches
// is adjusted and any time of day is ignored.
PeriodStartsAt param.Opt[time.Time] `json:"period_starts_at,omitzero" format:"date-time"`
// The amount of the adjustment, interpreted according to `adjustment`.
//
// It is validated against the adjustment the override ends up with, so switching a
// stored unit delta to `delta_percent` without sending a new value requires the
// existing value to be a legal percentage.
Value param.Opt[float64] `json:"value,omitzero"`
// Why the adjustment was made.
//
// The reason is carried into each schedule the override changes, so a plan can
// explain why a month departs from history.
//
// Any of "new_customer", "lost_account", "promotion", "seasonal_shift",
// "new_product", "discontinued", "market_intelligence", "other".
Reason UpdateDemandOverrideRequestReason `json:"reason,omitzero"`
// How the value adjusts the forecast.
//
// - `absolute`: replaces the forecast for each month in the period.
// - `delta_units`: adds the value to each month in the period.
// - `delta_percent`: scales each month in the period by the value as a percentage.
//
// Any of "absolute", "delta_units", "delta_percent".
Adjustment UpdateDemandOverrideRequestAdjustment `json:"adjustment,omitzero"`
// contains filtered or unexported fields
}
Request to update a demand override.
func (UpdateDemandOverrideRequestParam) MarshalJSON ¶
func (r UpdateDemandOverrideRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateDemandOverrideRequestParam) UnmarshalJSON ¶
func (r *UpdateDemandOverrideRequestParam) UnmarshalJSON(data []byte) error
type UpdateDemandOverrideRequestReason ¶
type UpdateDemandOverrideRequestReason string
Why the adjustment was made.
The reason is carried into each schedule the override changes, so a plan can explain why a month departs from history.
const ( UpdateDemandOverrideRequestReasonNewCustomer UpdateDemandOverrideRequestReason = "new_customer" UpdateDemandOverrideRequestReasonLostAccount UpdateDemandOverrideRequestReason = "lost_account" UpdateDemandOverrideRequestReasonPromotion UpdateDemandOverrideRequestReason = "promotion" UpdateDemandOverrideRequestReasonSeasonalShift UpdateDemandOverrideRequestReason = "seasonal_shift" UpdateDemandOverrideRequestReasonNewProduct UpdateDemandOverrideRequestReason = "new_product" UpdateDemandOverrideRequestReasonDiscontinued UpdateDemandOverrideRequestReason = "discontinued" UpdateDemandOverrideRequestReasonMarketIntelligence UpdateDemandOverrideRequestReason = "market_intelligence" UpdateDemandOverrideRequestReasonOther UpdateDemandOverrideRequestReason = "other" )
type UpdateDepartmentRequestParam ¶
type UpdateDepartmentRequestParam struct {
// ID of the location where this department operates.
LocationID param.Opt[string] `json:"location_id,omitzero"`
// Display name of the department.
//
// Must be unique within your account; maximum 255 characters.
Name param.Opt[string] `json:"name,omitzero"`
// Free-form notes about the department.
Notes param.Opt[string] `json:"notes,omitzero"`
// A rate, expressed as a value together with the units of its numerator and
// denominator (for example, `25.00` `$` per `hr`).
LaborRate DepartmentRateInputParam `json:"labor_rate,omitzero"`
// IDs of machines to assign to this department.
//
// Assignment is additive: listed machines are moved into this department and
// machines already in the department are unaffected.
MachineIDs []string `json:"machine_ids,omitzero"`
// IDs of scanning stations to assign to this department.
//
// Assignment is additive: listed stations are moved into this department and
// stations already in the department are unaffected.
ScanningStationIDs []string `json:"scanning_station_ids,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a department.
func (UpdateDepartmentRequestParam) MarshalJSON ¶
func (r UpdateDepartmentRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateDepartmentRequestParam) UnmarshalJSON ¶
func (r *UpdateDepartmentRequestParam) UnmarshalJSON(data []byte) error
type UpdateDraftRequestParam ¶
type UpdateDraftRequestParam struct {
// The revised reply body, replacing what the draft said before.
Body string `json:"body" api:"required"`
// The revised subject line for a draft that will be sent by email.
//
// Leaving it out keeps the draft's current subject.
Subject param.Opt[string] `json:"subject,omitzero"`
// contains filtered or unexported fields
}
Request to edit a still-open customer-reply draft message.
The property Body is required.
func (UpdateDraftRequestParam) MarshalJSON ¶
func (r UpdateDraftRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateDraftRequestParam) UnmarshalJSON ¶
func (r *UpdateDraftRequestParam) UnmarshalJSON(data []byte) error
type UpdateEmailInboxRequestAgentTriggerPolicy ¶ added in v0.17.1
type UpdateEmailInboxRequestAgentTriggerPolicy string
How the bound agent decides whether to run on incoming mail.
- `mention`: runs only when the agent is @mentioned, matched against the trigger keywords below.
- `keyword`: runs when the message contains any of the trigger keywords.
- `always`: runs on every incoming message.
While no policy has been set, the agent runs on every incoming message, since email has no reliable @mention convention.
const ( UpdateEmailInboxRequestAgentTriggerPolicyMention UpdateEmailInboxRequestAgentTriggerPolicy = "mention" UpdateEmailInboxRequestAgentTriggerPolicyKeyword UpdateEmailInboxRequestAgentTriggerPolicy = "keyword" UpdateEmailInboxRequestAgentTriggerPolicyAlways UpdateEmailInboxRequestAgentTriggerPolicy = "always" )
type UpdateEmailInboxRequestParam ¶
type UpdateEmailInboxRequestParam struct {
// Whether the inbox accepts mail.
//
// - `active`: inbound mail is threaded into a conversation.
// - `disabled`: the inbox stays provisioned and keeps its history, but inbound
// mail is dropped without being threaded.
//
// Any of "active", "disabled".
Status UpdateEmailInboxRequestStatus `json:"status,omitzero" api:"required"`
// The agent to bind to this inbox to handle incoming mail.
AgentConfigID param.Opt[string] `json:"agent_config_id,omitzero"`
// Display name for the `From` header of outbound mail.
FromName param.Opt[string] `json:"from_name,omitzero"`
// The messaging group (roster) whose members are seated on every conversation this
// inbox opens.
//
// Must name a group in your own account. Changing it only affects conversations
// opened afterwards.
GroupID param.Opt[string] `json:"group_id,omitzero"`
// The keywords that decide whether the agent runs on an incoming message.
//
// Under the `keyword` policy a keyword matches anywhere in the message; under
// `mention` it only counts where it is prefixed with `@`.
AgentTriggerKeywords []string `json:"agent_trigger_keywords,omitzero"`
// How the bound agent decides whether to run on incoming mail.
//
// - `mention`: runs only when the agent is @mentioned, matched against the trigger
// keywords below.
// - `keyword`: runs when the message contains any of the trigger keywords.
// - `always`: runs on every incoming message.
//
// While no policy has been set, the agent runs on every incoming message, since
// email has no reliable @mention convention.
//
// Any of "mention", "keyword", "always".
AgentTriggerPolicy UpdateEmailInboxRequestAgentTriggerPolicy `json:"agent_trigger_policy,omitzero"`
// contains filtered or unexported fields
}
Request to edit an email inbox's from-name, status, agent configuration, and roster.
The property Status is required.
func (UpdateEmailInboxRequestParam) MarshalJSON ¶
func (r UpdateEmailInboxRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateEmailInboxRequestParam) UnmarshalJSON ¶
func (r *UpdateEmailInboxRequestParam) UnmarshalJSON(data []byte) error
type UpdateEmailInboxRequestStatus ¶ added in v0.17.1
type UpdateEmailInboxRequestStatus string
Whether the inbox accepts mail.
- `active`: inbound mail is threaded into a conversation.
- `disabled`: the inbox stays provisioned and keeps its history, but inbound mail is dropped without being threaded.
const ( UpdateEmailInboxRequestStatusActive UpdateEmailInboxRequestStatus = "active" UpdateEmailInboxRequestStatusDisabled UpdateEmailInboxRequestStatus = "disabled" )
type UpdateItemCategoryRequestParam ¶
type UpdateItemCategoryRequestParam struct {
// Display name of the item category.
Name param.Opt[string] `json:"name,omitzero"`
// Free-form notes about the item category.
Notes param.Opt[string] `json:"notes,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an item category.
func (UpdateItemCategoryRequestParam) MarshalJSON ¶
func (r UpdateItemCategoryRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateItemCategoryRequestParam) UnmarshalJSON ¶
func (r *UpdateItemCategoryRequestParam) UnmarshalJSON(data []byte) error
type UpdateItemInventoryRequestOperation ¶
type UpdateItemInventoryRequestOperation string
How `quantity` is applied.
- `adjust`: adds `quantity` to the current quantity. - `reconcile`: sets the current quantity to exactly `quantity`.
const ( UpdateItemInventoryRequestOperationAdjust UpdateItemInventoryRequestOperation = "adjust" UpdateItemInventoryRequestOperationReconcile UpdateItemInventoryRequestOperation = "reconcile" )
type UpdateItemInventoryRequestParam ¶
type UpdateItemInventoryRequestParam struct {
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Quantity QuantityInputParam `json:"quantity,omitzero" api:"required"`
// ID of the customer account that owns the resulting inventory.
//
// Use this for stock you hold but do not own, such as customer-supplied material.
// It only affects quantity being added: your account stays the holder, the
// customer becomes the owner, and the current quantity a `reconcile` measures
// against is still your account's. Requires edit access to that customer.
CustomerID param.Opt[string] `json:"customer_id,omitzero"`
// ID of the location to record the inventory change against.
//
// Must be a location in your account.
LocationID param.Opt[string] `json:"location_id,omitzero"`
// Lot number to record the inventory change against.
//
// The lot is created for the item if it does not already exist.
LotNumber param.Opt[string] `json:"lot_number,omitzero"`
// How `quantity` is applied.
//
// - `adjust`: adds `quantity` to the current quantity.
// - `reconcile`: sets the current quantity to exactly `quantity`.
//
// Any of "adjust", "reconcile".
Operation UpdateItemInventoryRequestOperation `json:"operation,omitzero"`
// contains filtered or unexported fields
}
Request to adjust or reconcile inventory for an item.
The property Quantity is required.
func (UpdateItemInventoryRequestParam) MarshalJSON ¶
func (r UpdateItemInventoryRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateItemInventoryRequestParam) UnmarshalJSON ¶
func (r *UpdateItemInventoryRequestParam) UnmarshalJSON(data []byte) error
type UpdateLocationRequestParam ¶
type UpdateLocationRequestParam struct {
// The location this one sits under in the storage hierarchy.
//
// Must be an existing location in your account, and cannot be the location being
// updated. Send `null` to detach it from its parent and make it a top-level
// location.
ParentID param.Opt[string] `json:"parent_id,omitzero"`
// Display name of the location.
//
// Maximum 255 characters.
Name param.Opt[string] `json:"name,omitzero"`
// The locations that sit directly beneath this one.
//
// This replaces the full set of children: current children that are not listed are
// detached and become top-level locations, and listed locations are reparented
// onto this location. Send `null` to detach every child. Omit the field to leave
// the existing children untouched.
ChildIDs []string `json:"child_ids,omitzero"`
// This location's level in the storage hierarchy.
//
// The levels run from largest to smallest: `building`, `section`, `aisle`, `rack`,
// `shelf`, `bin`. They are descriptive labels rather than a rule — the parent is
// not required to be the next level up.
//
// Any of "building", "section", "aisle", "rack", "shelf", "bin".
Type LocationTypeCode `json:"type,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a location.
func (UpdateLocationRequestParam) MarshalJSON ¶
func (r UpdateLocationRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateLocationRequestParam) UnmarshalJSON ¶
func (r *UpdateLocationRequestParam) UnmarshalJSON(data []byte) error
type UpdateMachineDowntimeEventRequestParam ¶
type UpdateMachineDowntimeEventRequestParam struct {
// ID of the batch in progress when the machine stopped.
//
// Send null to detach the batch.
BatchID param.Opt[string] `json:"batch_id,omitzero"`
// When the machine started running again.
//
// Setting it closes the event and records the duration. Send null to reopen an
// event that was closed by mistake, which is rejected if the machine has since had
// another stoppage logged that is still open.
EndedAt param.Opt[time.Time] `json:"ended_at,omitzero" format:"date-time"`
// ID of the item the machine was running when it stopped.
//
// Send null to detach the item.
ItemID param.Opt[string] `json:"item_id,omitzero"`
// Free-form notes about the stoppage.
//
// Send null to remove the note. Maximum 2000 characters.
Note param.Opt[string] `json:"note,omitzero"`
// ID of the production run in progress when the machine stopped.
//
// Send null to detach the run.
ProductionRunID param.Opt[string] `json:"production_run_id,omitzero"`
// ID of the machine that stopped.
//
// Moving an event to another machine re-resolves the department it is charged to,
// so past availability changes for both rooms. Rejected when the destination
// machine already has an open stoppage and this one is open too.
MachineID param.Opt[string] `json:"machine_id,omitzero"`
// When the machine stopped.
//
// Correcting it recalculates the duration and can move the stoppage onto a
// different business day.
StartedAt param.Opt[time.Time] `json:"started_at,omitzero" format:"date-time"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Duration QuantityInputParam `json:"duration,omitzero"`
// Why the machine stopped.
//
// Reclassifying a stoppage moves it to the OEE term the new reason charges, so
// past availability figures change with it.
//
// Any of "breakdown", "changeover", "material_shortage", "no_operator",
// "planned_maintenance", "minor_stop", "quality_hold", "no_schedule".
Reason UpdateMachineDowntimeEventRequestReason `json:"reason,omitzero"`
// contains filtered or unexported fields
}
Request to update a machine downtime event.
func (UpdateMachineDowntimeEventRequestParam) MarshalJSON ¶
func (r UpdateMachineDowntimeEventRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateMachineDowntimeEventRequestParam) UnmarshalJSON ¶
func (r *UpdateMachineDowntimeEventRequestParam) UnmarshalJSON(data []byte) error
type UpdateMachineDowntimeEventRequestReason ¶
type UpdateMachineDowntimeEventRequestReason string
Why the machine stopped.
Reclassifying a stoppage moves it to the OEE term the new reason charges, so past availability figures change with it.
const ( UpdateMachineDowntimeEventRequestReasonBreakdown UpdateMachineDowntimeEventRequestReason = "breakdown" UpdateMachineDowntimeEventRequestReasonChangeover UpdateMachineDowntimeEventRequestReason = "changeover" UpdateMachineDowntimeEventRequestReasonMaterialShortage UpdateMachineDowntimeEventRequestReason = "material_shortage" UpdateMachineDowntimeEventRequestReasonNoOperator UpdateMachineDowntimeEventRequestReason = "no_operator" UpdateMachineDowntimeEventRequestReasonPlannedMaintenance UpdateMachineDowntimeEventRequestReason = "planned_maintenance" UpdateMachineDowntimeEventRequestReasonMinorStop UpdateMachineDowntimeEventRequestReason = "minor_stop" UpdateMachineDowntimeEventRequestReasonQualityHold UpdateMachineDowntimeEventRequestReason = "quality_hold" UpdateMachineDowntimeEventRequestReasonNoSchedule UpdateMachineDowntimeEventRequestReason = "no_schedule" )
type UpdateMachineRequestParam ¶
type UpdateMachineRequestParam struct {
// Display name of the machine.
//
// Must be unique within your account; maximum 255 characters.
Name param.Opt[string] `json:"name,omitzero"`
// Free-form notes about the machine.
Notes param.Opt[string] `json:"notes,omitzero"`
// Serial number of the machine.
//
// Maximum 255 characters.
SerialNumber param.Opt[string] `json:"serial_number,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a machine.
func (UpdateMachineRequestParam) MarshalJSON ¶
func (r UpdateMachineRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateMachineRequestParam) UnmarshalJSON ¶
func (r *UpdateMachineRequestParam) UnmarshalJSON(data []byte) error
type UpdateMaterialRequestParam ¶
type UpdateMaterialRequestParam struct {
// New description for the material.
Description param.Opt[string] `json:"description,omitzero"`
// New notes for the material.
Notes param.Opt[string] `json:"notes,omitzero"`
// New stock keeping unit code for the material.
//
// Must remain unique within the account; a conflict error is returned if another
// item already uses it.
SKU param.Opt[string] `json:"sku,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
LeadTime QuantityInputRequestParam `json:"lead_time,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
OrderPoint QuantityInputRequestParam `json:"order_point,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// contains filtered or unexported fields
}
Request to update a material.
func (UpdateMaterialRequestParam) MarshalJSON ¶
func (r UpdateMaterialRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateMaterialRequestParam) UnmarshalJSON ¶
func (r *UpdateMaterialRequestParam) UnmarshalJSON(data []byte) error
type UpdateMemoryRequestCategory ¶
type UpdateMemoryRequestCategory string
The kind of information this memory holds, used to group related memories.
- `preference`: how someone likes things done, such as a customer who always wants express shipping.
- `fact`: a durable detail worth remembering about the account or one of its records, such as a customer's typical order size.
- `instruction`: standing guidance for agents to follow, such as always confirming freight before issuing an order.
const ( UpdateMemoryRequestCategoryPreference UpdateMemoryRequestCategory = "preference" UpdateMemoryRequestCategoryFact UpdateMemoryRequestCategory = "fact" UpdateMemoryRequestCategoryInstruction UpdateMemoryRequestCategory = "instruction" )
type UpdateMemoryRequestParam ¶
type UpdateMemoryRequestParam struct {
// ID of the platform record this memory is scoped to.
//
// Provide together with `entity_type`; send `null` to unscope the memory.
EntityID param.Opt[string] `json:"entity_id,omitzero"`
// Type of platform record this memory is scoped to (e.g. `customer`, `product`).
//
// Provide together with `entity_id` to scope the memory to a specific record; send
// `null` (on either entity field) to unscope the memory.
EntityType param.Opt[string] `json:"entity_type,omitzero"`
// When this memory should stop being used, as an ISO 8601 timestamp (e.g.
// `2026-01-02T15:04:05Z`).
//
// Past this time the memory is no longer recalled by agents and is omitted from
// list results, but it is not deleted. Send `null` so the memory is used
// indefinitely.
ExpiresAt param.Opt[string] `json:"expires_at,omitzero"`
// The information to remember, written as plain text for an agent to read.
Content param.Opt[string] `json:"content,omitzero"`
// Relative importance from `0` to `1` in increments of `0.1`, used to prioritize
// which memories the agent recalls.
//
// An agent takes in only a limited number of memories per run and recalls the
// highest-importance ones first.
Importance param.Opt[float64] `json:"importance,omitzero"`
// Arbitrary metadata as JSON.
//
// Replaces the stored metadata outright rather than merging into it. Encoded as a
// JSON value (object, array, string, number, boolean, or null), not a JSON-encoded
// string.
Metadata any `json:"metadata,omitzero"`
// The kind of information this memory holds, used to group related memories.
//
// - `preference`: how someone likes things done, such as a customer who always
// wants express shipping.
// - `fact`: a durable detail worth remembering about the account or one of its
// records, such as a customer's typical order size.
// - `instruction`: standing guidance for agents to follow, such as always
// confirming freight before issuing an order.
//
// Any of "preference", "fact", "instruction".
Category UpdateMemoryRequestCategory `json:"category,omitzero"`
// contains filtered or unexported fields
}
Request to update an agent memory.
func (UpdateMemoryRequestParam) MarshalJSON ¶
func (r UpdateMemoryRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateMemoryRequestParam) UnmarshalJSON ¶
func (r *UpdateMemoryRequestParam) UnmarshalJSON(data []byte) error
type UpdateMessagingGroupRequestParam ¶
type UpdateMessagingGroupRequestParam struct {
// The roster's new display name.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
Request to rename a reusable roster.
The property Name is required.
func (UpdateMessagingGroupRequestParam) MarshalJSON ¶
func (r UpdateMessagingGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateMessagingGroupRequestParam) UnmarshalJSON ¶
func (r *UpdateMessagingGroupRequestParam) UnmarshalJSON(data []byte) error
type UpdateOperatingCalendarRequestParam ¶
type UpdateOperatingCalendarRequestParam struct {
// Local time freight has to be tendered by. Clearing it leaves the ship-by date a
// day with no time of day attached.
CutoffAt param.Opt[string] `json:"cutoff_at,omitzero"`
// IANA zone the cutoff is read in. Clearing it on a receiving calendar returns to
// taking the zone from the ship-to address.
Timezone param.Opt[string] `json:"timezone,omitzero"`
// Open weekdays as seven characters of '0' or '1', Monday first. At least one day
// must be open.
DaysOfWeek param.Opt[string] `json:"days_of_week,omitzero"`
// Make this the calendar used when nothing more specific is linked. Setting it
// demotes whichever calendar of the same kind held the role.
IsDefault param.Opt[bool] `json:"is_default,omitzero"`
// Human-readable name.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
Request to update an operating calendar.
func (UpdateOperatingCalendarRequestParam) MarshalJSON ¶
func (r UpdateOperatingCalendarRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateOperatingCalendarRequestParam) UnmarshalJSON ¶
func (r *UpdateOperatingCalendarRequestParam) UnmarshalJSON(data []byte) error
type UpdateOrderDiscountRequestDiscountType ¶
type UpdateOrderDiscountRequestDiscountType string
How the discount is calculated.
- `percentage`: the order total is reduced by the fraction in `percentage`. - `amount`: the order total is reduced by the flat amount in `amount`.
Switching the type does not move the stored figure across, so send the matching `percentage` or `amount` in the same request or the discount will take nothing off.
const ( UpdateOrderDiscountRequestDiscountTypePercentage UpdateOrderDiscountRequestDiscountType = "percentage" UpdateOrderDiscountRequestDiscountTypeAmount UpdateOrderDiscountRequestDiscountType = "amount" )
type UpdateOrderDiscountRequestParam ¶
type UpdateOrderDiscountRequestParam struct {
// The flat amount to take off the order total, as a decimal string.
//
// Only read when `discount_type` is `amount`.
Amount param.Opt[string] `json:"amount,omitzero" format:"decimal"`
// The code a buyer enters to apply this discount to an order.
//
// Codes are unique within your account and are compared without regard to letter
// case.
Code param.Opt[string] `json:"code,omitzero"`
// Display name of the discount.
Name param.Opt[string] `json:"name,omitzero"`
// The fraction of the order total to take off, as a decimal string.
//
// This is a multiplier, not a whole percent: send `0.1` to take 10% off. Only read
// when `discount_type` is `percentage`.
Percentage param.Opt[string] `json:"percentage,omitzero" format:"decimal"`
// How the discount is calculated.
//
// - `percentage`: the order total is reduced by the fraction in `percentage`.
// - `amount`: the order total is reduced by the flat amount in `amount`.
//
// Switching the type does not move the stored figure across, so send the matching
// `percentage` or `amount` in the same request or the discount will take nothing
// off.
//
// Any of "percentage", "amount".
DiscountType UpdateOrderDiscountRequestDiscountType `json:"discount_type,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an order discount.
func (UpdateOrderDiscountRequestParam) MarshalJSON ¶
func (r UpdateOrderDiscountRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateOrderDiscountRequestParam) UnmarshalJSON ¶
func (r *UpdateOrderDiscountRequestParam) UnmarshalJSON(data []byte) error
type UpdatePartRequestParam ¶
type UpdatePartRequestParam struct {
// New free-form description of the part.
Description param.Opt[string] `json:"description,omitzero"`
// New free-form notes about the part.
Notes param.Opt[string] `json:"notes,omitzero"`
// New stock keeping unit code for the part.
//
// Must remain unique within the account; a conflict error is returned if another
// item already uses it.
SKU param.Opt[string] `json:"sku,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a part.
func (UpdatePartRequestParam) MarshalJSON ¶
func (r UpdatePartRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdatePartRequestParam) UnmarshalJSON ¶
func (r *UpdatePartRequestParam) UnmarshalJSON(data []byte) error
type UpdateParticipantRoleRequestParam ¶
type UpdateParticipantRoleRequestParam struct {
// The role to assign to the participant.
//
// - `owner`: can rename or delete the conversation and manage members and roles.
// - `admin`: can add and remove members and rename the conversation.
// - `member`: can post, leave, mute, and react.
// - `viewer`: read-only access.
//
// Any of "owner", "admin", "member", "viewer".
Role UpdateParticipantRoleRequestRole `json:"role,omitzero" api:"required"`
// contains filtered or unexported fields
}
Request to change a participant's role in a conversation.
The property Role is required.
func (UpdateParticipantRoleRequestParam) MarshalJSON ¶
func (r UpdateParticipantRoleRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateParticipantRoleRequestParam) UnmarshalJSON ¶
func (r *UpdateParticipantRoleRequestParam) UnmarshalJSON(data []byte) error
type UpdateParticipantRoleRequestRole ¶
type UpdateParticipantRoleRequestRole string
The role to assign to the participant.
- `owner`: can rename or delete the conversation and manage members and roles. - `admin`: can add and remove members and rename the conversation. - `member`: can post, leave, mute, and react. - `viewer`: read-only access.
const ( UpdateParticipantRoleRequestRoleOwner UpdateParticipantRoleRequestRole = "owner" UpdateParticipantRoleRequestRoleAdmin UpdateParticipantRoleRequestRole = "admin" UpdateParticipantRoleRequestRoleMember UpdateParticipantRoleRequestRole = "member" UpdateParticipantRoleRequestRoleViewer UpdateParticipantRoleRequestRole = "viewer" )
type UpdatePaymentTermRequestParam ¶
type UpdatePaymentTermRequestParam struct {
// New display name for the payment term.
//
// Must be unique among the payment terms visible to your account, including system
// defaults.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a payment term.
func (UpdatePaymentTermRequestParam) MarshalJSON ¶
func (r UpdatePaymentTermRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdatePaymentTermRequestParam) UnmarshalJSON ¶
func (r *UpdatePaymentTermRequestParam) UnmarshalJSON(data []byte) error
type UpdatePickLineRequestParam ¶ added in v0.20.0
type UpdatePickLineRequestParam struct {
// New picked quantity for the line, as a decimal string read in the unit the sales
// order line was sold in, stored as given and not capped at the ordered quantity.
//
// Must not be negative. Pulling more than was ordered is a real floor event and is
// kept as recorded; pulling a negative amount is not.
QuantityValue param.Opt[string] `json:"quantity_value,omitzero" format:"decimal"`
// contains filtered or unexported fields
}
Request to update a pick line's picked quantity.
func (UpdatePickLineRequestParam) MarshalJSON ¶ added in v0.20.0
func (r UpdatePickLineRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdatePickLineRequestParam) UnmarshalJSON ¶ added in v0.20.0
func (r *UpdatePickLineRequestParam) UnmarshalJSON(data []byte) error
type UpdateProductLineRequestCommissionPolicy ¶
type UpdateProductLineRequestCommissionPolicy string
Default commission policy for products in this product line.
- `commission_exempt`: no commission applies to these products.
- `commission_applied`: commission applies to these products, unless overridden elsewhere.
const ( UpdateProductLineRequestCommissionPolicyCommissionApplied UpdateProductLineRequestCommissionPolicy = "commission_applied" UpdateProductLineRequestCommissionPolicyCommissionExempt UpdateProductLineRequestCommissionPolicy = "commission_exempt" )
type UpdateProductLineRequestFreightPolicy ¶
type UpdateProductLineRequestFreightPolicy string
Default freight policy for products in this product line.
- `free_freight`: these products do not incur a freight charge.
- `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const ( UpdateProductLineRequestFreightPolicyFreeFreight UpdateProductLineRequestFreightPolicy = "free_freight" UpdateProductLineRequestFreightPolicyBilledFreight UpdateProductLineRequestFreightPolicy = "billed_freight" )
type UpdateProductLineRequestFulfillmentPolicy ¶
type UpdateProductLineRequestFulfillmentPolicy string
How products in this line are produced when they do not say for themselves.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
Clearing it returns the line's products to the account default.
const ( UpdateProductLineRequestFulfillmentPolicyMakeToStock UpdateProductLineRequestFulfillmentPolicy = "make_to_stock" UpdateProductLineRequestFulfillmentPolicyMakeToOrder UpdateProductLineRequestFulfillmentPolicy = "make_to_order" )
type UpdateProductLineRequestParam ¶
type UpdateProductLineRequestParam struct {
// Display name of the product line.
//
// Must be unique among the product lines visible to your account, including the
// shared system lines; a duplicate name returns a conflict error.
Name param.Opt[string] `json:"name,omitzero"`
// ID of the unit group to associate with this product line.
//
// The unit group determines the set of units available to products in this product
// line. It must be a unit group your account owns or one of the shared system unit
// groups. A lot already stored on the line is not rechecked when the group
// changes, so send `default_lot` alongside to keep the two consistent.
UnitGroupID param.Opt[string] `json:"unit_group_id,omitzero"`
// How products in this line are produced when they do not say for themselves.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Clearing it returns the line's products to the account default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy UpdateProductLineRequestFulfillmentPolicy `json:"fulfillment_policy,omitzero"`
// Default commission policy for products in this product line.
//
// - `commission_exempt`: no commission applies to these products.
// - `commission_applied`: commission applies to these products, unless overridden
// elsewhere.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy UpdateProductLineRequestCommissionPolicy `json:"commission_policy,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
DefaultLot QuantityInputParam `json:"default_lot,omitzero"`
// Default freight policy for products in this product line.
//
// - `free_freight`: these products do not incur a freight charge.
// - `billed_freight`: freight is billed for these products, unless overridden
// elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy UpdateProductLineRequestFreightPolicy `json:"freight_policy,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a product line.
func (UpdateProductLineRequestParam) MarshalJSON ¶
func (r UpdateProductLineRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateProductLineRequestParam) UnmarshalJSON ¶
func (r *UpdateProductLineRequestParam) UnmarshalJSON(data []byte) error
type UpdateProductRequestParam ¶
type UpdateProductRequestParam struct {
// Free-form description of the product.
//
// Send `null` to clear.
Description param.Opt[string] `json:"description,omitzero"`
// Free-form notes about the product.
//
// Send `null` to clear.
Notes param.Opt[string] `json:"notes,omitzero"`
// New stock keeping unit code for the product's item.
//
// Must be unique within the account; the update fails with a conflict error if
// another item already uses it.
SKU param.Opt[string] `json:"sku,omitzero"`
// Whether the product is shown to buyers in the customer portal.
//
// - `visible`: buyers can see and order the product in the portal.
// - `hidden`: the product is concealed from the portal but remains usable
// internally.
//
// Any of "visible", "hidden".
PortalVisibility UpdateProductRequestPortalVisibility `json:"portal_visibility,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a product.
func (UpdateProductRequestParam) MarshalJSON ¶
func (r UpdateProductRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateProductRequestParam) UnmarshalJSON ¶
func (r *UpdateProductRequestParam) UnmarshalJSON(data []byte) error
type UpdateProductRequestPortalVisibility ¶
type UpdateProductRequestPortalVisibility string
Whether the product is shown to buyers in the customer portal.
- `visible`: buyers can see and order the product in the portal.
- `hidden`: the product is concealed from the portal but remains usable internally.
const ( UpdateProductRequestPortalVisibilityVisible UpdateProductRequestPortalVisibility = "visible" UpdateProductRequestPortalVisibilityHidden UpdateProductRequestPortalVisibility = "hidden" )
type UpdateProductionScheduleLineRequestParam ¶
type UpdateProductionScheduleLineRequestParam struct {
// How many lots the quantity is built in.
//
// What a release actually splits batches by is the lot size the campaign was
// planned at, which this does not change.
Lots param.Opt[int64] `json:"lots,omitzero"`
// ID of the machine to move the campaign to.
MachineID param.Opt[string] `json:"machine_id,omitzero"`
// Units to build over the campaign.
//
// Changing this re-derives `lots` and `run_hours` from the rate and lot size this
// version was solved with, so the campaign never keeps claiming its old share of
// machine time; send either alongside it to override what is derived. A campaign
// builds something by definition, so use delete rather than a quantity of zero to
// take it off the plan.
Quantity param.Opt[float64] `json:"quantity,omitzero"`
// Free-form explanation of the change.
ReasonNote param.Opt[string] `json:"reason_note,omitzero"`
// Machine hours the campaign will take.
RunHours param.Opt[float64] `json:"run_hours,omitzero"`
// Position within the week's run order, lowest first.
SequenceIndex param.Opt[int64] `json:"sequence_index,omitzero"`
// Horizon week to move the campaign to, zero-based.
//
// Must fall inside the horizon this version was planned over.
WeekIndex param.Opt[int64] `json:"week_index,omitzero"`
// Why the campaign changed.
//
// Required when the change touches a frozen week, including moving a campaign out
// of one.
//
// Any of "machine_down", "material_shortage", "rush_order", "quality_hold",
// "over_run", "under_run", "capacity_change", "other".
Reason UpdateProductionScheduleLineRequestReason `json:"reason,omitzero"`
// Progress of the campaign.
//
// Setting `released` here only labels the campaign; it does not create a
// production run or any batches — releasing a week to the floor is its own action.
// Setting `cancelled` leaves the campaign on the plan but excludes it from any
// later release of its week.
//
// Any of "planned", "released", "in_progress", "complete", "cancelled".
Status UpdateProductionScheduleLineRequestStatus `json:"status,omitzero"`
// contains filtered or unexported fields
}
Request to edit a campaign on a schedule.
func (UpdateProductionScheduleLineRequestParam) MarshalJSON ¶
func (r UpdateProductionScheduleLineRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateProductionScheduleLineRequestParam) UnmarshalJSON ¶
func (r *UpdateProductionScheduleLineRequestParam) UnmarshalJSON(data []byte) error
type UpdateProductionScheduleLineRequestReason ¶
type UpdateProductionScheduleLineRequestReason string
Why the campaign changed.
Required when the change touches a frozen week, including moving a campaign out of one.
const ( UpdateProductionScheduleLineRequestReasonMachineDown UpdateProductionScheduleLineRequestReason = "machine_down" UpdateProductionScheduleLineRequestReasonMaterialShortage UpdateProductionScheduleLineRequestReason = "material_shortage" UpdateProductionScheduleLineRequestReasonRushOrder UpdateProductionScheduleLineRequestReason = "rush_order" UpdateProductionScheduleLineRequestReasonQualityHold UpdateProductionScheduleLineRequestReason = "quality_hold" UpdateProductionScheduleLineRequestReasonOverRun UpdateProductionScheduleLineRequestReason = "over_run" UpdateProductionScheduleLineRequestReasonUnderRun UpdateProductionScheduleLineRequestReason = "under_run" UpdateProductionScheduleLineRequestReasonCapacityChange UpdateProductionScheduleLineRequestReason = "capacity_change" UpdateProductionScheduleLineRequestReasonOther UpdateProductionScheduleLineRequestReason = "other" )
type UpdateProductionScheduleLineRequestStatus ¶
type UpdateProductionScheduleLineRequestStatus string
Progress of the campaign.
Setting `released` here only labels the campaign; it does not create a production run or any batches — releasing a week to the floor is its own action. Setting `cancelled` leaves the campaign on the plan but excludes it from any later release of its week.
const ( UpdateProductionScheduleLineRequestStatusPlanned UpdateProductionScheduleLineRequestStatus = "planned" UpdateProductionScheduleLineRequestStatusReleased UpdateProductionScheduleLineRequestStatus = "released" UpdateProductionScheduleLineRequestStatusInProgress UpdateProductionScheduleLineRequestStatus = "in_progress" UpdateProductionScheduleLineRequestStatusComplete UpdateProductionScheduleLineRequestStatus = "complete" UpdateProductionScheduleLineRequestStatusCancelled UpdateProductionScheduleLineRequestStatus = "cancelled" )
type UpdateProductionScheduleSettingsRequestAutoPublishStatus ¶
type UpdateProductionScheduleSettingsRequestAutoPublishStatus string
Whether a version produced by the cadence is published automatically.
While active, a cadence run publishes as soon as it solves, committing its frozen weeks without anyone reviewing the plan. Otherwise the run leaves a draft for a planner to publish by hand. Versions generated on request are never published automatically.
const ( UpdateProductionScheduleSettingsRequestAutoPublishStatusActive UpdateProductionScheduleSettingsRequestAutoPublishStatus = "active" UpdateProductionScheduleSettingsRequestAutoPublishStatusInactive UpdateProductionScheduleSettingsRequestAutoPublishStatus = "inactive" )
type UpdateProductionScheduleSettingsRequestCadenceStatus ¶
type UpdateProductionScheduleSettingsRequestCadenceStatus string
Whether schedules are generated automatically on a recurring cadence.
While active, each due tick queues a new schedule version.
const ( UpdateProductionScheduleSettingsRequestCadenceStatusActive UpdateProductionScheduleSettingsRequestCadenceStatus = "active" UpdateProductionScheduleSettingsRequestCadenceStatusInactive UpdateProductionScheduleSettingsRequestCadenceStatus = "inactive" )
type UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy ¶
type UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy string
How a SKU is produced when neither it nor its product line says.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
const ( UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicyMakeToStock UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy = "make_to_stock" UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicyMakeToOrder UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy = "make_to_order" )
type UpdateProductionScheduleSettingsRequestDemandBasis ¶
type UpdateProductionScheduleSettingsRequestDemandBasis string
How the demand a plan is solved against is derived from history.
- `trailing_12`: the last twelve complete months of orders, spread evenly across the coming year.
- `seasonal_ema`: a seasonally adjusted, exponentially smoothed projection that weights recent months more heavily. Falls back to the trailing baseline for an item with no history.
Demand overrides are applied on top of whichever baseline is chosen.
const ( UpdateProductionScheduleSettingsRequestDemandBasisTrailing12 UpdateProductionScheduleSettingsRequestDemandBasis = "trailing_12" UpdateProductionScheduleSettingsRequestDemandBasisSeasonalEma UpdateProductionScheduleSettingsRequestDemandBasis = "seasonal_ema" )
type UpdateProductionScheduleSettingsRequestParam ¶
type UpdateProductionScheduleSettingsRequestParam struct {
// Whether a version produced by the cadence is published automatically.
//
// While active, a cadence run publishes as soon as it solves, committing its
// frozen weeks without anyone reviewing the plan. Otherwise the run leaves a draft
// for a planner to publish by hand. Versions generated on request are never
// published automatically.
//
// Any of "active", "inactive".
AutoPublishStatus UpdateProductionScheduleSettingsRequestAutoPublishStatus `json:"auto_publish_status,omitzero" api:"required"`
// Whether schedules are generated automatically on a recurring cadence.
//
// While active, each due tick queues a new schedule version.
//
// Any of "active", "inactive".
CadenceStatus UpdateProductionScheduleSettingsRequestCadenceStatus `json:"cadence_status,omitzero" api:"required"`
// Share of machine time a plan may fill.
//
// Shifts, hours and work days give a machine's raw weekly hours; this trims them
// to what may actually be planned. The remainder absorbs changeovers, which are
// not scheduled as explicit blocks, so a value of 1 produces a plan that leaves no
// time to set anything up.
CapacityHeadroomPct float64 `json:"capacity_headroom_pct" api:"required"`
// Typical changeover duration.
//
// Changeover time is modeled as rising with the number of new inputs a product
// introduces, between the minimum and maximum below. The slope is calibrated from
// production history so the model reproduces this average across the transitions
// actually observed; set it to the changeover time the floor typically reports
// rather than to a worst case.
ChangeoverAvgMinutes float64 `json:"changeover_avg_minutes" api:"required"`
// Hourly labor rate charged to a changeover.
//
// This should be a dedicated technician rate rather than an allocated production
// rate, because one person works a single machine through a changeover. The
// constraint department's own labor rate takes precedence when it has one, leaving
// this as the fallback.
ChangeoverLaborRate float64 `json:"changeover_labor_rate" api:"required"`
// Longest plausible changeover, and the ceiling of the changeover model.
ChangeoverMaxMinutes float64 `json:"changeover_max_minutes" api:"required"`
// Shortest plausible changeover, and the floor of the changeover model.
//
// Cannot exceed the maximum.
ChangeoverMinMinutes float64 `json:"changeover_min_minutes" api:"required"`
// Weeks of lead time to assume at the constraint for an item with no measured
// history.
//
// An item's own lead time, measured from production history, is used instead
// whenever one can be observed.
DefaultConstraintLeadTimeWeeks float64 `json:"default_constraint_lead_time_weeks" api:"required"`
// Calendar days between an order being issued and it being due to ship.
//
// The last resort in the ship-by chain: a lead time set on the customer, on its
// parent account, or on the customer's account group takes precedence. Zero
// commits the account to same-day shipping on every order that falls through to
// it, so this update replaces the whole settings object and omitting the field is
// not the same as leaving it alone.
DefaultCustomerLeadTimeDays int64 `json:"default_customer_lead_time_days" api:"required"`
// How a SKU is produced when neither it nor its product line says.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Any of "make_to_stock", "make_to_order".
DefaultFulfillmentPolicy UpdateProductionScheduleSettingsRequestDefaultFulfillmentPolicy `json:"default_fulfillment_policy,omitzero" api:"required"`
// Units in a default production lot.
//
// The last resort in the lot-size chain: a lot set on the item, on its product
// line, or on the finished goods an intermediate item becomes all take precedence.
DefaultLotUnits float64 `json:"default_lot_units" api:"required"`
// How the demand a plan is solved against is derived from history.
//
// - `trailing_12`: the last twelve complete months of orders, spread evenly across
// the coming year.
// - `seasonal_ema`: a seasonally adjusted, exponentially smoothed projection that
// weights recent months more heavily. Falls back to the trailing baseline for an
// item with no history.
//
// Demand overrides are applied on top of whichever baseline is chosen.
//
// Any of "trailing_12", "seasonal_ema".
DemandBasis UpdateProductionScheduleSettingsRequestDemandBasis `json:"demand_basis,omitzero" api:"required"`
// Months of production history the solver measures run rates, changeover behavior
// and lead times from.
DemandWindowMonths int64 `json:"demand_window_months" api:"required"`
// Weeks between coming off the constraint and being sellable.
FinishLeadTimeWeeks float64 `json:"finish_lead_time_weeks" api:"required"`
// Months of order history the demand baseline is drawn from.
ForecastHistoryMonths int64 `json:"forecast_history_months" api:"required"`
// Months the forecast projects forward.
//
// Only applies to the `seasonal_ema` basis. A projection of anything other than
// twelve months is scaled to an annual rate, so the plan always reasons about a
// year of demand.
ForecastMonths int64 `json:"forecast_months" api:"required"`
// Z-score used for the confidence interval around the seasonal demand forecast.
//
// The plan is solved against the central forecast, so this widens or narrows that
// interval without changing what gets scheduled.
ForecastZ float64 `json:"forecast_z" api:"required"`
// How many leading weeks of the horizon become a commitment when a version is
// published.
//
// Cannot be longer than the planning horizon. Once a version is published,
// changing a campaign inside the frozen window requires a reason and is recorded
// against the plan.
FrozenWeeks int64 `json:"frozen_weeks" api:"required"`
// Timezone the cadence is interpreted in.
//
// Decides when "every Wednesday at 6am" actually happens. A timezone the platform
// does not recognize falls back to UTC.
GenerationTimezone string `json:"generation_timezone" api:"required"`
// Annual cost of holding stock, as a share of item value.
//
// Weighed against the cost of a changeover when campaigns are sized: a higher rate
// favors shorter, more frequent runs.
HoldingRatePct float64 `json:"holding_rate_pct" api:"required"`
// Hours in a shift.
HoursPerShift float64 `json:"hours_per_shift" api:"required"`
// How many steps down the production flow a constraint item is traced to the
// finished goods it becomes.
//
// Demand, stock and lot conventions are pooled onto the constraint item from every
// finished good the trace reaches, so anything further down the flow than this
// contributes nothing to the plan. The limit is also what stops a routing that
// loops back on itself from being traced forever.
MaxFlowDepth int64 `json:"max_flow_depth" api:"required"`
// Ceiling on how far ahead any item is built.
//
// An item is only rebuilt once its projected stock falls below the lower of its
// reorder point and this many weeks of demand, so a slow mover whose statistical
// reorder point covers months of demand is not topped up ahead of items that are
// actually short.
MaxWeeksSupply float64 `json:"max_weeks_supply" api:"required"`
// How many weeks a generated plan covers.
PlanningHorizonWeeks int64 `json:"planning_horizon_weeks" api:"required"`
// Z-score for service level safety stock targets.
ServiceLevelZ float64 `json:"service_level_z" api:"required"`
// Shifts worked per day.
ShiftsPerDay int64 `json:"shifts_per_day" api:"required"`
// Day a planning week starts, where 0 is Sunday.
WeekStartDay int64 `json:"week_start_day" api:"required"`
// Weeks worked per year.
WeeksPerYear int64 `json:"weeks_per_year" api:"required"`
// Days worked per week.
WorkDaysPerWeek int64 `json:"work_days_per_week" api:"required"`
// ID of the department that sets the pace of the factory, and the one campaigns
// are planned onto.
//
// Every machine in the department is planned, and the work of downstream
// departments is derived from what those machines are scheduled to run. Sending
// null, or leaving the field out of a request that otherwise replaces the
// settings, both leave the account with no constraint department — and generation
// is refused until one is chosen again.
ConstraintDepartmentID param.Opt[string] `json:"constraint_department_id,omitzero"`
// Standard cron expression driving the generation cadence.
//
// Must be present and parse as a standard cron expression whenever the cadence is
// active, otherwise the whole update is rejected.
GenerationCron param.Opt[string] `json:"generation_cron,omitzero"`
ReceiveCalendarID param.Opt[string] `json:"receive_calendar_id,omitzero"`
// The operating calendar naming the days this account's plant tenders freight, and
// the one naming the days a customer's dock accepts it.
//
// These are the account-wide fallbacks: an address or a customer with its own
// calendar overrides them, and an account with neither set falls back to a
// Monday-to-Friday week with no closures.
ShipCalendarID param.Opt[string] `json:"ship_calendar_id,omitzero"`
// contains filtered or unexported fields
}
Request to replace the account's planning assumptions.
The properties AutoPublishStatus, CadenceStatus, CapacityHeadroomPct, ChangeoverAvgMinutes, ChangeoverLaborRate, ChangeoverMaxMinutes, ChangeoverMinMinutes, DefaultConstraintLeadTimeWeeks, DefaultCustomerLeadTimeDays, DefaultFulfillmentPolicy, DefaultLotUnits, DemandBasis, DemandWindowMonths, FinishLeadTimeWeeks, ForecastHistoryMonths, ForecastMonths, ForecastZ, FrozenWeeks, GenerationTimezone, HoldingRatePct, HoursPerShift, MaxFlowDepth, MaxWeeksSupply, PlanningHorizonWeeks, ServiceLevelZ, ShiftsPerDay, WeekStartDay, WeeksPerYear, WorkDaysPerWeek are required.
func (UpdateProductionScheduleSettingsRequestParam) MarshalJSON ¶
func (r UpdateProductionScheduleSettingsRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateProductionScheduleSettingsRequestParam) UnmarshalJSON ¶
func (r *UpdateProductionScheduleSettingsRequestParam) UnmarshalJSON(data []byte) error
type UpdatePropertyRequestParam ¶
type UpdatePropertyRequestParam struct {
// Display name of the property, such as `Color` or `Size`.
//
// Must be unique within your account.
Name param.Opt[string] `json:"name,omitzero"`
// contains filtered or unexported fields
}
Request to update a property.
func (UpdatePropertyRequestParam) MarshalJSON ¶
func (r UpdatePropertyRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdatePropertyRequestParam) UnmarshalJSON ¶
func (r *UpdatePropertyRequestParam) UnmarshalJSON(data []byte) error
type UpdateRoleRequestParam ¶
type UpdateRoleRequestParam struct {
// New display name for the role.
//
// Returns a conflict error if another role in your account already uses this name.
Name param.Opt[string] `json:"name,omitzero"`
// Full replacement set of permissions, in `{permission}:{action}` format, such as
// `customers:read`.
//
// The role's existing permissions are discarded and replaced with exactly what you
// send, so include every permission the role should keep. Sending an empty array
// strips the role of all access, while leaving the field out keeps the current
// permissions untouched.
Permissions []string `json:"permissions,omitzero"`
// contains filtered or unexported fields
}
Request to update a role.
func (UpdateRoleRequestParam) MarshalJSON ¶
func (r UpdateRoleRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateRoleRequestParam) UnmarshalJSON ¶
func (r *UpdateRoleRequestParam) UnmarshalJSON(data []byte) error
type UpdateSalesOrderLineRequestParam ¶
type UpdateSalesOrderLineRequestParam struct {
// Description recorded on the line.
ProductDescription param.Opt[string] `json:"product_description,omitzero"`
// SKU recorded on the line.
ProductSKU param.Opt[string] `json:"product_sku,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
Quantity QuantityInputParam `json:"quantity,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Request to update a sales order line.
func (UpdateSalesOrderLineRequestParam) MarshalJSON ¶
func (r UpdateSalesOrderLineRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateSalesOrderLineRequestParam) UnmarshalJSON ¶
func (r *UpdateSalesOrderLineRequestParam) UnmarshalJSON(data []byte) error
type UpdateSalesOrderRequestAcknowledgmentStatus ¶
type UpdateSalesOrderRequestAcknowledgmentStatus string
Acknowledgment status of the order.
Set to `sent` to mark the acknowledgement as sent without emailing the customer, or `not_sent` to reset it.
const ( UpdateSalesOrderRequestAcknowledgmentStatusNotSent UpdateSalesOrderRequestAcknowledgmentStatus = "not_sent" UpdateSalesOrderRequestAcknowledgmentStatusSent UpdateSalesOrderRequestAcknowledgmentStatus = "sent" )
type UpdateSalesOrderRequestCarrierBillingType ¶
type UpdateSalesOrderRequestCarrierBillingType string
Who is billed for freight.
- `sender`: the sender pays for shipping.
- `third_party`: a third party pays for shipping, using the carrier billing account number.
const ( UpdateSalesOrderRequestCarrierBillingTypeSender UpdateSalesOrderRequestCarrierBillingType = "sender" UpdateSalesOrderRequestCarrierBillingTypeThirdParty UpdateSalesOrderRequestCarrierBillingType = "third_party" )
type UpdateSalesOrderRequestParam ¶
type UpdateSalesOrderRequestParam struct {
// Carrier billing account number charged when `carrier_billing_type` is
// `third_party`.
CarrierBillingAccountNumber param.Opt[string] `json:"carrier_billing_account_number,omitzero"`
// The customer's own purchase order number, for cross-referencing.
CustomerPurchaseOrderNumber param.Opt[string] `json:"customer_purchase_order_number,omitzero"`
// Days between this order being issued and it being due to ship, replacing the
// customer's standing lead time for this order alone. Mutually exclusive with
// promised_at and ship_by_override_date; clear one to switch to another.
LeadTimeOverrideDays param.Opt[int64] `json:"lead_time_override_days,omitzero"`
// Free-form note about the order.
Note param.Opt[string] `json:"note,omitzero"`
// ID of the order-level discount recorded on the order.
//
// Changing this does not add, reprice, or remove the order's discount line; adjust
// that line directly.
OrderDiscountID param.Opt[string] `json:"order_discount_id,omitzero"`
// Date delivery is promised to the customer.
PromisedAt param.Opt[time.Time] `json:"promised_at,omitzero" format:"date-time"`
// ID of the account user to credit as the order's sales rep.
SalesRepID param.Opt[string] `json:"sales_rep_id,omitzero"`
// ID of the carrier service level the order ships on.
ServiceLevelID param.Opt[string] `json:"service_level_id,omitzero"`
// The exact date the order is due to ship, bypassing transit and the customer's
// receiving days. Mutually exclusive with promised_at and lead_time_override_days.
ShipByOverrideDate param.Opt[time.Time] `json:"ship_by_override_date,omitzero" format:"date-time"`
// Billing address ID.
//
// Re-points the order to an existing address. To change an address's contents, use
// the update-address endpoint.
BillingAddressID param.Opt[string] `json:"billing_address_id,omitzero"`
// ID of the carrier that will ship the order.
CarrierID param.Opt[string] `json:"carrier_id,omitzero"`
// Moves the order to a different customer account.
//
// Existing lines keep the prices they were created with; they are not re-priced
// against the new customer.
CustomerID param.Opt[string] `json:"customer_id,omitzero"`
// ID of the payment terms for the order.
PaymentTermID param.Opt[string] `json:"payment_term_id,omitzero"`
// Shipping address ID.
//
// Re-points the order to an existing address. To change an address's contents, use
// the update-address endpoint.
ShippingAddressID param.Opt[string] `json:"shipping_address_id,omitzero"`
// ID of the shipping terms for the order.
ShippingTermID param.Opt[string] `json:"shipping_term_id,omitzero"`
// Who is billed for freight.
//
// - `sender`: the sender pays for shipping.
// - `third_party`: a third party pays for shipping, using the carrier billing
// account number.
//
// Any of "sender", "third_party".
CarrierBillingType UpdateSalesOrderRequestCarrierBillingType `json:"carrier_billing_type,omitzero"`
// Replaces the acknowledgement email contacts on the order.
//
// An empty list clears all contacts; omitting the field leaves existing contacts
// untouched.
AcknowledgementEmailContacts []SalesOrderEmailContactInputParam `json:"acknowledgement_email_contacts,omitzero"`
// Acknowledgment status of the order.
//
// Set to `sent` to mark the acknowledgement as sent without emailing the customer,
// or `not_sent` to reset it.
//
// Any of "not_sent", "sent".
AcknowledgmentStatus UpdateSalesOrderRequestAcknowledgmentStatus `json:"acknowledgment_status,omitzero"`
// Replaces the invoice email contacts on the order.
//
// An empty list clears all contacts; omitting the field leaves existing contacts
// untouched.
InvoiceEmailContacts []SalesOrderEmailContactInputParam `json:"invoice_email_contacts,omitzero"`
// New fulfillment priority for the order.
//
// Any of "low", "normal", "high".
PriorityCode UpdateSalesOrderRequestPriorityCode `json:"priority_code,omitzero"`
// contains filtered or unexported fields
}
Request to update a sales order.
func (UpdateSalesOrderRequestParam) MarshalJSON ¶
func (r UpdateSalesOrderRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateSalesOrderRequestParam) UnmarshalJSON ¶
func (r *UpdateSalesOrderRequestParam) UnmarshalJSON(data []byte) error
type UpdateSalesOrderRequestPriorityCode ¶ added in v0.17.1
type UpdateSalesOrderRequestPriorityCode string
New fulfillment priority for the order.
const ( UpdateSalesOrderRequestPriorityCodeLow UpdateSalesOrderRequestPriorityCode = "low" UpdateSalesOrderRequestPriorityCodeNormal UpdateSalesOrderRequestPriorityCode = "normal" UpdateSalesOrderRequestPriorityCodeHigh UpdateSalesOrderRequestPriorityCode = "high" )
type UpdateScanningStationRequestLabelSize ¶
type UpdateScanningStationRequestLabelSize string
Size of the labels printed at this station, given as width-by-height (for example, `1x1`).
Send `null` or an empty string to clear.
const ( UpdateScanningStationRequestLabelSize1x1 UpdateScanningStationRequestLabelSize = "1x1" UpdateScanningStationRequestLabelSize1x3 UpdateScanningStationRequestLabelSize = "1x3" UpdateScanningStationRequestLabelSize1x4 UpdateScanningStationRequestLabelSize = "1x4" UpdateScanningStationRequestLabelSize2x4 UpdateScanningStationRequestLabelSize = "2x4" )
type UpdateScanningStationRequestLabelType ¶
type UpdateScanningStationRequestLabelType string
Type of label printed at this station.
- `tag`: a label attached to the physical product.
- `traveler`: a routing sheet that accompanies the batch through every production step.
Send `null` or an empty string to clear.
const ( UpdateScanningStationRequestLabelTypeTag UpdateScanningStationRequestLabelType = "tag" UpdateScanningStationRequestLabelTypeTraveler UpdateScanningStationRequestLabelType = "traveler" )
type UpdateScanningStationRequestOperatorRequirement ¶
type UpdateScanningStationRequestOperatorRequirement string
Whether operators must perform a material check at this station.
- `none`: no additional operator check is required. - `material_check`: a material check is expected before the operation.
const ( UpdateScanningStationRequestOperatorRequirementNone UpdateScanningStationRequestOperatorRequirement = "none" UpdateScanningStationRequestOperatorRequirementMaterialCheck UpdateScanningStationRequestOperatorRequirement = "material_check" )
type UpdateScanningStationRequestParam ¶
type UpdateScanningStationRequestParam struct {
// Free-form notes about the scanning station.
//
// Send `null` to clear.
Notes param.Opt[string] `json:"notes,omitzero"`
// Display name of the scanning station.
//
// Must be unique within your account; maximum 255 characters.
Name param.Opt[string] `json:"name,omitzero"`
// Size of the labels printed at this station, given as width-by-height (for
// example, `1x1`).
//
// Send `null` or an empty string to clear.
//
// Any of "1x1", "1x3", "1x4", "2x4".
LabelSize UpdateScanningStationRequestLabelSize `json:"label_size,omitzero"`
// Type of label printed at this station.
//
// - `tag`: a label attached to the physical product.
// - `traveler`: a routing sheet that accompanies the batch through every
// production step.
//
// Send `null` or an empty string to clear.
//
// Any of "tag", "traveler".
LabelType UpdateScanningStationRequestLabelType `json:"label_type,omitzero"`
// Whether operators must perform a material check at this station.
//
// - `none`: no additional operator check is required.
// - `material_check`: a material check is expected before the operation.
//
// Any of "none", "material_check".
OperatorRequirement UpdateScanningStationRequestOperatorRequirement `json:"operator_requirement,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a scanning station.
The station's type and department are set at creation and cannot be changed here.
func (UpdateScanningStationRequestParam) MarshalJSON ¶
func (r UpdateScanningStationRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateScanningStationRequestParam) UnmarshalJSON ¶
func (r *UpdateScanningStationRequestParam) UnmarshalJSON(data []byte) error
type UpdateServiceLevelRequestCustomerPortalVisibility ¶
type UpdateServiceLevelRequestCustomerPortalVisibility string
Whether customers can see and select this service level at checkout in the customer portal.
const ( UpdateServiceLevelRequestCustomerPortalVisibilityVisible UpdateServiceLevelRequestCustomerPortalVisibility = "visible" UpdateServiceLevelRequestCustomerPortalVisibilityHidden UpdateServiceLevelRequestCustomerPortalVisibility = "hidden" )
type UpdateServiceLevelRequestParam ¶
type UpdateServiceLevelRequestParam struct {
// Business days this service typically takes in transit, used to work an order's
// ship-by date back from a promised delivery date.
//
// A fallback: when a carrier can rate the lane, the transit it quotes is used
// instead. Set to null to remove it, which leaves transit unknown for lanes the
// carrier cannot rate.
DefaultTransitDays param.Opt[int64] `json:"default_transit_days,omitzero"`
// Carrier-specific code identifying this service level (e.g. `fedex_ground`).
//
// Must be unique among the carrier's service levels. For a service level synced
// from a connected carrier the `service_level_token` used for rating is fixed by
// the carrier and a code change does not affect it; for one you created yourself,
// the token follows the code.
Code param.Opt[string] `json:"code,omitzero"`
// Whether this is the carrier's default service level, pre-selected when the
// carrier is chosen.
//
// Each carrier has at most one default; setting this to `true` clears the
// carrier's existing default.
IsDefault param.Opt[bool] `json:"is_default,omitzero"`
// Human-readable name for the service level, shown to customers at checkout when
// the service level is visible.
Name param.Opt[string] `json:"name,omitzero"`
// Whether customers can see and select this service level at checkout in the
// customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility UpdateServiceLevelRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to update a service level.
func (UpdateServiceLevelRequestParam) MarshalJSON ¶
func (r UpdateServiceLevelRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateServiceLevelRequestParam) UnmarshalJSON ¶
func (r *UpdateServiceLevelRequestParam) UnmarshalJSON(data []byte) error
type UpdateShippingTermRequestParam ¶
type UpdateShippingTermRequestParam struct {
// Human-readable name for the shipping term, used to identify it when assigning
// shipping terms to customers and orders.
Name param.Opt[string] `json:"name,omitzero"`
// IDs of the service levels that ship for free once an order exceeds
// `minimum_order_value`.
//
// Replaces the whole list rather than adding to it, and clearing it lets every
// service level ship free above the threshold. The request is rejected if any ID
// is not a service level available to your account.
FreeShippingServiceLevelIDs []string `json:"free_shipping_service_level_ids,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
FlatRate QuantityInputParam `json:"flat_rate,omitzero"`
// An amount together with the unit it is expressed in.
//
// The unit may be a currency, so money amounts such as a credit limit are written
// the same way as physical amounts like weights or counts.
MinimumOrderValue QuantityInputParam `json:"minimum_order_value,omitzero"`
// Freight pricing model applied by this shipping term.
//
// - `free_freight`: the buyer is never charged for shipping.
// - `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`,
// regardless of what the carrier would have charged.
// - `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for
// the order's carrier and service level.
//
// Any of "free_freight", "flat_rate_freight", "carrier_rate_freight".
Type UpdateShippingTermRequestType `json:"type,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a shipping term.
Fields left out of the request keep their current values. Send an explicit JSON `null` for `flat_rate`, `minimum_order_value`, or `free_shipping_service_level_ids` to clear the stored value.
func (UpdateShippingTermRequestParam) MarshalJSON ¶
func (r UpdateShippingTermRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateShippingTermRequestParam) UnmarshalJSON ¶
func (r *UpdateShippingTermRequestParam) UnmarshalJSON(data []byte) error
type UpdateShippingTermRequestType ¶
type UpdateShippingTermRequestType string
Freight pricing model applied by this shipping term.
- `free_freight`: the buyer is never charged for shipping.
- `flat_rate_freight`: the buyer is charged the fixed amount in `flat_rate`, regardless of what the carrier would have charged.
- `carrier_rate_freight`: the buyer is charged the rate the carrier quotes for the order's carrier and service level.
const ( UpdateShippingTermRequestTypeFreeFreight UpdateShippingTermRequestType = "free_freight" UpdateShippingTermRequestTypeFlatRateFreight UpdateShippingTermRequestType = "flat_rate_freight" UpdateShippingTermRequestTypeCarrierRateFreight UpdateShippingTermRequestType = "carrier_rate_freight" )
type UpdateUnitGroupRequestParam ¶
type UpdateUnitGroupRequestParam struct {
// Free-form notes about the unit group.
//
// Set to `null` to clear.
Notes param.Opt[string] `json:"notes,omitzero"`
// ID of the unit to designate as the group's reference unit.
//
// Must be a unit of the group's dimension, which cannot itself be changed.
BaseUnitID param.Opt[string] `json:"base_unit_id,omitzero"`
// Display name of the unit group.
//
// Must be unique within the account.
Name param.Opt[string] `json:"name,omitzero"`
// Units to add to the group.
//
// Only units that are not already in the group can be listed here; use the
// associated-unit update and delete endpoints to change or remove an existing
// association. Associations left out of the list are untouched.
AssociatedUnits []CreateUnitGroupUnitParam `json:"associated_units,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a unit group.
func (UpdateUnitGroupRequestParam) MarshalJSON ¶
func (r UpdateUnitGroupRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateUnitGroupRequestParam) UnmarshalJSON ¶
func (r *UpdateUnitGroupRequestParam) UnmarshalJSON(data []byte) error
type UpdateUnitGroupUnitRequestCustomerPortalVisibility ¶
type UpdateUnitGroupUnitRequestCustomerPortalVisibility string
Whether the unit is shown to customers in the customer portal.
const ( UpdateUnitGroupUnitRequestCustomerPortalVisibilityVisible UpdateUnitGroupUnitRequestCustomerPortalVisibility = "visible" UpdateUnitGroupUnitRequestCustomerPortalVisibilityHidden UpdateUnitGroupUnitRequestCustomerPortalVisibility = "hidden" )
type UpdateUnitGroupUnitRequestParam ¶
type UpdateUnitGroupUnitRequestParam struct {
// Flat amount subtracted from the unit's price when an order is placed in this
// unit.
//
// Subtracted before `discount_percentage` is applied.
DiscountFixed param.Opt[float64] `json:"discount_fixed,omitzero"`
// Share of the unit's price removed when an order is placed in this unit.
//
// Expressed as a decimal fraction rather than a whole number, so `0.1` is a 10%
// discount and `0` is no discount.
DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
// ID of the unit this association refers to.
//
// Sending a different unit does not repoint the association; remove the
// association and add a new one instead. A unit sent here must still match the
// group's `type`.
UnitID param.Opt[string] `json:"unit_id,omitzero"`
// Whether the unit is shown to customers in the customer portal.
//
// Any of "visible", "hidden".
CustomerPortalVisibility UpdateUnitGroupUnitRequestCustomerPortalVisibility `json:"customer_portal_visibility,omitzero"`
// contains filtered or unexported fields
}
Request to partially update an associated unit within a unit group.
func (UpdateUnitGroupUnitRequestParam) MarshalJSON ¶
func (r UpdateUnitGroupUnitRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateUnitGroupUnitRequestParam) UnmarshalJSON ¶
func (r *UpdateUnitGroupUnitRequestParam) UnmarshalJSON(data []byte) error
type UpdateUnitRequestParam ¶
type UpdateUnitRequestParam struct {
// Short abbreviation for the unit.
//
// Must be unique within the account.
Abbreviation param.Opt[string] `json:"abbreviation,omitzero"`
// Display name of the unit.
//
// Must be unique within the account.
Name param.Opt[string] `json:"name,omitzero"`
// Denominator of the conversion offset.
//
// Must not be zero.
OffsetDenominator param.Opt[string] `json:"offset_denominator,omitzero" format:"decimal"`
// Numerator of the conversion offset, applied after the ratio for scales that do
// not share a zero point, such as temperature.
OffsetNumerator param.Opt[string] `json:"offset_numerator,omitzero" format:"decimal"`
// Denominator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// Must not be zero.
RatioDenominator param.Opt[string] `json:"ratio_denominator,omitzero" format:"decimal"`
// Numerator of the ratio that converts a quantity in this unit into the
// dimension's base unit.
//
// A quantity is converted with
// `value × (ratio_numerator / ratio_denominator) + (offset_numerator / offset_denominator)`.
RatioNumerator param.Opt[string] `json:"ratio_numerator,omitzero" format:"decimal"`
// contains filtered or unexported fields
}
Request to partially update a unit.
func (UpdateUnitRequestParam) MarshalJSON ¶
func (r UpdateUnitRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateUnitRequestParam) UnmarshalJSON ¶
func (r *UpdateUnitRequestParam) UnmarshalJSON(data []byte) error
type UpdateVolumeDiscountRequestParam ¶
type UpdateVolumeDiscountRequestParam struct {
// Whether to apply the `attribute_ids` field; when `false`, it is ignored.
HasAttributes bool `json:"has_attributes" api:"required"`
// Whether to apply the `category_ids` field; when `false`, it is ignored.
HasCategories bool `json:"has_categories" api:"required"`
// Whether to apply the `customer_group_ids` field; when `false`, it is ignored.
HasCustomerGroups bool `json:"has_customer_groups" api:"required"`
// Whether to apply the `product_line_ids` field; when `false`, it is ignored.
HasProductLines bool `json:"has_product_lines" api:"required"`
// Whether to apply the `tiers` field.
//
// When `true`, the discount's tiers are replaced with the contents of `tiers` (an
// empty list deletes all tiers). When `false`, `tiers` is ignored.
HasTiers bool `json:"has_tiers" api:"required"`
// Whether to apply the `unit_ids` field; when `false`, it is ignored.
HasUnits bool `json:"has_units" api:"required"`
// Display name of the volume discount.
//
// Must be unique within the account.
Name param.Opt[string] `json:"name,omitzero"`
// Attribute IDs to set.
//
// Only applied when `has_attributes` is `true`, in which case they replace the
// existing set entirely.
AttributeIDs []string `json:"attribute_ids,omitzero"`
// Item category IDs to set.
//
// Only applied when `has_categories` is `true`, in which case they replace the
// existing set entirely.
CategoryIDs []string `json:"category_ids,omitzero"`
// Account group IDs to set as customer groups.
//
// Only applied when `has_customer_groups` is `true`, in which case they replace
// the existing set entirely.
CustomerGroupIDs []string `json:"customer_group_ids,omitzero"`
// Product line IDs to set.
//
// Only applied when `has_product_lines` is `true`, in which case they replace the
// existing set entirely.
ProductLineIDs []string `json:"product_line_ids,omitzero"`
// The full set of tiers for this discount.
//
// Only applied when `has_tiers` is `true`. Tiers with an `id` are updated, tiers
// without an `id` are created, and existing tiers not present in the list are
// deleted.
Tiers []UpdateVolumeDiscountTierInputParam `json:"tiers,omitzero"`
// IDs of the units to set as acceptable units.
//
// Only applied when `has_units` is `true`, in which case they replace the existing
// set entirely. Clearing every unit makes the discount inert, since ordered
// quantity then always evaluates to zero.
UnitIDs []string `json:"unit_ids,omitzero"`
// contains filtered or unexported fields
}
Request to partially update a volume discount.
The properties HasAttributes, HasCategories, HasCustomerGroups, HasProductLines, HasTiers, HasUnits are required.
func (UpdateVolumeDiscountRequestParam) MarshalJSON ¶
func (r UpdateVolumeDiscountRequestParam) MarshalJSON() (data []byte, err error)
func (*UpdateVolumeDiscountRequestParam) UnmarshalJSON ¶
func (r *UpdateVolumeDiscountRequestParam) UnmarshalJSON(data []byte) error
type UpdateVolumeDiscountTierInputParam ¶
type UpdateVolumeDiscountTierInputParam struct {
// ID of an existing tier to update.
//
// Omit to create a new tier.
ID param.Opt[string] `json:"id,omitzero"`
// Fraction of the price taken off once the threshold is met, as a decimal string.
//
// This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
// meets several tiers of the same discount, their reductions compound.
DiscountPercentage param.Opt[string] `json:"discount_percentage,omitzero" format:"decimal"`
// Display name of the tier.
Name param.Opt[string] `json:"name,omitzero"`
// ID of another tier in this discount that this tier follows.
//
// The link is stored with the tier but does not affect pricing. Omitting it when
// updating an existing tier clears the link.
ParentTierID param.Opt[string] `json:"parent_tier_id,omitzero"`
// Minimum ordered quantity at which this tier's discount begins to apply, as a
// decimal string.
//
// The quantity compared against the threshold is the total across every line on
// the order that falls within the discount's scope, converted into one of the
// discount's units.
Threshold param.Opt[string] `json:"threshold,omitzero" format:"decimal"`
// contains filtered or unexported fields
}
Volume discount tier to upsert.
Each entry is written as a whole: send every value you want the tier to keep, since values left out are not carried over from the existing tier.
func (UpdateVolumeDiscountTierInputParam) MarshalJSON ¶
func (r UpdateVolumeDiscountTierInputParam) MarshalJSON() (data []byte, err error)
func (*UpdateVolumeDiscountTierInputParam) UnmarshalJSON ¶
func (r *UpdateVolumeDiscountTierInputParam) UnmarshalJSON(data []byte) error
type UpsertItemCategoryInputParam ¶
type UpsertItemCategoryInputParam struct {
// Optional notes.
Notes param.Opt[string] `json:"notes,omitzero" api:"required"`
// Display name of the item category, used to match existing categories.
Name string `json:"name" api:"required"`
// Optional list of property names to attach to this category. Properties are
// matched by name (case-insensitive) within the account; names not found are
// created automatically. Relations are additive — existing relations are not
// removed.
PropertyNames []string `json:"property_names,omitzero" api:"required"`
// Item category type code. Create-only.
//
// Any of "material_category", "product_category".
Type UpsertItemCategoryInputType `json:"type,omitzero" api:"required"`
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
UnitGroup ObjectIdentifierParam `json:"unit_group,omitzero" api:"required"`
// contains filtered or unexported fields
}
UpsertItemCategoryInput is the input for a single item category in a bulk upsert operation.
The properties Name, Notes, PropertyNames, Type, UnitGroup are required.
func (UpsertItemCategoryInputParam) MarshalJSON ¶
func (r UpsertItemCategoryInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertItemCategoryInputParam) UnmarshalJSON ¶
func (r *UpsertItemCategoryInputParam) UnmarshalJSON(data []byte) error
type UpsertItemCategoryInputType ¶
type UpsertItemCategoryInputType string
Item category type code. Create-only.
const ( UpsertItemCategoryInputTypeMaterialCategory UpsertItemCategoryInputType = "material_category" UpsertItemCategoryInputTypeProductCategory UpsertItemCategoryInputType = "product_category" )
type UpsertItemSettingRequestFulfillmentPolicy ¶
type UpsertItemSettingRequestFulfillmentPolicy string
How this item is produced.
- `make_to_stock`: built to the forecast, holding a safety stock against its variability.
- `make_to_order`: built only against orders already on the book, holding no buffer.
Clearing it returns the item to its product line's policy, then to the account default.
const ( UpsertItemSettingRequestFulfillmentPolicyMakeToStock UpsertItemSettingRequestFulfillmentPolicy = "make_to_stock" UpsertItemSettingRequestFulfillmentPolicyMakeToOrder UpsertItemSettingRequestFulfillmentPolicy = "make_to_order" )
type UpsertItemSettingRequestParam ¶
type UpsertItemSettingRequestParam struct {
// Whether this item takes part in planning.
//
// An excluded item is left out of the plan entirely: no campaigns, no policy, no
// capacity.
//
// Any of "included", "excluded".
ParticipationStatus UpsertItemSettingRequestParticipationStatus `json:"participation_status,omitzero" api:"required"`
// Units in one production lot for this item, overriding the lot its product line
// would supply.
LotMultipleUnits param.Opt[float64] `json:"lot_multiple_units,omitzero"`
// How this item is produced.
//
// - `make_to_stock`: built to the forecast, holding a safety stock against its
// variability.
// - `make_to_order`: built only against orders already on the book, holding no
// buffer.
//
// Clearing it returns the item to its product line's policy, then to the account
// default.
//
// Any of "make_to_stock", "make_to_order".
FulfillmentPolicy UpsertItemSettingRequestFulfillmentPolicy `json:"fulfillment_policy,omitzero"`
// contains filtered or unexported fields
}
Request to write one item's planning overrides.
The property ParticipationStatus is required.
func (UpsertItemSettingRequestParam) MarshalJSON ¶
func (r UpsertItemSettingRequestParam) MarshalJSON() (data []byte, err error)
func (*UpsertItemSettingRequestParam) UnmarshalJSON ¶
func (r *UpsertItemSettingRequestParam) UnmarshalJSON(data []byte) error
type UpsertItemSettingRequestParticipationStatus ¶
type UpsertItemSettingRequestParticipationStatus string
Whether this item takes part in planning.
An excluded item is left out of the plan entirely: no campaigns, no policy, no capacity.
const ( UpsertItemSettingRequestParticipationStatusIncluded UpsertItemSettingRequestParticipationStatus = "included" UpsertItemSettingRequestParticipationStatusExcluded UpsertItemSettingRequestParticipationStatus = "excluded" )
type UpsertLocationInputParam ¶
type UpsertLocationInputParam struct {
// Display name of the location, used to match existing locations.
Name string `json:"name" api:"required"`
// Location type code.
//
// Any of "building", "section", "aisle", "rack", "shelf", "bin".
Type LocationTypeCode `json:"type,omitzero" api:"required"`
// Child locations to re-parent under this one, referenced by `id` or `name`, or by
// name for a location in the same batch. Redundant with `parent` on each child.
Children []ObjectIdentifierParam `json:"children,omitzero"`
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
Parent ObjectIdentifierParam `json:"parent,omitzero"`
// contains filtered or unexported fields
}
UpsertLocationInput is the input for a single location in a bulk upsert operation.
The properties Name, Type are required.
func (UpsertLocationInputParam) MarshalJSON ¶
func (r UpsertLocationInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertLocationInputParam) UnmarshalJSON ¶
func (r *UpsertLocationInputParam) UnmarshalJSON(data []byte) error
type UpsertMaterialInputParam ¶
type UpsertMaterialInputParam struct {
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
Category ObjectIdentifierParam `json:"category,omitzero" api:"required"`
// Properties to attach to the material, matched/created by name + value. Additive
// — existing attributes are not removed.
Properties []UpsertMaterialPropertyParam `json:"properties,omitzero" api:"required"`
// SKU for the material, used to match an existing material within the account. If
// it exists the material is updated in place; otherwise a new material is created.
// A SKU already used by a non-material item fails that row.
SKU string `json:"sku" api:"required"`
// Material description.
Description param.Opt[string] `json:"description,omitzero"`
// Material notes.
Notes param.Opt[string] `json:"notes,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
LeadTime QuantityInputRequestParam `json:"lead_time,omitzero"`
// A quantity, given as a decimal value and the unit it is measured in.
OrderPoint QuantityInputRequestParam `json:"order_point,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Input for a single material in a bulk upsert operation.
The properties Category, Properties, SKU are required.
func (UpsertMaterialInputParam) MarshalJSON ¶
func (r UpsertMaterialInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertMaterialInputParam) UnmarshalJSON ¶
func (r *UpsertMaterialInputParam) UnmarshalJSON(data []byte) error
type UpsertMaterialPropertyParam ¶
type UpsertMaterialPropertyParam struct {
// Property name (e.g. "Grade"). Matched case-insensitively; created if missing.
Name string `json:"name" api:"required"`
// Property value (e.g. "A36"). Matched case-insensitively; created under the
// property if missing. A value already in use under a different property fails the
// whole job.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
Property name + value pair attached to a material. The property and its value (an attribute) are created if they do not yet exist.
The properties Name, Value are required.
func (UpsertMaterialPropertyParam) MarshalJSON ¶
func (r UpsertMaterialPropertyParam) MarshalJSON() (data []byte, err error)
func (*UpsertMaterialPropertyParam) UnmarshalJSON ¶
func (r *UpsertMaterialPropertyParam) UnmarshalJSON(data []byte) error
type UpsertNotificationPreferenceRequestDigest ¶
type UpsertNotificationPreferenceRequestDigest string
How often email for this category is sent.
- `instant`: send an email as soon as an eligible notification occurs.
- `hourly`: collect eligible notifications into a single hourly email.
- `daily`: collect eligible notifications into a single daily email.
- `off`: never send email for this category, even when email is otherwise enabled.
This governs email only; in-app delivery is unaffected. Batched sending is not running yet, so `hourly` and `daily` currently hold email back in the same way as `off`.
const ( UpsertNotificationPreferenceRequestDigestInstant UpsertNotificationPreferenceRequestDigest = "instant" UpsertNotificationPreferenceRequestDigestHourly UpsertNotificationPreferenceRequestDigest = "hourly" UpsertNotificationPreferenceRequestDigestDaily UpsertNotificationPreferenceRequestDigest = "daily" UpsertNotificationPreferenceRequestDigestOff UpsertNotificationPreferenceRequestDigest = "off" )
type UpsertNotificationPreferenceRequestParam ¶
type UpsertNotificationPreferenceRequestParam struct {
// Whether notifications in this category are also emailed to the user.
//
// Email is additionally suppressed for a conversation the user has muted, and only
// sent on the cadence set by `digest`.
EmailEnabled bool `json:"email_enabled" api:"required"`
// Whether notifications in this category appear in the user's in-app feed.
//
// A direct @mention is always delivered in-app, even when this is off.
InAppEnabled bool `json:"in_app_enabled" api:"required"`
// Whether notifications in this category are also sent as push notifications.
//
// Push delivery is not available yet; the choice is stored for when it is.
PushEnabled bool `json:"push_enabled" api:"required"`
// The notification category these settings apply to, such as `chat.message`.
//
// Leave it out to set the global default used for every category without its own
// preference.
Category param.Opt[string] `json:"category,omitzero"`
// How often email for this category is sent.
//
// - `instant`: send an email as soon as an eligible notification occurs.
// - `hourly`: collect eligible notifications into a single hourly email.
// - `daily`: collect eligible notifications into a single daily email.
// - `off`: never send email for this category, even when email is otherwise
// enabled.
//
// This governs email only; in-app delivery is unaffected. Batched sending is not
// running yet, so `hourly` and `daily` currently hold email back in the same way
// as `off`.
//
// Any of "instant", "hourly", "daily", "off".
Digest UpsertNotificationPreferenceRequestDigest `json:"digest,omitzero"`
// contains filtered or unexported fields
}
Request to create or replace one of the caller's notification preferences.
A user has at most one preference per category, so sending the same category again replaces the previous settings outright — every channel is written from this request, not merged with what was there before.
Chat notifications are the only ones these settings currently govern: notifications in every other category reach the in-app feed and are never emailed, whatever is stored here.
The properties EmailEnabled, InAppEnabled, PushEnabled are required.
func (UpsertNotificationPreferenceRequestParam) MarshalJSON ¶
func (r UpsertNotificationPreferenceRequestParam) MarshalJSON() (data []byte, err error)
func (*UpsertNotificationPreferenceRequestParam) UnmarshalJSON ¶
func (r *UpsertNotificationPreferenceRequestParam) UnmarshalJSON(data []byte) error
type UpsertPartInputParam ¶
type UpsertPartInputParam struct {
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
Category ObjectIdentifierParam `json:"category,omitzero" api:"required"`
// Properties to attach to the part, matched/created by name + value. Additive —
// existing attributes are not removed.
Properties []UpsertPartPropertyParam `json:"properties,omitzero" api:"required"`
// SKU for the part, matched against existing parts in the account: a match updates
// in place, otherwise a part is created. A SKU held by a non-part item fails that
// row.
SKU string `json:"sku" api:"required"`
// Free-form description of the part.
Description param.Opt[string] `json:"description,omitzero"`
// Free-form notes about the part.
Notes param.Opt[string] `json:"notes,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
UpsertPartInput is the input for a single part in a bulk upsert operation.
The properties Category, Properties, SKU are required.
func (UpsertPartInputParam) MarshalJSON ¶
func (r UpsertPartInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertPartInputParam) UnmarshalJSON ¶
func (r *UpsertPartInputParam) UnmarshalJSON(data []byte) error
type UpsertPartPropertyParam ¶
type UpsertPartPropertyParam struct {
// Property name (e.g. "Material"). Matched case-insensitively; created if missing.
Name string `json:"name" api:"required"`
// Property value (e.g. "Steel"). Matched exactly; created under the property if
// missing.
Value string `json:"value" api:"required" format:"decimal"`
// contains filtered or unexported fields
}
UpsertPartProperty is a property name + value pair attached to a part. The property and its value (an attribute) are created if they do not yet exist.
The properties Name, Value are required.
func (UpsertPartPropertyParam) MarshalJSON ¶
func (r UpsertPartPropertyParam) MarshalJSON() (data []byte, err error)
func (*UpsertPartPropertyParam) UnmarshalJSON ¶
func (r *UpsertPartPropertyParam) UnmarshalJSON(data []byte) error
type UpsertProductInputParam ¶
type UpsertProductInputParam struct {
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
Category ObjectIdentifierParam `json:"category,omitzero" api:"required"`
// Properties to attach to the product, matched/created by name + value. Additive —
// existing attributes are not removed.
Properties []UpsertProductPropertyParam `json:"properties,omitzero" api:"required"`
// SKU for the product, used to match an existing product within the account. If it
// exists the product is updated in place; otherwise a new product is created. A
// SKU already used by a non-product item fails that row.
SKU string `json:"sku" api:"required"`
// Product description.
Description param.Opt[string] `json:"description,omitzero"`
// Product notes.
Notes param.Opt[string] `json:"notes,omitzero"`
// Whether the product is shown to buyers in the customer portal. Defaults to
// `hidden` on create; preserved when omitted on update.
//
// Any of "visible", "hidden".
PortalVisibility UpsertProductInputPortalVisibility `json:"portal_visibility,omitzero"`
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
ProductLine ObjectIdentifierParam `json:"product_line,omitzero"`
// Product type. Create-only; defaults to `sale` when omitted.
//
// Any of "sale", "service", "shipping", "credit", "return", "tax".
Type UpsertProductInputType `json:"type,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitCost RateInputParam `json:"unit_cost,omitzero"`
// A value expressed as a ratio of two units, supplied on create and update
// requests.
//
// A unit price, for example, has a currency as its numerator unit and the unit the
// product is bought or sold by as its denominator.
UnitPrice RateInputParam `json:"unit_price,omitzero"`
// contains filtered or unexported fields
}
Input for a single product in a bulk upsert operation.
The properties Category, Properties, SKU are required.
func (UpsertProductInputParam) MarshalJSON ¶
func (r UpsertProductInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertProductInputParam) UnmarshalJSON ¶
func (r *UpsertProductInputParam) UnmarshalJSON(data []byte) error
type UpsertProductInputPortalVisibility ¶
type UpsertProductInputPortalVisibility string
Whether the product is shown to buyers in the customer portal. Defaults to `hidden` on create; preserved when omitted on update.
const ( UpsertProductInputPortalVisibilityVisible UpsertProductInputPortalVisibility = "visible" UpsertProductInputPortalVisibilityHidden UpsertProductInputPortalVisibility = "hidden" )
type UpsertProductInputType ¶
type UpsertProductInputType string
Product type. Create-only; defaults to `sale` when omitted.
const ( UpsertProductInputTypeSale UpsertProductInputType = "sale" UpsertProductInputTypeService UpsertProductInputType = "service" UpsertProductInputTypeShipping UpsertProductInputType = "shipping" UpsertProductInputTypeCredit UpsertProductInputType = "credit" UpsertProductInputTypeReturn UpsertProductInputType = "return" UpsertProductInputTypeTax UpsertProductInputType = "tax" )
type UpsertProductLineInputCommissionPolicy ¶
type UpsertProductLineInputCommissionPolicy string
Default commission policy for products in this product line.
- `commission_exempt`: no commission applies to these products.
- `commission_applied`: commission applies to these products, unless overridden elsewhere.
const ( UpsertProductLineInputCommissionPolicyCommissionApplied UpsertProductLineInputCommissionPolicy = "commission_applied" UpsertProductLineInputCommissionPolicyCommissionExempt UpsertProductLineInputCommissionPolicy = "commission_exempt" )
type UpsertProductLineInputFreightPolicy ¶
type UpsertProductLineInputFreightPolicy string
Default freight policy for products in this product line.
- `free_freight`: these products do not incur a freight charge.
- `billed_freight`: freight is billed for these products, unless overridden elsewhere.
const ( UpsertProductLineInputFreightPolicyFreeFreight UpsertProductLineInputFreightPolicy = "free_freight" UpsertProductLineInputFreightPolicyBilledFreight UpsertProductLineInputFreightPolicy = "billed_freight" )
type UpsertProductLineInputParam ¶
type UpsertProductLineInputParam struct {
// Default commission policy for products in this product line.
//
// - `commission_exempt`: no commission applies to these products.
// - `commission_applied`: commission applies to these products, unless overridden
// elsewhere.
//
// Any of "commission_applied", "commission_exempt".
CommissionPolicy UpsertProductLineInputCommissionPolicy `json:"commission_policy,omitzero" api:"required"`
// Default freight policy for products in this product line.
//
// - `free_freight`: these products do not incur a freight charge.
// - `billed_freight`: freight is billed for these products, unless overridden
// elsewhere.
//
// Any of "free_freight", "billed_freight".
FreightPolicy UpsertProductLineInputFreightPolicy `json:"freight_policy,omitzero" api:"required"`
// Display name of the product line, matched case-insensitively against existing
// lines. A row matching a system product line fails — system lines cannot be
// modified.
Name string `json:"name" api:"required"`
// -------------------------- Named Object -------------------------- Identifies an
// object by its id or its name. An id wins when both are given.
UnitGroup ObjectIdentifierParam `json:"unit_group,omitzero" api:"required"`
// contains filtered or unexported fields
}
UpsertProductLineInput is the input for a single product line in a bulk upsert operation.
The properties CommissionPolicy, FreightPolicy, Name, UnitGroup are required.
func (UpsertProductLineInputParam) MarshalJSON ¶
func (r UpsertProductLineInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertProductLineInputParam) UnmarshalJSON ¶
func (r *UpsertProductLineInputParam) UnmarshalJSON(data []byte) error
type UpsertProductPropertyParam ¶
type UpsertProductPropertyParam struct {
// Property name (e.g. "Color"). Matched case-insensitively; created if missing.
Name string `json:"name" api:"required"`
// Property value (e.g. "Red"). Matched case-insensitively; created under the
// property if missing. A value already in use under a different property fails the
// whole job.
Value string `json:"value" api:"required"`
// contains filtered or unexported fields
}
Property name + value pair attached to a product. The property and its value (an attribute) are created if they do not yet exist.
The properties Name, Value are required.
func (UpsertProductPropertyParam) MarshalJSON ¶
func (r UpsertProductPropertyParam) MarshalJSON() (data []byte, err error)
func (*UpsertProductPropertyParam) UnmarshalJSON ¶
func (r *UpsertProductPropertyParam) UnmarshalJSON(data []byte) error
type UpsertPropertyAttributeInputColor ¶
type UpsertPropertyAttributeInputColor string
Swatch color used to display this attribute in the UI.
When omitted, one of the nine named colors is assigned. Ignored for a value the property already defines.
const ( UpsertPropertyAttributeInputColorBlue UpsertPropertyAttributeInputColor = "blue" UpsertPropertyAttributeInputColorBrown UpsertPropertyAttributeInputColor = "brown" UpsertPropertyAttributeInputColorDefault UpsertPropertyAttributeInputColor = "default" UpsertPropertyAttributeInputColorGray UpsertPropertyAttributeInputColor = "gray" UpsertPropertyAttributeInputColorGreen UpsertPropertyAttributeInputColor = "green" UpsertPropertyAttributeInputColorOrange UpsertPropertyAttributeInputColor = "orange" UpsertPropertyAttributeInputColorPink UpsertPropertyAttributeInputColor = "pink" UpsertPropertyAttributeInputColorPurple UpsertPropertyAttributeInputColor = "purple" UpsertPropertyAttributeInputColorRed UpsertPropertyAttributeInputColor = "red" UpsertPropertyAttributeInputColorYellow UpsertPropertyAttributeInputColor = "yellow" )
type UpsertPropertyAttributeInputParam ¶
type UpsertPropertyAttributeInputParam struct {
// The selectable value this attribute represents, such as `Red`.
//
// Must be unique across all attributes in the account, not just within the
// property. Leading and trailing whitespace is trimmed.
Value string `json:"value" api:"required"`
// Swatch color used to display this attribute in the UI.
//
// When omitted, one of the nine named colors is assigned. Ignored for a value the
// property already defines.
//
// Any of "blue", "brown", "default", "gray", "green", "orange", "pink", "purple",
// "red", "yellow".
Color UpsertPropertyAttributeInputColor `json:"color,omitzero"`
// contains filtered or unexported fields
}
carries one attribute under a bulk-upserted property
The property Value is required.
func (UpsertPropertyAttributeInputParam) MarshalJSON ¶
func (r UpsertPropertyAttributeInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertPropertyAttributeInputParam) UnmarshalJSON ¶
func (r *UpsertPropertyAttributeInputParam) UnmarshalJSON(data []byte) error
type UpsertPropertyInputParam ¶
type UpsertPropertyInputParam struct {
// The selectable values to define under this property, in the order they should be
// arranged.
//
// Additive — values the property already defines are left as they stand, and none
// are removed. New values are appended after the existing ones.
Attributes []UpsertPropertyAttributeInputParam `json:"attributes,omitzero" api:"required"`
// Display name of the property, used to match existing properties within the
// account.
Name string `json:"name" api:"required"`
// contains filtered or unexported fields
}
carries one property in a bulk upsert
The properties Attributes, Name are required.
func (UpsertPropertyInputParam) MarshalJSON ¶
func (r UpsertPropertyInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertPropertyInputParam) UnmarshalJSON ¶
func (r *UpsertPropertyInputParam) UnmarshalJSON(data []byte) error
type UpsertResourceSettingRequestParam ¶
type UpsertResourceSettingRequestParam struct {
// How many weeks after the step feeding it this resource's work starts.
//
// Read when downstream department work is derived from the constraint plan, so it
// is the production-step override that shifts a plan: without an offset every step
// lands in the same week as the step feeding it, and the offsets along a chain of
// steps add up. A schedule is planned in whole weeks, so a fractional offset is
// truncated.
LeadTimeOffsetWeeks float64 `json:"lead_time_offset_weeks" api:"required"`
// Whether this resource takes part in planning.
//
// Machines are chosen by naming the constraint department, so this is how one is
// taken out — a machine down for a rebuild — rather than how one is opted in.
//
// Any of "included", "excluded".
ParticipationStatus UpsertResourceSettingRequestParticipationStatus `json:"participation_status,omitzero" api:"required"`
// ID of the machine, department or production step being overridden, matching the
// scope type.
ScopeRefID string `json:"scope_ref_id" api:"required"`
// What kind of resource this override applies to.
//
// Together with the resource ID it identifies the override, so writing the same
// pair again updates the existing entry in place and keeps its ID.
//
// Any of "machine", "department", "production_step".
ScopeType UpsertResourceSettingRequestScopeType `json:"scope_type,omitzero" api:"required"`
// Weeks of lead time at this resource.
LeadTimeWeeks param.Opt[float64] `json:"lead_time_weeks,omitzero"`
// contains filtered or unexported fields
}
Request to write a per-resource planning override.
The properties LeadTimeOffsetWeeks, ParticipationStatus, ScopeRefID, ScopeType are required.
func (UpsertResourceSettingRequestParam) MarshalJSON ¶
func (r UpsertResourceSettingRequestParam) MarshalJSON() (data []byte, err error)
func (*UpsertResourceSettingRequestParam) UnmarshalJSON ¶
func (r *UpsertResourceSettingRequestParam) UnmarshalJSON(data []byte) error
type UpsertResourceSettingRequestParticipationStatus ¶
type UpsertResourceSettingRequestParticipationStatus string
Whether this resource takes part in planning.
Machines are chosen by naming the constraint department, so this is how one is taken out — a machine down for a rebuild — rather than how one is opted in.
const ( UpsertResourceSettingRequestParticipationStatusIncluded UpsertResourceSettingRequestParticipationStatus = "included" UpsertResourceSettingRequestParticipationStatusExcluded UpsertResourceSettingRequestParticipationStatus = "excluded" )
type UpsertResourceSettingRequestScopeType ¶
type UpsertResourceSettingRequestScopeType string
What kind of resource this override applies to.
Together with the resource ID it identifies the override, so writing the same pair again updates the existing entry in place and keeps its ID.
const ( UpsertResourceSettingRequestScopeTypeMachine UpsertResourceSettingRequestScopeType = "machine" UpsertResourceSettingRequestScopeTypeDepartment UpsertResourceSettingRequestScopeType = "department" UpsertResourceSettingRequestScopeTypeProductionStep UpsertResourceSettingRequestScopeType = "production_step" )
type UpsertSalesTargetRequestParam ¶
type UpsertSalesTargetRequestParam struct {
// The unit the goal is denominated in, typically a currency unit.
//
// Only applied when creating a new target; the unit on an existing target is not
// changed.
AmountUnitID string `json:"amount_unit_id" api:"required"`
// The revenue goal for the period, as a decimal string (e.g. `75000.00`).
//
// This is the only value an existing target accepts; everything else on it stays
// as it was.
AmountValue string `json:"amount_value" api:"required"`
// End of the period the target applies to.
//
// Only applied when creating a new target; the dates on an existing target are not
// changed.
EndsAt time.Time `json:"ends_at" api:"required" format:"date-time"`
// Start of the period the target applies to (inclusive).
//
// Only applied when creating a new target; the dates on an existing target are not
// changed.
StartsAt time.Time `json:"starts_at" api:"required" format:"date-time"`
// contains filtered or unexported fields
}
Request to create or update a sales target.
The properties AmountUnitID, AmountValue, EndsAt, StartsAt are required.
func (UpsertSalesTargetRequestParam) MarshalJSON ¶
func (r UpsertSalesTargetRequestParam) MarshalJSON() (data []byte, err error)
func (*UpsertSalesTargetRequestParam) UnmarshalJSON ¶
func (r *UpsertSalesTargetRequestParam) UnmarshalJSON(data []byte) error
type UpsertUnitGroupConversionInputParam ¶
type UpsertUnitGroupConversionInputParam struct {
// -------------------------- UNIT -------------------------- Identifies a unit by
// its id, its name, or its abbreviation, in that order of precedence.
Unit UnitIdentifierParam `json:"unit,omitzero" api:"required"`
// Discount percentage to apply for this unit conversion.
DiscountPercentage param.Opt[float64] `json:"discount_percentage,omitzero"`
// contains filtered or unexported fields
}
UpsertUnitGroupConversionInput is the input for a single unit conversion within a bulk upsert unit group.
The property Unit is required.
func (UpsertUnitGroupConversionInputParam) MarshalJSON ¶
func (r UpsertUnitGroupConversionInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertUnitGroupConversionInputParam) UnmarshalJSON ¶
func (r *UpsertUnitGroupConversionInputParam) UnmarshalJSON(data []byte) error
type UpsertUnitGroupInputParam ¶
type UpsertUnitGroupInputParam struct {
// -------------------------- UNIT -------------------------- Identifies a unit by
// its id, its name, or its abbreviation, in that order of precedence.
BaseUnit UnitIdentifierParam `json:"base_unit,omitzero" api:"required"`
// Display name of the unit group, matched case-insensitively against existing
// groups. A row matching a system unit group fails — system groups cannot be
// modified.
Name string `json:"name" api:"required"`
// Unit dimension type. Create-only — an existing group keeps its stored type.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type UpsertUnitGroupInputType `json:"type,omitzero" api:"required"`
// Free-form notes about the unit group. Preserved when omitted on update.
Notes param.Opt[string] `json:"notes,omitzero"`
// Units to associate with the group. Replaces the existing set on update; the base
// unit is always kept.
UnitConversions []UpsertUnitGroupConversionInputParam `json:"unit_conversions,omitzero"`
// contains filtered or unexported fields
}
UpsertUnitGroupInput is the input for a single unit group in a bulk upsert operation.
The properties BaseUnit, Name, Type are required.
func (UpsertUnitGroupInputParam) MarshalJSON ¶
func (r UpsertUnitGroupInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertUnitGroupInputParam) UnmarshalJSON ¶
func (r *UpsertUnitGroupInputParam) UnmarshalJSON(data []byte) error
type UpsertUnitGroupInputType ¶
type UpsertUnitGroupInputType string
Unit dimension type. Create-only — an existing group keeps its stored type.
const ( UpsertUnitGroupInputTypeCurrency UpsertUnitGroupInputType = "currency" UpsertUnitGroupInputTypeQuantity UpsertUnitGroupInputType = "quantity" UpsertUnitGroupInputTypeTime UpsertUnitGroupInputType = "time" UpsertUnitGroupInputTypeMass UpsertUnitGroupInputType = "mass" UpsertUnitGroupInputTypeVolume UpsertUnitGroupInputType = "volume" UpsertUnitGroupInputTypeLength UpsertUnitGroupInputType = "length" UpsertUnitGroupInputTypeTemperature UpsertUnitGroupInputType = "temperature" UpsertUnitGroupInputTypeArea UpsertUnitGroupInputType = "area" )
type UpsertUnitInputParam ¶
type UpsertUnitInputParam struct {
// Short abbreviation for the unit (e.g. "g"). Also used for matching — see `name`.
Abbreviation string `json:"abbreviation" api:"required"`
// Whether the unit is its dimension's base unit. Bulk upsert never creates a base
// unit and rejects a change to an existing one.
IsBaseUnit bool `json:"is_base_unit" api:"required"`
// Display name of the unit (e.g. "Gram"). A row matching a system unit fails —
// system units cannot be modified.
Name string `json:"name" api:"required"`
// Conversion offset denominator, as a decimal string.
OffsetDenominator string `json:"offset_denominator" api:"required" format:"decimal"`
// Conversion offset numerator, as a decimal string.
OffsetNumerator string `json:"offset_numerator" api:"required" format:"decimal"`
// Conversion ratio denominator relative to the base unit, as a decimal string.
RatioDenominator string `json:"ratio_denominator" api:"required" format:"decimal"`
// Conversion ratio numerator relative to the base unit, as a decimal string.
RatioNumerator string `json:"ratio_numerator" api:"required" format:"decimal"`
// Unit dimension code. Create-only — a row that changes an existing unit's
// dimension fails.
//
// Any of "currency", "quantity", "time", "mass", "volume", "length",
// "temperature", "area".
Type UpsertUnitInputType `json:"type,omitzero" api:"required"`
// contains filtered or unexported fields
}
UpsertUnitInput is the input for a single unit in a bulk upsert operation.
The properties Abbreviation, IsBaseUnit, Name, OffsetDenominator, OffsetNumerator, RatioDenominator, RatioNumerator, Type are required.
func (UpsertUnitInputParam) MarshalJSON ¶
func (r UpsertUnitInputParam) MarshalJSON() (data []byte, err error)
func (*UpsertUnitInputParam) UnmarshalJSON ¶
func (r *UpsertUnitInputParam) UnmarshalJSON(data []byte) error
type UpsertUnitInputType ¶
type UpsertUnitInputType string
Unit dimension code. Create-only — a row that changes an existing unit's dimension fails.
const ( UpsertUnitInputTypeCurrency UpsertUnitInputType = "currency" UpsertUnitInputTypeQuantity UpsertUnitInputType = "quantity" UpsertUnitInputTypeTime UpsertUnitInputType = "time" UpsertUnitInputTypeMass UpsertUnitInputType = "mass" UpsertUnitInputTypeVolume UpsertUnitInputType = "volume" UpsertUnitInputTypeLength UpsertUnitInputType = "length" UpsertUnitInputTypeTemperature UpsertUnitInputType = "temperature" UpsertUnitInputTypeArea UpsertUnitInputType = "area" )
type User ¶
type User struct {
// User ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Email address the user signs in with and receives platform email at.
Email string `json:"email" api:"required"`
// When the user verified their email address.
EmailVerifiedAt time.Time `json:"email_verified_at" api:"required" format:"date-time"`
// Location of the user's profile image.
//
// For photos uploaded through the API this holds an internal path rather than a
// fetchable image URL; call Get User Photo URL to obtain a temporary link to the
// image itself.
ImageURL string `json:"image_url" api:"required"`
// User's full display name.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "user".
Object UserObject `json:"object" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// Username the user can sign in with instead of their email address.
//
// Usernames are unique across the whole platform, not just within your account.
Username string `json:"username" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Email respjson.Field
EmailVerifiedAt respjson.Field
ImageURL respjson.Field
Name respjson.Field
Object respjson.Field
UpdatedAt respjson.Field
Username respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A user's global profile, shared across every account they belong to.
Account-specific settings (status, role, department) live on the account user resource that links the user to each account.
func (*User) UnmarshalJSON ¶
type UserObject ¶
type UserObject string
Resource type identifier.
const (
UserObjectUser UserObject = "user"
)
type ValidateAddressRequestParam ¶
type ValidateAddressRequestParam struct {
// First line of the street address.
AddressLine1 string `json:"address_line_1" api:"required"`
// City or locality.
City string `json:"city" api:"required"`
// Two-letter country code, such as `US`.
//
// A full country name such as `United States` is recognized for a handful of
// common countries; send the two-letter code for anywhere else.
Country string `json:"country" api:"required"`
// Postal or ZIP code.
PostalCode string `json:"postal_code" api:"required"`
// State or administrative area.
State string `json:"state" api:"required"`
// Second line of the street address.
AddressLine2 param.Opt[string] `json:"address_line_2,omitzero"`
// contains filtered or unexported fields
}
Request to validate an address.
The properties AddressLine1, City, Country, PostalCode, State are required.
func (ValidateAddressRequestParam) MarshalJSON ¶
func (r ValidateAddressRequestParam) MarshalJSON() (data []byte, err error)
func (*ValidateAddressRequestParam) UnmarshalJSON ¶
func (r *ValidateAddressRequestParam) UnmarshalJSON(data []byte) error
type ValidatedAddress ¶
type ValidatedAddress struct {
// Parsed address components.
Components AddressComponents `json:"components" api:"required"`
// Formatted, single-line address as standardized by the validation service.
//
// The validation service may omit this regardless of `status`, so it can be absent
// even for a `valid` address.
FormattedAddress string `json:"formatted_address" api:"required"`
// Resource type identifier.
//
// Any of "validated_address".
Object ValidatedAddressObject `json:"object" api:"required"`
// Whether the address was confirmed as complete and specific enough to ship to.
//
// - `valid`: nothing required was missing and the address resolved to a specific
// building or block.
// - `invalid`: required components were missing, or the address only resolved to a
// street or a wider area.
//
// When the status is `invalid`, read `validation_messages` and compare
// `components` against what you submitted to see what to correct.
//
// Any of "valid", "invalid".
Status ValidatedAddressStatus `json:"status" api:"required"`
// Human-readable messages describing issues found during validation.
//
// May be non-empty even when `status` is `valid`, for example when components were
// inferred or replaced with standardized values. Empty when no issues were
// reported.
ValidationMessages []string `json:"validation_messages" api:"required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Components respjson.Field
FormattedAddress respjson.Field
Object respjson.Field
Status respjson.Field
ValidationMessages respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The outcome of checking a submitted address against an address validation service.
func (ValidatedAddress) RawJSON ¶
func (r ValidatedAddress) RawJSON() string
Returns the unmodified JSON received from the API
func (*ValidatedAddress) UnmarshalJSON ¶
func (r *ValidatedAddress) UnmarshalJSON(data []byte) error
type ValidatedAddressObject ¶
type ValidatedAddressObject string
Resource type identifier.
const (
ValidatedAddressObjectValidatedAddress ValidatedAddressObject = "validated_address"
)
type ValidatedAddressStatus ¶
type ValidatedAddressStatus string
Whether the address was confirmed as complete and specific enough to ship to.
- `valid`: nothing required was missing and the address resolved to a specific building or block.
- `invalid`: required components were missing, or the address only resolved to a street or a wider area.
When the status is `invalid`, read `validation_messages` and compare `components` against what you submitted to see what to correct.
const ( ValidatedAddressStatusValid ValidatedAddressStatus = "valid" ValidatedAddressStatusInvalid ValidatedAddressStatus = "invalid" )
type VolumeDiscount ¶
type VolumeDiscount struct {
// Volume discount ID.
ID string `json:"id" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
AcceptableUnits ListUnit `json:"acceptable_units" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Attributes ListAttribute `json:"attributes" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Categories ListItemCategory `json:"categories" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
CustomerGroups ListAccountGroup `json:"customer_groups" api:"required"`
// Display name of the volume discount.
//
// Must be unique within the account.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "volume_discount".
Object VolumeDiscountObject `json:"object" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
ProductLines ListProductLine `json:"product_lines" api:"required"`
// A single page of resources, together with the metadata needed to page through
// the rest of the result set.
Tiers ListVolumeDiscountTier `json:"tiers" api:"required"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AcceptableUnits respjson.Field
Attributes respjson.Field
Categories respjson.Field
CreatedAt respjson.Field
CustomerGroups respjson.Field
Name respjson.Field
Object respjson.Field
ProductLines respjson.Field
Tiers respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A quantity-based discount with tiered percentage rates.
A volume discount reduces the price once the ordered quantity reaches a tier's threshold. The customer group associations scope which customers qualify, and the product line, category, and attribute associations scope which order lines qualify; an empty list on any of them means no restriction on that dimension. Acceptable units are not a scope: they are the units the ordered quantity is measured in, and a discount with none of them never reaches a threshold above zero.
At most one volume discount is applied to a given order line: among the discounts whose scope the line matches and whose thresholds are met, those scoped to a customer group the buyer belongs to take precedence. An account price for the same line overrides the discounted price entirely.
func (VolumeDiscount) RawJSON ¶
func (r VolumeDiscount) RawJSON() string
Returns the unmodified JSON received from the API
func (*VolumeDiscount) UnmarshalJSON ¶
func (r *VolumeDiscount) UnmarshalJSON(data []byte) error
type VolumeDiscountObject ¶
type VolumeDiscountObject string
Resource type identifier.
const (
VolumeDiscountObjectVolumeDiscount VolumeDiscountObject = "volume_discount"
)
type VolumeDiscountTier ¶
type VolumeDiscountTier struct {
// Volume discount tier ID.
ID string `json:"id" api:"required"`
// Creation timestamp.
CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
// Fraction of the price taken off once the threshold is met, as a decimal string.
//
// This is a multiplier, not a whole percent: `0.05` takes 5% off. When an order
// meets several tiers of the same discount, their reductions compound: meeting a
// `0.1` tier and a `0.2` tier multiplies the price by `0.9 × 0.8`, a 28% reduction
// overall.
DiscountPercentage string `json:"discount_percentage" api:"required" format:"decimal"`
// Display name of the tier.
Name string `json:"name" api:"required"`
// Resource type identifier.
//
// Any of "volume_discount_tier".
Object VolumeDiscountTierObject `json:"object" api:"required"`
// Minimum ordered quantity at which this tier's discount begins to apply, as a
// decimal string.
//
// The quantity compared against the threshold is the total across every line on
// the order that falls within the discount's scope, converted into one of the
// discount's acceptable units — not the quantity of a single line.
Threshold string `json:"threshold" api:"required" format:"decimal"`
// Last updated timestamp.
UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
DiscountPercentage respjson.Field
Name respjson.Field
Object respjson.Field
Threshold respjson.Field
UpdatedAt respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A quantity threshold within a volume discount, and the reduction that applies at or above it.
func (VolumeDiscountTier) RawJSON ¶
func (r VolumeDiscountTier) RawJSON() string
Returns the unmodified JSON received from the API
func (*VolumeDiscountTier) UnmarshalJSON ¶
func (r *VolumeDiscountTier) UnmarshalJSON(data []byte) error
type VolumeDiscountTierObject ¶
type VolumeDiscountTierObject string
Resource type identifier.
const (
VolumeDiscountTierObjectVolumeDiscountTier VolumeDiscountTierObject = "volume_discount_tier"
)
Source Files
¶
- ai.go
- aiagent.go
- aimemory.go
- airun.go
- airunaction.go
- aliases.go
- auth.go
- authapikey.go
- authapikeyaction.go
- catalog.go
- catalogitem.go
- catalogitemaction.go
- catalogitemattribute.go
- catalogitemcategory.go
- catalogitemcategoryaction.go
- catalogitemcategoryproperty.go
- catalogiteminventory.go
- catalogmaterial.go
- catalogmaterialaction.go
- catalogpart.go
- catalogpartaction.go
- catalogproduct.go
- catalogproductaction.go
- catalogproductline.go
- catalogproductlineaction.go
- catalogproperty.go
- catalogpropertyaction.go
- catalogpropertyattribute.go
- catalogunit.go
- catalogunitaction.go
- catalogunitgroup.go
- catalogunitgroupaction.go
- catalogunitgroupunit.go
- client.go
- core.go
- coreaction.go
- coreaddress.go
- coreaddressaction.go
- coreanalytics.go
- coreauditevent.go
- coreemaillog.go
- corejob.go
- corerequestlog.go
- coresandbox.go
- default_http_client.go
- field.go
- finance.go
- financepaymentterm.go
- identity.go
- identityaccount.go
- identityaccountuser.go
- identityaccountuseraction.go
- identityrole.go
- messaging.go
- messagingannouncement.go
- messagingannouncementaction.go
- messagingblock.go
- messagingconversation.go
- messagingconversationaction.go
- messagingconversationattachment.go
- messagingconversationattachmentaction.go
- messagingconversationlink.go
- messagingconversationmessage.go
- messagingconversationparticipant.go
- messagingconversationparticipantaction.go
- messagingemaildomain.go
- messagingemaildomainaction.go
- messagingemailinbox.go
- messagingemailsender.go
- messaginggroup.go
- messaginggroupmember.go
- messagingmessage.go
- messagingmessageaction.go
- messagingnotification.go
- messagingnotificationaction.go
- messagingpreference.go
- operation.go
- operationcarrier.go
- operationcarrierservicelevel.go
- operationdemandoverride.go
- operationdepartment.go
- operationfulfillmentrecommendation.go
- operationfulfillmentrecommendationaction.go
- operationinventorychangelog.go
- operationinventorychangelogaction.go
- operationlocation.go
- operationlocationaction.go
- operationlocationtype.go
- operationmachine.go
- operationmachinedowntimeevent.go
- operationoperatingcalendar.go
- operationoperatingcalendarclosure.go
- operationpick.go
- operationpickaction.go
- operationpickline.go
- operationpicklineaction.go
- operationproductionschedule.go
- operationproductionscheduleaction.go
- operationproductionscheduleline.go
- operationproductionschedulesetting.go
- operationproductionschedulesettingitem.go
- operationproductionschedulesettingresource.go
- operationscanningstation.go
- operationshipment.go
- operationshipmentaction.go
- operationshippingterm.go
- sale.go
- saleaccountgroup.go
- saleaccountprice.go
- saleaccountpriceaction.go
- saleaccountstatus.go
- saleaccountuser.go
- saleaccountusersalestarget.go
- saleaddress.go
- salecontact.go
- salecontactaction.go
- salecustomer.go
- salecustomeraction.go
- saleorderdiscount.go
- saleorderdiscountaction.go
- salepriority.go
- salesalesorder.go
- salesalesorderaction.go
- salesalesorderline.go
- salesalesorderlineaction.go
- salevolumediscount.go
- setting.go
- settingintegration.go
- settingportaldomain.go
- settingportaldomainaction.go
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
|
|