NetQuarry.Services Namespace |
The services namespace provides runtime services, such as email processing, alert management, and task-scheduling.
Services are defined in metadata and can contain properties for configuration. A Service references a component and that component must implement the IServiceInfo interface.
Services can be marked as Singleton. This means that the application context object will create only one instance of the service for the life of the application.
Class | Description | |
---|---|---|
AC_AddContactRequest |
ActiveCampaign add contact request
| |
AC_AddContactResponse |
ActiveCampaign add contact response
| |
AC_BaseRequest |
ActiveCampaign base request class
| |
AC_BaseResponse |
Base response class
| |
AC_Contact |
ActiveCampaign contact class
| |
AC_EditContactRequest |
ActiveCampaign edit contact request
| |
AC_EditContactResponse |
ActiveCampaign edit contact response
| |
AC_GetListRequest |
Get list request from ActiveCampaign
| |
AC_GetListResponse |
List response from ActiveCampaign
| |
AC_List |
ActiveCampaign list class
| |
AC_RemoveContactRequest |
ActiveCampaign edit contact request
| |
AC_RemoveContactResponse |
ActiveCampaign remove contact response
| |
ActiveCampaignListener |
Generic handler for ActiveCampaign's API.
https://developers.activecampaign.com/page/webhooks for more ActiveCampaigns documentation on Event Webhooks.
| |
Alert |
A user alert object for alerts managed in the xot_alerts table.
| |
AlertService |
The standard platform alert service. Currently alerts are provided via AJAX while users are logged into the application.
| |
AlertSettings |
Configuration settings regarding alert/page-message delivery.
These specifically apply to page-message as created through
DisplayMessage(String, String, AlertDelivery, Int32, AlertAttrs) or one of its overloads.
| |
AlgoliaLocation |
Specifies a geo location.
| |
AlgoliaQuery |
Holds query parameters for a query against an index.
| |
BlazeAddProductRequest |
The Blaze request to add a product.
| |
BlazeAddress |
The Blaze address object.
| |
BlazeAdjustmentInfo |
The Blaze adjustment information object.
| |
BlazeAsset |
The Blaze asset object.
| |
BlazeBaseData |
The Blaze base data object.
| |
BlazeBaseGetResponse |
Base response of GET operation
| |
BlazeBaseGetResponseWDateRange |
Base response with dates of GET operation
| |
BlazeBaseRequest |
Blaze service base request
| |
BlazeBaseResponse |
Blaze service base response
| |
BlazeBatchAddDetail |
The Blaze batch add detail object.
| |
BlazeBatchDetail |
The Blaze batch detail object.
| |
BlazeBatchQuantityMap |
The Blaze batch quantity object.
| |
BlazeBrand |
The Blaze brand object.
| |
BlazeBundleItem |
The Blaze bundle item object.
| |
BlazeCart |
The Blaze shopping cart object.
| |
BlazeCartItem |
The Blaze shopping cart item.
| |
BlazeCartMinimum |
The Blaze shopping cart mimimum object.
| |
BlazeCartMinimumDetail |
The Blaze shopping cart mimumum detail object.
| |
BlazeCategory |
The Blaze category object.
| |
BlazeCompany |
The Blaze company object.
| |
BlazeCompanyLicense |
The Blaze company license object.
| |
BlazeContact |
The Blaze contact object.
| |
BlazeCultivationTaxResult |
The Blaze cultivation tax result object.
| |
BlazeEmployee |
The Blaze employee object.
| |
BlazeEmployeeOnFleetInfo |
The Blaze OnFleet information object.
| |
BlazeGetBrandsResponse |
The Blaze request to get available brands.
| |
BlazeGetCategoriesResponse |
The Blaze request to get the available categories.
| |
BlazeGetEmployeesResponse |
The Blaze get employee response object.
| |
BlazeGetInventoriesResponse |
The Blaze request to get the available inventories.
| |
BlazeGetInvoicesResponse |
The Blaze request to get the available invoices.
| |
BlazeGetModifiedProductsResponse |
The response to a request to get modified products.
| |
BlazeGetProductsResponse |
The Blaze get product response object.
| |
BlazeGetPurchaseOrdersResponse |
The Blaze get purchase orders response object.
| |
BlazeGetVendorsResponse |
The Blaze get vendors response object.
| |
BlazeInventory |
The Blaze inventory object.
| |
BlazeInvoice |
The Blaze invoice object.
| |
BlazeInvoiceActrivityLog |
The Blaze invoice activity log object.
| |
BlazeInvoiceHistory |
The Blaze invoice history.
| |
BlazeInvoiceRequest |
The Blaze request to get an invoice.
| |
BlazeLocation |
The Blaze location object.
| |
BlazeMedicalCondition |
The Blaze medical condition.
| |
BlazeMember |
The Blaze member object.
| |
BlazeMetrcMap |
The Blaze map object.
| |
BlazeNote |
The Blaze note object.
| |
BlazeOnlineStoreInfo |
The Blaze online store information object.
| |
BlazePoActivityLog |
The Blaze PO activity log object.
| |
BlazePoProductAdd |
The Blaze PO product add object.
| |
BlazePoProductRequest |
The Blaze PO product request.
| |
BlazePoProductRequestResult |
The Blaze PO product request result object.
| |
BlazePotencyAmount |
The Blaze potency amount object.
| |
BlazePriceBreak |
The Blaze price break object.
| |
BlazePriceRange |
The Blaze price range object.
| |
BlazeProduct |
The Blaze product object.
| |
BlazeProductMap |
The Blaze map object.
| |
BlazeProductMetrcInfo |
The Blaze product merchant information object.
| |
BlazePromotionReq |
The Blaze promotion request object.
| |
BlazePurchaseOrder |
The Blaze purchase order object.
| |
BlazePurchaseOrderRequest |
The Blaze purchase order request object.
| |
BlazeQuantity |
The Blaze quantity object.
| |
BlazeQuantityLog |
The Blaze quantity object.
| |
BlazeReceiverInformation |
The Blaze receiver information object.
| |
BlazeRole |
The Blaze role object.
| |
BlazeSession |
The Blaze session object.
| |
BlazeShipperCompany |
The Blaze shipper company object.
| |
BlazeShipperInformation |
The Blaze shipper information object.
| |
BlazeShippingManifest |
The Blaze shipping manifest object.
| |
BlazeTax |
The Blaze tax object.
| |
BlazeTaxInfo |
The Blaze tax information object.
| |
BlazeTaxResult |
The Blaze tax result object.
| |
BlazeTaxTable |
The Blaze tax table object.
| |
BlazeTimeCard |
The Blaze timecard object.
| |
BlazeTookanInfo |
The Blaze Tookan information object.
| |
BlazeTrackingPackage |
The Blaze tracking package object.
| |
BlazeVendor |
The Blaze vendor object.
| |
BlazeWeightTolerance |
The Blaze weight tolerance object.
| |
CallInfo |
An Call instance resource represents a single Twilio Call.
| |
CarrierInfo |
Carrier information obtained from Twilio.
See https://www.twilio.com/docs/api/rest/lookups.
| |
DataExportCommandInfo |
A class specifiying the various elements that make up a MapperCommand for an IDataExportService
| |
DebounceEmailValidator |
Implementation of the debounce.io validator
| |
DocStorageFileInfo |
Return value from the document storage service SaveFile
| |
EmailBounceReader |
Scheduled task that polls the SendGrid API for bounces, spamreports, ...
| |
EmailManager |
Service implementation of the IEmailManager
| |
EmailValidateResult |
Results from a validated email address
| |
EmailValidatorBase |
Base class for validators
| |
EpochMillisecondConverter |
Json converter for epoch datetime fields.
Cannot use Newtonsoft's UnixDateTimeConverter since it converts seconds.
Blaze accpets datetime as epoch milliseconds.
| |
EventType |
Holds information about the event type
| |
FleetLocateAllAssetStatus |
Asset Status response
| |
FleetLocateAssetStatus |
Asset status data
| |
FleetLocateBaseResponse |
Fleet locate service base response
| |
HttpRequestExtensions |
Extension methods for HttpRequest objects.
| |
InvalidPhoneNumberException |
Thrown when a phone number lookup returns 404 (invalid phone number).
| |
MailEventArgs |
Event args used with mail events, e.g. MailBeforeSend and MailAfterSend.
| |
MailgunEmailValidator |
Implementation of the debounce.io validator
| |
MailgunListener |
Mailgun webhook handler
| |
MailService |
The MailService object is a wrapper object around System.Web.Mail that can load it's configuration
properties from the repository database or used stand alone.
| |
MailUtils |
Various utility methods for working with email.
| |
MessageInfo |
A Message resource that represents a single message for use with GetMessage(String) | |
NumberCapabilities |
The posible capabilities of a twilio phone number to receive various types of communications.
A particular phone number may have any combination of these capabilities.
| |
PhoneNumberInfo |
Phone number information obtained from Twilio.
See https://www.twilio.com/docs/api/rest/lookups.
| |
SendGridEvent |
An event to be processed by OnProcessRequest(HttpContext). Correponds, generally, to the xot_email_event table.
https://sendgrid.com/docs/API_Reference/Webhooks/event.html for more SendGrid documentation on Event Webhooks.
| |
SendGridListener |
Generic handler for SendGrid's notification API.
https://sendgrid.com/docs/API_Reference/Webhooks/event.html for more SendGrid documentation on Event Webhooks.
| |
SendGridListenerParseCharsetRequest |
The SendGrid "Character Set and Header Decoding" information for its Inbound Parse Webhook,
https://sendgrid.com/docs/API_Reference/Webhooks/parse.html.
| |
SendGridListenerParseEnvelope |
The SendGrid envelope for its Inbound Parse Webhook,
https://sendgrid.com/docs/API_Reference/Webhooks/parse.html.
| |
ServiceBase |
Simple implementation of a service
| |
ServiceInfos |
Holds a collection of IServiceInfo object describing available services.
| |
SystemMailExtensions |
Email message extensions
| |
TookanAddAgentData |
Add agent response data
| |
TookanAddAgentResponse |
Add agent response
| |
TookanAddTeamData |
Add team data
| |
TookanAddTeamResponse |
Add team response
| |
TookanAgentRequest |
Add agent request
| |
TookanBaseRequest |
Tookan service base request
| |
TookanBaseResponse |
Tookan service base response
| |
TookanCancelTaskRequest |
Cancel task request
| |
TookanCreateTaskData |
Data part of create task response
| |
TookanCreateTaskReponse |
Response data for create task.
| |
TookanCreateTaskRequest |
Data class to create task
| |
TookanCustomField |
Custom field
IMPORTANT : Read the documentation for custom fields at https://tookanapi.docs.apiary.io/#introduction/custom-fields
| |
TookanFleetData |
Fleet data
| |
TookanFleetsData |
The Tookan fleets object.
| |
TookanGenericResponse |
Generic response from Tookan with empty data.
| |
TookanGeoFenceData |
Geofence data
| |
TookanGetAgentLocationResponse |
Agent location response
| |
TookanGetAgentTagsResponse |
Agent tags response
| |
TookanGetAllAgentsData |
Get all agents response data
| |
TookanGetAllAgentsRequest |
Add agent request
| |
TookanGetAllAgentsResponse |
All agents response
| |
TookanGetTaskDetailRequest |
The Tookan task detail request object.
| |
TookanGetTaskDetailRequestByOrder |
The Tookan task detail request by order object.
| |
TookanGetTaskDetailResponse |
The TookanTaskDetail response.
| |
TookanJobAndAgentDetailData |
The Tookan job and agent detail object.
| |
TookanJobAndAgentDetailRequest |
Job and agent detail request
| |
TookanJobAndAgentDetailsResponse |
Job and agent details response
| |
TookanJobData |
The Tookan job object.
| |
TookanListener |
Generic handler for Tookan's notification API.
| |
TookanLocationData |
Location data
| |
TookanPartnerJobsData |
The Tookan partner jobs object.
| |
TookanRecurringTasksData |
The Tookan recurring tasks object.
| |
TookanRouteData |
The Tookan route object.
| |
TookanTask |
The Tookan task object.
| |
TookanTaskDetail |
The detailed information about a task.
| |
TookanTaskField |
The Tookand task field object.
| |
TookanTaskHistory |
The Tookan task history object.
| |
TookanTeamData |
Team Data
| |
TookanTeamDetailData |
Detail data about a particular team.
| |
TookanTeamDetailResponse |
Team detail response
| |
TookanTeamFleetSummaryData |
Summary information about fleets.
| |
TookanTeamRequest |
Team request
| |
TookanUnroutedData |
The Tookan unrouted data object.
| |
TookanViewAllTasksRequest |
Request to view all tasks
| |
TookanViewAllTasksResponse |
Response to view all tasks
| |
TookanWebhookData |
Tookan Webhook data.
IMPORTANT :
- There are inconsistencies in date fields
"completed_datetime": "2019-06-06 14:52:44",
"job_pickup_datetime": "06/06/2019 01:00 pm",
"job_date": "2019-06-06T00:00:00.000Z",
"job_date_utc": "2019-06-06T00:00:00.000Z",
- There are inconsistencies in phone fields. Maybe it's because numbers are entered like this.
"job_pickup_phone": "+1 408-478-5791",
"fleet_phone": "+14084785791",
- Some datetime fields has "invalid date" string in them. I think they didn't check null values.
For pickup tasks, delivery datetime field has "invalid date" in them.
"job_pickup_datetime": "06/06/2019 01:00 pm",
"job_delivery_datetime": "Invalid date",
- Some date fields contain empty string
"started_datetime": "2019-06-06 16:56:19",
"completed_datetime": "",
Opposite also same for delivery tasks.
"job_pickup_datetime": "Invalid date",
"job_delivery_datetime": "06/06/2019 05:45 pm",
- Latitude and longitude fields have different precisions and they are strings.
"job_pickup_latitude": "33.87154",
"job_pickup_longitude": "-117.92466100000001",
"fleet_latitude": "33.8715254",
"fleet_longitude": "-117.9244901",
- If task is not started, "days_started" field contains "-" instead of empty string or 0.
"days_started": "-",
"days_started": "0",
- "distance_in" field contains the distance unit. But, "total_distance" field also contains a unit.
"total_distance_traveled" field's type is integer, while "total_distance" field's type is string.
"distance_in": "KM",
"total_distance": "0.00 Km",
"total_distance_travelled": 0,
| |
TwilioListener |
Listener for Twilio requests.
| |
TwilioNumber |
A twilio phone number.
See the REST API: INCOMING PHONE NUMBERS twilio documentation page.
| |
TwilioPhoneNumber |
Describes a Twilio phone number used for voice or SMS.
| |
UniqueArgs |
Custom platform parameters provided in the original email as SendGrid "Unique Arguments" via unique_args.
When a SendGrid event is received it will include the "Unique Arguments" provided in the original email.
| |
UserSettingsRequiredException |
Exception thrown when required user email settings have not been configured.
| |
ZeroBounceEmailValidator |
Implementation of the debounce.io validator
|
Interface | Description | |
---|---|---|
IActiveCampaign |
Interface implemented by the ActiveCampaign service.
| |
IAlertService |
Interface implemented by services providing alerts to users.
| |
IAlgolia |
Interface implemented by the Algolia service for remote index / search.
| |
IAuthService |
The authorization service.
| |
IBlaze |
Interface implemented by the Blaze service.
| |
IDataExportService |
An interface used by the DataExport set of processes to export a Mapper's set of data to a specific Data format.
The format specified is determined by the Service itself.
| |
IDocStorageService |
The interface for services that implement document storage.
Note that objects implementing this interface should also implement the IServiceInfo interface required of all platform services.
At this time there are two document storage implementations based on this interface:
| |
IDynamsoftScan |
The interface for the Dynamsoft Dynamic Web TWAIN scanner service.
The service supports use of the Dynamsoft Dynamic Web TWAIN ActiveX/Plugin component.
| |
IEmailManager |
Generic way to control the email manager
| |
IEmailService |
Interface that implements an email service.
| |
IEmailValidate |
Manages ZeroBounce or Debounce.io | |
IFleetLocate |
Interface implemented by the Fleet Locate service.
| |
IJwtService |
Generate a JSON Web Token (JWT) single-sign-on token.
As described by the IETF (https://tools.ietf.org/html/rfc7519):
A JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties.
The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature(JWS) structure
or as the plaintext of a JSON Web Encryption(JWE) structure, enabling the claims to be digitally signed or integrity
protected with a Message Authentication Code (MAC) and/or encrypted.
| |
IMessage |
Implemented by Message services
| |
IPushNotification |
The interface through which one can interact with the Push Notification sending service
| |
IServiceInfo |
Interface implemented by core services.
| |
IShortUrl |
Interface through which one requests short urls from a service (e.g. the bitly service which uses https://bitly.com/).
| |
ITookan |
Interface implemented by the Tookan service.
| |
ITwilioAuthentication |
A small interface for a service to generate tokens for Twilio's javascript libraries
| |
ITwilioNumbers |
The interface used to maintain twilio phone numbers.
The interface is implemented by the TwilioSMS service.
| |
ITwilioVoice |
Manages the voice interface with Twilio.
|
Enumeration | Description | |
---|---|---|
AlertAttrs |
Attributes for use with alerts and page messages (created via DisplayMessage(Alert) or one of its overloads).
See Alert.
| |
AlertDelivery |
The available delivery method for alerts (page-messages) as created through
DisplayMessage(String, String, AlertDelivery, Int32, AlertAttrs) or one of its overloads.
| |
BlazeActivityType |
The Blaze activity types.
| |
BlazeAppTarget |
The Blaze application target.
| |
BlazeAssetType |
The type of Blaze asset.
| |
BlazeCannabisType |
The type of cannabis product.
| |
BlazeCartItemStatus |
The statuses for Blaze carts.
| |
BlazeCartMinType |
The Blaze card minimum types.
| |
BlazeCheckoutType |
The Blaze checkout types.
| |
BlazeColorTheme |
The Blaze UI color scheme.
| |
BlazeCompanyType |
The Blaze company type.
| |
BlazeConsumerType |
The Blaze consumer type.
| |
BlazeDiscountType |
The Blaze discount types.
| |
BlazeEnableInventoryType |
The Blaze inventory enable types.
| |
BlazeExciseTaxType |
The Blaze excise tax types.
| |
BlazeFlowerSourceType |
The Blaze flower source types.
| |
BlazeFlowerType |
The Blaze flower types.
| |
BlazeInvoicePaymentStatus |
The Blaze invoice payment status.
| |
BlazeInvoiceStatus |
The Blaze invoice statuses.
| |
BlazeInvoiceTerm |
The Blaze invoice terms.
| |
BlazeMinimumsType |
The Blaze minimums types.
| |
BlazePaymentOption |
The Blaze payment options.
| |
BlazePaymentTerm |
The Blaze payment terms.
| |
BlazePaymentType |
The Blaze payment types.
| |
BlazePoPaymentOption |
The Blaze PO payment options.
| |
BlazePoType |
The Blaze PO type.
| |
BlazeProductSaleType |
The Blaze product sale types.
| |
BlazeProductType |
The Blaze product types.
| |
BlazePurchaseOrderStatus |
The Blaze purchase order statuses.
| |
BlazeReceiveBatchStatus |
The Blaze receive batch statuses.
| |
BlazeRefundOption |
The Blaze refund options.
| |
BlazeRefundType |
The Blaze refund types.
| |
BlazeRequestStatus |
The Blaze request statuses.
| |
BlazeRoundOffType |
The Blaze round-off types.
| |
BlazeShippingManifestStatus |
The Blaze shipping manifest statuses.
| |
BlazeShopType |
The Blaze shop types.
| |
BlazeStorageLocation |
The Blaze storage locations.
| |
BlazeTaxOrder |
The Blze tax order.
| |
BlazeTaxType |
The Blaze tax type.
| |
BlazeTookanStatus |
The Blaze Tookan status.
| |
BlazeTrackTraceSystem |
The Blaze track/trace system.
| |
BlazeTransactionType |
The Blaze transaction type.
| |
BlazeVendorType |
The Blaze vendor types.
| |
BlazeViewType |
The Blaze view types.
| |
BlazeWeightKey |
The Blaze weight keys.
| |
DataExportMode |
Options affecting how to determine whether a Data export is executed online, or offline.
| |
DocStorageOptions | ||
EmailManagerAttributes |
Email manager behavior attributes
| |
EmailManagerType |
The type of email manager service
| |
EmailSendAttrs |
Controls email send behavior.
| |
EmailSendStatus |
The type of email manager service
| |
EmailValidateBehavior |
Attributes that control the behavior of validate
| |
EmailValidateResultCode |
TEXT CODE DESCRIPTION SAFE TO SEND?
Syntax 1 Not an email. No
Spam Trap 2 Spam-trap by ESPs. No
Disposable 3 A temporary, disposable address. No
Accept-All 4 A domain-wide setting. Maybe, Not recommended unless on private server
Deliverable 5 Verified as real address. Yes
Invalid 6 Verified as invalid (Bounce). No
Unknown 7 The server cannot be reached. No
Role 8 Role accounts such as info, support... Maybe, Not recommended
| |
MailerAttrs |
Attributes describing aspects of an email message.
| |
PhoneServiceAttrs |
Attributes affecting the behaviour of phone services.
This affects implementing the IMessage and ITwilioVoice interfaces,
specically the TwilioSMS" service.
| |
S3DocTagOptions |
Options for use with the S3 version of IDocStorageService | |
SendEmailFlags | ||
ServiceAttrs |
Service attributes
| |
SmtpAuthenticationType |
Specifies the authentication mechanism to use when authentication is required to
send messages to an SMTP service using a TCP/IP network socket.
| |
TookanAttributes |
Tookan service behavior attributes
| |
TookanBatteryUsage |
Battery usage
| |
TookanJobType |
Job Type
| |
TookanLayoutType |
Layout type
| |
TookanReturnCode |
When something is wrong with a request, the API will respond with a non-200 status code in the response.
To help you better understand the problem, where possible,
the API overloads a number of different error codes so your application logic has as much visibility as possible into what has gone wrong.
| |
TookanTaskStatus |
Task statuses
IMPORTANT : There is no status text for "5". It's skipped or removed I guess.
| |
TookanTransportType |
Transportation Type
| |
TwilioTokenType |
The different types of token's we can generate for Twilio's javascript libraries
to allow them to make REST calls with our account.
|
private void Send(IAppContext appContext, string sendToList, string templateName, NameValueCollection nameValues) { ServiceInfos svs = appContext.Services; IEmailService mail = (IEmailService)svs.GetServiceInstance("SmtpMail"); NetQuarry.Template tmpl = appContext.Templates[templateName]; string body; string subject; if (tmpl == null) throw new ApplicationException(string.Format(this.TextItems.GetText(IDS_MISSING_TEMPLATE), templateName)); body = tmpl.Replace(nameValues); subject = tmpl.TextItems.GetText("Subject"); try { //--- leave the From field empty, it will default to the value configured in the studio mail.Send(string.Empty, sendToList, subject, body, true); } catch(Exception ex) { //--- log the error then re-throw DevLog.LogMessage("XIssue.Send", "sendMailError", ex); throw; } }