Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #46 from HelloFax/boolean_formatting_fixes
Browse files Browse the repository at this point in the history
Only convert bools to strings where appropriate
  • Loading branch information
jyoung488 authored May 30, 2018
2 parents bff95da + 520b6d6 commit 4325a29
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
52 changes: 26 additions & 26 deletions hellosign_sdk/hsclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class HSClient(object):
'''

version = '3.8.5' # SDK version
version = '3.8.7' # SDK version
API_VERSION = 'v3' # API version
API_URL = ''

Expand Down Expand Up @@ -111,12 +111,12 @@ def __str__(self):
def _init_endpoints(self):

API_PRODUCTION_URL = "https://api.hellosign.com"
API_DEV_URL = "https://www.dev-hellosign.com/apiapp_dev.php"
API_STAGING_URL = "https://staging.hellosign.com/apiapp.php"
API_DEV_URL = "https://api.dev-hellosign.com"
API_STAGING_URL = "https://api.staging-hellosign.com"

WEB_PRODUCTION_URL = "https://www.hellosign.com"
WEB_DEV_URL = "https://www.dev-hellosign.com/webapp_dev.php"
WEB_STAGING_URL = "https://staging.hellosign.com/webapp_dev.php"
WEB_PRODUCTION_URL = "https://app.hellosign.com"
WEB_DEV_URL = "https://app.dev-hellosign.com"
WEB_STAGING_URL = "https://app.staging-hellosign.com"

if self.env == "production":
self.API_URL = API_PRODUCTION_URL + '/' + self.API_VERSION
Expand Down Expand Up @@ -395,7 +395,7 @@ def send_signature_request(self, test_mode=False, files=None, file_urls=None, ti
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'files': files,
'file_urls': file_urls,
'title': title,
Expand All @@ -405,10 +405,10 @@ def send_signature_request(self, test_mode=False, files=None, file_urls=None, ti
'signers': signers,
'cc_email_addresses': cc_email_addresses,
'form_fields_per_document': form_fields_per_document,
'use_text_tags': self._boolean(use_text_tags),
'hide_text_tags': self._boolean(hide_text_tags),
'use_text_tags': use_text_tags,
'hide_text_tags': hide_text_tags,
'metadata': metadata,
'allow_decline': self._boolean(allow_decline)
'allow_decline': allow_decline
}

if ux_version is not None:
Expand Down Expand Up @@ -472,7 +472,7 @@ def send_signature_request_with_template(self, test_mode=False, template_id=None
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'template_id': template_id,
'template_ids': template_ids,
'title': title,
Expand Down Expand Up @@ -597,7 +597,7 @@ def send_signature_request_embedded(self, test_mode=False, client_id=None, files
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'client_id': client_id,
'files': files,
'file_urls': file_urls,
Expand All @@ -608,8 +608,8 @@ def send_signature_request_embedded(self, test_mode=False, client_id=None, files
'signers': signers,
'cc_email_addresses': cc_email_addresses,
'form_fields_per_document': form_fields_per_document,
'use_text_tags': self._boolean(use_text_tags),
'hide_text_tags': self._boolean(hide_text_tags),
'use_text_tags': use_text_tags,
'hide_text_tags': hide_text_tags,
'metadata': metadata,
'allow_decline': allow_decline
}
Expand Down Expand Up @@ -679,7 +679,7 @@ def send_signature_request_embedded_with_template(self, test_mode=False, client_
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'client_id': client_id,
'template_id': template_id,
'template_ids': template_ids,
Expand Down Expand Up @@ -852,7 +852,7 @@ def create_embedded_template_draft(self, client_id, signer_roles, test_mode=Fals
'''
params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'client_id': client_id,
'files': files,
'file_urls': file_urls,
Expand Down Expand Up @@ -1056,7 +1056,7 @@ def create_unclaimed_draft(self, test_mode=False, files=None, file_urls=None, dr
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'files': files,
'file_urls': file_urls,
'draft_type': draft_type,
Expand All @@ -1068,7 +1068,7 @@ def create_unclaimed_draft(self, test_mode=False, files=None, file_urls=None, dr
'form_fields_per_document': form_fields_per_document,
'metadata': metadata,
'use_preexisting_fields': use_preexisting_fields,
'allow_decline': self._boolean(allow_decline)
'allow_decline': allow_decline
}

return self._create_unclaimed_draft(**params)
Expand Down Expand Up @@ -1132,10 +1132,10 @@ def create_embedded_unclaimed_draft(self, test_mode=False, client_id=None, is_fo
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'client_id': client_id,
'requester_email_address': requester_email_address,
'is_for_embedded_signing': self._boolean(is_for_embedded_signing),
'is_for_embedded_signing': is_for_embedded_signing,
'files': files,
'file_urls': file_urls,
'draft_type': draft_type,
Expand All @@ -1148,7 +1148,7 @@ def create_embedded_unclaimed_draft(self, test_mode=False, client_id=None, is_fo
'form_fields_per_document': form_fields_per_document,
'metadata': metadata,
'use_preexisting_fields': use_preexisting_fields,
'allow_decline': self._boolean(allow_decline)
'allow_decline': allow_decline
}

return self._create_unclaimed_draft(**params)
Expand Down Expand Up @@ -1205,7 +1205,7 @@ def create_embedded_unclaimed_draft_with_template(self, test_mode=False, client_
)

params = {
'test_mode': self._boolean(test_mode),
'test_mode': test_mode,
'client_id': client_id,
'is_for_embedded_signing': is_for_embedded_signing,
'template_id': template_id,
Expand All @@ -1220,7 +1220,7 @@ def create_embedded_unclaimed_draft_with_template(self, test_mode=False, client_
'ccs': ccs,
'custom_fields': custom_fields,
'metadata': metadata,
'allow_decline': self._boolean(allow_decline)
'allow_decline': allow_decline
}

return self._create_embedded_unclaimed_draft_with_template(**params)
Expand Down Expand Up @@ -1626,7 +1626,7 @@ def _create_unclaimed_draft(self, test_mode=False, client_id=None, is_for_embedd
"message": message,
"signing_redirect_url": signing_redirect_url,
"form_fields_per_document": form_fields_per_document,
"use_preexisting_fields": use_preexisting_fields,
"use_preexisting_fields": self._boolean(use_preexisting_fields),
"allow_decline": self._boolean(allow_decline)
}

Expand Down Expand Up @@ -1745,7 +1745,7 @@ def _create_embedded_template_draft(self, client_id, signer_roles, test_mode=Fal
'title': title,
'subject': subject,
'message': message,
'use_preexisting_fields': use_preexisting_fields
'use_preexisting_fields': self._boolean(use_preexisting_fields)
}

# Prep files
Expand Down Expand Up @@ -1787,7 +1787,7 @@ def _create_embedded_unclaimed_draft_with_template(self, test_mode=False, client
payload = {
"test_mode": self._boolean(test_mode),
"client_id": client_id,
"is_for_embedded_signing": is_for_embedded_signing,
"is_for_embedded_signing": self._boolean(is_for_embedded_signing),
"template_id": template_id,
"requester_email_address": requester_email_address,
"title": title,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readme():

setup(
name='hellosign-python-sdk',
version='3.8.6',
version='3.8.7',
description="A Python wrapper for the HelloSign API (http://www.hellosign.com/api)",
long_description=readme(),
classifiers=[
Expand Down

0 comments on commit 4325a29

Please sign in to comment.