From 4370a8133c8e9c870d7d2c659f27ac655896eec0 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 21 May 2026 14:40:50 -0400 Subject: shorten client method names; implement order cancelation --- testdata/costreq.json | 23 ++++++++ testdata/costresp.json | 95 ++++++++++++++++++++++++++++++++ testdata/getprintjobsresp.json | 119 ----------------------------------------- testdata/jobsresp.json | 119 +++++++++++++++++++++++++++++++++++++++++ testdata/printjobcostreq.json | 23 -------- testdata/printjobcostresp.json | 95 -------------------------------- 6 files changed, 237 insertions(+), 237 deletions(-) create mode 100644 testdata/costreq.json create mode 100644 testdata/costresp.json delete mode 100644 testdata/getprintjobsresp.json create mode 100644 testdata/jobsresp.json delete mode 100644 testdata/printjobcostreq.json delete mode 100644 testdata/printjobcostresp.json (limited to 'testdata') diff --git a/testdata/costreq.json b/testdata/costreq.json new file mode 100644 index 0000000..d521f77 --- /dev/null +++ b/testdata/costreq.json @@ -0,0 +1,23 @@ +{ + "line_items": [ + { + "page_count": 32, + "pod_package_id": "0600X0900.BW.STD.PB.060UW444.MXX", + "quantity": 20 + }, + { + "page_count": 324, + "pod_package_id": "0425X0687.BW.STD.PB.060UW444.GXX", + "quantity": 200 + } + ], + "shipping_address": { + "city": "Lübeck", + "country_code": "DE", + "postcode": "23552", + "state_code": "", + "street1": "Holstenstr. 40", + "phone_number": "844-212-0689" + }, + "shipping_option": "EXPRESS" +} \ No newline at end of file diff --git a/testdata/costresp.json b/testdata/costresp.json new file mode 100644 index 0000000..f633183 --- /dev/null +++ b/testdata/costresp.json @@ -0,0 +1,95 @@ +{ + "shipping_address": { + "city": "Lübeck", + "postcode": "23552", + "street1": "Holstenstr. 40", + "phone_number": "844-212-0689", + "state": "", + "country": "DE", + "is_business": false, + "first_name": ".", + "last_name": ".", + "warnings": [ + { + "type": "validation_warning", + "code": "REPLACED", + "path": "external", + "message": "street1: Holstenstr. 40 -> Holstenstraße 40" + } + ], + "suggested_address": { + "country_code": "DE", + "state_code": null, + "postcode": "23552", + "city": "Lübeck", + "street1": "Holstenstraße 40", + "street2": null + } + }, + "fees": [ + { + "currency": "USD", + "fee_type": "HANDLING_FEE", + "sku": "HANDLING_FEE", + "tax_rate": "0.060000", + "total_cost_excl_tax": "14.00", + "total_cost_incl_tax": "14.84", + "total_tax": "0.84" + }, + { + "currency": "USD", + "fee_type": "FULFILLMENT_FEE", + "sku": "FULFILLMENT_FEE", + "tax_rate": "0.060000", + "total_cost_excl_tax": "0.75", + "total_cost_incl_tax": "0.80", + "total_tax": "0.05" + } + ], + "line_item_costs": [ + { + "cost_excl_discounts": "4.95", + "total_tax": "6.93", + "tax_rate": "0.070000", + "quantity": 20, + "total_cost_excl_tax": "99.00", + "total_cost_excl_discounts": "99.00", + "total_cost_incl_tax": "105.93", + "discounts": [], + "unit_tier_cost": "4.95" + }, + { + "cost_excl_discounts": "16.19", + "total_tax": "215.33", + "tax_rate": "0.070000", + "quantity": 200, + "total_cost_excl_tax": "3076.10", + "total_cost_excl_discounts": "3238.00", + "total_cost_incl_tax": "3291.43", + "discounts": [ + { + "amount": "161.90", + "description": "Volume Discount 5%" + } + ], + "unit_tier_cost": "16.19" + } + ], + "shipping_cost": { + "total_cost_excl_tax": "1085.50", + "total_cost_incl_tax": "1161.49", + "total_tax": "75.99", + "tax_rate": "0.19" + }, + "fulfillment_cost": { + "total_cost_excl_tax": "1.05", + "total_cost_incl_tax": "1.12", + "total_tax": "0.07", + "tax_rate": "0.19" + }, + "total_tax": "298.32", + "total_cost_excl_tax": "4261.65", + "total_cost_incl_tax": "4559.97", + "total_discount_amount": "161.90", + "currency": "CAD" +} diff --git a/testdata/getprintjobsresp.json b/testdata/getprintjobsresp.json deleted file mode 100644 index 3f43d2c..0000000 --- a/testdata/getprintjobsresp.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "count": 1, - "next": "https://api.lulu.com/resources/?page=1&page_size=1", - "previous": "https://api.lulu.com/resources/?page=1&page_size=1", - "results": [ - { - "contact_email": "test@test.com", - "costs": { - "line_item_costs": null, - "shipping_cost": { - "total_cost_excl_tax": "132.74", - "total_cost_incl_tax": "132.74", - "total_tax": "0.00", - "tax_rate": "0.000000" - }, - "fulfillment_cost": { - "total_cost_excl_tax": "0.75", - "total_cost_incl_tax": "0.81", - "total_tax": "0.06", - "tax_rate": "0.080000" - }, - "fees": [ - { - "currency": "USD", - "fee_type": "HANDLING_FEE", - "sku": "HANDLING_FEE_6", - "tax_rate": "0.088750", - "total_cost_excl_tax": "4.00", - "total_cost_incl_tax": "4.36", - "total_tax": "0.36" - } - ], - "total_cost_excl_tax": "123.45", - "total_cost_incl_tax": "678.00", - "total_tax": "0.123400" - }, - "date_created": "2017-08-07T08:47:26.485456Z", - "date_modified": "2017-08-07T08:47:26.485490Z", - "estimated_shipping_dates": { - "arrival_max": "2017-08-12", - "arrival_min": "2017-08-10", - "dispatch_max": "2017-08-09", - "dispatch_min": "2017-08-07" - }, - "external_id": "demo-time", - "id": 1, - "line_items": [ - { - "external_id": "item-reference-1", - "id": 1, - "printable_id": null, - "printable_normalization": { - "cover": { - "job_id": null, - "normalized_file": null, - "page_count": null, - "source_file": null, - "source_md5_sum": "e78512c777e7f5841fe8f1992cefb898", - "source_url": "https://www.dropbox.com/sh/p3zh22vzsaegiri/AADP367j0bTWlt8fCu-_tm2ia/161025/139056_cover.pdf?dl=1" - }, - "interior": { - "job_id": null, - "normalized_file": null, - "page_count": null, - "source_file": null, - "source_md5_sum": "7f8af20c296747689756f8e310135d79", - "source_url": "https://www.dropbox.com/sh/p3zh22vzsaegiri/AACOUn3LFKsITDzylh13bQpsa/161025/thesis2.pdf?dl=1" - }, - "pod_package_id": "0600X0900.BW.STD.PB.060UW444.MXX" - }, - "quantity": 20, - "status": { - "messages": { - "info": "Line-item is currently being validated" - }, - "name": "CREATED" - }, - "title": "My Book" - } - ], - "production_delay": 120, - "production_due_time": null, - "shipping_address": { - "city": "Lübeck", - "country_code": "DE", - "is_business": false, - "name": "Hans Dampf", - "phone_number": "844-212-0689", - "postcode": "23552", - "state_code": "", - "street1": "Holstenstr. 40", - "street2": "", - "warnings": [ - { - "type": "validation_warning", - "path": "external", - "code": "REPLACED", - "message": "street1: Holstenstr. 40 -> Holstenstraße 40" - } - ], - "suggested_address": { - "country_code": "DE", - "state_code": null, - "postcode": "23552", - "city": "Lübeck", - "street1": "Holstenstraße 40", - "street2": null - } - }, - "shipping_level": "MAIL", - "shipping_option_level": "MAIL", - "status": { - "changed": "2017-08-07T08:47:26.480493Z", - "message": "Print-job is currently being validated", - "name": "CREATED" - } - } - ] -} diff --git a/testdata/jobsresp.json b/testdata/jobsresp.json new file mode 100644 index 0000000..3f43d2c --- /dev/null +++ b/testdata/jobsresp.json @@ -0,0 +1,119 @@ +{ + "count": 1, + "next": "https://api.lulu.com/resources/?page=1&page_size=1", + "previous": "https://api.lulu.com/resources/?page=1&page_size=1", + "results": [ + { + "contact_email": "test@test.com", + "costs": { + "line_item_costs": null, + "shipping_cost": { + "total_cost_excl_tax": "132.74", + "total_cost_incl_tax": "132.74", + "total_tax": "0.00", + "tax_rate": "0.000000" + }, + "fulfillment_cost": { + "total_cost_excl_tax": "0.75", + "total_cost_incl_tax": "0.81", + "total_tax": "0.06", + "tax_rate": "0.080000" + }, + "fees": [ + { + "currency": "USD", + "fee_type": "HANDLING_FEE", + "sku": "HANDLING_FEE_6", + "tax_rate": "0.088750", + "total_cost_excl_tax": "4.00", + "total_cost_incl_tax": "4.36", + "total_tax": "0.36" + } + ], + "total_cost_excl_tax": "123.45", + "total_cost_incl_tax": "678.00", + "total_tax": "0.123400" + }, + "date_created": "2017-08-07T08:47:26.485456Z", + "date_modified": "2017-08-07T08:47:26.485490Z", + "estimated_shipping_dates": { + "arrival_max": "2017-08-12", + "arrival_min": "2017-08-10", + "dispatch_max": "2017-08-09", + "dispatch_min": "2017-08-07" + }, + "external_id": "demo-time", + "id": 1, + "line_items": [ + { + "external_id": "item-reference-1", + "id": 1, + "printable_id": null, + "printable_normalization": { + "cover": { + "job_id": null, + "normalized_file": null, + "page_count": null, + "source_file": null, + "source_md5_sum": "e78512c777e7f5841fe8f1992cefb898", + "source_url": "https://www.dropbox.com/sh/p3zh22vzsaegiri/AADP367j0bTWlt8fCu-_tm2ia/161025/139056_cover.pdf?dl=1" + }, + "interior": { + "job_id": null, + "normalized_file": null, + "page_count": null, + "source_file": null, + "source_md5_sum": "7f8af20c296747689756f8e310135d79", + "source_url": "https://www.dropbox.com/sh/p3zh22vzsaegiri/AACOUn3LFKsITDzylh13bQpsa/161025/thesis2.pdf?dl=1" + }, + "pod_package_id": "0600X0900.BW.STD.PB.060UW444.MXX" + }, + "quantity": 20, + "status": { + "messages": { + "info": "Line-item is currently being validated" + }, + "name": "CREATED" + }, + "title": "My Book" + } + ], + "production_delay": 120, + "production_due_time": null, + "shipping_address": { + "city": "Lübeck", + "country_code": "DE", + "is_business": false, + "name": "Hans Dampf", + "phone_number": "844-212-0689", + "postcode": "23552", + "state_code": "", + "street1": "Holstenstr. 40", + "street2": "", + "warnings": [ + { + "type": "validation_warning", + "path": "external", + "code": "REPLACED", + "message": "street1: Holstenstr. 40 -> Holstenstraße 40" + } + ], + "suggested_address": { + "country_code": "DE", + "state_code": null, + "postcode": "23552", + "city": "Lübeck", + "street1": "Holstenstraße 40", + "street2": null + } + }, + "shipping_level": "MAIL", + "shipping_option_level": "MAIL", + "status": { + "changed": "2017-08-07T08:47:26.480493Z", + "message": "Print-job is currently being validated", + "name": "CREATED" + } + } + ] +} diff --git a/testdata/printjobcostreq.json b/testdata/printjobcostreq.json deleted file mode 100644 index d521f77..0000000 --- a/testdata/printjobcostreq.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "line_items": [ - { - "page_count": 32, - "pod_package_id": "0600X0900.BW.STD.PB.060UW444.MXX", - "quantity": 20 - }, - { - "page_count": 324, - "pod_package_id": "0425X0687.BW.STD.PB.060UW444.GXX", - "quantity": 200 - } - ], - "shipping_address": { - "city": "Lübeck", - "country_code": "DE", - "postcode": "23552", - "state_code": "", - "street1": "Holstenstr. 40", - "phone_number": "844-212-0689" - }, - "shipping_option": "EXPRESS" -} \ No newline at end of file diff --git a/testdata/printjobcostresp.json b/testdata/printjobcostresp.json deleted file mode 100644 index f633183..0000000 --- a/testdata/printjobcostresp.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "shipping_address": { - "city": "Lübeck", - "postcode": "23552", - "street1": "Holstenstr. 40", - "phone_number": "844-212-0689", - "state": "", - "country": "DE", - "is_business": false, - "first_name": ".", - "last_name": ".", - "warnings": [ - { - "type": "validation_warning", - "code": "REPLACED", - "path": "external", - "message": "street1: Holstenstr. 40 -> Holstenstraße 40" - } - ], - "suggested_address": { - "country_code": "DE", - "state_code": null, - "postcode": "23552", - "city": "Lübeck", - "street1": "Holstenstraße 40", - "street2": null - } - }, - "fees": [ - { - "currency": "USD", - "fee_type": "HANDLING_FEE", - "sku": "HANDLING_FEE", - "tax_rate": "0.060000", - "total_cost_excl_tax": "14.00", - "total_cost_incl_tax": "14.84", - "total_tax": "0.84" - }, - { - "currency": "USD", - "fee_type": "FULFILLMENT_FEE", - "sku": "FULFILLMENT_FEE", - "tax_rate": "0.060000", - "total_cost_excl_tax": "0.75", - "total_cost_incl_tax": "0.80", - "total_tax": "0.05" - } - ], - "line_item_costs": [ - { - "cost_excl_discounts": "4.95", - "total_tax": "6.93", - "tax_rate": "0.070000", - "quantity": 20, - "total_cost_excl_tax": "99.00", - "total_cost_excl_discounts": "99.00", - "total_cost_incl_tax": "105.93", - "discounts": [], - "unit_tier_cost": "4.95" - }, - { - "cost_excl_discounts": "16.19", - "total_tax": "215.33", - "tax_rate": "0.070000", - "quantity": 200, - "total_cost_excl_tax": "3076.10", - "total_cost_excl_discounts": "3238.00", - "total_cost_incl_tax": "3291.43", - "discounts": [ - { - "amount": "161.90", - "description": "Volume Discount 5%" - } - ], - "unit_tier_cost": "16.19" - } - ], - "shipping_cost": { - "total_cost_excl_tax": "1085.50", - "total_cost_incl_tax": "1161.49", - "total_tax": "75.99", - "tax_rate": "0.19" - }, - "fulfillment_cost": { - "total_cost_excl_tax": "1.05", - "total_cost_incl_tax": "1.12", - "total_tax": "0.07", - "tax_rate": "0.19" - }, - "total_tax": "298.32", - "total_cost_excl_tax": "4261.65", - "total_cost_incl_tax": "4559.97", - "total_discount_amount": "161.90", - "currency": "CAD" -} -- cgit v1.2.3