Commit Graph

66 Commits

Author SHA1 Message Date
Georg Sauthoff b2ebe4042f update prices for book and wares (BüWa) shipments
> Zum 01.01.2024 werden die Preise für die "Bücher- und Warensendung
500" und die "Bücher- und Warensendung 1000" um jeweils 30 Cent
angehoben. Der neue Preis beträgt dann 2,25 EUR für die BüWa 500 und
2,55 EUR für die BüWa 1000. Notwendig ist die Preiserhöhung wegen stark
gestiegener Personalkosten nach dem Tarifabschluss im März 2023 sowie
durch drastisch gestiegene Preise aufgrund der Inflation.

Source: https://www.deutschepost.de/de/w/buecherundwarensendung.html

In other news: DPDHL 2022 EBIT was > 8 * 10**9 €
    (which yields an EBIT margin of almost 9 % or so)
2023-12-30 23:12:56 +01:00
Georg Sauthoff ccf2d617b1 Import ppl_v530_PARTNER.csv product update
This time only variants of the existing 'Einschreiben' (registered letter)
were added, i.e. basically all existing variants are extended with
a for registered letter with reply to show receipt  ('Rückschein')
variant.

NB: Those products are new to the inema service, the 'Rückschein'
feature already was available with Deutsche Post since forever, but
apparently couldn't be ordered via inema, so far.

New products are activated on 2023-07-01.
2023-05-19 19:58:12 +02:00
Harald Welte 4966ae5c43 Add SPDX Identifiers for the (new) License to all python files 2023-01-01 21:35:17 +01:00
Harald Welte 2ba5620855 re-license under (more permissive) LGPLv3+
Georg as the only other copyright holder has agreed to this.

Closes: #1
2023-01-01 21:30:58 +01:00
Harald Welte 613b219dcd wpint: make sure actual http response body ends up in backtrace
Right now we just get some cryptic JSON decoding error, rather than
any hint of a HTTP status code or the actual error message
2023-01-01 21:30:02 +01:00
Harald Welte ef3dd757be create 'utils.py' for bits shared between SOAP and REST API 2023-01-01 21:30:02 +01:00
Georg Sauthoff 1da49c7763 Import product updates announced for 2023-01-01
using ppl_v520_PARTNER.csv which was distributed by mail
on November, 11th
2023-01-01 19:05:23 +01:00
Georg Sauthoff 6382a99b97 Import product updates announced for 2022-07-01
i.e. using 20220512_IMPARTNER_PPL51.csv which is distributed by Deutsche Post
via email.

NB: the update doesn't contain any price updates but 'just' removes all
'Warenpost International' products.
Apparently, those products are/were migrated to DHL.
2022-06-13 11:39:51 +02:00
Georg Sauthoff 42764fae91 add new prices for 2021 2021-12-06 23:09:03 +01:00
Georg Sauthoff 3e2dcb8dab integrate namechanges that are slated for 2021-07-01
cf. ppl_v490_partner.csv
2021-06-13 18:57:38 +02:00
Georg Sauthoff 6f4634267a consolidate product prices
i.e. move 2021 ones to products.json and remove the rest
2021-05-01 13:05:11 +02:00
Georg Sauthoff 7219f4952f update default product location 2021-03-13 10:39:56 +01:00
Harald Welte ebb0fce5d0 wpi: Add shrink_contents_if_needed() method
This method can be used to shrink the number of lines on the customs
declaration, which unfortunately only supports 5 lines in the
WaPoInt API.
2021-03-07 14:33:09 +01:00
Harald Welte db0a0fb7ae wpint: No more than 5 line items on the CN22 declaration allowed
Otherwise the API will generate the following error:
        "items[0].contents: size must be between 0 and 5"
2021-03-07 14:08:40 +01:00
Harald Welte dd8b8d7320 wpint: Allow user to specify shipment_nature and customer_reference 2021-03-07 11:26:32 +01:00
Harald Welte 06d990510c wpint: More input length validation of addresses 2021-03-07 11:26:32 +01:00
Harald Welte f8e81db8cb wpint: More input data validation for content_item and item
The limits are documented in Table 9 of "Anbindungleitfaden"
2021-03-07 11:26:32 +01:00
Harald Welte df04434e5d wpint: be more specific about what we're logging 2021-03-07 10:24:03 +01:00
Harald Welte 6e37ff6574 wpint: Address various pylint-reported issues 2021-03-07 10:10:52 +01:00
Harald Welte c812926610 Add 'wpint' module for Warenpost International ReST-API
This is a new module conforming to revision 1.03 of the
above-mentioned ReST-API.
2021-03-07 00:15:18 +01:00
Georg Sauthoff 640baf1dbc Allow users to supply customer specific prices
fixes https://github.com/gsauthof/frank/issues/3
2021-02-02 21:13:06 +01:00
Georg Sauthoff 6c1f9bb1f5 Avoid rounding issues with float 2021-01-23 16:38:10 +01:00
Harald Welte b71d9484fd update products.json with prices from January 1st, 2021
Pricing is not going back to what it was before July 1st, 2020
but there are significant price increases - and some products
that were discontinued.  This update covers "ppl_v480_PARTER.CSV"
as received from DPAG on December 1st, 2020.
2020-12-03 11:28:43 +01:00
Georg Sauthoff 9b22103c04 Update prices for temporary VAT discount
i.e. VAT temporarily changes from 19% to 16% as part of the Corona
related economy stimulus package. Deutsche Post thus adjusts the prices
for a subset of their products.
2020-06-20 18:07:09 +02:00
Georg Sauthoff 410b0ac833 Use more appropriate function for version query 2019-12-05 21:23:42 +01:00
Georg Sauthoff 5cc7591415 Handle version string in setup.py
This fixes the issue with importing the package in setup.py which fails
when the dependencies aren't already available.

Reported by Carsten Tschense.
2019-12-05 20:56:21 +01:00
Georg Sauthoff f469a9b9fc Add product changes that are effective 2020-01-01
i.e. some added/removed products and some price changes

The package now supports multiple price lists and selects the right
one based on the effective date suffix (if present).
2019-11-22 18:27:43 +01:00
Georg Sauthoff e72514697c Print inema version 2019-11-22 18:27:03 +01:00
Georg Sauthoff 824ed58d03 Remove trailing whitespace 2019-11-22 18:26:35 +01:00
Harald Welte 77d55b4f48 update products.json with sorted keys / defined ordering
This will avoid lots of unwanted diffs on future updates
2019-07-15 07:50:28 +08:00
Harald Welte fdc295653b bump version to 0.8 2019-07-11 23:59:54 +08:00
Harald Welte 39c519f147 Update products.json with current dump of 20190711
This was extracted from ProdWS using 'examples/products.py | json_pp'
2019-07-11 23:59:42 +08:00
Henrik Genssen 896ac2abc0 Add ProductInformation() class and examples/products.py
This allows the user to re-generate (update) the price list in
products.json using ProdWS API, which is a separate API provided by DPAG
to obtain the product catalogue including pricing information.
2019-07-11 23:59:42 +08:00
Henrik Genssen 114b6c036b make gen_1c4a_hdr() and get_product_price_by_id() class methods 2019-07-11 23:59:42 +08:00
Harald Welte 999c0b713b Fix utf-8 parsing of json data files 2019-07-11 23:59:42 +08:00
Henrik Genssen 103c0f4059 Add coding/utf8 annotations to fix special characters for python 2.7 2019-07-11 23:59:42 +08:00
Harald Welte 2646fdc889 bump version to 0.7 2019-07-11 23:59:42 +08:00
Harald Welte 3cb30f5137 products.json: Update some prices to 2019-07-01
Deutshce Post changed pricing, let's update this for some products. A
proper fix for all products will follow as separate patch.
2019-07-11 23:22:28 +08:00
Harald Welte 9ec7af1df4 products.json: Avoid "Umlauts" for python 2.x compatibility
Without this patch, python 2.x would abort with a famous
	'ascii' codec can't decode byte ...
error.  This is why I kept the file free of special characters
so far, but commit 6d2ee85a7e
unfortunately broke that assumption.

I'm sure there's a proper solution, but I really don't feel like
investing time into researching and testing that now.
2019-06-03 07:34:09 +00:00
Georg Sauthoff 539148021e bump to version 0.6 2019-03-25 14:29:45 +01:00
Georg Sauthoff 7e141341a2 Fix deprecation warning 2019-03-25 14:27:55 +01:00
Georg Sauthoff 6d2ee85a7e Add some new Warenpost products
reported by Remi Bergsma
2019-03-25 14:24:50 +01:00
Georg Sauthoff 68e58a42e2 Fix name-key typo in products.json
reported by Remi Bergsma
2019-03-25 14:20:59 +01:00
Harald Welte fc2365d3d7 Add PEP-0396 compatible __version__ to the module and bump to 0.5 2019-01-16 16:08:32 +01:00
Harald Welte 7e1493ee09 products.json: Warenpost "L" is up to 2kg, not 1kg 2019-01-09 00:34:19 +01:00
Harald Welte a4950a0e0b products.json: Update to 20190101
* add new "Warenpost International" prices
* update pricing
* order document in logical groups + ascending order
2019-01-09 00:14:35 +01:00
Georg Sauthoff db0e33d420 Update prices of Waren-/Büchersendung products
cf. https://web.archive.org/web/20180810155706/https://shop.deutschepost.de/briefversand/spezielle-versandformen/buechersendung-und-warensendung
2018-08-10 18:01:27 +02:00
Georg Sauthoff 23502e15f1 Add --print option. 2018-05-10 15:30:41 +02:00
Georg Sauthoff 1d4bf4813c Add command line frontend 'frank' 2017-06-24 13:06:03 +02:00
Harald Welte e464545a89 Fix company addresses with contact person
When using the build_comp_addr() method 'person' argument, we need
to pass in a PersonName object, and not a string name of the contact.

Add a public build_pers_name() method to produce that PersonName object,
and use it from the example code.
2016-12-13 14:08:29 +01:00