Documentation ¶
Index ¶
- Constants
- Variables
- type APIAddress
- type APICurrency
- type APICustomField
- type APIDateRange
- type APIEmailAddress
- type APIPhone
- type AppliedToTxn
- type BillCreditAPIResult
- type BillCreditAttachmentAPIResult
- type BillCreditNotes
- type BillCreditNotesParams
- type ClassesAPIResult
- type ContactSearchResult
- type ContactsAPIResult
- type ContactsParam
- type ContactsSearchAPIResult
- type ContactsSearchParam
- type CustomListItemsAPIResult
- type CustomListsAPIResult
- type CustomerAsset
- type CustomerAssetCustomFieldsAPIResult
- type CustomerAssetMaintenanceScheduleParam
- type CustomerAssetSearchParam
- type CustomerAssetSearchResult
- type CustomerAssetStatusParam
- type CustomerAssetType
- type CustomerAssetTypeAPIResult
- type CustomerAssetsAPIResult
- type CustomerDetail
- type CustomersContactAPIResult
- type CustomersHubContentGroupAPIResult
- type CustomersHubDoc
- type CustomersHubDocOption
- type EmployeeAPIResult
- type EmployeesAPIResult
- type GLCategoriesAPIResult
- type GLCategoryAPIResult
- type IDNamePair
- type IndustriesAPIResult
- type InventoryLocationsAPIResult
- type InvoiceFormatAPIResult
- type InvoiceFormatsAPIResult
- type ItemTypesAPIResult
- type PaymentTermsAPIResult
- type PoolAPIResult
- type PoolsAPIResult
- type ReferralSourcesAPIResult
- type SalesOrderTypesAPIResult
- type ShippingMethodAPIResult
- type ShippingMethodsAPIResult
- type Striven
- type TaskCreateParams
- type TaskCreateResult
- type TasksAPIResult
- type Timestamp
- type UpdatedContact
Constants ¶
const ( BillCreditActive = iota + 165 BillCreditVoided )
Bill Credit Status
const ( BillStatusPendingReview = iota + 124 BillStatusToBePaid BillStatusPaid BillStatusCancelled BillStatusDenied )
Bill Status
const ( CreditMemoActive = iota + 163 CreditMemoVoided )
Credit Memo Status
const ( StatusProspect = iota + 1 StatusActive StatusDeleted StatusLost )
Customer/Vendor Status
const ( TypeCustomer = iota + 1 TypeVendor )
Customer/Vendor Types
const ( GLAccountIncome = iota + 1 GLAccountExpense GLAccountFixedAsset GLAccountBank GLAccountLoan GLAccountCreditCard GLAccountEquity GLAccountAccountsReceivable GLAccountAccountsPayable GLAccountCostOfGoodsSold GLAccountOtherAsset GLAccountOtherLiability GLAccountOtherIncome GLAccountOtherExpense )
GL Account Types
const ( InvoiceActive = iota + 160 InvoiceVoided )
Invoice Status
const ( JournalEntryActive = iota + 145 JournalEntryVoided )
Journal Entry Status
const ( OrderIncomplete = iota + 18 OrderQuoted OrderPendingApproval OrderDeclined OrderApproved OrderCanceled OrderLost OrderInProgress OrderCompleted )
Order Status
const ( OrderInvoiceNo = iota + 167 OrderInvoicePartial OrderInvoiceFull )
Order Invoice Status
const ( OrderLineItemPending = iota + 30 OrderLineItemOrdered OrderLineItemShipped OrderLineItemCancelled )
Order Line Item Status
const ( PaymentPending = iota + 69 PaymentApproved PaymentFailed PaymentVoided = 75 )
Payment Status
const ( POStatusIncomplete = iota + 105 POStatusPendingApproval POStatusDeclined POStatusApproved POStatusInProgress POStatusFulfilled POStatusCancelled POStatusClosed = 132 )
PO Status
const ( POLineItemStatusPending = iota + 113 POLineItemStatusOrdered POLineItemStatusReceived POLineItemStatusCanceled )
PO Line Item Status
const ( PhoneNumberTypeMobile = iota + 1 PhoneNumberTypeWork PhoneNumberTypeHome PhoneNumberTypeFax )
Phone Number Types
const ( SubcontractedWorkPending = iota + 140 SubcontractedWorkInProgress SubcontractedWorkDone )
Subcontracted Work Status
const ( TaskOpen = iota + 48 TaskDone TaskCanceled TaskOnHold = 68 )
Task Status
const ( VendorPOPending = iota + 117 VendorPOAccepted VendorPODeclined VendorPOPartiallyFulfilled VendorPOFulfilled )
Vendor PO Status
const StrivenURL string = "https://api.striven.com/"
StrivenURL is the global URL for Striven's API
Variables ¶
var ( // AssetStatusOutOfServiceParam is the Static Type for an Out of Service Asset Status AssetStatusOutOfServiceParam = IDNamePair{ ID: 15, Name: "Out of Service", } // AssetStatusInServiceParam is the Static Type for an In Service Asset Status AssetStatusInServiceParam = IDNamePair{ ID: 16, Name: "In Service", } // AssetStatusRetiredParam is the Static Type for a Retired Asset Status AssetStatusRetiredParam = IDNamePair{ ID: 17, Name: "Retired", } // AssetStatusUnsupportedParam is the Static Type for an Unsupported Asset Status AssetStatusUnsupportedParam = IDNamePair{ ID: 148, Name: "Unsupported", } )
Customer Asset Status
Functions ¶
This section is empty.
Types ¶
type APIAddress ¶
type APIAddress struct { Address1 string `json:"address1"` Address2 string `json:"address2"` Address3 string `json:"address3"` City string `json:"city"` State string `json:"state"` PostalCode string `json:"postalCode"` Country string `json:"country"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` FullAddress string `json:"fullAddress"` }
APIAddress is the standard format for an API address in Striven
type APICurrency ¶
type APICurrency struct { CurrencyISOCode string `json:"currencyISOCode"` ExchangeRate float64 `json:"exchangeRate"` }
APICurrency is the standard structure for displaying currency in Striven
type APICustomField ¶
type APICustomField struct { ID int `json:"id"` Name string `json:"name"` FieldType IDNamePair `json:"fieldType"` SourceID int `json:"sourceId"` Value string `json:"value"` IsRequired bool `json:"isRequired"` }
APICustomField is the structure for Custom Fields in the Striven API
type APIDateRange ¶
APIDateRange is an API date searching construct
type APIEmailAddress ¶
type APIEmailAddress struct { ID int `json:"id"` Email string `json:"email"` IsPrimary bool `json:"isPrimary"` Active bool `json:"active"` }
APIEmailAddress is the format of an Email address return from Striven
type APIPhone ¶
type APIPhone struct { ID int `json:"id"` PhoneType IDNamePair `json:"phoneType,omitempty"` Number string `json:"number"` Extension string `json:"extension"` IsPreferred bool `json:"isPreferred"` Active bool `json:"active"` }
APIPhone is the format of phone information in the Striven API
type AppliedToTxn ¶
type AppliedToTxn struct { TxnID int `json:"txnid"` //TODO SS: I need to get a sample of this field to verify the case of the json return. Amount float64 `json:"amount"` DateApplied Timestamp `json:"dateApplied"` }
AppliedToTxn is the format for a single bill that a credit was applied to. Almost always a slice value since you can apply a credit to multiple bills
type BillCreditAPIResult ¶
type BillCreditAPIResult struct { ID int `json:"id"` TxnNumber string `json:"txnNumber"` TxnDate Timestamp `json:"txnDate"` Vendor vendorRef `json:"vendor"` VendorLocation IDNamePair `json:"vendorLocation,omitempty"` Memo string `json:"memo"` Status IDNamePair `json:"status"` CreditTotal float64 `json:"creditTotal"` UnappliedCredit float64 `json:"unappliedCredit"` ApglAccount IDNamePair `json:"apglAccount"` LineItemsGLCategory IDNamePair `json:"lineItemsGLCategory,omitempty"` LineItems []billCreditLineItem `json:"lineItems"` AppliedToBills []AppliedToTxn `json:"appliedToBills,omitempty"` NotesLogCount int `json:"notesLogCount"` AttachmentCount int `json:"attachmentCount"` DateCreated string `json:"dateCreated"` CreatedBy IDNamePair `json:"createdBy"` LastUpdatedDate Timestamp `json:"lastUpdatedDate,omitempty"` LastUpdatedBy IDNamePair `json:"lastUpdatedBy,omitempty"` Reviewed bool `json:"reviewed"` DateReviewed Timestamp `json:"dateReviewed,omitempty"` ReviewedBy IDNamePair `json:"reviewedBy,omitempty"` Currency APICurrency `json:"currency"` }
BillCreditAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-bill-credits-id
type BillCreditAttachmentAPIResult ¶
type BillCreditAttachmentAPIResult struct { TotalCount int `json:"totalCount"` Data []billCreditAttachment `json:"data"` }
BillCreditAttachmentAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-bill-credits-id-attachments
type BillCreditNotes ¶
type BillCreditNotes struct { TotalCount int `json:"totalCount"` Data []billCreditNote `json:"data,omitempty"` }
BillCreditNotes is the return structure for a call to https://api.striven.com/Help/Api/GET-v1-bill-credits-id-notes_PageIndex_PageSize
type BillCreditNotesParams ¶
BillCreditNotesParams is the required data structure for passing to BillCreditNotes.GetByID
type ClassesAPIResult ¶
type ClassesAPIResult struct { TotalCount int `json:"totalCount"` Data []classesSearchResult }
ClassesAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-classes
type ContactSearchResult ¶
type ContactSearchResult struct { ID int `json:"id"` FirstName string `json:"firstName"` LastName string `json:"lastName"` DateCreated Timestamp `json:"dateCreated"` LastUpdated Timestamp `json:"lastUpdatedDate"` Active bool `json:"active"` }
ContactSearchResult is the resultant data that's pulled from matching contacts
type ContactsAPIResult ¶
type ContactsAPIResult struct { CustomerAssociations []customerContactAssociation `json:"customerAssociations"` VendorAssociations []vendorContactAssociation `json:"vendorAssociations"` ID int `json:"id"` FirstName string `json:"firstName"` LastName string `json:"lastName"` Phones []APIPhone `json:"phones"` Emails []APIEmailAddress `json:"emails"` Address APIAddress `json:"address"` CustomFields []APICustomField `json:"customFields"` }
ContactsAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-contacts-id
type ContactsParam ¶
type ContactsParam struct { ID int `json:"id,omitempty"` FirstName string `json:"firstName"` LastName string `json:"lastName,omitempty"` Phones *[]APIPhone `json:"phones,omitempty"` Emails *[]APIEmailAddress `json:"emails,omitempty"` Address *APIAddress `json:"address,omitempty"` CustomFields *[]APICustomField `json:"customFields,omitempty"` }
ContactsParam is the Parameter to be passed for Creating or updating a contact. Trying to figure out how I can work around the requirement that Phones/Emails/Address/CustomFields need to be pointers for json Marshalling while empty. It's pretty gross as is, but it does work.
type ContactsSearchAPIResult ¶
type ContactsSearchAPIResult struct { TotalCount int `json:"totalCount"` Data []ContactSearchResult `json:"data"` }
ContactsSearchAPIResult is a collection of ContactsAPIResult wrapped with a TotalCount, structure is the return value for http://api.striven.com/Help/Api/POST-v1-contacts-search
type ContactsSearchParam ¶
type ContactsSearchParam struct { Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` AccountName string `json:"accountName,omitempty"` Active bool `json:"active,omitempty"` PageIndex int `json:"pageIndex,omitempty"` PageSize int `json:"pageSize,omitempty"` SortExperssion string `json:"sortExpression,omitempty"` SortOrder int `json:"sortOrder,omitempty"` }
ContactsSearchParam is the required Parameter for searching contacts with https://api.striven.com/v1/contacts/search. May be empty to return all contacts.
type CustomListItemsAPIResult ¶
type CustomListItemsAPIResult struct { TotalCount int `json:"totalCount"` Data []customListItemAPIResult `json:"data"` }
CustomListItemsAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-custom-lists-id-list-items
type CustomListsAPIResult ¶
type CustomListsAPIResult struct { TotalCount int `json:"totalCount"` Data []customListAPIResult `json:"data"` }
CustomListsAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-custom-lists
type CustomerAsset ¶
type CustomerAsset struct { ID int `json:"id"` //set to 0 for a new asset AssetName string `json:"assetName"` AssetType IDNamePair `json:"assetType"` Customer IDNamePair `json:"customer"` CustomerLocation IDNamePair `json:"customerLocation"` Status IDNamePair `json:"status,omitempty"` StatusNote string `json:"statusNote,omitempty"` PurchasePrice float64 `json:"purchasePrice,omitempty"` VisibleOnPortal bool `json:"visibleOnPortal"` PresentValue float64 `json:"presentValue,omitempty"` DatePurchased Timestamp `json:"datePurchased,omitempty"` ExpirationDate Timestamp `json:"expirationDate,omitempty"` DateCreated Timestamp `json:"dateCreated"` CreatedBy IDNamePair `json:"createdBy"` LastUpdatedDate Timestamp `json:"lastUpdatedDate,omitempty"` LastUpdatedBy IDNamePair `json:"lastUpdatedBy,omitempty"` Currency APICurrency `json:"currency,omitempty"` CustomFields []APICustomField `json:"customFields,omitempty"` MaintenanceSchedule []CustomerAssetMaintenanceScheduleParam `json:"maintenanceSchedule,omitempty"` }
CustomerAsset is a single Customer Asset, returned from a Get by ID also used for creating new Assets
type CustomerAssetCustomFieldsAPIResult ¶
type CustomerAssetCustomFieldsAPIResult []struct { APICustomField }
CustomerAssetCustomFieldsAPIResult is the result of pulling a list of custom fields on a given asset.
type CustomerAssetMaintenanceScheduleParam ¶
type CustomerAssetMaintenanceScheduleParam struct { ID int `json:"id,omitempty"` AssetID int `json:"assetId"` StartDate Timestamp `json:"startDate"` EndDate Timestamp `json:"endDate"` Notes string `json:"notes,omitempty"` Active bool `json:"active"` }
CustomerAssetMaintenanceScheduleParam is the parameter structure that gets passed to api.striven.com/v1/customer-assets/{id}/maintenance-schedule The "ID" field here is the Maintenance Schedule ID. As far as I can tell there's no way to get it other than to query an asset, so while this endpoit can be used to create a Maintenance Schedule, there is a strong possibility that you would just update an existing one and break other assets if you're not extremely careful. Use at your own risk. I could also be completely wrong here, there's almost no documentation around this. it is also the entire Customer Asset Maintenance Schedule object that is returned as part of an asset. Caveat 2: If you are creating a new maintenance schedule for an asset that doesn't have one, you have to skip providing an ID for it to work.
type CustomerAssetSearchParam ¶
type CustomerAssetSearchParam struct { AssetName string `json:"assetName,omitempty"` StatusID int `json:"statusId,omitempty"` AssetTypeID int `json:"assetTypeId,omitempty"` LastUpdatedDateRange APIDateRange `json:"lastUpdatedDateRange,omitempty"` PageIndex int `json:"pageIndex,omitempty"` PageSize int `json:"pageSize,omitempty"` SortExpression string `json:"sortExpression,omitempty"` SortOrder int `json:"sortOrder,omitempty"` }
CustomerAssetSearchParam is a parameter structure that gets passed to api.striven.com/v1/customer-assets/search
type CustomerAssetSearchResult ¶
type CustomerAssetSearchResult struct { ID int `json:"id"` AssetName string `json:"assetName"` AssetTypeID int `json:"assetTypeId"` Customer IDNamePair `json:"customer"` Status IDNamePair `json:"sattus"` DateCreated Timestamp `json:"dateCreated"` LastUpdatedDate Timestamp `json:"lastUpdatedDate"` }
CustomerAssetSearchResult is a single customer asset search result
type CustomerAssetStatusParam ¶
type CustomerAssetStatusParam struct { Status IDNamePair `json:"status"` StatusNote string `json:"statusNote"` }
CustomerAssetStatusParam is the parameter structure that gets passed to api.striven.com/v1/customer-assets/{id}/update-status
type CustomerAssetType ¶
type CustomerAssetType struct { ID int `json:"id"` AssetType string `json:"assetType"` HasExpirationDate bool `json:"hasExpirationDate"` RequiresExpirationDate bool `json:"requiresExpirationDate"` HasDatePurchased bool `json:"hasDatePurchased"` RequiresDatePurchased bool `json:"requiresDatePurchased"` HasPresentValue bool `json:"hasPresentValue"` RequiresPresentValue bool `json:"requiresPresentValue"` DefaultStatus IDNamePair `json:"defaultStatus"` }
CustomerAssetType is a single Customer Asset Type return value
type CustomerAssetTypeAPIResult ¶
type CustomerAssetTypeAPIResult struct { TotalCount int `json:"totalCount"` Data []CustomerAssetType `json:"data"` }
CustomerAssetTypeAPIResult is the return type for a list of customer asset types.
type CustomerAssetsAPIResult ¶
type CustomerAssetsAPIResult struct { TotalCount int `json:"totalCount"` Data []CustomerAssetSearchResult `json:"data"` }
CustomerAssetsAPIResult is the Return value of an API customer assets search
type CustomerDetail ¶
type CustomerDetail struct { ID int `json:"id"` Name string `json:"name"` Number string `json:"number,omitempty"` IsVendor bool `json:"isVendor,omitempty"` IsConsumerAccount bool `json:"isConsumerAccount,omitempty"` PrimaryContact IDNamePair `json:"primaryContact,omitempty"` Status IDNamePair `json:"status"` Categories []IDNamePair `json:"categories,omitempty"` ReferralSource IDNamePair `json:"referralSource,omitempty"` Industry IDNamePair `json:"industry,omitempty"` CustomerSince string `json:"customerSince,omitempty"` //date? OnCreditHold bool `json:"onCreditHold,omitempty"` CreditLimit float64 `json:"creditLimit,omitempty"` WebSite string `json:"webSite,omitempty"` IsTaxExempt bool `json:"isTaxExempt,omitempty"` IsFinanceChargeExempt bool `json:"isFinanceChargeExempt,omitempty"` PaymentTerm IDNamePair `json:"paymentTerm,omitempty"` BillToLocation IDNamePair `json:"billToLocation,omitempty"` ShipToLocation IDNamePair `json:"shipToLocation,omitempty"` Phones []APIPhone `json:"phones,omitempty"` PrimaryAddress APIAddress `json:"primaryAddress,omitempty"` PriceList IDNamePair `json:"priceList"` CustomFields []APICustomField `json:"customFields,omitempty"` DateCreated string `json:"dateCreated,omitempty"` CreatedBy IDNamePair `json:"createdBy,omitempty"` LastUpdatedDate string `json:"lastUpdatedDate,omitempty"` LastUpdatedBy IDNamePair `json:"lastUpdatedBy,omitempty"` Currency APICurrency `json:"currency,omitempty"` }
CustomerDetail is the structure of a single Customer from the customers APi
type CustomersContactAPIResult ¶
type CustomersContactAPIResult struct { TotalCount int `json:"totalCount"` Data []customerContactAPIResult `json:"data"` }
CustomersContactAPIResult is the structure of a request to Striven to /v1/customers/{ID}/contacts
type CustomersHubContentGroupAPIResult ¶
type CustomersHubContentGroupAPIResult struct { TotalCount int `json:"totalCount"` Data []customerHubContentGroupAPIResult `json:"data"` }
CustomersHubContentGroupAPIResult is the structure of a request to Striven to GetContentGroups()
type CustomersHubDoc ¶
type CustomersHubDoc struct { ClientID int GroupID int ContentGroupName string OverwriteExistingFiles bool VisibleOnPortal bool }
CustomersHubDoc is a structure for file upload headers and options
func (*CustomersHubDoc) Upload ¶
func (chd *CustomersHubDoc) Upload(localFilePath string, opts ...CustomersHubDocOption) (int, error)
Upload is the Constructor and uploader for a default CustomersHubDoc
type CustomersHubDocOption ¶
type CustomersHubDocOption func(*CustomersHubDoc)
CustomersHubDocOption prototype definiton
func IsOverwriteEnabled ¶
func IsOverwriteEnabled() CustomersHubDocOption
IsOverwriteEnabled CHD Option to allow overwriting files
func IsVisibleOnPortal ¶
func IsVisibleOnPortal() CustomersHubDocOption
IsVisibleOnPortal CHD Option to allow customers to see these documents
func SetClientID ¶
func SetClientID(clientID int) CustomersHubDocOption
SetClientID Functional Option for CHD Constructor ClientID
func SetContentGroupName ¶
func SetContentGroupName(groupName string) CustomersHubDocOption
SetContentGroupName Option for CHD Constructor Group Name
func SetGroupID ¶
func SetGroupID(groupID int) CustomersHubDocOption
SetGroupID Functional Option for CHD Constructor GroupID
type EmployeeAPIResult ¶
type EmployeeAPIResult struct { ID int `json:"id"` Name string `json:"name"` Email string `json:"email"` IsSystemuser bool `json:"isSystemUser"` DateCreated Timestamp `json:"datecreated"` LastUpdatedDate Timestamp `json:"lastUpdatedDate"` }
EmployeeAPIResult is the structure for a single Employee
type EmployeesAPIResult ¶
type EmployeesAPIResult []EmployeeAPIResult
EmployeesAPIResult is the structure for employees in Striven.
type GLCategoriesAPIResult ¶
type GLCategoriesAPIResult []GLCategoryAPIResult
GLCategoriesAPIResult is the collection of InvoiceFormat needed to return all formats
type GLCategoryAPIResult ¶
type GLCategoryAPIResult struct { CategoryID int `json:"CategoryID"` CategoryName string `json:"CategoryName"` CategoryFullName string `json:"CategoryFullName"` ParentID int `json:"ParentID"` ParentCategoryName string `json:"ParentCategoryName"` Active bool `json:"active"` }
GLCategoryAPIResult is the structure for an API return from https://api.striven.com/Help/Api/GET-v1-glcategories
type IDNamePair ¶
IDNamePair is used pretty much everywhere in the API.
type IndustriesAPIResult ¶
type IndustriesAPIResult struct { TotalCount int `json:"totalCount"` Data []industrySearchResult `json:"data"` }
IndustriesAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-industries
type InventoryLocationsAPIResult ¶
type InventoryLocationsAPIResult struct { TotalCount int `json:"totalCount"` Data []inventoryLocationSearchResult `json:"data"` }
InventoryLocationsAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-inventory-locations
type InvoiceFormatAPIResult ¶
type InvoiceFormatAPIResult struct { ID int `json:"id"` Name string `json:"name"` Active bool `json:"active"` }
InvoiceFormatAPIResult is the structure for an API return from https://api.striven.com/Help/Api/GET-v1-invoice-formats
type InvoiceFormatsAPIResult ¶
type InvoiceFormatsAPIResult []InvoiceFormatAPIResult
InvoiceFormatsAPIResult is the collection of InvoiceFormat needed to return all formats
type ItemTypesAPIResult ¶
type ItemTypesAPIResult struct { TotalCount int `json:"totalCount"` Data []itemTypeSearchResult `json:"data"` }
ItemTypesAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-item-types
type PaymentTermsAPIResult ¶
type PaymentTermsAPIResult struct { TotalCount int `json:"totalCount"` Data []paymentTerm `json:"data"` }
PaymentTermsAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-payment-terms_excludeDiscounts
type PoolAPIResult ¶
type PoolAPIResult struct { ID int `json:"id"` Name string `json:"name"` IsDefault bool `json:"isDefault"` }
PoolAPIResult is the structure for an API return from https://api.striven.com/Help/Api/GET-v1-pools
type PoolsAPIResult ¶
type PoolsAPIResult []PoolAPIResult
PoolsAPIResult is the collection of Pool needed to return all available Pools
type ReferralSourcesAPIResult ¶
type ReferralSourcesAPIResult struct { TotalCount int `json:"totalCount"` Data []referralSourceSearchResult `json:"data"` }
ReferralSourcesAPIResult is the structure for an API return from https://api.striven.com/Help/Api/GET-v1-referral-sources
type SalesOrderTypesAPIResult ¶
type SalesOrderTypesAPIResult struct { TotalCount int `json:"totalCount"` Data []salesOrder }
SalesOrderTypesAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-sales-order-types_excludeContractManagedTypes
type ShippingMethodAPIResult ¶
type ShippingMethodAPIResult struct { ShippingMethodID int `json:"shippingMethodId"` ShippingMethod string `json:"shippingMethod"` TrackingURL string `json:"trackingURL"` Active bool `json:"active"` }
ShippingMethodAPIResult is the structure for an item in the API return from https://api.striven.com/Help/Api/GET-v1-shipping-methods
type ShippingMethodsAPIResult ¶
type ShippingMethodsAPIResult []ShippingMethodAPIResult
ShippingMethodsAPIResult is the collection of ShippingMethod needed to return all available ShippingMethods from the API
type Striven ¶
type Striven struct { ClientID string ClientSecret string Context context.Context CancelContext context.CancelFunc Token strivenToken BillCredits billCreditFunc Classes classesFunc Contacts contactsFunc CustomerAssets customerAssetsFunc Customers customersFunc CustomLists customListsFunc Employees employeesFunc InvoiceFormats invoiceFormatsFunc GLCategories glCategoryFunc Industries industriesFunc InventoryLocations inventoryLocationsFunc ItemTypes itemTypesfunc PaymentTerms paymentTermsFunc Pools poolsFunc ReferralSources referralSourcesFunc SalesOrderTypes salesOrderTypesFunc ShippingMethods shippingMethodsFunc Tasks tasksFunc }
Striven is the core object in this module. It is an instance of the Striven API Token and the ID and Secret used to connect.
type TaskCreateParams ¶
type TaskCreateParams struct { TaskName *string `json:"taskName,omitempty"` TaskTypeID *int `json:"taskTypeID,omitempty"` PriorityID *int `json:"priorityID,omitempty"` DueDate *time.Time `json:"dueDate,omitempty"` RequestedByObjectID *int `json:"requestedByObjectID,omitempty"` RequestedByKeyID *int `json:"requestedByKeyID,omitempty"` AccountID *int `json:"accountID,omitempty"` OrderID *int `json:"orderID,omitempty"` ProjectID *int `json:"projectID,omitempty"` MilestoneID *int `json:"milestoneID,omitempty"` TaskDesc *string `json:"taskDesc,omitempty"` AssignedToObjectID *int `json:"assignedToObjectID,omitempty"` AssignedToKeyID *int `json:"assignedToKeyID,omitempty"` AssignToUserByDefault *bool `json:"assignToUserByDefault,omitempty"` DeriveRequestedByUsingEmailFrom *bool `json:"deriveRequestedByUsingEmailFrom,omitempty"` RequestedByEmail *string `json:"requestedByEmail,omitempty"` StatusID *int `json:"statusID,omitempty"` }
TaskCreateParams are the parameters for creating a task in Striven
type TaskCreateResult ¶
type TaskCreateResult struct { TaskID int `json:"taskID,omitempty"` PriorityID int `json:"priorityID,omitempty"` StartDate Timestamp `json:"startDate,omitempty"` DueDate Timestamp `json:"dueDate,omitempty"` DateCreated string `json:"dateCreated,omitempty"` AssignedToObjectID int `json:"assignedToObjectID,omitempty"` AssignedToKeyID int `json:"assignedToKeyID,omitempty"` }
TaskCreateResult is the return value when creating a task
type TasksAPIResult ¶
type TasksAPIResult struct { ID int `json:"id"` TaskName string `json:"taskName"` TaskTypeID int `json:"taskTypeId"` TaskTypeName string `json:"taskTypeName"` AccountID int `json:"accountId"` AccountName string `json:"accountName"` LocationID int `json:"locationId"` LocationName string `json:"locationName"` TaskDescription string `json:"taskDescription"` BudgetHours float64 `json:"budgetHours"` TaskPercentComplete float64 `json:"taskPercentComplete"` DateRequested Timestamp `json:"dateRequested"` DesiredEndDate Timestamp `json:"desiredEndDate"` DesiredStartDate Timestamp `json:"desiredStartDate"` StatusID int `json:"statusId"` Status string `json:"status"` PriorityID int `json:"priorityId"` PriorityName string `json:"priorityName"` DivisionID int `json:"divisionId"` AssignedTo string `json:"assignedTo"` IsRecurring bool `json:"isRecurring"` IsSticky bool `json:"isSticky"` RequestedBy int `json:"requestedBy"` RequestedByName string `json:"requestedByName"` OrderID int `json:"orderId"` OrderName string `json:"orderName"` ProjectID int `json:"projectId"` ProjectName string `json:"projectName"` MilestoneID int `json:"milestoneId"` MilestoneName string `json:"milestoneName"` UseSubcontractor bool `json:"useSubcontractor"` AssignedVendorID int `json:"assignedVendorId"` AssignedVendorName string `json:"assignedVendorName"` PoID int `json:"poId"` PoName string `json:"poName"` PoStatus string `json:"poStatus"` SubContractedWorkStatus string `json:"subContractedWorkStatus"` CreatedBy int `json:"createdBy"` DateCreated Timestamp `json:"dateCreated"` ModifiedBy int `json:"modifiedBy"` DateModified Timestamp `json:"dateModified"` AttachmentCount int `json:"attachmentCount"` NotesLogCount int `json:"notesLogCount"` CustomFields []APICustomField `json:"customFields"` }
TasksAPIResult is the overall structure for an API return from https://api.striven.com/Help/Api/GET-v1-Tasks-TaskID
type Timestamp ¶
Timestamp is a custom time field that can be unmarshalled direct from striven because it's timestamp is not RFC3339
func NewTimestamp ¶
NewTimestamp returns a new Timestamp formatted time based on a real golang time
func NowTimestamp ¶
func NowTimestamp() Timestamp
NowTimestamp returns a new timestamp formatted time with the current time.
func (Timestamp) MarshalJSON ¶
MarshalJSON returns null if Timestamp is not valid (zero). It returns the time formatted in RFC3339 otherwise.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON parses a nullable RFC3339 string into time.
type UpdatedContact ¶
type UpdatedContact struct {
ContactsParam
}
UpdatedContact is the returned contact info from a contact creation request. It is functionally identical to a ContactsParam