from faxplus import ApiClient, OutboxApi, OutboxComment, RetryOptions, OutboxOptions, OutboxCoverPage, PayloadOutbox
from faxplus.configuration import Configuration
outbox_comment = OutboxComment(tags=['tag1', 'tag2'],
text='text comment')
retry_options = RetryOptions(count=2, delay=15)
outbox_options = OutboxOptions(enhancement=True, retry=retry_options)
outbox_cover_page = OutboxCoverPage()
payload_outbox = PayloadOutbox(from='+12345667',
to=['+12345688', '+12345699'],
files=['filetosend.pdf'],
comment=outbox_comment,
options=outbox_options,
send_time='2000-01-01 01:02:03 +0000',
return_ids=True,
cover_page=outbox_cover_page)
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = OutboxApi(api_client)
resp = api.send_fax(
user_id='13d8z73c',
body=payload_outbox
)
Comments