Canada’s Pospisil, Shapovalov to face U.S. in singles at Davis Cup
by Canadian PressMADRID – Canada will go with the same lineup as it tries to record its second win in a row and advance to the quarterfinals of the inaugural Davis Cup Finals.
Vancouver’s Vasek Pospisil, a late replacement for Felix Auger-Aliassime (ankle) yesterday in a 2-1 win over Italy, gets the call for singles and doubles again today against the United States (0-0).
Pospisil, who upset Fabio Fognini yesterday, faces American Reilly Opelka to open the Group F tie.
Denis Shapovalov, who clinched the tie over Italy with an upset of Matteo Berrettini, meets Taylor Fritz in the second singles match.
Shapovalov, from Richmond Hill, Ont., and Pospisil then are scheduled to face Sam Querrey and Jack Sock in doubles. Shapovalov and Pospisil lost a three-set doubles match to Italy yesterday.
The winners of each of the six groups and the next two best teams advance to the quarterfinals.


{{include.solution.hero-desc}}
{{include.solution.features-uptitle}}
{{include.solution.features-subtitle}}
{{feature.text}}


In learning the MON Command Language, it helps to know some of its design philosophy. Commands are usually formed from the first letter of each word in the spoken command name. Command names are of the form Action, Action Object, or Object Action (for example, Go, Display Word, or File Read).
Command names were chosen for being easy to remember, and the command mnemonics are simple abbreviations. The number of basic commands is kept to a minimum - there is just one Display command, for instance. Symbolic MON commands are not case sensitive.
MON features a hierarchical help system. The following types of commands are available:
H // shows the list of commands.
H D // gives general help on display commands.
H DW // gives detailed help on the display word command.
H ops // shows the list of command operands for which on-line help // is available.
H addr // gives detailed help on address operands.
You can enter multiple commands on a single line, separated by “;”. For example, the following line sets the stack pointer and then displays it.
ew sp = a00ff000; dw sp
Command lines can contain C-style comments (for example, “/*This is a comment*/”) and C++ comments (for example, “//...”).
Comments are replaced with a single blank character when the command is being interpreted. Comments are useful for documenting command files.


??
sibling
Married to wife
Married to husband
add spouse
⚭ date place ⚮ date place ✏
⚭ date place
⚮ date place
Children child#n
Children
No (known) children
add child


Convex Optimization Algorithms, Berteskas [2009 Supplement]
07 Oct 2016Convex Optimization Algorithms
Most algorithms for minimizing convex over a convex set make use of at least one of the following techniques:
- Iterative descent. The sequence is such that is a decreasing sequence.
- Approximation, where is obtained by solving at each step a tractable approximation of the original optimization problem. The approximation should improve at each step .
This post covers …
- gradient descent methods
- subgradient methods
- polyhedral approximation methods
- proximal and bundle methods
- interior-point methods
- primal-dual methods
- approximate subgradient methods
Gradient Descent Methods
- of limited use in general optimization theory because they require differentiability
Subgradient Methods
- bear a striking resemblance to gradient methods
- in their simplest form (minimizing a convex over convex set ) …
where is the projection onto , is the learning rate at and is a subgradient.
- A strange property: is possibly .
- However, we are guaranteed that the distance from the optimal set is reduced.
- Comes from the fact that
Polyhedral Approximation Methods
- Compute subgradient at each iteration
- Use previously calculated subgradients to construct piecewise linear approximations of the cost function and/or constraint set.
Outer Linearization: Cutting Plane Methods
-
Key idea: A closed convex set is the intersection of its supporting halfspaces
- is a polyhedral approximation of :
where is the sequence of points generated thus far and is the subgradient computed in step . This is very neat: if you draw a simple diagram, you’ll see that sketches the boundary of . (Try this sketch for a quadratic , for example.)
- Theorem: is an optimal solution.
Limitations:
- instability – the algorithm can take large steps away from the optimum, and in particular might not be a good starting point for .
- computational tractability – number of subgradients used to construct polyhedral approximation increases without bound as . The successive optimization problems become more and more expensive to solve.
- Convergence can be slow. proximal methods are aimed at mitigating instability*
Central Cutting Plane Methods
- defined as before, but …
- is the first component of a central pair
.
- :
where is the best upper bound of the optimal value found so far.
- the analytic center of S_k is one choice for the central point.
- central cutting plane methods are closely related to interior point methods (?)
Inner Linearization: Simplical Decomposition
- approximate with the convex hull of an expanding finite that contains the extreme points of plus an arbitrary . Each x_k gives a cost improvement.
- for differentiable convex and bounded polyhedral .
- useful when:
- non-linear (takes advantage of fact minimizing linear over is easy.
- has a large number of extreme points.
Duality of Outer and Inner Linearization closed, proper, and convex outer linearization of is equivalent to an inner linearization of the conjugate and vice versa.
Generalized Polyhedral Approximation
todo
Proximal Center
- Recall a key problem with the cutting plane method: instability.
- Proposed solution: penalize deviations from a reference point
where is defined as in the cutting plane method and
- adding a proximal term trades off efficiency (must solve a QP) for stability
Proximal and Bundle Methods
Proximal Point Algorithm
Revisit this – geometric intuition is not obvious. What advantage do we obtain from adding an additional term to our objective function?
Let . Then
Proximal Cutting Plane Method
- Just like the cutting plane method, except minimize proximal term.
- Advantage: Increased stability
- Limitations:
- trade-off in choice of parameter . Large faster convergence, less stability. Small slower convergence, more stability.
- number of subgradients used in polyhedral approximation can grow to be large (this problem is inherited from the cutting plane method).
Bundle Methods
- the proximal center is not constrained to be , as it is in the proximal cutting plane method; rather, it can be any ,
- todo: revisit.
Dual Proximal Point Algorithms
todo
Interior Point Methods
Optimization problems with inequality constraints:
where the are convex, as is , a closed convex set. Let
be the interior of the set defined by the inequality constraints. is non-empty by assumption.
- Key Idea: a barrier function to the cost that is defined on .
- Key Property:
- It is in this sense that is a barrier.
- Examples:
- The barrier method adds a parameter sequence s.t. , .
- At each iteration, must find …
- Can use Newton’s Method to solve for each iterate .
[BV04] Interlude
Newton’s Method with Equality Constraints
Goal: Solve
has optimality conditions
or, more succintly,
In Newton’s Method, we replace the objective function with its second-order Taylor approximation near x:
This gives the KKT conditions
where the optimal solution to the approximated objective, the optimal dual variable.
Infeasible start Newton Method
If we start with an infeasible , then our conditions look almost exactly the same as before, except now it is possible that
is the residual vector for the linear inequality constraints. We can interpret the above equations as a primal-dual method for the equality constrained problem. We define the dual residual and primal residual as
We want to and to equal zero (remember, they are residuals). In particular, we want to take a small step so that , where is our current estimate of . Since
where is the differential operator, we want to pick such that
Our optimality conditions become
If we write , then the optimality conditions look exactly like those for the feasible start Newton’s method, with
, the infeasible Newton step is the same as the primal part of the primal-dual step, and the associated dual vector is the primal-dual variable .
Disadvantage of infeasible start Netwon method: hard to know whether problem is wholly infeasible (useful when you know it’s feasible but unsure how to find a feasible point). Also slow to converge to feasibility.
Inequality constrained minimization
Problem of interest:
Recall the KKT conditions:
Interior-point methods solve the KKT conditions by applying Newton’s method to a sequence of equality constrained problems / a sequence of modified versions of the KKT conditions.
Hierarchy of methods:
- Analytical solutions for linear equality constrained quadratic problems.
- Newton’s method for linear equality constrained problems with twice differentiable objective functions –> a sequence of (1).
- Interior-point methods for linear equality & inequality constrained problems by reducing to a sequence of linear equality constrained problems.
The idea of a barrier is intuitive ~
A point on the central point is at most suboptimal, the number of inequality constraints. The barrier method conveniently gives us dual feasible points along the way (see [BV04] for details).
The barrier method can be extended to cone programming by using the generalized logarithm.
end interlude
Primal-Dual Methods for Linear Programming
- As of ‘09, these were one of the most popular methods for solving linear programs.
Approximate Subgradient Methods
Using approximate subgradients can lead to computational savings or even faster convergence.
-Subgradient methods An -subgradient is just like a normal subgradient except it can be up to below the graph of the function. More formally, is an -subgradient* of at if
Note that
Geometrically, is an -subgradient of only if the latter’s epigraph is contained in the positive halfspace carved out by the hyperplane with normal that passes through . This can be seen by rearranging the definition to get
-subgradient methods are nearly identical to subgradient methods, except the former aim to converge to the $\epsilon$-optimal set, while the latter converge to the optimal set.
Incremental Subgradient Methods
- Apply to minmization over closed convex set with additive cost function , where each is convex.
- This is a generalization of stochastic gradient descent.
- ISM consists of outer iterations, each of which are a cycle of $m$ inner iterations.
- Key idea: If (weight vector) has not changed too much during an iteration, then the subgradient at the -th inner iteration is approximately equal to the subgradient of at (i.e., ’s value at the beginning of the cycle).
Subgradient Methods with Randomization
- In SGD, randomly permuting the data samples can speed convergence and decrease error
- TODO: Look into this
Incremental Proximal Methods
- like incremental subgradient methods … todo


Gecode::Int::GCC::VarNode Class Reference
Inherits Gecode::Int::GCC::VVGNode.Detailed Description
Variable Node
Definition at line 104 of file graphsup.icc.
Constructors and initialization | |
| VarNode (int i, int oidx) | |
| Creates a variable node with index i. | |
Access | |
| template<BC > | |
| Edge * | get_match (void) |
| return the matching edge on the node | |
| int | get_info (void) |
| return the variable index of the node | |
| bool | is_matched (BC) |
| returns whether the node is still matchable | |
| template<BC > | |
| bool | matched (void) |
| tests whether the node is matched or not | |
| bool | removed (void) |
| Variable Node. | |
Update | |
| void | set_info (int i) |
| set the node info to i | |
| template<BC > | |
| void | set_match (Edge *m) |
| set the pointer of the matching edge to m | |
| template<BC > | |
| void | match (void) |
| match the node | |
| template<BC > | |
| void | unmatch (void) |
| unmatch the node | |
Public Attributes | |
| unsigned int | var |
| stores the variable index of the node | |
| unsigned int | noe |
| stores the number of incident edges on the node | |
| unsigned int | xindex |
| stores the variable index of the node |
Constructor & Destructor Documentation
|
|
Creates a variable node with index i.
Definition at line 685 of file graphsup.icc. |
Member Function Documentation
|
|
return the matching edge on the node
Definition at line 735 of file graphsup.icc. |
|
|
return the variable index of the node
Implements Gecode::Int::GCC::VVGNode. Definition at line 749 of file graphsup.icc. |
|
|
returns whether the node is still matchable
Implements Gecode::Int::GCC::VVGNode. Definition at line 696 of file graphsup.icc. |
|
|
tests whether the node is matched or not
Definition at line 706 of file graphsup.icc. |
|
|
Variable Node.
Implements Gecode::Int::GCC::VVGNode. Definition at line 678 of file graphsup.icc. |
|
|
set the node info to i
Implements Gecode::Int::GCC::VVGNode. Definition at line 744 of file graphsup.icc. |
|
|
set the pointer of the matching edge to m
Definition at line 725 of file graphsup.icc. |
|
|
match the node
Definition at line 712 of file graphsup.icc. |
|
|
unmatch the node
Definition at line 718 of file graphsup.icc. |
Member Data Documentation
|
|
stores the variable index of the node
Definition at line 113 of file graphsup.icc. |
|
|
stores the number of incident edges on the node
Definition at line 115 of file graphsup.icc. |
|
|
stores the variable index of the node
Definition at line 118 of file graphsup.icc. |
The documentation for this class was generated from the following file:
- gecode/int/gcc/graphsup.icc (Revision: 3512)


Looking for some computer parts?
Look no further.
Truetech is your one-stop shop for all of your computer part needs. We offer quality products at a low price, guaranteed!
Click on the products tab to view our selection of parts!
Truetech is your one-stop shop for all of your computer part needs. We offer quality products at a low price, guaranteed!
Click on the products tab to view our selection of parts!


The default Reality Viewer.
An event that is raised when the presenting reality viewer is changed.
An event that provides a session for sending / receiving commands to / from a reality.
The session passed via this event can represent either endpoint of a connection between RealityViewer <--> RealityAugmenter/RealityManager.
If running in a RealityAugmenter, the session represents a connection to a RealityViewer.
If running in a RealityViewer, the session represents a connection to a RealityAugmenter.
The URI for the currently presenting Reality Viewer.
A collection of connected sessions.
If running in a RealityAugmenter, this collection represents connections to any loaded RealityViewers.
If running in a RealityViewer, this collection represents connections to any RealityAugmenters.
Install the specified reality viewer
Request a reality viewer to be presented.
Ask a reality to move the stage to the given geolocation
Deprecated. Use [[RealityService#request]]
Ask a reality to move the stage to the given geolocation
Uninstall the specified reality viewer
Generated using TypeDoc
A service which makes requests to manage the reality viewer.


On this page:
Note: You can follow the instructions below to set up WebDAV from within your operating system, or you can use a third-party client such as Cyberduck or AnyClient. For the latter, see Uploading files to Resources or Drop Box using WebDAV with AnyClient. Some users have reported better performance with one method than with another; if you have difficulties, try a different client.
WebDAV (Web-based Distributed Authoring and Versioning) allows you to upload and download large files, multiple files, or folders of files to your course or project site more easily.
Before you set up WebDAV, at least one object (i.e., file or folder) must be in the destination Resources or Drop Box tool. For help, see Resources or Adding, editing, or deleting an item in Drop Box.
Saving files directly to WebDAV (i.e., from within an application, such as Word, Excel, or Internet Explorer) does not work reliably. For best results, save the file to your computer first, and then upload it to your site.
Note: Filenames that include certain characters cannot be accepted. For a list of unsupported characters, see Unsupported characters.
To connect to WebDAV in Windows 7, first turn on the WebClient service, and then create the WebDAV connection.
Start
menu, choose Control Panel
, then
System and Security
, then Administrative Tools
, and
then Services
.
WebClient
, set the service to Automatic
,
and then click Apply
.
Start
.
OK
to close the Control Panel.
Start
menu, right-click Computer
, and select
Map network drive...
.
Contact your site administrator for the URL's format. It will likely include the siteID for your site.
Note: For instructions on finding your siteID, see Determining your site's siteID.
You should now be able to drag and drop files and folders between your
computer and the site to which you just connected. To delete an item,
right-click it and select Delete
.
If you have difficulty dragging and dropping, right-click the file or
folder you want to copy, and choose Copy
. Then right-click
the directory you want to put it in, and choose Paste
.
You may need to refresh your browser for the file to appear in your directory in Resources or Drop Box.
Note: Connecting to your site using WebDAV on a computer running Windows Vista does not work reliably. However, Microsoft has a software update available that may help correct connection problems for some users. For information about the update and how to download it, see article 907306 at the Microsoft Help and Support web site.
Search Microsoft Help and Support.
To add a shortcut to your Windows Vista computer that allows you to upload and access files using WebDAV:
Start
menu, right-click Computer
and
select Map Network Drive...
.
Map Network Drive
window, click Connect to
a Web site that you can use to store your documents and pictures
,
and then click Next
.
Choose a custom network location
, and then click
Next
.
Next
.
Contact your site administrator for the URL's format. It will likely include the siteID for your site.
Note: For instructions on finding your siteID, see Determining your site's siteID.
You should now be able to drag and drop files and folders between your
computer and the sites to which you just connected. To open a folder,
right-click it and choose Explore
or Open
. To
delete an item, right-click it and select Delete
.
If you have difficulty dragging and dropping, right-click the file or
folder you want to copy, and choose Copy
. Then right-click
the directory you want to put it in, and choose Paste
.
You may need to refresh your browser for the file to appear in your directory in Resources or Drop Box.
To use the Add Network Place Wizard to add a shortcut to your computer that allows you to upload and access files in Resources or Drop Box using WebDAV:
My Network Places
.
Add a network
place
.
Next
.
Choose another network location
, and then click
Next
.
Contact your site administrator for the URL's format. It will likely include the siteID for your site.
Note: For instructions on finding your siteID, see Determining your site's siteID.
Finish
.
You may now drag and drop files and folders between your computer and the
sites to which you just connected. However, you cannot delete items
from a site by dragging them to the Recycle Bin on your desktop. To
delete an item, right-click it and select Delete
.


{% include linkrefs.html %}
Overview
To get started, see RQ Data Connect Guide.
Authentication
This API supports many different methods of authentication, see {{AuthenticationOptions}}.
Endpoints
- Sandbox: https://rqdataconnectdemo.iqmetrix.net
- Production: https://rqdataconnect.iqmetrix.net
Resources
Category
{
"CategoryNumber": "10101012",
"Category": "Financing",
"CategoryPath": ">> Activations >> Financing"
}
| Name | Description |
|---|---|
CategoryNumber (NVARCHAR (100) ) |
Identifier for the Category |
Category (NVARCHAR (MAX) ) |
Category Name |
CategoryPath (NVARCHAR (MAX) ) |
Category |
Store
{
"StoreID": "1",
"City": "Phoenix",
"Address": "27617 Commerce Center Dr",
"StoreName": "Altera Kiosk"
}
| Name | Description |
|---|---|
StoreID (Integer ) |
Identifier for a Store in RQ |
City (String ) |
City |
Address (String ) |
Address |
StoreName (String ) |
Store name |
CashIn
{
"amount": "0",
"cash_in_id": "6882",
"comment": "",
"employee_id": "4",
"employee_id_2": "4",
"employee_name": "John Tester",
"employee_name_2": "John Tester",
"in_date": "2009-10-27T09:35:30.767",
"store_id": "1",
"terminal_id": "0"
}
| Name | Description |
|---|---|
amount (MONEY ) |
Cash in amount |
cash_in_id (INTEGER ) |
Internal identifier in RQ |
comment (VARCHAR(2000) ) |
Comment |
employee_id (INTEGER ) |
Identifier for an employee in RQ |
employee_id_2 (INTEGER ) |
Identifier for an employee in RQ |
employee_name (VARCHAR(MAX) ) |
Name of employee who performed cash in |
employee_name_2 (VARCHAR(MAX) ) |
Name of employee who verified cash in |
in_date (DateTime ) |
Cash in date |
store_id (INTEGER ) |
Identifier for a store in RQ |
terminal_id (INTEGER ) |
Identifier for a terminal in RQ |
CashOut
{
"amount": "332478",
"cash_out_id": "104253",
"comment": "b",
"employee_id": "2863",
"employee_id_2": "2863",
"employee_name": "iQmetrix Employee",
"employee_name_2": "iQmetrix Employee",
"out_date": "2011-04-13T11:35:23.32",
"store_id": "1",
"terminal_id": "0"
}
| Name | Description |
|---|---|
amount (MONEY ) |
Cash out amount |
cash_out_id (INTEGER ) |
Internal identifier in RQ |
comment (VARCHAR(5000) ) |
Comment |
employee_id (INTEGER ) |
Identifier for an employee in RQ |
employee_id_2 (INTEGER ) |
Identifier for an employee in RQ |
employee_name (VARCHAR(MAX) ) |
Name of employee who performed cash out |
employee_name_2 (VARCHAR(MAX) ) |
Name of employee who verified cash out |
out_date (DateTime ) |
Cash out date |
store_id (INTEGER ) |
Identifier for a store in RQ |
terminal_id (INTEGER ) |
Identifier for a terminal in RQ |
OriginalSalesInvoice
{
"invoice_id": "1265314",
"orig_date": "2013-04-09T08:23:51.93",
"orig_employee_id": "45",
"orig_employee_name": "iQmetrix Employee",
"orig_invoice_id": "1265312",
"orig_receipt": "00001IN1805",
"orig_store_id": "1",
"orig_terminal_id": "0",
"orig_workstation": "null",
"store_id": "1"
}
| Name | Description |
|---|---|
invoice_id (INTEGER ) |
Internal identifier in RQ |
orig_date (DateTime ) |
Invoice date |
orig_employee_id (INTEGER ) |
Identifier for an employee in RQ |
orig_employee_name (VARCHAR(MAX) ) |
Name of employee on invoice |
orig_invoice_id (INTEGER ) |
Identifier of invoice in RQ |
orig_receipt (VARCHAR(14) ) |
Receipt number |
orig_store_id (INTEGER ) |
Identifier for a store in RQ |
orig_terminal_id (INTEGER ) |
Identifier for a terminal in RQ |
orig_workstation (VARCHAR(50) ) |
Workstation |
store_id (INTEGER ) |
Identifier for a store in RQ |
PunchClockEntry
{
"employee_id": "2",
"employee_name": "iQmetrix Employee",
"employee_verified": "true",
"in_comment": "",
"manager_verified": "false",
"out_comment": "Auto-Punch Out",
"punch_id": "7341",
"statue": "1",
"store_id": "1",
"time_in": "2010-01-04T08:00:00",
"time_out": "2010-01-04T12:33:00"
}
| Name | Description |
|---|---|
employee_id (INTEGER ) |
Identifier for an employee in RQ |
employee_name (NVARCHAR (MAX) ) |
Name of employee on punch |
employee_verified (BIT ) |
A flag to indicate employee verification of punch |
in_comment (VARCHAR(100) ) |
Comment for punch in |
manager_verified (BIT ) |
A flag to indicate manager verification of punch |
out_comment (VARCHAR(100) ) |
Comment for punch out |
punch_id (INTEGER ) |
Internal identifier for punch in RQ |
statue (TINYINT ) |
Standard = 1, Edited = 1, Added = 2, Deleted = 3 |
store_id (INTEGER ) |
Identifier for a store in RQ |
time_in (DateTime ) |
Punch in time |
time_out (DateTime ) |
Punch out time |
PunchClockEntryRevision
{
"comment": "wrong location - entered correctly at corporate office",
"employee": "Cathy Day",
"employee_id": "107",
"orig_time_in": "2010-01-04T06:12:52.79",
"orig_time_out": "2010-01-04T15:06:36.677",
"punch_id": "6276",
"revised_by_employee": "Dayle Paulson",
"revised_by_employee_id": "7",
"revised_date": "2010-01-14T16:06:18.25",
"revised_time_in": "null",
"revised_time_out": "null",
"revision_id": "1567",
"revision_type": "3",
"store_id": "1"
}
| Name | Description |
|---|---|
comment (VARCHAR(255) ) |
Revision comment |
employee (VARCHAR(MAX) ) |
Employee on revision |
employee_id (INTEGER ) |
Identifier for an employee in RQ |
orig_time_in (DateTime ) |
Original punch in time |
orig_time_out (DateTime ) |
Original punch out time |
punch_id (INTEGER ) |
Internal identifier for punch in RQ |
revised_by_employee (VARCHAR(MAX) ) |
Employee making revision |
revised_by_employee_id (INTEGER ) |
Identifier for an employee in RQ |
revised_date (DateTime ) |
Date and time punch was revised |
revised_time_in (DateTime ) |
Revised punch in |
revised_time_out (DateTime ) |
Revised punch out |
revision_id (INTEGER ) |
Internal identifier in RQ |
revision_type (TINYINT ) |
Not Specified = 0, Edit = 1, Addition = 2, Deletion = 3 |
store_id (INTEGER ) |
Identifier for a store in RQ |
SaleInvoiceCoupon
{
"Amount": "3.5",
"DateCreated": "2012-06-11T13:13:51.74",
"Description": "Normal Coupon",
"InvoiceIDByStore": "00001IN1001",
"SaleInvoiceID": "1263859",
"StoreID1": "1"
}
| Name | Description |
|---|---|
Amount (MONEY ) |
Amount on coupon |
DateCreated (DateTime ) |
Date created |
Description (NVARCHAR(MAX) ) |
Description |
InvoiceIDByStore (VARCHAR(14) ) |
Invoice |
SaleInvoiceID (INTEGER ) |
Internal identifier in RQ |
StoreID1 (INTEGER ) |
Identifier for a store in RQ |
SaleInvoicePayment
{
"amount": "152.25",
"change_amount": "0",
"comments": "",
"customer_id": "null",
"customer_member_num": "null",
"employee_id": "4",
"employee_name": "John Tester",
"employee_name_3": "John Tester",
"invoice_id": "524371",
"is_bill_payment": "0",
"payment_type": "Cash",
"receipt_number": "00001IN117",
"store_id": "1",
"terminal_id": "0",
"trans_create_time": "2010-03-10T15:20:19.323",
"trans_logged_time": "null",
"workstation_name": "null"
}
| Name | Description |
|---|---|
amount (MONEY ) |
Amount |
change_amount (MONEY ) |
Change given |
comments (TEXT ) |
Comments |
customer_id (INTEGER ) |
Identifier for a customer in RQ |
customer_member_num (VARCHAR(30) ) |
Customer member number in RQ |
employee_id (INTEGER ) |
Identifier for an employee in RQ |
employee_name (VARCHAR(MAX) ) |
Name of employee in RQ |
employee_name_3 (VARCHAR(MAX) ) |
Name of employee in RQ |
invoice_id (INTEGER ) |
Internal identifier in RQ |
is_bill_payment (BIT ) |
A flag to indicate if this is a bill payment |
payment_type (NVARCHAR(MAX) ) |
Payment type |
receipt_number (VARCHAR(14) ) |
Receipt number |
store_id (INTEGER ) |
Identifier for a store in RQ |
terminal_id (INTEGER ) |
Identifier for a terminal in RQ |
trans_create_time (DateTime ) |
Transaction created time |
trans_logged_time (DateTime ) |
Transaction logged time |
workstation_name (VARCHAR(50) ) |
Workstation name |
SaleInvoiceProduct
{
"Activation": "0",
"AssociationNumber": "1",
"category_number": "10101126",
"category_path": ">> Accessories >> Antennas",
"cost": "6.96",
"Discount": "0",
"employee_id": "2892",
"employee_name": "iQmetrix Employee",
"invoice_id": "1267257",
"item_logged_time": "2015-03-03T07:40:29.493",
"list_price": "1",
"override_amt": "0",
"Priority": "1",
"product_description": "ADAPTER CABLE USB727/760- Test",
"product_id": "ASANUN000001",
"product_type": "Regular Global Product",
"quantity": "1",
"receipt_number": "00416IN4417",
"Return": "0",
"sale_price": "1",
"store_id": "221",
"terminal_id": "0",
"workstation_name": "TEMP-W530-W8"
}
| Name | Description |
|---|---|
Activation (INTEGER ) |
A flag to indicate if this is an activated product |
AssociationNumber (INTEGER ) |
Association number in rq |
category_number (VARCHAR(150) ) |
Internal identifier for a Category in RQ |
category_path (VARCHAR(150) ) |
Category |
cost (MONEY ) |
Cost |
Discount (MONEY ) |
A flag to indicate if this is a discounted product |
employee_id (INTEGER ) |
Identifier for an employee in RQ |
employee_name (VARCHAR(250) ) |
Name of employee in RQ |
invoice_id (INTEGER ) |
Internal identifier in RQ |
item_logged_time (DateTime ) |
Time the product was added to the invoice |
list_price (MONEY ) |
List price |
override_amt (MONEY ) |
Override amount |
Priority (INTEGER ) |
A number representing the priority of the product on the invoice |
product_description (NVARCHAR(MAX) ) |
Description |
product_id (VARCHAR(250) ) |
Identifier for a product in RQ |
product_type (VARCHAR(250) ) |
Product type in RQ |
quantity (INTEGER ) |
Quantity |
receipt_number (VARCHAR(50) ) |
Receipt number in RQ |
Return (INTEGER ) |
A flag to indicate if this is a returned product |
sale_price (MONEY ) |
Sale price |
store_id (INTEGER ) |
Identifier for a store in RQ |
terminal_id (INTEGER ) |
Transaction logged time |
workstation_name (VARCHAR(100) ) |
Workstation name |
SaleInvoiceTax
{
"DateCreated": "2010-05-28T15:55:38.78",
"InvoiceIDByStore": "00001IN193",
"SaleInvoiceID": "812306",
"StoreID1": "1",
"Tax": "0"
}
| Name | Description |
|---|---|
DateCreated (DateTime ) |
Created date |
InvoiceIDByStore (VARCHAR(14) ) |
Invoice number |
SaleInvoiceID (INTEGER ) |
Identifier for an invoice in RQ |
StoreID1 (INTEGER ) |
Identifier for a store in RQ |
Tax (MONEY ) |
Tax amount |
Relationship
{
"CompanyID": "22575",
"CompanyName": "KENTEL"
}
| Name | Description |
|---|---|
CompanyID (INTEGER ) |
Identifier for a Company |
CompanyName (VARCHAR(50) ) |
Company name |
Requests
Getting Partner Relationships
Request
GET /partner/relationships?Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}}
Example
GET /partner/relationships
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/relationships"
Using RestSharp;
at the top of your file.
static IRestResponse GettingPartnerRelationships()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/relationships");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingPartnerRelationships() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/relationships");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/relationships', {
}
puts response
Response
Array[[relationship](#Relationship)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"CompanyID": 22575,
"CompanyName": "KENTEL"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"CompanyID": 22575,
"CompanyName": "KENTEL"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
CompanyID,CompanyName 22575,KENTEL
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Categories for a Company
Request
GET /partner/Envysion/Categories?CompanyId={CompanyId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}}
Example
GET /partner/Envysion/Categories?CompanyId=22575
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Categories?CompanyId=22575"
Using RestSharp;
at the top of your file.
static IRestResponse GettingCategoriesForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Categories?CompanyId=22575");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingCategoriesForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Categories?CompanyId=22575");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Categories?CompanyId=22575', {
}
puts response
Response
Array[[category](#Category)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"CategoryNumber": "10101012",
"Category": "Financing",
"CategoryPath": ">> Activations >> Financing"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"CategoryNumber": "10101012",
"Category": "Financing",
"CategoryPath": ">> Activations >> Financing"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
CategoryNumber,Category,CategoryPath 10101012,Financing,>> Activations >> Financing
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Stores for a Company
Request
GET /partner/Envysion/Stores?CompanyId={CompanyId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}}
Example
GET /partner/Envysion/Stores?CompanyId=22575
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Stores?CompanyId=22575"
Using RestSharp;
at the top of your file.
static IRestResponse GettingStoresForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Stores?CompanyId=22575");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingStoresForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Stores?CompanyId=22575");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/Stores?CompanyId=22575', {
}
puts response
Response
Array[[store](#Store)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"StoreID": 1,
"City": "Phoenix",
"Address": "27617 Commerce Center Dr",
"StoreName": "Altera Kiosk"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"StoreID": 1,
"City": "Phoenix",
"Address": "27617 Commerce Center Dr",
"StoreName": "Altera Kiosk"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
StoreID,City,Address,StoreName 1,Phoenix,27617 Commerce Center Dr,Altera Kiosk
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Cash Ins for a Company
Request
GET /partner/Envysion/CashIns?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/CashIns?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashIns?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingCashInsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashIns?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingCashInsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashIns?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashIns?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[cashin](#CashIn)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"amount": 0,
"cash_in_id": 6882,
"comment": "",
"employee_id": 4,
"employee_id_2": 4,
"employee_name": "John Tester",
"employee_name_2": "John Tester",
"in_date": "2009-10-27T09:35:30.767",
"store_id": 1,
"terminal_id": 0
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"amount": 0,
"cash_in_id": 6882,
"comment": "",
"employee_id": 4,
"employee_id_2": 4,
"employee_name": "John Tester",
"employee_name_2": "John Tester",
"in_date": "2009-10-27T09:35:30.767",
"store_id": 1,
"terminal_id": 0
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
amount,cash_in_id,comment,employee_id,employee_id_2,employee_name,employee_name_2,in_date,store_id,terminal_id 0,6882,,4,4,John Tester,John Tester,2009-10-27T09:35:30.767,1,0
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Cash Outs for a Company
Request
GET /partner/Envysion/CashOuts?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/CashOuts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashOuts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingCashOutsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashOuts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingCashOutsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashOuts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/CashOuts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[cashout](#CashOut)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"amount": 332478,
"cash_out_id": 104253,
"comment": "b",
"employee_id": 2863,
"employee_id_2": 2863,
"employee_name": "iQmetrix Employee",
"employee_name_2": "iQmetrix Employee",
"out_date": "2011-04-13T11:35:23.32",
"store_id": 1,
"terminal_id": 0
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"amount": 332478,
"cash_out_id": 104253,
"comment": "b",
"employee_id": 2863,
"employee_id_2": 2863,
"employee_name": "iQmetrix Employee",
"employee_name_2": "iQmetrix Employee",
"out_date": "2011-04-13T11:35:23.32",
"store_id": 1,
"terminal_id": 0
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
amount,cash_out_id,comment,employee_id,employee_id_2,employee_name,employee_name_2,out_date,store_id,terminal_id 332478,104253,b,2863,2863,iQmetrix Employee,iQmetrix Employee,2011-04-13T11:35:23.32,1,0
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Original Sales Invoices for a Company
Request
GET /partner/Envysion/OriginalSaleInvoice?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/OriginalSaleInvoice?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/OriginalSaleInvoice?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingOriginalSalesInvoicesForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/OriginalSaleInvoice?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingOriginalSalesInvoicesForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/OriginalSaleInvoice?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/OriginalSaleInvoice?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[originalsalesinvoice](#OriginalSalesInvoice)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"invoice_id": 1265314,
"orig_date": "2013-04-09T08:23:51.93",
"orig_employee_id": 45,
"orig_employee_name": "iQmetrix Employee",
"orig_invoice_id": 1265312,
"orig_receipt": "00001IN1805",
"orig_store_id": 1,
"orig_terminal_id": 0,
"orig_workstation": "null",
"store_id": 1
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"invoice_id": 1265314,
"orig_date": "2013-04-09T08:23:51.93",
"orig_employee_id": 45,
"orig_employee_name": "iQmetrix Employee",
"orig_invoice_id": 1265312,
"orig_receipt": "00001IN1805",
"orig_store_id": 1,
"orig_terminal_id": 0,
"orig_workstation": "null",
"store_id": 1
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
invoice_id,orig_date,orig_employee_id,orig_employee_name,orig_invoice_id,orig_receipt,orig_store_id,orig_terminal_id,orig_workstation,store_id 1265314,2013-04-09T08:23:51.93,45,iQmetrix Employee,1265312,00001IN1805,1,0,null,1
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Punch Clock Entries for a Company
Request
GET /partner/Envysion/PunchClock?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/PunchClock?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClock?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingPunchClockEntriesForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClock?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingPunchClockEntriesForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClock?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClock?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[punchclockentry](#PunchClockEntry)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"employee_id": 2,
"employee_name": "iQmetrix Employee",
"employee_verified": true,
"in_comment": "",
"manager_verified": false,
"out_comment": "Auto-Punch Out",
"punch_id": 7341,
"statue": 1,
"store_id": 1,
"time_in": "2010-01-04T08:00:00",
"time_out": "2010-01-04T12:33:00"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"employee_id": 2,
"employee_name": "iQmetrix Employee",
"employee_verified": true,
"in_comment": "",
"manager_verified": false,
"out_comment": "Auto-Punch Out",
"punch_id": 7341,
"statue": 1,
"store_id": 1,
"time_in": "2010-01-04T08:00:00",
"time_out": "2010-01-04T12:33:00"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
employee_id,employee_name,employee_verified,in_comment,manager_verified,out_comment,punch_id,statue,store_id,time_in,time_out 2,iQmetrix Employee,true,,false,Auto-Punch Out,7341,1,1,2010-01-04T08:00:00,2010-01-04T12:33:00
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Punch Clock Entries Revisions for a Company
Request
GET /partner/Envysion/PunchClockRevisions?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/PunchClockRevisions?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClockRevisions?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingPunchClockEntriesRevisionsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClockRevisions?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingPunchClockEntriesRevisionsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClockRevisions?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/PunchClockRevisions?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[punchclockentryrevision](#PunchClockEntryRevision)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"comment": "wrong location - entered correctly at corporate office",
"employee": "Cathy Day",
"employee_id": 107,
"orig_time_in": "2010-01-04T06:12:52.79",
"orig_time_out": "2010-01-04T15:06:36.677",
"punch_id": 6276,
"revised_by_employee": "Dayle Paulson",
"revised_by_employee_id": 7,
"revised_date": "2010-01-14T16:06:18.25",
"revised_time_in": "null",
"revised_time_out": "null",
"revision_id": 1567,
"revision_type": 3,
"store_id": 1
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"comment": "wrong location - entered correctly at corporate office",
"employee": "Cathy Day",
"employee_id": 107,
"orig_time_in": "2010-01-04T06:12:52.79",
"orig_time_out": "2010-01-04T15:06:36.677",
"punch_id": 6276,
"revised_by_employee": "Dayle Paulson",
"revised_by_employee_id": 7,
"revised_date": "2010-01-14T16:06:18.25",
"revised_time_in": "null",
"revised_time_out": "null",
"revision_id": 1567,
"revision_type": 3,
"store_id": 1
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
comment,employee,employee_id,orig_time_in,orig_time_out,punch_id,revised_by_employee,revised_by_employee_id,revised_date,revised_time_in,revised_time_out,revision_id,revision_type,store_id wrong location - entered correctly at corporate office,Cathy Day,107,2010-01-04T06:12:52.79,2010-01-04T15:06:36.677,6276,Dayle Paulson,7,2010-01-14T16:06:18.25,null,null,1567,3,1
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Sale Invoice Coupons for a Company
Request
GET /partner/Envysion/SaleInvoiceCoupons?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/SaleInvoiceCoupons?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceCoupons?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingSaleInvoiceCouponsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceCoupons?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingSaleInvoiceCouponsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceCoupons?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceCoupons?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[saleinvoicecoupon](#SaleInvoiceCoupon)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"Amount": 3.5,
"DateCreated": "2012-06-11T13:13:51.74",
"Description": "Normal Coupon",
"InvoiceIDByStore": "00001IN1001",
"SaleInvoiceID": 1263859,
"StoreID1": 1
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"Amount": 3.5,
"DateCreated": "2012-06-11T13:13:51.74",
"Description": "Normal Coupon",
"InvoiceIDByStore": "00001IN1001",
"SaleInvoiceID": 1263859,
"StoreID1": 1
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
Amount,DateCreated,Description,InvoiceIDByStore,SaleInvoiceID,StoreID1 3.5,2012-06-11T13:13:51.74,Normal Coupon,00001IN1001,1263859,1
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Sale Invoice Payments for a Company
Request
GET /partner/Envysion/SaleInvoicePayments?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/SaleInvoicePayments?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoicePayments?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingSaleInvoicePaymentsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoicePayments?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingSaleInvoicePaymentsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoicePayments?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoicePayments?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[saleinvoicepayment](#SaleInvoicePayment)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"amount": 152.25,
"change_amount": 0,
"comments": "",
"customer_id": "null",
"customer_member_num": "null",
"employee_id": 4,
"employee_name": "John Tester",
"employee_name_3": "John Tester",
"invoice_id": 524371,
"is_bill_payment": 0,
"payment_type": "Cash",
"receipt_number": "00001IN117",
"store_id": 1,
"terminal_id": 0,
"trans_create_time": "2010-03-10T15:20:19.323",
"trans_logged_time": "null",
"workstation_name": "null"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"amount": 152.25,
"change_amount": 0,
"comments": "",
"customer_id": "null",
"customer_member_num": "null",
"employee_id": 4,
"employee_name": "John Tester",
"employee_name_3": "John Tester",
"invoice_id": 524371,
"is_bill_payment": 0,
"payment_type": "Cash",
"receipt_number": "00001IN117",
"store_id": 1,
"terminal_id": 0,
"trans_create_time": "2010-03-10T15:20:19.323",
"trans_logged_time": "null",
"workstation_name": "null"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
amount,change_amount,comments,customer_id,customer_member_num,employee_id,employee_name,employee_name_3,invoice_id,is_bill_payment,payment_type,receipt_number,store_id,terminal_id,trans_create_time,trans_logged_time,workstation_name 152.25,0,,null,null,4,John Tester,John Tester,524371,0,Cash,00001IN117,1,0,2010-03-10T15:20:19.323,null,null
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Sale Invoice Products for a Company
Request
GET /partner/Envysion/SaleInvoiceProducts?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/SaleInvoiceProducts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceProducts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingSaleInvoiceProductsForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceProducts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingSaleInvoiceProductsForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceProducts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceProducts?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[saleinvoiceproduct](#SaleInvoiceProduct)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"Activation": 0,
"AssociationNumber": 1,
"category_number": "10101126",
"category_path": ">> Accessories >> Antennas",
"cost": 6.96,
"Discount": 0,
"employee_id": 2892,
"employee_name": "iQmetrix Employee",
"invoice_id": 1267257,
"item_logged_time": "2015-03-03T07:40:29.493",
"list_price": 1,
"override_amt": 0,
"Priority": 1,
"product_description": "ADAPTER CABLE USB727/760- Test",
"product_id": "ASANUN000001",
"product_type": "Regular Global Product",
"quantity": 1,
"receipt_number": "00416IN4417",
"Return": 0,
"sale_price": 1,
"store_id": 221,
"terminal_id": 0,
"workstation_name": "TEMP-W530-W8"
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"Activation": 0,
"AssociationNumber": 1,
"category_number": "10101126",
"category_path": ">> Accessories >> Antennas",
"cost": 6.96,
"Discount": 0,
"employee_id": 2892,
"employee_name": "iQmetrix Employee",
"invoice_id": 1267257,
"item_logged_time": "2015-03-03T07:40:29.493",
"list_price": 1,
"override_amt": 0,
"Priority": 1,
"product_description": "ADAPTER CABLE USB727/760- Test",
"product_id": "ASANUN000001",
"product_type": "Regular Global Product",
"quantity": 1,
"receipt_number": "00416IN4417",
"Return": 0,
"sale_price": 1,
"store_id": 221,
"terminal_id": 0,
"workstation_name": "TEMP-W530-W8"
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
Activation,AssociationNumber,category_number,category_path,cost,Discount,employee_id,employee_name,invoice_id,item_logged_time,list_price,override_amt,Priority,product_description,product_id,product_type,quantity,receipt_number,Return,sale_price,store_id,terminal_id,workstation_name 0,1,10101126,>> Accessories >> Antennas,6.96,0,2892,iQmetrix Employee,1267257,2015-03-03T07:40:29.493,1,0,1,ADAPTER CABLE USB727/760- Test,ASANUN000001,Regular Global Product,1,00416IN4417,0,1,221,0,TEMP-W530-W8
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Getting Sale Invoice Taxes for a Company
Request
GET /partner/Envysion/SaleInvoiceTaxes?CompanyId={CompanyId}&StartDate={StartDate}&StopDate={StopDate}&StoreId={StoreId}&Auth={Auth}&Response={Response}
Headers
Authorization: Bearer (Access Token)
(Optional) - Bearer token used for authentication. For other methods of authentication, see {{AuthenticationOptions}}Accept-Encoding: gzip
(Optional) - Compression algorithm. For other methods of compression, see {{CompressionOptions}}
URI Parameters
-
CompanyId
(Required) - Identifier for a Company -
Auth
(Optional) - Basic token used for authentication. For other methods of authentication, see {{AuthenticationOptions}} -
Response
(Optional) - Default is JSON. For other methods of response, see {{ResponseOptions}} -
StartDate
(Required) - Date at which report will begin -
StopDate
(Required) - Date at which report will end -
StoreId
(Optional) - Identifier for a store in RQ
Example
GET /partner/Envysion/SaleInvoiceTaxes?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1
curl -X GET "https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceTaxes?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1"
Using RestSharp;
at the top of your file.
static IRestResponse GettingSaleInvoiceTaxesForACompany()
{
var client = new RestClient("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceTaxes?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
var request = new RestRequest(Method.GET);
return client.Execute(request);
}
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;
public static CloseableHttpResponse GettingSaleInvoiceTaxesForACompany() throws IOException {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet request = new HttpGet("https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceTaxes?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1");
return httpClient.execute(request);
}
gem install rest-client
.
require 'rest-client'
response = RestClient.get 'https://rqdataconnectdemo.iqmetrix.net/partner/Envysion/SaleInvoiceTaxes?CompanyId=22575&StartDate=1970-01-01T08:00:00.000Z&StopDate=2016-06-06T07:00:00.000Z&StoreId=1', {
}
puts response
Response
Array[[saleinvoicetax](#SaleInvoiceTax)]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the Auth
URI parameter
[
{
"DateCreated": "2010-05-28T15:55:38.78",
"InvoiceIDByStore": "00001IN193",
"SaleInvoiceID": 812306,
"StoreID1": 1,
"Tax": 0
}
]
HTTP 200 Content-Type: application/json
This is the default result obtained by omitting the URI parameter Auth=JsonDataTable
. This response type wraps the data in a “Records” array and adds a “Schema” array, which contains information about each column in the report.
{
"Records": [
{
"DateCreated": "2010-05-28T15:55:38.78",
"InvoiceIDByStore": "00001IN193",
"SaleInvoiceID": 812306,
"StoreID1": 1,
"Tax": 0
}
],
"Schema": [
{
"Column_Name": "ColumnName",
"Type": "datatype",
"SafeType": "safetype",
"Length": 100
}
]
}
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=Xml
HTTP 200 Content-Type: text/xml
This result is obtained by using the URL parameter Auth=XmlDataTable
. This response type appends to the bottom of the request a summary of information about each column in the report.
HTTP 200 Content-Type: text/csv
This result is obtained by using the URL parameter Auth=Csv
DateCreated,InvoiceIDByStore,SaleInvoiceID,StoreID1,Tax 2010-05-28T15:55:38.78,00001IN193,812306,1,0
HTTP 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
This result is obtained by using the URL parameter Auth=Excel
content-disposition: attachment;filename=reportname-2016-07-11.xlsx Binary *.xlsx file
Errors
| HTTP Status Code | Description | How to Resolve |
|---|---|---|
HTTP 400 |
Bad Request |
Ensure request body is formatted properly |
HTTP 401 |
Token is invalid |
Ensure Access Token is valid and has not expired |
HTTP 403 |
Unauthorized |
Ensure Access Token is valid and user has appropriate security |
HTTP 404 |
Not Found |
Ensure URI is valid |
HTTP 429 |
Too Many Requests |
See Rate Limiting |
HTTP 500 |
Unexpected Error |
See Message in response for more information |


CubeVisualizer class - a framework agnostic cube visualization with sine wave lines which trace out the square randomly. It appends itself to the DOM element passed in. It has width and height as passed in.
the DOM element to append itself to
the width of the visualization
the height of the visualization
further optional configuration (See CubeVisualizerConfig documentation)
Config
Bounded functions: These are bounded in the constructor to the current instance. This is so they don't need ot be continuously rebound
The setInterval id for the update function
functions which emit the x,y,z verticies of the line from a displacement value(x) and time value(t)
Rendered objects
Dimensions
Dimensions
Build the camera and attach it to the scene Setup a temporarily position and point it at the middle of the cube
Setup ambient light
Randomly generate numbers for the line parameters
iterate over the entire cube coordinates (integers) and create spheres with colours depending on their position
Setup the entire scene, including camera, lights, spheres / lines.
Update calculated value of cubeLength
Generated using TypeDoc
CubeVisualizer class - a framework agnostic cube visualization with sine wave lines which trace out the square randomly.


Who are we? Why are we here?
The most emerging industry in past few years has been the health sector of India. This sector is more and more trying to adapt the Technology in its industry. Samkhya Tech will be focusing on getting into the “Health Care Sector with respect to Information & Technology”.
Samkhya Tech will be producing technology which will help the community of doctors and try to make their work easier.
Mission & Goal:
Samkhya Tech’s main mission is to bring the smart phone technology in the Health care industry, which in turn should help the community and in the end heal the people.
Primary Customers:
Our products will mainly be used by the MEDICOS. Usage of our technology will help them take decisions about the treatment and help the patient heal in a proper way.
Product Name:
SocioDoc - Share.Learn.Heal
Investors:
KLS IT Incubation Center


ex_sync v0.0.3 ExSync.Store behaviour
Specification for Exsync Stores. Stores are being used to save and retrieve Server Documents
Summary
Callbacks
Retrieves the document from the store by its ID
Similarly to the Elixir get_and_update/2
function (e.g. in Access, Agent,
Doct, …) this function gets the document from storage, applies a function
to it and saves it back to the storage
Types
error :: atom
Callbacks
Similarly to the Elixir get_and_update/2
function (e.g. in Access, Agent,
Doct, …) this function gets the document from storage, applies a function
to it and saves it back to the storage.
Reading and writing should be done in a transaction, as the document changing between the read and the write command will cause trouble that is extremely painful to track down.


TRED(1) TRED(1) NAME tred - transitive reduction filter for directed graphs SYNOPSIS tred [ files ] DESCRIPTION tred computes the transitive reduction of directed graphs, and prints the resulting graphs to standard output. This removes edges implied by tran‐ sitivity. Nodes and subgraphs are not otherwise affected. The ``mean‐ ing'' and validity of the reduced graphs is application dependent. tred is particularly useful as a preprocessor to dot to reduce clutter in dense layouts. Undirected graphs are silently ignored. OPERANDS The following operand is supported: files Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used. BUGS Using bitmaps internally would substantially decrease running time. DIAGNOSTICS If a graph has cycles, its transitive reduction is not uniquely defined. In this case tred emits a warning. AUTHORS Stephen C. North<EMAIL_ADDRESS>Emden R. Gansner<EMAIL_ADDRESS>SEE ALSO gc(1), dot(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), libgraph(3) 21 March 2001 TRED(1)


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
| Method Summary | |
|---|---|
Object
|
jjtAccept
(
AnnotationParserVisitor
visitor,
Object
data)
Accept the visitor |
void
|
jjtAddChild
(
Node
n,
int i)
This method tells the node to add its argument to the node's list of children. |
void
|
jjtClose
()
This method is called after all the child nodes have been added. |
Node
|
jjtGetChild
(int i)
This method returns a child node. |
int
|
jjtGetNumChildren
()
Return the number of children the node has. |
Node
|
jjtGetParent
()
|
void
|
jjtOpen
()
This method is called after the node has been made the current node. |
void
|
jjtSetParent
(
Node
n)
This pair of methods are used to inform the node of its parent. |
| Method Detail |
|---|
void jjtOpen ()
void jjtClose ()
void jjtSetParent ( Node n)
Node jjtGetParent ()
void jjtAddChild ( Node n, int i)
Node jjtGetChild (int i)
int jjtGetNumChildren ()
Object jjtAccept ( AnnotationParserVisitor visitor, Object data)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


prove is a tool for running Perl tests
prove # runs tests in 't' and 'xt' directories
prove t # runs tests in 't' directory
prove t/cowboy t/alien
prove -r t/cowboy t/alien # recursive
prove -lvr # with the 'lib' dir, verbose, recursive
prove \
--lib \ # add 'lib' dir to your $PERL5LIB
--verbose \ # more output
--recurse \ # run tests in the t dir recursively
-Pretty \ # use the prove plugin App::Prove::Plugin::retty
--jobs 10 \ # run tests in parallel
--state=slow # run slowest tests first
save your options in your ~/.proverc
--lib # add 'lib' dir to your $PERL5LIB
--verbose #
--recurse # run tests in the t dir recursively
--state=save # save test info to .prove in the cwd
-Pretty # use the prove plugin App::Prove::Plugin::retty
t
├── 00_compile.t # this test runs first
├── data # dir for test data
│ ├── alien.json
│ └── cowboy.json
├── lib # dir for test libraries
│ └── t
│ └── Helper.pm # t::Helper
├── Transmogrifier
│ ├── In
│ │ └── Tiger.t # unit tests for Transmogrifier::In::Tiger
│ └── Out
│ ├── Alien.t # unit tests for Transmogrifier::Out::Alien
│ └── Cowboy.t # unit tests for Transmogrifier::Out::Cowboy
└── Transmogrifier.t # integration tests for Transmogrifier.pm
xt # extra tests are run only during a release
├── reallyslow.t
└── slow.t
ok( $got, $test_name);
ok(!$got, $test_name);
is ($got, $expected, $test_name);
isnt($got, $expected, $test_name);
like ($got, qr/expected/, $test_name);
unlike($got, qr/expected/, $test_name);
is_deeply($got_complex_thing, $expected_complex_thing, $test_name);
isa_ok($object, $class);
# rare, but used for complex logic:
# eg, if I get to this place, pass()
pass "this test will always pass";
fail "this test will always fail";
# Used to make sure you meant to stop testing here and
# didn't exit/return/die and skip the rest of your tests.
done_testing();
SKIP: {
skip $why, $how_many unless $have_some_feature;
ok $got1, $test_name1;
is $got2, $expected, $test_name2;
like $got3, qr/$expected/, $test_name3;
};
$ prove t/tiger.t
t/tiger.t ..
ok 1 - created a tiger
ok 2 - tiger has sharp teeth
ok 3 - tiger has stripes
ok 4 # skip third party tests
ok 5 # skip third party tests
ok 6 # skip third party tests
1..6
ok
All tests successful.
use Test::More skip_all => 'third party tests';
# ...test code here...
done_testing;
$ prove t/tiger.t
t/tiger.t ..
1..0 # SKIP third party tests
skipped: third party tests
Files=1, Tests=0, 0 wallclock secs ( 0.01 usr 0.01 sys + 0.04 cusr 0.00 csys = 0.06 CPU)
Result: NOTESTS
TODO: {
local $TODO = $why;
is $got, $expected, $test_name;
};
$ prove t/tiger.t
t/tiger.t ..
ok 1 - created a tiger
ok 2 - tiger has sharp teeth
ok 3 - tiger has stripes
not ok 4 - the tiger ate # TODO third party tests
# Failed (TODO) test 'the tiger ate'
# at t/Transmogrifier/In/Tiger.t line 18.
# got: 'not implemented yet at /home/eric/code/slides-testing-in-perl/src/lib/Transmogrifier/In/Tiger.pm line 9.
# '
# expected: undef
1..4
ok
All tests successful.
Subtests are really useful and are highly recommended
subtest $name => sub {
ok $got1, $test_name1;
is $got2, $expected, $test_name2;
is $got3, $expected, $test_name3;
};
Test Anything Protocol
TAP is the stuff your tests output
# comic book noises test sequence commencing
# (this line and line before are ignored by the tap parser)
ok 1 - zap()
not ok 2 - bam()
# Failed test 'bam()'
# at xt/slow.t line 6.
not ok 3 - pow() # TODO not implemented yet
# Failed (TODO) test 'pow()'
# at xt/slow.t line 10.
ok 4 # skip because ComicBook::Noises::Batman is not installed
yargle blargle (this line is ignore by the tap parser)
ok 5 - kaboom()
1..5
note "here is a note"; # only displayed in verbose output
diag "here's what went wrong"; # always displayed
explain \%foo; # dump a data structure
Uses Text::Diff to display a diff when the test fails
eq_or_diff $got, "$line1\n$line2\n$line3\n", "testing strings";
$ prove t/boop.t
t/boop.t....1..1
not ok 1 - testing strings
# Failed test ((eval 2) at line 14)
# +---+----------------+----------------+
# | Ln|Got |Expected |
# +---+----------------+----------------+
# | 1|this is line 1 |this is line 1 |
# * 2|this is line b |this is line 2 *
# | 3|this is line 3 |this is line 3 |
# +---+----------------+----------------+
# Looks like you failed 1 test of 1.
my $person = make_person();
like $person->{name}, '/^(Mr|Mrs|Miss) \w+ \w+$/', "name ok";
like $person->{phone}, '/^0d{6}$/', "phone ok";
is scalar keys %$person, 2, "number of keys";
my $person = make_person();
if (ref($person) eq "HASH")
{
like $person->{name}, '/^(Mr|Mrs|Miss) \w+ \w+$/', "name ok";
like $person->{phone}, '/^0d{6}$/', "phone ok";
is scalar keys %$person, 2, "number of keys";
}
else {
fail "person is not a hash";
}
my $person = make_person();
if (ref($person) eq "HASH") {
like $person->{name}, '/^(Mr|Mrs|Miss) \w+ \w+$/', "name ok";
like $person->{phone}, '/^0d{6}$/', "phone ok";
my $cn = $person->{child_names};
if (ref($cn) eq "ARRAY") {
foreach my $child (@$cn) {
like($child, $name_pat);
}
}
else {
fail "child names not an array";
}
}
else {
fail "person not a hash";
}
Testing data structures
with Test::More
is doable
Testing horrible complex nested data structures
with Test::More
is painful
my $person = make_person();
my $name_re = re('^(Mr|Mrs|Miss) \w+ \w+$');
cmp_deeply
$person,
{
name => $name_re,
phone => re('^0d{6}$'),
child_names => array_each($name_re),
},
"person ok";
cmp_deeply
\@array,
[$hash1, $hash2, ignore()],
"first 2 elements are as expected, ignoring third element";
my $expected = {
name => ignore(),
dna => subsetof('human', 'mutant', 'alien'),
is_evil => bool(1),
weaknesses => set(@weaknesses), # ignores order, duplicates
powers => bag('flight', 'invisibility', 'fire'), # ignores order
weapons => any( undef, array_each(isa("Weapon")) );
home_planet => all(
isa("Planet"),
methods(
number_of_moons => any(0..100),
distance_to_earth => code(sub { return 1 if shift > 0 }),
),
),
};
cmp_deeply $superhero, $expected, "superhero hashref looks ok";
Using standard Perl exception syntax
eval { die "Something bad happened" };
warn $@ if $@;
Using Try::Tiny
try { die "Something bad happened" }
catch { warn $_ };
Using standard Perl exception syntax
eval {
die My::Exception->new(
error => 'Something bad happened',
request => $request,
response => $response,
);
};
warn $@->error if $@;
eval {
My::Exception->throw(
error => 'Something bad happened',
request => $request,
response => $response,
);
};
warn $@->error if $a;
Using Try::Tiny
try {
My::Exception->throw(
error => 'Something bad happened',
request => $request,
response => $response,
);
}
catch {
warn $_->error;
};
The standard module for testing exceptions
# Check the exception matches a given regex
like
exception { $obj->method() },
qr/Something bad happened/,
"caught the exception I expected";
# Check method() did not die
is
exception { $obj->method() },
undef,
"method() did not die";
# Check method() did not die
lives_ok { $obj->method } 'expecting to live';
Note: Test::Fatal is recommended over Test::Exception
use Test::More;
use Test::Warnings;
like
warning { $obj->method() },
qr/BEEP/,
'got a warning from method()';
use Test::More;
use Test::Warnings;
is_deeply
[ warnings { $obj->method() } ],
[
'INFO: BEEP!',
'INFO: BOOP!',
],
'got 2 warnings from method()';
use Test::More;
use Test::Warnings;
use Test::Deep;
cmp_deeply
[ warnings { $obj->method() } ],
bag(
re(qr/BEEP/),
re(qr/BOOP/),
),
'got 2 warnings from method()';
Note: Test::Warnings is recommended over Test::Warn
use Test::More;
use Test::Warnings;
pass 'yay!;
done_testing;
$ prove t/test.t
ok 1 - yay!
ok 2 - no (unexpected) warnings (via done_testing)
1..2
ok
All tests successful.
Note: Test::Warnings is recommended over Test::NoWarnings
Searches upward from the calling file for a directory 't' with a 'lib' directory inside it and adds that to the module search path (@INC).
use Test::Lib;
use t::Private::Test::Library;
instead of
use FindBin qw($Bin);
use lib "$Bin/lib";
use t::Private::Test::Library;
use Test::More;
use Test::Cmd;
my $test = Test::Cmd->new(prog => '/bin/ls', workdir => '');
# ls -l /var/log
$test->run(args => '-l /var/log');
is $test->stdout, $expected_stdout, 'standard out';
is $test->stderr, $expected_stderr, 'standard error';
is $? >> 8, 1, 'exit status';
# ls -a
$test->run(args => '-a');
is $test->stdout, $expected_stdout, 'standard out';
is $test->stderr, $expected_stderr, 'standard error';
is $? >> 8, 1, 'exit status';
done_testing;
TIP: You can strip ansi color codes from your program's output using Term::ANSIColor::colorstrip().
Tell test runners what kind of test you are
use Test::More;
use Test::DescribeMe qw/extended/;
pass "foo";
done_testing;
$ prove t/test.t
1..0 # SKIP Not running extended tests
skipped: Not running extended tests
$ EXTENDED_TESTING=1 prove xt/reallyslow.t
xt/reallyslow.t ..
ok 1 - very very slow test
1..1
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.01 usr 0.00 sys + 0.03 cusr 0.00 csys = 0.04 CPU)
Result: PASS
See also Test::Settings and the Lancaster Consensus
Web servers are event driven.
Event driven code looks weird.
The traditional Plack::Test UI is weird.
When a request happens, a code reference (aka callback) gets run.
The traditional Plack::Test UI (widely used)
use Plack::Test;
test_psgi
app => My::WebApp->app,
client => sub {
# $cb is a callback (aka code reference)
my $cb = shift;
my $req = HTTP::Request->new(GET => "http://localhost/hello");
my $res = $cb->($req);
like $res->content, qr/Hello World/;
};
$cb is a wrapper around the PSGI app which does the following:
Alternate UI for Plack::Test (less common)
use Plack::Test;
use HTTP::Request::Common;
my $app = My::WebApp->app;
my $test = Plack::Test->create($app);
my $res = $test->request(GET "/");
like $res->content, qr/Hello World/;
No forking.
No network calls.
Makes things very fast and light.
But if you want forking and network calls there are 2 options for you:
Generate reports about test coverage
$ HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lvr
$ cover
The report tells you the coverage of each of the
following categories as a percentage.
you can type this
use strict;
use warnings;
use Test::More;
use Test::Exception;
use Test::Differences;
use Test::Deep;
use Test::Warn;
or you can type this
use Test::Most;
but
you can type this
use strict;
use warnings;
use Test::More;
use Test::Fatal;
use Test::Warnings;
use Test::API;
use Test::LongString;
use Test::Deep;
use Test::Pod;
use Test::Pod::Coverage;
use Test::Version;
use Test::Moose;
use Test::CleanNamespace;
use Test::Benchmark;
use Test::Requires;
use Test::RequiresInternet;
use Test::Without::Module;
use Test::DescribeMe;
use Test::Lib;
or you can type this (well its roughly equivalent)
use Test::Modern;
but
Test::Modern doesn't work with Test::Pretty
~/code/text-vcard ⚡ prove t/vcard.t
t/vcard.t ..
# Subtest: output methods
ok 1 - as_string()
ok 2 - as_file()
ok 3 - file contents ok
1..3
ok 1 - output methods
# Subtest: simple getters
ok 1 - full_name
ok 2 - title
ok 3 - photo
ok 4 - birthday
ok 5 - timezone
ok 6 - version
1..6
ok 2 - simple getters
# Subtest: photo
ok 1 - returns a URI::http object
ok 2 - returns a URI::http object
ok 3 - photo
1..3
ok 3 - photo
# Subtest: complex getters
ok 1 - family_names()
ok 2 - given_names()
ok 3 - prefixes
ok 4 - suffixes
ok 5 - work phone
ok 6 - cell phone
ok 7 - work address
ok 8 - home address
ok 9 - work email address
ok 10 - home email address
1..10
ok 4 - complex getters
1..4
ok
All tests successful.
Files=1, Tests=4, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.07 cusr 0.02 csys = 0.12 CPU)
Result: PASS
~/code/text-vcard ⚡ prove t/vcard.t
output methods
✓ as_string()
✓ as_file()
✓ file contents ok
simple getters
✓ full_name
✓ title
✓ photo
✓ birthday
✓ timezone
✓ version
photo
✓ returns a URI::http object
✓ returns a URI::http object
✓ photo
complex getters
✓ family_names()
✓ given_names()
✓ prefixes
✓ suffixes
✓ work phone
✓ cell phone
✓ work address
✓ home address
✓ work email address
✓ home email address
ok
Type this on the command line
prove -Pretty t
Or save some typing by adding this to your ~/.proverc
-Pretty
The standard module for testing exceptions for years
Use Test::Fatal instead!
# Check that the stringified exception matches given regex
throws_ok { $obj->method } qr/division by zero/, 'caught exception';
# Check an exception of the given class (or subclass) is thrown
throws_ok { $obj->method } 'Error::Simple', 'simple error thrown';
like $@->error, qr/division by zero/;
# Check method() died -- we do not care why
# dies_ok() is for lazy people; throws_ok() is best practice
dies_ok { $obj->method } 'died as expected';
# Check method() did not die
lives_ok { $obj->method } 'lived as expected';