aboutsummaryrefslogtreecommitdiffstats
path: root/notes
blob: ce427d0c1ede35e0d99b3bfd3d434540dbb8916f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- Print Job Cost --

The API doc is either out of date or was never correct to begin with.
The response fields in the doc are different from what the server
actually responds with. Therefore testdata/printjobcostresp.json is
the union of the doc example and a real response from the sandbox
server. For instance, the doc example has a "fees" field while the
real response did not; thus "fees" is included in the testdata. The
real response had "first_name" and "last_name" rather than just
"name", so ShippingAddress has a custom UnmarshalJSON() function to
account for both. And so on...


-- Print Jobs --

I made some corrections to testdata/getprintjobsresp.json. These
include changing "source_md5sum" to "source_md5_sum" and changing the
postcode field from integer to string, etc., as per the schema. It
remains to be seen if the errors are just in the documentation example
or if they (sometimes) appear in real server responses too...