Skip to content

Commit

Permalink
fix(USPS*): missing required PASSWORD request properties
Browse files Browse the repository at this point in the history
  • Loading branch information
danh91 committed Apr 3, 2024
1 parent 8bef255 commit b1e8728
Show file tree
Hide file tree
Showing 204 changed files with 1,158 additions and 381 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def pickup_cancel_request(
) -> Serializable:
request = CarrierPickupCancelRequest(
UserID=settings.username,
PASSWORD=settings.password,
FirmName=payload.address.company_name,
SuiteOrApt=payload.address.address_line1,
Address2=SF.concat_str(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def pickup_request(payload: PickupRequest, settings: Settings) -> Serializable:

request = CarrierPickupScheduleRequest(
USERID=settings.username,
PASSWORD=settings.password,
FirstName=payload.address.person_name,
LastName=None,
FirmName=payload.address.company_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def pickup_update_request(

request = CarrierPickupChangeRequest(
USERID=settings.username,
PASSWORD=settings.password,
FirstName=payload.address.person_name,
LastName=None,
FirmName=payload.address.company_name,
Expand Down
1 change: 1 addition & 0 deletions modules/connectors/usps/karrio/providers/usps/rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def rate_request(

request = RateV4Request(
USERID=settings.username,
PASSWORD=settings.password,
Revision="2",
Package=[
PackageType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def shipment_cancel_request(
payload: ShipmentCancelRequest, settings: Settings
) -> Serializable:
request = eVSCancelRequest(
USERID=settings.username, BarcodeNumber=payload.shipment_identifier
USERID=settings.username,
PASSWORD=settings.password,
BarcodeNumber=payload.shipment_identifier,
)

return Serializable(request, XP.export)
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def shipment_request(

request = usps.eVSRequest(
USERID=settings.username,
PASSWORD=settings.password,
Option=None,
Revision="1",
ImageParameters=usps.ImageParametersType(
Expand Down
1 change: 1 addition & 0 deletions modules/connectors/usps/karrio/providers/usps/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def tracking_request(
) -> lib.Serializable:
request = usps.TrackFieldRequest(
USERID=settings.username,
PASSWORD=settings.password,
Revision="1",
ClientIp="127.0.0.1",
SourceId="Karrio",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:36 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:38 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:36 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:38 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:36 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:38 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down Expand Up @@ -1011,14 +1011,16 @@ class CarrierPickupAvailabilityRequest(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, USERID=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, Date=None, gds_collector_=None, **kwargs_):
def __init__(self, USERID=None, PASSWORD=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, Date=None, gds_collector_=None, **kwargs_):
self.gds_collector_ = gds_collector_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.USERID = _cast(None, USERID)
self.USERID_nsprefix_ = None
self.PASSWORD = _cast(None, PASSWORD)
self.PASSWORD_nsprefix_ = None
self.FirmName = FirmName
self.FirmName_nsprefix_ = None
self.SuiteOrApt = SuiteOrApt
Expand Down Expand Up @@ -1092,6 +1094,10 @@ def get_USERID(self):
return self.USERID
def set_USERID(self, USERID):
self.USERID = USERID
def get_PASSWORD(self):
return self.PASSWORD
def set_PASSWORD(self, PASSWORD):
self.PASSWORD = PASSWORD
def has__content(self):
if (
self.FirmName is not None or
Expand Down Expand Up @@ -1134,6 +1140,9 @@ def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_=
if self.USERID is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
outfile.write(' USERID=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.USERID), input_name='USERID')), ))
if self.PASSWORD is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
outfile.write(' PASSWORD=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.PASSWORD), input_name='PASSWORD')), ))
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CarrierPickupAvailabilityRequest', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
Expand Down Expand Up @@ -1191,6 +1200,10 @@ def _buildAttributes(self, node, attrs, already_processed):
if value is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
self.USERID = value
value = find_attr_value_('PASSWORD', node)
if value is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
self.PASSWORD = value
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
if nodeName_ == 'FirmName':
value_ = child_.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:36 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:38 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:37 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:39 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down Expand Up @@ -1011,14 +1011,16 @@ class CarrierPickupCancelRequest(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, USERID=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, ConfirmationNumber=None, gds_collector_=None, **kwargs_):
def __init__(self, USERID=None, PASSWORD=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, ConfirmationNumber=None, gds_collector_=None, **kwargs_):
self.gds_collector_ = gds_collector_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.USERID = _cast(None, USERID)
self.USERID_nsprefix_ = None
self.PASSWORD = _cast(None, PASSWORD)
self.PASSWORD_nsprefix_ = None
self.FirmName = FirmName
self.FirmName_nsprefix_ = None
self.SuiteOrApt = SuiteOrApt
Expand Down Expand Up @@ -1092,6 +1094,10 @@ def get_USERID(self):
return self.USERID
def set_USERID(self, USERID):
self.USERID = USERID
def get_PASSWORD(self):
return self.PASSWORD
def set_PASSWORD(self, PASSWORD):
self.PASSWORD = PASSWORD
def has__content(self):
if (
self.FirmName is not None or
Expand Down Expand Up @@ -1134,6 +1140,9 @@ def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_=
if self.USERID is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
outfile.write(' USERID=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.USERID), input_name='USERID')), ))
if self.PASSWORD is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
outfile.write(' PASSWORD=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.PASSWORD), input_name='PASSWORD')), ))
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CarrierPickupCancelRequest', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
Expand Down Expand Up @@ -1191,6 +1200,10 @@ def _buildAttributes(self, node, attrs, already_processed):
if value is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
self.USERID = value
value = find_attr_value_('PASSWORD', node)
if value is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
self.PASSWORD = value
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
if nodeName_ == 'FirmName':
value_ = child_.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:37 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:39 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:37 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:39 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down Expand Up @@ -1011,14 +1011,16 @@ class CarrierPickupChangeRequest(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, USERID=None, FirstName=None, LastName=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, Phone=None, Extension=None, Package=None, EstimatedWeight=None, PackageLocation=None, SpecialInstructions=None, ConfirmationNumber=None, EmailAddress=None, gds_collector_=None, **kwargs_):
def __init__(self, USERID=None, PASSWORD=None, FirstName=None, LastName=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, Phone=None, Extension=None, Package=None, EstimatedWeight=None, PackageLocation=None, SpecialInstructions=None, ConfirmationNumber=None, EmailAddress=None, gds_collector_=None, **kwargs_):
self.gds_collector_ = gds_collector_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.USERID = _cast(None, USERID)
self.USERID_nsprefix_ = None
self.PASSWORD = _cast(None, PASSWORD)
self.PASSWORD_nsprefix_ = None
self.FirstName = FirstName
self.FirstName_nsprefix_ = None
self.LastName = LastName
Expand Down Expand Up @@ -1155,6 +1157,10 @@ def get_USERID(self):
return self.USERID
def set_USERID(self, USERID):
self.USERID = USERID
def get_PASSWORD(self):
return self.PASSWORD
def set_PASSWORD(self, PASSWORD):
self.PASSWORD = PASSWORD
def has__content(self):
if (
self.FirstName is not None or
Expand Down Expand Up @@ -1206,6 +1212,9 @@ def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_=
if self.USERID is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
outfile.write(' USERID=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.USERID), input_name='USERID')), ))
if self.PASSWORD is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
outfile.write(' PASSWORD=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.PASSWORD), input_name='PASSWORD')), ))
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CarrierPickupChangeRequest', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
Expand Down Expand Up @@ -1298,6 +1307,10 @@ def _buildAttributes(self, node, attrs, already_processed):
if value is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
self.USERID = value
value = find_attr_value_('PASSWORD', node)
if value is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
self.PASSWORD = value
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
if nodeName_ == 'FirstName':
value_ = child_.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:37 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:39 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:38 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:39 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down Expand Up @@ -1011,14 +1011,16 @@ class CarrierPickupInquiryRequest(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, USERID=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, ConfirmationNumber=None, gds_collector_=None, **kwargs_):
def __init__(self, USERID=None, PASSWORD=None, FirmName=None, SuiteOrApt=None, Address2=None, Urbanization=None, City=None, State=None, ZIP5=None, ZIP4=None, ConfirmationNumber=None, gds_collector_=None, **kwargs_):
self.gds_collector_ = gds_collector_
self.gds_elementtree_node_ = None
self.original_tagname_ = None
self.parent_object_ = kwargs_.get('parent_object_')
self.ns_prefix_ = None
self.USERID = _cast(None, USERID)
self.USERID_nsprefix_ = None
self.PASSWORD = _cast(None, PASSWORD)
self.PASSWORD_nsprefix_ = None
self.FirmName = FirmName
self.FirmName_nsprefix_ = None
self.SuiteOrApt = SuiteOrApt
Expand Down Expand Up @@ -1092,6 +1094,10 @@ def get_USERID(self):
return self.USERID
def set_USERID(self, USERID):
self.USERID = USERID
def get_PASSWORD(self):
return self.PASSWORD
def set_PASSWORD(self, PASSWORD):
self.PASSWORD = PASSWORD
def has__content(self):
if (
self.FirmName is not None or
Expand Down Expand Up @@ -1134,6 +1140,9 @@ def _exportAttributes(self, outfile, level, already_processed, namespaceprefix_=
if self.USERID is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
outfile.write(' USERID=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.USERID), input_name='USERID')), ))
if self.PASSWORD is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
outfile.write(' PASSWORD=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.PASSWORD), input_name='PASSWORD')), ))
def _exportChildren(self, outfile, level, namespaceprefix_='', namespacedef_='', name_='CarrierPickupInquiryRequest', fromsubclass_=False, pretty_print=True):
if pretty_print:
eol_ = '\n'
Expand Down Expand Up @@ -1191,6 +1200,10 @@ def _buildAttributes(self, node, attrs, already_processed):
if value is not None and 'USERID' not in already_processed:
already_processed.add('USERID')
self.USERID = value
value = find_attr_value_('PASSWORD', node)
if value is not None and 'PASSWORD' not in already_processed:
already_processed.add('PASSWORD')
self.PASSWORD = value
def _buildChildren(self, child_, node, nodeName_, fromsubclass_=False, gds_collector_=None):
if nodeName_ == 'FirmName':
value_ = child_.text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Generated Wed Apr 3 18:16:38 2024 by generateDS.py version 2.43.3.
# Generated Wed Apr 3 21:08:40 2024 by generateDS.py version 2.43.3.
# Python 3.10.13 (main, Mar 21 2024, 17:51:02) [GCC 9.4.0]
#
# Command line options:
Expand Down
Loading

0 comments on commit b1e8728

Please sign in to comment.