Skip to content

Commit 3115008

Browse files
authored
Merge pull request #71 from EasyPost/zip4-delivery-fix-abram
Fix for sending delivery and zip4 verification in the same request
2 parents ae6dd82 + 8ae0295 commit 3115008

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

easypost/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -628,12 +628,10 @@ def create(cls, api_key=None, verify=None, verify_strict=None, **params):
628628
if verify or verify_strict:
629629
verify = verify or []
630630
verify_strict = verify_strict or []
631-
url += "?"
632-
633-
for param in verify:
634-
url += "verify[]={0}".format(param)
635-
for param in verify_strict:
636-
url += "verify_strict[]={0}".format(param)
631+
url += '?' + '&'.join(
632+
['verify[]={0}'.format(opt) for opt in verify] +
633+
['verify_strict[]={0}'.format(opt) for opt in verify_strict]
634+
)
637635

638636
wrapped_params = {cls.class_name(): params}
639637
response, api_key = requestor.request('post', url, wrapped_params)

0 commit comments

Comments
 (0)