Compare commits
No commits in common. "master" and "next" have entirely different histories.
746
LICENSE
746
LICENSE
|
@ -1,165 +1,661 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
0. Additional Definitions.
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
0. Definitions.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
4. Combined Works.
|
||||
1. Source Code.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
d) Do one of the following:
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
2. Basic Permissions.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
5. Combined Libraries.
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
|
61
README.rst
61
README.rst
|
@ -1,56 +1,19 @@
|
|||
python-inema
|
||||
============
|
||||
|
||||
This is a python module for interfacing the "Internetmarke" API provided
|
||||
by the German postal company "Deutsche Post". It implements V3 of this
|
||||
API. It also implements the new (2020) "Warenpost International API".
|
||||
API.
|
||||
|
||||
The Internetmarke API allows you to buy online franking for national and
|
||||
international postal products like post cards and letters of all weight
|
||||
The Internetmarke API allwos you to buy online franking for national and
|
||||
international postal products like post cardsd and letters of all weight
|
||||
classes and service classes (normal, registered, ...).
|
||||
|
||||
Internetmarke API
|
||||
-----------------
|
||||
In order to use this module, you will need to be registered with
|
||||
Deutsche Post for accessing the "1C4A Webservice". You can request
|
||||
related details from pcf-1click@deutschepost.de. Upon registration,
|
||||
you will recevie your individual parameters PARTNER_ID, KEY and
|
||||
KEY_PHASE.
|
||||
|
||||
In order to use the Internetmarke API (SOAP), you will need to be registered
|
||||
with Deutsche Post for accessing the "1C4A Webservice". You can request
|
||||
related details from pcf-1click@deutschepost.de. Upon registration, you
|
||||
will receive your individual parameters PARTNER_ID, KEY and KEY_PHASE.
|
||||
Furthermore, for actual payment of purchases made via this API, you will
|
||||
need the user name (email address) and password to a "Portokasse"
|
||||
acount.
|
||||
|
||||
This module makes use of the fairly new "zeep" module for SOAP/WSDL.
|
||||
|
||||
|
||||
Warenpost International API
|
||||
---------------------------
|
||||
|
||||
In order to use the Warenpost International API (REST), you will need to
|
||||
be separately registered with Deutsche Post for accessing that API.
|
||||
Upon registration, you will have the following individual parameters,
|
||||
which you must use when initializing the WarenpostInt() class:
|
||||
|
||||
- PARTNER_ID
|
||||
- SCHLUESSEL_DPWN_PARTNER (same as KEY?)
|
||||
- EKP
|
||||
- KEY_PHASE
|
||||
|
||||
|
||||
Portokasse
|
||||
----------
|
||||
|
||||
Furthermore, for actual payment of purchases made via both APIs, you
|
||||
will need the user name (email address) and password to a "Portokasse"
|
||||
account.
|
||||
|
||||
|
||||
Authors / History
|
||||
-----------------
|
||||
|
||||
python-inema was originally developed by Harald Welte <hwelte@sysmocom.de>
|
||||
for internal use at his company sysmocom, in order to provide franking
|
||||
from the Odoo based logistics system. Like most other software at sysmocom,
|
||||
it was released as open source software under a strong network copyleft
|
||||
license.
|
||||
|
||||
Shortly after the initial release, Georg Sauthoff <mail@georg.so> joined
|
||||
the development and improved and extended the code im various ways. He
|
||||
also added the command-line ``frank.py`` tool.
|
||||
This module makes use of the farily new "zeep" module for SOAP/WSDL.
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
from inema import ProductInformation
|
||||
import json
|
||||
|
||||
import sys
|
||||
|
||||
if sys.version_info.major >= 3:
|
||||
unicode = str
|
||||
encode = lambda x : x
|
||||
else:
|
||||
encode = lambda x : x.encode('utf8')
|
||||
|
||||
# you have to fill the below with your login details for the ProdWS Service
|
||||
USER = "xxx"
|
||||
PASS = "yyyyyy"
|
||||
|
@ -43,9 +33,7 @@ if data['success']:
|
|||
'max_weight': unicode(weight['maxValue'])
|
||||
}
|
||||
|
||||
print(encode(json.dumps(products,
|
||||
sort_keys=True, indent=4, ensure_ascii=False)))
|
||||
print('')
|
||||
print json.dumps(products)
|
||||
|
||||
else:
|
||||
print('ERROR: %s' % data['Exception'], file=sys.stderr)
|
||||
sys.exit(1)
|
||||
print 'ERROR: %s' % data['Exception']
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Example program for converting a Deutsche Post provided ppl_vXXX.csv file
|
||||
# to JSON. See also the data package sub-directory.
|
||||
#
|
||||
# Example call:
|
||||
#
|
||||
# $ update_products.py ppl_v450.csv inema/data/products.json \
|
||||
# inema/data/products-2020-01-01.json
|
||||
#
|
||||
#
|
||||
# Note: PPL stands for Product Price List
|
||||
|
||||
import sys
|
||||
import json
|
||||
import csv
|
||||
import decimal
|
||||
|
||||
def quantize(x):
|
||||
x = decimal.Decimal(x).quantize(decimal.Decimal('.01'))
|
||||
return str(x)
|
||||
|
||||
def main(csv_filename, json_filename, filename):
|
||||
with open(csv_filename, newline='', encoding='latin-1') as f \
|
||||
, open(json_filename) as g \
|
||||
, open(filename, 'w') as h:
|
||||
rows = csv.DictReader(f, delimiter=';')
|
||||
products = json.load(g)
|
||||
|
||||
seen_ids = set()
|
||||
for row in rows:
|
||||
key, price = row['PROD_ID'], row['PROD_BRPREIS'].replace(',', '.')
|
||||
inter, weight, name = (row['PROD_AUSR'] in ('1', 'I')), row['MAXG'], row['PROD_NAME']
|
||||
seen_ids.add(key)
|
||||
if key in products:
|
||||
p = products[key]
|
||||
oprice, ointer = p['cost_price'], p['international']
|
||||
oweight, oname = p['max_weight'], p['name']
|
||||
# row[5] vs. row[7] => total vs. base product price
|
||||
# row[4] vs. row[6] => complete vs. base product name
|
||||
price, oprice = quantize(price), quantize(oprice)
|
||||
c = False
|
||||
if price != oprice:
|
||||
print(f'Price of {name} ({key}) changed: {oprice} -> {price} (from {row["PROD_GUEAB"]})')
|
||||
c = True
|
||||
p['cost_price'] = price
|
||||
if inter != ointer:
|
||||
print(f'Nationality of {name} ({key}) changed: {ointer} -> {inter} (from {row["PROD_GUEAB"]})')
|
||||
c = True
|
||||
p['international'] = inter
|
||||
if weight != oweight:
|
||||
print(f'Weight of {name} ({key}) changed: {oweight} -> {weight} (from {row["PROD_GUEAB"]})')
|
||||
# as approximation, use old one ...
|
||||
if weight:
|
||||
c = True
|
||||
p['max_weight'] = weight
|
||||
# The names returned by the ProdWS might differ from the ones included in the PPL ...
|
||||
if name != oname:
|
||||
print(f'Name of {name} ({key}) changed:\n{oname} ->\n{name} (from {row["PROD_GUEAB"]})')
|
||||
c = True
|
||||
p['name'] = name
|
||||
if c:
|
||||
print('*'*75)
|
||||
else:
|
||||
products[key] = {
|
||||
"cost_price": price,
|
||||
"international": inter,
|
||||
"max_weight": weight,
|
||||
"name": name
|
||||
}
|
||||
print(f'NEW Product {row["PROD_NAME"]} ({row["PROD_ID"]}) - from {row["PROD_GUEAB"]}!')
|
||||
print('*'*75)
|
||||
|
||||
remove_ids = set()
|
||||
for k in products:
|
||||
if k not in seen_ids:
|
||||
p = products[k]
|
||||
print(f'Product {p["name"]} ({k}) was deleted!')
|
||||
remove_ids.add(k)
|
||||
for k in remove_ids:
|
||||
products.pop(k)
|
||||
|
||||
json.dump(products, h, sort_keys=True, indent=4, ensure_ascii=False)
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main(sys.argv[1], sys.argv[2], sys.argv[3]))
|
|
@ -2,4 +2,3 @@
|
|||
from .inema import Internetmarke
|
||||
from .inema import ProductInformation
|
||||
from .inema import __version__
|
||||
from .wpint import WarenpostInt
|
||||
|
|
|
@ -1,374 +0,0 @@
|
|||
{
|
||||
"1": {
|
||||
"cost_price": "0.85",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief"
|
||||
},
|
||||
"10001": {
|
||||
"cost_price": "1.1",
|
||||
"international": true,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Intern. GK"
|
||||
},
|
||||
"10011": {
|
||||
"cost_price": "1.7",
|
||||
"international": true,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Intern. GK"
|
||||
},
|
||||
"1002": {
|
||||
"cost_price": "3.20",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10051": {
|
||||
"cost_price": "3.7",
|
||||
"international": true,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Intern. GK"
|
||||
},
|
||||
"1007": {
|
||||
"cost_price": "3.50",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"10071": {
|
||||
"cost_price": "7",
|
||||
"international": true,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Intern. bis 1.000g GK"
|
||||
},
|
||||
"1008": {
|
||||
"cost_price": "5.7",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1009": {
|
||||
"cost_price": "5.70",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"10091": {
|
||||
"cost_price": "17",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Intern. bis 2.000g GK"
|
||||
},
|
||||
"1010": {
|
||||
"cost_price": "7.9",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1012": {
|
||||
"cost_price": "3.35",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10162": {
|
||||
"cost_price": "4.32",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Brief Kilotarif international ohne USt + EINSCHREIBEN"
|
||||
},
|
||||
"10166": {
|
||||
"cost_price": "0.82",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Brief Kilotarif international ohne USt."
|
||||
},
|
||||
"1017": {
|
||||
"cost_price": "3.65",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1018": {
|
||||
"cost_price": "5.85",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1019": {
|
||||
"cost_price": "5.85",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1020": {
|
||||
"cost_price": "8.05",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"10201": {
|
||||
"cost_price": "0.95",
|
||||
"international": true,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Intern. GK"
|
||||
},
|
||||
"1022": {
|
||||
"cost_price": "3.95",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1027": {
|
||||
"cost_price": "4.25",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1028": {
|
||||
"cost_price": "6.45",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1029": {
|
||||
"cost_price": "6.45",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1030": {
|
||||
"cost_price": "8.65",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1032": {
|
||||
"cost_price": "5.10",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1037": {
|
||||
"cost_price": "5.40",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1038": {
|
||||
"cost_price": "7.6",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1039": {
|
||||
"cost_price": "7.60",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1040": {
|
||||
"cost_price": "9.8",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1042": {
|
||||
"cost_price": "7.30",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1047": {
|
||||
"cost_price": "7.60",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN"
|
||||
},
|
||||
"1048": {
|
||||
"cost_price": "9.8",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1049": {
|
||||
"cost_price": "9.80",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1050": {
|
||||
"cost_price": "12",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1052": {
|
||||
"cost_price": "3.05",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1057": {
|
||||
"cost_price": "3.35",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1058": {
|
||||
"cost_price": "5.55",
|
||||
"international": false,
|
||||
"max_weight": "",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1059": {
|
||||
"cost_price": "5.55",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1060": {
|
||||
"cost_price": "7.75",
|
||||
"international": false,
|
||||
"max_weight": "",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"11": {
|
||||
"cost_price": "1.00",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief"
|
||||
},
|
||||
"11006": {
|
||||
"cost_price": "4.6",
|
||||
"international": true,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11016": {
|
||||
"cost_price": "5.2",
|
||||
"international": true,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11056": {
|
||||
"cost_price": "7.2",
|
||||
"international": true,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11076": {
|
||||
"cost_price": "10.5",
|
||||
"international": true,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Intern. bis 1.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11096": {
|
||||
"cost_price": "20.5",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Intern. bis 2.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11202": {
|
||||
"cost_price": "4.45",
|
||||
"international": true,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"195": {
|
||||
"cost_price": "1.95",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief + Prio"
|
||||
},
|
||||
"196": {
|
||||
"cost_price": "2.10",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief + Prio"
|
||||
},
|
||||
"197": {
|
||||
"cost_price": "2.70",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief + Prio"
|
||||
},
|
||||
"198": {
|
||||
"cost_price": "3.85",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief + Prio"
|
||||
},
|
||||
"199": {
|
||||
"cost_price": "6.05",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief bis 2000 g + Zusatzentgelt MBf + Prio"
|
||||
},
|
||||
"200": {
|
||||
"cost_price": "1.80",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte + Prio"
|
||||
},
|
||||
"21": {
|
||||
"cost_price": "1.60",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief"
|
||||
},
|
||||
"282": {
|
||||
"cost_price": "2.25",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Warensendung 500"
|
||||
},
|
||||
"290": {
|
||||
"cost_price": "2.55",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Warensendung 1.000"
|
||||
},
|
||||
"31": {
|
||||
"cost_price": "2.75",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief"
|
||||
},
|
||||
"331": {
|
||||
"cost_price": "3.40",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Warensendung 2.000 + Gewichtszuschlag"
|
||||
},
|
||||
"401": {
|
||||
"cost_price": "0.95",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Streifbandzeitung bis 50 g"
|
||||
},
|
||||
"405": {
|
||||
"cost_price": "2.68",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Streifbandzeitung 501 g bis 1000 g"
|
||||
},
|
||||
"407": {
|
||||
"cost_price": "1.55",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Streifbandzeitung 51 g bis 500 g"
|
||||
},
|
||||
"41": {
|
||||
"cost_price": "4.95",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief bis 2000 g + Zusatzentgelt MBf"
|
||||
},
|
||||
"51": {
|
||||
"cost_price": "0.70",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte"
|
||||
}
|
||||
}
|
|
@ -1,368 +1,566 @@
|
|||
{
|
||||
"1": {
|
||||
"cost_price": "0.85",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief"
|
||||
},
|
||||
"10001": {
|
||||
"cost_price": "1.1",
|
||||
"international": true,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Intern. GK"
|
||||
},
|
||||
"10011": {
|
||||
"cost_price": "1.7",
|
||||
"international": true,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Intern. GK"
|
||||
},
|
||||
"1002": {
|
||||
"cost_price": "3.20",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10051": {
|
||||
"cost_price": "3.7",
|
||||
"international": true,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Intern. GK"
|
||||
},
|
||||
"1007": {
|
||||
"cost_price": "3.50",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"10071": {
|
||||
"cost_price": "7",
|
||||
"international": true,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Intern. bis 1.000g GK"
|
||||
},
|
||||
"1008": {
|
||||
"cost_price": "5.7",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1009": {
|
||||
"cost_price": "5.70",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"10091": {
|
||||
"cost_price": "17",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Intern. bis 2.000g GK"
|
||||
},
|
||||
"1010": {
|
||||
"cost_price": "7.9",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1012": {
|
||||
"cost_price": "3.35",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10162": {
|
||||
"cost_price": "4.31",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Brief Kilotarif international ohne USt + EINSCHREIBEN"
|
||||
},
|
||||
"10166": {
|
||||
"cost_price": "0.81",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Brief Kilotarif international ohne USt."
|
||||
},
|
||||
"1017": {
|
||||
"cost_price": "3.65",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1018": {
|
||||
"cost_price": "5.85",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1019": {
|
||||
"cost_price": "5.85",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1020": {
|
||||
"cost_price": "8.05",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"10201": {
|
||||
"cost_price": "0.95",
|
||||
"international": true,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Intern. GK"
|
||||
},
|
||||
"1022": {
|
||||
"cost_price": "3.95",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1027": {
|
||||
"cost_price": "4.25",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1028": {
|
||||
"cost_price": "6.45",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1029": {
|
||||
"cost_price": "6.45",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1030": {
|
||||
"cost_price": "8.65",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1032": {
|
||||
"cost_price": "5.10",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1037": {
|
||||
"cost_price": "5.40",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1038": {
|
||||
"cost_price": "7.6",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1039": {
|
||||
"cost_price": "7.60",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1040": {
|
||||
"cost_price": "9.8",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1042": {
|
||||
"cost_price": "7.30",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1047": {
|
||||
"cost_price": "7.60",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN"
|
||||
},
|
||||
"1048": {
|
||||
"cost_price": "9.8",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1049": {
|
||||
"cost_price": "9.80",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1050": {
|
||||
"cost_price": "12",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Integral + Zusatzentgelt MBf + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"1052": {
|
||||
"cost_price": "3.05",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1057": {
|
||||
"cost_price": "3.35",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1058": {
|
||||
"cost_price": "5.55",
|
||||
"international": false,
|
||||
"max_weight": "",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + RÜCKSCHEIN"
|
||||
},
|
||||
"1059": {
|
||||
"cost_price": "5.55",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1060": {
|
||||
"cost_price": "7.75",
|
||||
"international": false,
|
||||
"max_weight": "",
|
||||
"name": "Postkarte Integral + EINSCHREIBEN + EIGENHÄNDIG + RÜCKSCHEIN"
|
||||
},
|
||||
"11": {
|
||||
"cost_price": "1.00",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief"
|
||||
},
|
||||
"11006": {
|
||||
"cost_price": "4.6",
|
||||
"international": true,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11016": {
|
||||
"cost_price": "5.2",
|
||||
"international": true,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11056": {
|
||||
"cost_price": "7.2",
|
||||
"international": true,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11076": {
|
||||
"cost_price": "10.5",
|
||||
"international": true,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief Intern. bis 1.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11096": {
|
||||
"cost_price": "20.5",
|
||||
"international": true,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief Intern. bis 2.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11202": {
|
||||
"cost_price": "4.45",
|
||||
"international": true,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"195": {
|
||||
"cost_price": "1.95",
|
||||
"international": false,
|
||||
"max_weight": "20",
|
||||
"name": "Standardbrief + Prio"
|
||||
},
|
||||
"196": {
|
||||
"cost_price": "2.10",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Kompaktbrief + Prio"
|
||||
},
|
||||
"197": {
|
||||
"cost_price": "2.70",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief + Prio"
|
||||
},
|
||||
"198": {
|
||||
"cost_price": "3.85",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief + Prio"
|
||||
},
|
||||
"199": {
|
||||
"cost_price": "6.05",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief bis 2000 g + Zusatzentgelt MBf + Prio"
|
||||
},
|
||||
"200": {
|
||||
"cost_price": "1.80",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte + Prio"
|
||||
},
|
||||
"21": {
|
||||
"cost_price": "1.60",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Großbrief"
|
||||
},
|
||||
"282": {
|
||||
"cost_price": "2.25",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Bücher- und Warensendung 500"
|
||||
},
|
||||
"290": {
|
||||
"cost_price": "2.55",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Bücher- und Warensendung 1000"
|
||||
},
|
||||
"31": {
|
||||
"cost_price": "2.75",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Maxibrief"
|
||||
},
|
||||
"401": {
|
||||
"cost_price": "0.95",
|
||||
"international": false,
|
||||
"max_weight": "50",
|
||||
"name": "Streifbandzeitung bis 50 g"
|
||||
},
|
||||
"405": {
|
||||
"cost_price": "2.68",
|
||||
"international": false,
|
||||
"max_weight": "1000",
|
||||
"name": "Streifbandzeitung 501 g bis 1000 g"
|
||||
},
|
||||
"407": {
|
||||
"cost_price": "1.55",
|
||||
"international": false,
|
||||
"max_weight": "500",
|
||||
"name": "Streifbandzeitung 51 g bis 500 g"
|
||||
},
|
||||
"41": {
|
||||
"cost_price": "4.95",
|
||||
"international": false,
|
||||
"max_weight": "2000",
|
||||
"name": "Maxibrief bis 2000 g + Zusatzentgelt MBf"
|
||||
},
|
||||
"51": {
|
||||
"cost_price": "0.70",
|
||||
"international": false,
|
||||
"max_weight": "15",
|
||||
"name": "Postkarte"
|
||||
}
|
||||
"1" : {
|
||||
"cost_price" : "0.8",
|
||||
"international" : false,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief"
|
||||
},
|
||||
"10001" : {
|
||||
"cost_price" : "1.1",
|
||||
"international" : true,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief Intern. GK"
|
||||
},
|
||||
"10011" : {
|
||||
"cost_price" : "1.7",
|
||||
"international" : true,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief Intern. GK"
|
||||
},
|
||||
"1002" : {
|
||||
"cost_price" : "3",
|
||||
"international" : false,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10051" : {
|
||||
"cost_price" : "3.7",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief Intern. GK"
|
||||
},
|
||||
"1007" : {
|
||||
"cost_price" : "3.3",
|
||||
"international" : false,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"10071" : {
|
||||
"cost_price" : "7",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief Intern. bis 1.000g GK"
|
||||
},
|
||||
"1009" : {
|
||||
"cost_price" : "5.5",
|
||||
"international" : false,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"10091" : {
|
||||
"cost_price" : "17",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief Intern. bis 2.000g GK"
|
||||
},
|
||||
"1012" : {
|
||||
"cost_price" : "3.15",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10162" : {
|
||||
"cost_price" : "4.04",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Brief Kilotarif international ohne USt + EINSCHREIBEN"
|
||||
},
|
||||
"10166" : {
|
||||
"cost_price" : "0.54",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Brief Kilotarif international ohne USt."
|
||||
},
|
||||
"1017" : {
|
||||
"cost_price" : "3.45",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1019" : {
|
||||
"cost_price" : "5.65",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1022" : {
|
||||
"cost_price" : "3.75",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"10246" : {
|
||||
"cost_price" : "3.2",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS"
|
||||
},
|
||||
"10247" : {
|
||||
"cost_price" : "3.7",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S"
|
||||
},
|
||||
"10248" : {
|
||||
"cost_price" : "7",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M"
|
||||
},
|
||||
"10249" : {
|
||||
"cost_price" : "17",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L"
|
||||
},
|
||||
"10250" : {
|
||||
"cost_price" : "5.45",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS Tracked"
|
||||
},
|
||||
"10251" : {
|
||||
"cost_price" : "5.95",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S Tracked"
|
||||
},
|
||||
"10252" : {
|
||||
"cost_price" : "9.25",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M Tracked"
|
||||
},
|
||||
"10253" : {
|
||||
"cost_price" : "19.25",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L Tracked"
|
||||
},
|
||||
"10254" : {
|
||||
"cost_price" : "3.81",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS (EU/USt.)"
|
||||
},
|
||||
"10255" : {
|
||||
"cost_price" : "4.4",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S (EU/USt.)"
|
||||
},
|
||||
"10256" : {
|
||||
"cost_price" : "8.33",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M (EU/USt.)"
|
||||
},
|
||||
"10257" : {
|
||||
"cost_price" : "20.23",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L (EU/USt.)"
|
||||
},
|
||||
"10258" : {
|
||||
"cost_price" : "6.49",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS Tracked (EU/USt.)"
|
||||
},
|
||||
"10259" : {
|
||||
"cost_price" : "7.08",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S Tracked (EU/USt.)"
|
||||
},
|
||||
"10260" : {
|
||||
"cost_price" : "11.01",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M Tracked (EU/USt.)"
|
||||
},
|
||||
"10261" : {
|
||||
"cost_price" : "22.91",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L Tracked (EU/USt.)"
|
||||
},
|
||||
"1027" : {
|
||||
"cost_price" : "4.05",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"10270" : {
|
||||
"cost_price" : "1",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT (EU/USt.) für Internetmarke"
|
||||
},
|
||||
"10271" : {
|
||||
"cost_price" : "3.25",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT Tracked (EU/USt.) für Internetmarke"
|
||||
},
|
||||
"10272" : {
|
||||
"cost_price" : "1",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT (Non EU) für Internetmarke"
|
||||
},
|
||||
"10273" : {
|
||||
"cost_price" : "3.25",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT Tracked (Non EU) für Internetmarke"
|
||||
},
|
||||
"10280" : {
|
||||
"cost_price" : "5.7",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS Unterschrift"
|
||||
},
|
||||
"10281" : {
|
||||
"cost_price" : "6.2",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S Unterschrift"
|
||||
},
|
||||
"10282" : {
|
||||
"cost_price" : "9.5",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M Unterschrift"
|
||||
},
|
||||
"10283" : {
|
||||
"cost_price" : "19.5",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L Unterschrift"
|
||||
},
|
||||
"10284" : {
|
||||
"cost_price" : "6.78",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International XS Unterschrift (EU/USt.)"
|
||||
},
|
||||
"10285" : {
|
||||
"cost_price" : "7.38",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warenpost International S Unterschrift (EU/USt.)"
|
||||
},
|
||||
"10286" : {
|
||||
"cost_price" : "11.31",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost International M Unterschrift (EU/USt.)"
|
||||
},
|
||||
"10287" : {
|
||||
"cost_price" : "23.21",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost International L Unterschrift (EU/USt.)"
|
||||
},
|
||||
"1029" : {
|
||||
"cost_price" : "6.25",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"10292" : {
|
||||
"cost_price" : "3.5",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT Unterschrift (EU/USt.) für Internetmarke"
|
||||
},
|
||||
"10293" : {
|
||||
"cost_price" : "3.5",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Warenpost Int. KT Unterschrift (Non EU) für Internetmarke"
|
||||
},
|
||||
"1032" : {
|
||||
"cost_price" : "4.9",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN EINWURF"
|
||||
},
|
||||
"1037" : {
|
||||
"cost_price" : "5.2",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN"
|
||||
},
|
||||
"1039" : {
|
||||
"cost_price" : "7.4",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG"
|
||||
},
|
||||
"1042" : {
|
||||
"cost_price" : "7.1",
|
||||
"international" : false,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN EINWURF + Zusatzentgelt MBf"
|
||||
},
|
||||
"1047" : {
|
||||
"cost_price" : "7.4",
|
||||
"international" : false,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN + Zusatzentgelt MBf"
|
||||
},
|
||||
"1049" : {
|
||||
"cost_price" : "9.6",
|
||||
"international" : false,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief Integral + EINSCHREIBEN + EIGENHÄNDIG + Zusatzentgelt MBf"
|
||||
},
|
||||
"11" : {
|
||||
"cost_price" : "0.95",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief"
|
||||
},
|
||||
"11006" : {
|
||||
"cost_price" : "4.6",
|
||||
"international" : true,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11016" : {
|
||||
"cost_price" : "5.2",
|
||||
"international" : true,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11056" : {
|
||||
"cost_price" : "7.2",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief Intern. GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11076" : {
|
||||
"cost_price" : "10.5",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief Intern. bis 1.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"11096" : {
|
||||
"cost_price" : "20.5",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief Intern. bis 2.000g GK Integral + EINSCHREIBEN"
|
||||
},
|
||||
"195" : {
|
||||
"cost_price" : "1.8",
|
||||
"international" : false,
|
||||
"max_weight" : "20",
|
||||
"name" : "Standardbrief + Prio"
|
||||
},
|
||||
"196" : {
|
||||
"cost_price" : "1.95",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Kompaktbrief + Prio"
|
||||
},
|
||||
"197" : {
|
||||
"cost_price" : "2.55",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief + Prio"
|
||||
},
|
||||
"198" : {
|
||||
"cost_price" : "3.7",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief + Prio"
|
||||
},
|
||||
"199" : {
|
||||
"cost_price" : "5.9",
|
||||
"international" : false,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief bis 2000 g + Zusatzentgelt MBf + Prio"
|
||||
},
|
||||
"21" : {
|
||||
"cost_price" : "1.55",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Großbrief"
|
||||
},
|
||||
"232" : {
|
||||
"cost_price" : "3.33",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost individuell"
|
||||
},
|
||||
"233" : {
|
||||
"cost_price" : "3.33",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost M"
|
||||
},
|
||||
"234" : {
|
||||
"cost_price" : "3.09",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost L"
|
||||
},
|
||||
"235" : {
|
||||
"cost_price" : "3.33",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost Blusenlegeformat"
|
||||
},
|
||||
"238" : {
|
||||
"cost_price" : "3.33",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warenpost mit Gefahrgut"
|
||||
},
|
||||
"282" : {
|
||||
"cost_price" : "1.9",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Bücher- und Warensendung 500"
|
||||
},
|
||||
"290" : {
|
||||
"cost_price" : "2.2",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Bücher- und Warensendung 1000"
|
||||
},
|
||||
"30092" : {
|
||||
"cost_price" : "3.2",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Presse Eco 500g"
|
||||
},
|
||||
"30112" : {
|
||||
"cost_price" : "6",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Presse Eco 1000g"
|
||||
},
|
||||
"30132" : {
|
||||
"cost_price" : "12",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Presse Eco 2000g"
|
||||
},
|
||||
"30202" : {
|
||||
"cost_price" : "3.7",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Presse Prio 500g"
|
||||
},
|
||||
"30207" : {
|
||||
"cost_price" : "7.2",
|
||||
"international" : true,
|
||||
"max_weight" : "500",
|
||||
"name" : "Presse Prio 500g + EINSCHREIBEN"
|
||||
},
|
||||
"30222" : {
|
||||
"cost_price" : "7",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Presse Prio 1000g"
|
||||
},
|
||||
"30227" : {
|
||||
"cost_price" : "10.5",
|
||||
"international" : true,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Presse Prio 1000g + EINSCHREIBEN"
|
||||
},
|
||||
"30242" : {
|
||||
"cost_price" : "17",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Presse Prio 2000g"
|
||||
},
|
||||
"30247" : {
|
||||
"cost_price" : "20.5",
|
||||
"international" : true,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Presse Prio 2000g + EINSCHREIBEN"
|
||||
},
|
||||
"31" : {
|
||||
"cost_price" : "2.7",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Maxibrief"
|
||||
},
|
||||
"401" : {
|
||||
"cost_price" : "0.77",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Streifbandzeitung bis 50 g"
|
||||
},
|
||||
"402" : {
|
||||
"cost_price" : "1.07",
|
||||
"international" : false,
|
||||
"max_weight" : "100",
|
||||
"name" : "Streifbandzeitung bis 100 g"
|
||||
},
|
||||
"403" : {
|
||||
"cost_price" : "1.25",
|
||||
"international" : false,
|
||||
"max_weight" : "250",
|
||||
"name" : "Streifbandzeitung bis 250 g"
|
||||
},
|
||||
"404" : {
|
||||
"cost_price" : "1.55",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Streifbandzeitung bis 500 g"
|
||||
},
|
||||
"405" : {
|
||||
"cost_price" : "2.38",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Streifbandzeitung bis 1000 g"
|
||||
},
|
||||
"406" : {
|
||||
"cost_price" : "2.2",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warensendung Maxi 1000g bis 5cm"
|
||||
},
|
||||
"408" : {
|
||||
"cost_price" : "2.35",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Warensendung Maxi 1000g größer 5cm"
|
||||
},
|
||||
"41" : {
|
||||
"cost_price" : "4.9",
|
||||
"international" : false,
|
||||
"max_weight" : "2000",
|
||||
"name" : "Maxibrief bis 2000 g + Zusatzentgelt MBf"
|
||||
},
|
||||
"78" : {
|
||||
"cost_price" : "1.2",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Büchersendung Groß"
|
||||
},
|
||||
"79" : {
|
||||
"cost_price" : "1.7",
|
||||
"international" : false,
|
||||
"max_weight" : "1000",
|
||||
"name" : "Büchersendung Maxi"
|
||||
},
|
||||
"81" : {
|
||||
"cost_price" : "1.3",
|
||||
"international" : false,
|
||||
"max_weight" : "50",
|
||||
"name" : "Warensendung Kompakt"
|
||||
},
|
||||
"82" : {
|
||||
"cost_price" : "2.2",
|
||||
"international" : false,
|
||||
"max_weight" : "500",
|
||||
"name" : "Warensendung Groß"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# 2016, Georg Sauthoff <mail@georg.so>, LGPLv3+
|
||||
# SPDX-Identifier: LGPL-3.0-or-later
|
||||
# 2016, Georg Sauthoff <mail@georg.so>, GPLv3+
|
||||
|
||||
import argparse
|
||||
import configparser
|
||||
|
@ -190,18 +189,12 @@ It's also fine to delimit the recipient lines with newline characters.
|
|||
help='update internal format list via webservice')
|
||||
p.add_argument('--print', action='store_true', default=False,
|
||||
help='Print the retrieved PDF with the lpr command')
|
||||
p.add_argument('--version', '-v', action='store_true',
|
||||
help='Display inema package version')
|
||||
return p
|
||||
|
||||
def parse_args(*xs):
|
||||
arg_parser = mk_arg_parser()
|
||||
args = arg_parser.parse_args(*xs)
|
||||
|
||||
if args.version:
|
||||
print(inema.__version__)
|
||||
sys.exit(0)
|
||||
|
||||
if args.debug:
|
||||
setup_file_logging(args.debug)
|
||||
if not args.config:
|
||||
|
@ -220,7 +213,7 @@ def read_config(filenames):
|
|||
def list_products(expr):
|
||||
l = []
|
||||
e = re.compile(expr, flags=re.IGNORECASE)
|
||||
for k,v in inema.default_products.items():
|
||||
for k,v in inema.marke_products.items():
|
||||
if not e.search(v['name']):
|
||||
continue
|
||||
h = v
|
||||
|
|
|
@ -1,41 +1,24 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# SPDX-Identifier: LGPL-3.0-or-later
|
||||
|
||||
from datetime import date
|
||||
from datetime import datetime
|
||||
from pytz import timezone
|
||||
import hashlib
|
||||
import json
|
||||
from lxml import etree
|
||||
from zeep import Client
|
||||
from zeep.wsse.username import UsernameToken
|
||||
from pkg_resources import resource_stream, resource_listdir
|
||||
import pkg_resources
|
||||
from pkg_resources import resource_stream
|
||||
import requests, zipfile
|
||||
import io
|
||||
import logging
|
||||
import decimal
|
||||
|
||||
from .utils import compute_1c4a_hash, gen_timestamp
|
||||
|
||||
__version__ = pkg_resources.get_distribution(__package__).version
|
||||
__version__ = "0.8"
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# Read the most recent inema/data/products-YYYY-MM-DD.json where YYYY-MM-DD is
|
||||
# not more recent than today. Fall back to inema/data/products.json.
|
||||
# This allows to ship multiple products.json files for announced future price/product
|
||||
# changes.
|
||||
def load_products():
|
||||
ps = [ e for e in resource_listdir(__name__, 'data')
|
||||
if e.startswith('products-') and e.endswith('.json')
|
||||
and e <= 'products-{}.json'.format(date.today().isoformat()) ]
|
||||
ps.sort()
|
||||
ps.insert(0, 'products.json')
|
||||
products_json = resource_stream(__name__, 'data/' + ps[-1]).read().decode("utf-8")
|
||||
products = json.loads(products_json)
|
||||
return products
|
||||
|
||||
default_products = load_products()
|
||||
products_json = resource_stream(__name__, "data/products.json").read().decode("utf-8")
|
||||
marke_products = json.loads(products_json)
|
||||
|
||||
formats_json = resource_stream(__name__, "data/formats.json").read().decode("utf-8")
|
||||
formats = json.loads(formats_json)
|
||||
|
@ -62,6 +45,25 @@ class Internetmarke(object):
|
|||
|
||||
# generate a 1C4A SOAP header
|
||||
def gen_1c4a_hdr(self, partner_id, key_phase, key):
|
||||
# Compute 1C4A request hash accordig to Section 4 of service description
|
||||
def compute_1c4a_hash(partner_id, req_ts, key_phase, key):
|
||||
# trim leading and trailing spaces of each argument
|
||||
partner_id = partner_id.strip()
|
||||
req_ts = req_ts.strip()
|
||||
key_phase = key_phase.strip()
|
||||
key = key.strip()
|
||||
# concatenate with "::" separator
|
||||
inp = "%s::%s::%s::%s" % (partner_id, req_ts, key_phase, key)
|
||||
# compute MD5 hash as 32 hex nibbles
|
||||
md5_hex = hashlib.md5(inp.encode('utf8')).hexdigest()
|
||||
# return the first 8 characters
|
||||
return md5_hex[:8]
|
||||
|
||||
def gen_timestamp():
|
||||
de_zone = timezone("Europe/Berlin")
|
||||
de_time = datetime.now(de_zone)
|
||||
return de_time.strftime("%d%m%Y-%H%M%S")
|
||||
|
||||
nsmap={'soapenv': 'http://schemas.xmlsoap.org/soap/envelope/',
|
||||
'v3':'http://oneclickforpartner.dpag.de'}
|
||||
r = etree.Element("{http://schemas.xmlsoap.org/soap/envelope/}Header", nsmap = nsmap)
|
||||
|
@ -76,21 +78,16 @@ class Internetmarke(object):
|
|||
return [p, t, k, s]
|
||||
|
||||
def get_product_price_by_id(self, ext_prod_id):
|
||||
price_str = self.products[str(ext_prod_id)]['cost_price']
|
||||
return int(decimal.Decimal(price_str) * 100)
|
||||
price_float_str = marke_products[str(ext_prod_id)]['cost_price']
|
||||
return int(round(float(price_float_str) * 100))
|
||||
|
||||
def __init__(self, partner_id, key, key_phase="1", products=None):
|
||||
def __init__(self, partner_id, key, key_phase="1"):
|
||||
self.client = Client(self.wsdl_url)
|
||||
self.partner_id = partner_id
|
||||
self.key_phase = key_phase
|
||||
self.key = key
|
||||
self.soapheader = self.gen_1c4a_hdr(self.partner_id, self.key_phase, self.key)
|
||||
self.positions = []
|
||||
if products is None:
|
||||
self.products = default_products
|
||||
else:
|
||||
self.products = products
|
||||
|
||||
|
||||
def authenticate(self, username, password):
|
||||
s = self.client.service
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
# SPDX-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import hashlib
|
||||
from datetime import datetime
|
||||
from pytz import timezone
|
||||
|
||||
def compute_1c4a_hash(partner_id, req_ts, key_phase, key):
|
||||
"""Compute 1C4A request hash according to Section 4 of service description."""
|
||||
# trim leading and trailing spaces of each argument
|
||||
partner_id = partner_id.strip()
|
||||
req_ts = req_ts.strip()
|
||||
key_phase = key_phase.strip()
|
||||
key = key.strip()
|
||||
# concatenate with "::" separator
|
||||
inp = "%s::%s::%s::%s" % (partner_id, req_ts, key_phase, key)
|
||||
# compute MD5 hash as 32 hex nibbles
|
||||
md5_hex = hashlib.md5(inp.encode('utf8')).hexdigest()
|
||||
# return the first 8 characters
|
||||
return md5_hex[:8]
|
||||
|
||||
def gen_timestamp():
|
||||
"""Compute a timestamp as used in the 1C4A and WaPoInt APIs."""
|
||||
de_zone = timezone("Europe/Berlin")
|
||||
de_time = datetime.now(de_zone)
|
||||
return de_time.strftime("%d%m%Y-%H%M%S")
|
296
inema/wpint.py
296
inema/wpint.py
|
@ -1,296 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Implementation of the "Warenpost International ReST-API"
|
||||
#
|
||||
# This is a completely different interface that Deutsche Post came up many years
|
||||
# after the "1C4A" Internetmarke API. For some strange reason they didn't
|
||||
# extend the old Internetmarke API to add support for the harmonized label and
|
||||
# the electronic customs declaration. Instead, they decided to implement a
|
||||
# completely different API with different standards (REST vs. SOAP) with
|
||||
# literally nothing in common to the old Internetmarke API
|
||||
|
||||
# SPDX-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import json
|
||||
import logging
|
||||
|
||||
import requests
|
||||
from lxml import etree
|
||||
|
||||
from .utils import compute_1c4a_hash, gen_timestamp
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class WarenpostInt(object):
|
||||
"""Represents the Warenpost Internatoinal ReST interface."""
|
||||
def __init__(self, partner_id, key, ekp, pk_email, pk_passwd, key_phase="1", sandbox = False):
|
||||
self.sandbox = sandbox
|
||||
self.partner_id = 'DP_LT' if sandbox else partner_id
|
||||
self.key = key
|
||||
self.ekp = ekp
|
||||
self.key_phase = '1' if sandbox else key_phase
|
||||
self.pk_email = pk_email
|
||||
self.pk_passwd = pk_passwd
|
||||
if sandbox:
|
||||
self.auth_url = 'https://api-qa.deutschepost.com/v1'
|
||||
self.url = 'https://api-qa.deutschepost.com/dpi/shipping/v1'
|
||||
else:
|
||||
self.auth_url = 'https://api.deutschepost.com/v1'
|
||||
self.url = 'https://api.deutschepost.com/dpi/shipping/v1'
|
||||
self.user_token = None
|
||||
self.wallet_balance = None
|
||||
|
||||
def gen_headers(self):
|
||||
"""Generate the HTTP headers required for the API."""
|
||||
ret = {
|
||||
'KEY_PHASE': self.key_phase,
|
||||
'PARTNER_ID': self.partner_id,
|
||||
'Authorization': 'Bearer %s' % self.user_token
|
||||
}
|
||||
if self.sandbox:
|
||||
ret['REQUEST_TIMESTAMP'] = '16082018-122210'
|
||||
ret['PARTNER_SIGNATURE'] = '9d7c35be'
|
||||
else:
|
||||
timestamp = gen_timestamp()
|
||||
sig = compute_1c4a_hash(self.partner_id, timestamp, self.key_phase, self.key)
|
||||
ret['REQUEST_TIMESTAMP'] = timestamp
|
||||
ret['PARTNER_SIGNATURE'] = sig
|
||||
return ret
|
||||
|
||||
def get_token(self):
|
||||
"""Get an Access Token for further API requests."""
|
||||
url = "%s/%s" % (self.auth_url, 'auth/accesstoken')
|
||||
auth = requests.auth.HTTPBasicAuth(self.pk_email, self.pk_passwd)
|
||||
ret = requests.request('GET', url, headers=self.gen_headers(), auth=auth)
|
||||
et = etree.XML(ret.content)
|
||||
e_user_token = et.find(".//{http://oneclickforapp.dpag.de/V3}userToken")
|
||||
e_wallet_balance = et.find(".//{http://oneclickforapp.dpag.de/V3}walletBalance")
|
||||
# update status + return token
|
||||
self.user_token = e_user_token.text
|
||||
self.wallet_balance = e_wallet_balance.text
|
||||
_logger.debug("User Token: %s", self.user_token)
|
||||
_logger.info("Wallet balance: %s", self.wallet_balance)
|
||||
return e_user_token.text
|
||||
|
||||
def request(self, method, suffix, json=None, headers=None):
|
||||
"""Wrapper for issuing HTTP requests against the API.
|
||||
This internally generates all required headers, including Authorization."""
|
||||
url = "%s/%s" % (self.url, suffix)
|
||||
# FIXME: automatically ensure we have a [current] user_token
|
||||
h = headers.copy() if headers else {}
|
||||
h.update(self.gen_headers())
|
||||
_logger.debug("HTTP Request: %s %s: HDR: %s JSON: %s", method, url, h, json)
|
||||
r = requests.request(method, url, json=json, headers=h)
|
||||
_logger.debug("HTTP Response: %s", r.content)
|
||||
return r
|
||||
|
||||
class Address(object):
|
||||
"""Common Representation of a postal address. In their infinite cluelessness,
|
||||
the developes of the Warenpost International API decided it's a good idea to
|
||||
use a flat, non-hierarchical structure with different names of fields for
|
||||
sender and recipient."""
|
||||
def __init__(self, name, addr_lines, city, country_code, postal_code='', state=None,
|
||||
phone=None, fax=None, email=None):
|
||||
if len(name) > 30:
|
||||
raise ValueError('Maximum length of name is 30 chars')
|
||||
if len(addr_lines) > 3:
|
||||
raise ValueError('Maximum number of 3 Address Lines supported')
|
||||
if len(city) > 30:
|
||||
raise ValueError('Maximum length of city is 30 chars')
|
||||
if len(country_code) != 2:
|
||||
raise ValueError('Country must be 2-digit ISO-3166-1 code')
|
||||
if state and len(state) > 20:
|
||||
raise ValueError('Maximum length of state is 20 chars')
|
||||
if phone and len(phone) > 15:
|
||||
raise ValueError('Maximum length of phone number is 15 chars')
|
||||
if fax and len(fax) > 15:
|
||||
raise ValueError('Maximum length of fax number is 15 chars')
|
||||
if email and len(email) > 50:
|
||||
raise ValueError('Maximum length of email address is 50 chars')
|
||||
for l in addr_lines:
|
||||
if len(l) > 40:
|
||||
raise ValueError('Maximum length of address lines is 40 chars')
|
||||
self.name = name
|
||||
self.addr_lines = addr_lines
|
||||
self.city = city
|
||||
self.postal_code = postal_code
|
||||
self.country_code = country_code
|
||||
self.state = state
|
||||
self.phone = phone
|
||||
self.fax = fax
|
||||
self.email = email
|
||||
|
||||
def as_sender(self):
|
||||
"""Represent an Address object as JSON fields of a sender."""
|
||||
if len(self.addr_lines) > 2:
|
||||
raise ValueError('Maximum number of 2 Address Lines supported')
|
||||
for l in self.addr_lines:
|
||||
if len(l) > 30:
|
||||
raise ValueError('Maximum length of address lines is 30 chars')
|
||||
ret = {
|
||||
'senderName': self.name,
|
||||
'senderAddressLine1': self.addr_lines[0],
|
||||
'senderAddressLine2': self.addr_lines[1] if len(self.addr_lines) > 1 else '',
|
||||
'senderCity': self.city,
|
||||
'senderPostalCode': self.postal_code,
|
||||
'senderCountry': self.country_code,
|
||||
}
|
||||
if self.phone:
|
||||
ret['senderPhone'] = self.phone
|
||||
if self.email:
|
||||
ret['senderEmail'] = self.email
|
||||
return ret
|
||||
|
||||
def as_recipient(self):
|
||||
"""Represent an Address object as JSON fields of a sender."""
|
||||
ret = {
|
||||
'recipient': self.name,
|
||||
'addressLine1': self.addr_lines[0],
|
||||
'city': self.city,
|
||||
'postalCode': self.postal_code,
|
||||
'destinationCountry': self.country_code,
|
||||
}
|
||||
if len(self.addr_lines) > 1:
|
||||
ret['addressLine2'] = self.addr_lines[1]
|
||||
if len(self.addr_lines) > 2:
|
||||
ret['addressLine3'] = self.addr_lines[2]
|
||||
if self.state:
|
||||
ret['state'] = self.state
|
||||
if self.phone:
|
||||
ret['recipientPhone'] = self.phone
|
||||
if self.fax:
|
||||
ret['recipientFax'] = self.fax
|
||||
if self.email:
|
||||
ret['recipientEmail'] = self.email
|
||||
return ret
|
||||
|
||||
def build_content_item(self, line_weight_g, line_value, qty, hs_code=None, origin_cc=None,
|
||||
desc=None):
|
||||
"""Build an 'content item' in the language of the WaPoInt API. Represents one
|
||||
line on the customs form."""
|
||||
line_weight_g = int(line_weight_g)
|
||||
if line_weight_g > 2000:
|
||||
raise ValueError('Maximum line weight is 2000g')
|
||||
qty = int(qty)
|
||||
if qty > 99 or qty < 1:
|
||||
raise ValueError('Maximum line quantity is 99')
|
||||
if desc and len(desc) > 33:
|
||||
raise ValueError('Maximum length of contentPieceDescription is 33 chars')
|
||||
if hs_code and (len(hs_code) < 4 or len(hs_code) > 10):
|
||||
raise ValueError('HS-Code must be between 4 and 10 characters long')
|
||||
ret = {
|
||||
'contentPieceNetweight': line_weight_g,
|
||||
'contentPieceValue': "%.2f" % (line_value),
|
||||
'contentPieceAmount': qty,
|
||||
}
|
||||
if hs_code:
|
||||
ret['contentPieceHsCode'] = str(hs_code)
|
||||
if desc:
|
||||
ret['contentPieceDescription'] = str(desc)
|
||||
if origin_cc:
|
||||
ret['contentPieceOrigin'] = origin_cc
|
||||
return ret
|
||||
|
||||
def shrink_contents_if_needed(self, contents):
|
||||
"""Attempt to shrink the number of content lines below the permitted 5. We
|
||||
intentionally ignore the country of origin and group all lines by the
|
||||
HTS code. All lines sharing the same HTS code are merged to one,
|
||||
hopefully this is sufficient to get the count below 5."""
|
||||
if len(contents) < 5:
|
||||
return contents
|
||||
# group items by HTS code
|
||||
by_hts = {}
|
||||
for c in contents:
|
||||
hts = c['contentPieceHsCode'].strip()
|
||||
if hts in by_hts:
|
||||
by_hts[hts].append(c)
|
||||
else:
|
||||
by_hts[hts] = [c]
|
||||
if len(by_hts.keys()) > 5:
|
||||
raise ValueError('More than 5 distinct HTS numbers(%u); cannot merge' % (len(by_hts.keys())))
|
||||
out = []
|
||||
# generate one aggregate item per HTS code
|
||||
for k in by_hts:
|
||||
total_grams = 0
|
||||
total_value = 0
|
||||
total_qty = 0
|
||||
for c in by_hts[k]:
|
||||
total_grams += c['contentPieceNetweight']
|
||||
total_value += float(c['contentPieceValue'])
|
||||
total_qty += c['contentPieceAmount']
|
||||
aggregate = by_hts[k][0]
|
||||
aggregate['contentPieceAmount'] = total_qty
|
||||
aggregate['contentPieceValue'] = "%.2f" % (total_value)
|
||||
aggregate['contentPieceNetweight'] = total_grams
|
||||
out.append(aggregate)
|
||||
return out
|
||||
|
||||
def build_item(self, product, sender, recipient, weight_grams, amount=0, currency='EUR',
|
||||
shipment_nature='SALE_GOODS', customer_reference=None, contents=None):
|
||||
"""Build an 'item' in the language of the WaPoInt API. Represents one shipment."""
|
||||
weight_grams = int(weight_grams)
|
||||
if weight_grams > 2000:
|
||||
raise ValueError('Maximum item gross weight is 2000g')
|
||||
if len(currency) != 3:
|
||||
raise ValueError('Currency must be expressed as 3-digit ISO-4217 code')
|
||||
if contents and len(contents) > 5:
|
||||
raise ValueError('Custom Contents must not contain more than 5 lines')
|
||||
ret = {
|
||||
'product': str(product),
|
||||
'serviceLevel': 'STANDARD',
|
||||
'shipmentAmount': int(amount),
|
||||
'shipmentCurrency': currency,
|
||||
'shipmentGrossWeight': weight_grams,
|
||||
'shipmentNaturetype': shipment_nature,
|
||||
}
|
||||
# merge in the sender and recipient fields
|
||||
ret.update(sender.as_sender())
|
||||
ret.update(recipient.as_recipient())
|
||||
if contents:
|
||||
ret['contents'] = contents
|
||||
if customer_reference:
|
||||
customer_reference = str(customer_reference)
|
||||
if len(customer_reference) > 20:
|
||||
raise ValueError('Maximum length of customer reference is 20 chars')
|
||||
ret['custRef'] = customer_reference
|
||||
return ret
|
||||
|
||||
def build_order(self, items, contact_name, order_status='FINALIZE'):
|
||||
"""Build an 'order' in the language of the WaPoInt API. Consists of multiple shipments."""
|
||||
ret = {
|
||||
'customerEkp': self.ekp,
|
||||
'orderStatus': order_status,
|
||||
'paperwork': {
|
||||
'contactName': contact_name,
|
||||
'awbCopyCount': 1,
|
||||
},
|
||||
'items': items
|
||||
}
|
||||
return ret
|
||||
|
||||
def api_create_order(self, items, contact_name, order_status='FINALIZE'):
|
||||
"""Issue an API request to create an order consisting of items."""
|
||||
order = self.build_order(items, contact_name=contact_name, order_status=order_status)
|
||||
_logger.info("Order Request: %s", order)
|
||||
r = self.request('POST', 'orders', json = order)
|
||||
if r.ok:
|
||||
# TODO: figure out the AWB and the (item, barcode, voucherId, ...) for the items
|
||||
json_resp = r.json()
|
||||
#print(json.dumps(json_resp, indent=4))
|
||||
_logger.info("Order Response: %s", json_resp)
|
||||
# TODO: download the PDF for each AWB
|
||||
return json_resp
|
||||
else:
|
||||
raise ValueError('%s: %s' % (r.status_code, r.text))
|
||||
|
||||
def api_get_item_label(self, item_id, accept='application/pdf'):
|
||||
"""Download the label for a given item. Returns PDF as 'bytes'"""
|
||||
r = self.request('GET', 'items/%s/label' % item_id, headers={'Accept': accept})
|
||||
r.raise_for_status()
|
||||
return r.content
|
||||
|
||||
def api_get_item_labels(self, awb, accept='application/pdf'):
|
||||
"""Download the labels for all items in a given AWB. Returns PDF as 'bytes'"""
|
||||
r = self.request('GET', 'shipments/%s/itemlabels' % awb, headers={'Accept': accept})
|
||||
r.raise_for_status()
|
||||
return r.content
|
19
setup.py
19
setup.py
|
@ -1,28 +1,27 @@
|
|||
from setuptools import find_packages, setup
|
||||
from inema import __version__
|
||||
|
||||
install_requires = [
|
||||
'zeep >= 0.12.0',
|
||||
'pytz',
|
||||
'setuptools' # i.e. provides pkg_resources
|
||||
'lxml',
|
||||
'pytz'
|
||||
]
|
||||
|
||||
setup(
|
||||
name='inema',
|
||||
version='0.8.10',
|
||||
description='A Python interface to the Deutsche Post Internetmarke and Warenpost International Online Franking',
|
||||
version=__version__,
|
||||
description='A Python interface to the Deutsche Post Internetmarke Online Franking',
|
||||
long_description=open('README.rst').read(),
|
||||
author='Harald Welte',
|
||||
author_email='hwelte@sysmocom.de',
|
||||
url='https://git.sysmocom.de/odoo/python-inema/',
|
||||
url='http://git.sysmocom.de/python-inema/',
|
||||
packages=['inema'],
|
||||
install_requires=install_requires,
|
||||
package_data={'inema': ['data/products.json',
|
||||
'data/products-2024-07-01.json',
|
||||
'data/formats.json']},
|
||||
license='LGPLv3',
|
||||
package_data={'inema': ['data/products.json', 'data/formats.json']},
|
||||
license='AGPLv3',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
|
||||
'License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Topic :: Office/Business',
|
||||
|
|
Loading…
Reference in New Issue