diff --git a/.bumpversion.cfg b/.bumpversion.cfg deleted file mode 100644 index aa05a6a..0000000 --- a/.bumpversion.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[bumpversion] -current_version = 4.5.1 -commit = True -tag = True - -[bumpversion:file:setup.py] - -[bumpversion:file:lob/version.py] - diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 2fda251..0000000 --- a/.coveragerc +++ /dev/null @@ -1,8 +0,0 @@ -[run] -source=lob -[report] -exclude_lines = - # Have to re-enable the standard pragma - pragma: no cover - - def __repr__ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 01b3180..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Pipenv Coveralls Test - -on: ["push", "pull_request"] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [ '3.10', '3.9', '3.8', '3.7', '3.6' ] - name: Python ${{ matrix.python-version }} sample - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - cache: 'pipenv' - - run: pip install pipenv - - run: pipenv sync --dev - - run: pipenv run tests - env: - LOB_API_KEY: ${{ secrets.LOB_API_KEY }} diff --git a/.github/workflows/forked_repos.yaml b/.github/workflows/forked_repos.yaml deleted file mode 100644 index 87c05eb..0000000 --- a/.github/workflows/forked_repos.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run tests from Forked Repo - -on: - pull_request_target: - types: [labeled] -jobs: - build: - runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'Approved') - strategy: - matrix: - python-version: [ '3.10', '3.9', '3.8', '3.7', '3.6' ] - name: Python ${{ matrix.python-version }} sample - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - cache: 'pipenv' - - run: pip install pipenv - - run: pipenv sync --dev - - run: pipenv run tests - env: - LOB_API_KEY: ${{ secrets.LOB_API_KEY }} \ No newline at end of file diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml new file mode 100644 index 0000000..44cd5d1 --- /dev/null +++ b/.github/workflows/run_tests.yml @@ -0,0 +1,37 @@ +name: Run Tests + +on: + workflow_dispatch: + push: + +jobs: + python_tests: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.7", "3.8", "3.9"] + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install python-dotenv + python -m pip install unittest-data-provider + pip install -r requirements.txt + - name: Run Integration Tests + run: + python -m unittest test/Integration/test_*.py + env: + LOB_API_TEST_KEY: ${{ secrets.LOB_API_TEST_KEY }} + LOB_API_LIVE_KEY: ${{ secrets.LOB_API_LIVE_KEY }} + - name: Run Unit Tests + run: + python -m unittest test/Unit/test_*.py + env: + LOB_API_TEST_KEY: ${{ secrets.LOB_API_TEST_KEY }} + LOB_API_LIVE_KEY: ${{ secrets.LOB_API_LIVE_KEY }} diff --git a/.gitignore b/.gitignore index 87e7271..82d55f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,53 +1,69 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ *.py[cod] +*$py.class # C extensions *.so -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -develop-eggs +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ .installed.cfg -lib -lib64 -__pycache__ +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec # Installer logs pip-log.txt +pip-delete-this-directory.txt # Unit test / coverage reports +htmlcov/ +.tox/ .coverage -.tox +.coverage.* +.cache nosetests.xml +coverage.xml +*,cover +.hypothesis/ +venv/ +.venv/ +.python-version +.pytest_cache # Translations *.mo +*.pot -# Mr Developer -.mr.developer.cfg -.project -.pydevproject +# Django stuff: +*.log # Sphinx documentation docs/_build/ -# Generated Files -examples/**/success.csv -examples/**/errors.csv -examples/**/verified.csv - -# Editor files -*.sublime-* +# PyBuilder +target/ -# macOS -.DS_Store +#Ipython Notebook +.ipynb_checkpoints -# dotenv file +# Secrets .env diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..d51f804 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,33 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md + + +lob_python/api/default_api.py +lob_python/model/placeholder_model.py +docs/DefaultApi.md +docs/PlaceholderModel.md +test/ +.gitignore +.env +requirements.txt \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..f759745 --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,404 @@ +.gitlab-ci.yml +.travis.yml +README.md +docs/Address.md +docs/AddressDeletion.md +docs/AddressDomestic.md +docs/AddressDomesticExpanded.md +docs/AddressEditable.md +docs/AddressList.md +docs/AddressesApi.md +docs/AdrId.md +docs/BankAccount.md +docs/BankAccountDeletion.md +docs/BankAccountList.md +docs/BankAccountVerify.md +docs/BankAccountWritable.md +docs/BankAccountsApi.md +docs/BankId.md +docs/BankTypeEnum.md +docs/BgDescription.md +docs/BgId.md +docs/BillingGroup.md +docs/BillingGroupEditable.md +docs/BillingGroupList.md +docs/BillingGroupsApi.md +docs/BulkError.md +docs/BulkErrorProperties.md +docs/Campaign.md +docs/CampaignUpdatable.md +docs/CampaignWritable.md +docs/CampaignsApi.md +docs/CampaignsList.md +docs/Card.md +docs/CardDeletion.md +docs/CardDescription.md +docs/CardEditable.md +docs/CardId.md +docs/CardList.md +docs/CardOrder.md +docs/CardOrderEditable.md +docs/CardOrderList.md +docs/CardOrdersApi.md +docs/CardUpdatable.md +docs/CardsApi.md +docs/Cents.md +docs/Check.md +docs/CheckDeletion.md +docs/CheckEditable.md +docs/CheckList.md +docs/ChecksApi.md +docs/ChkId.md +docs/City.md +docs/CmpId.md +docs/CmpScheduleType.md +docs/CmpUseType.md +docs/CoId.md +docs/Company.md +docs/CountryExtended.md +docs/CountryExtendedExpanded.md +docs/CreativePatch.md +docs/CreativeResponse.md +docs/CreativeWritable.md +docs/CreativesApi.md +docs/CrvId.md +docs/CustomEnvelopeReturned.md +docs/CustomEnvelopeUserProvided.md +docs/DeliverabilityAnalysis.md +docs/DpvFootnote.md +docs/EngineHtml.md +docs/EventType.md +docs/Events.md +docs/EvntId.md +docs/ExId.md +docs/Export.md +docs/ExportModel.md +docs/GeocodeAddresses.md +docs/GeocodeComponents.md +docs/IdentityValidation.md +docs/IdentityValidationApi.md +docs/IdentityValidationId.md +docs/IncludeModel.md +docs/IntlAutoId.md +docs/IntlAutocompletions.md +docs/IntlAutocompletionsApi.md +docs/IntlAutocompletionsWritable.md +docs/IntlComponents.md +docs/IntlSuggestions.md +docs/IntlVerId.md +docs/IntlVerification.md +docs/IntlVerificationOrError.md +docs/IntlVerificationWritable.md +docs/IntlVerifications.md +docs/IntlVerificationsApi.md +docs/IntlVerificationsPayload.md +docs/Letter.md +docs/LetterCustomEnvelope.md +docs/LetterDeletion.md +docs/LetterDetailsReturned.md +docs/LetterDetailsWritable.md +docs/LetterEditable.md +docs/LetterList.md +docs/LettersApi.md +docs/LobConfidenceScore.md +docs/LobError.md +docs/Location.md +docs/LocationAnalysis.md +docs/LtrId.md +docs/MailType.md +docs/MergeVariables.md +docs/MetadataModel.md +docs/MultiLineAddress.md +docs/MultipleComponents.md +docs/MultipleComponentsIntl.md +docs/MultipleComponentsList.md +docs/Name.md +docs/PostalCode.md +docs/Postcard.md +docs/PostcardDeletion.md +docs/PostcardDetailsReturned.md +docs/PostcardDetailsWritable.md +docs/PostcardEditable.md +docs/PostcardList.md +docs/PostcardSize.md +docs/PostcardsApi.md +docs/PrimaryLineUs.md +docs/PscId.md +docs/Recipient.md +docs/ResourceDescription.md +docs/ReturnEnvelope.md +docs/ReverseGeocode.md +docs/ReverseGeocodeId.md +docs/ReverseGeocodeLookupsApi.md +docs/SecondaryLine.md +docs/SelfMailer.md +docs/SelfMailerDeletion.md +docs/SelfMailerEditable.md +docs/SelfMailerList.md +docs/SelfMailerSize.md +docs/SelfMailersApi.md +docs/SfmId.md +docs/SignedLink.md +docs/SortBy.md +docs/SortBy1.md +docs/SortBy2.md +docs/SortBy3.md +docs/SortBy4.md +docs/SortBy5.md +docs/State.md +docs/Suggestions.md +docs/Template.md +docs/TemplateDeletion.md +docs/TemplateHtml.md +docs/TemplateList.md +docs/TemplateUpdate.md +docs/TemplateVersion.md +docs/TemplateVersionDeletion.md +docs/TemplateVersionList.md +docs/TemplateVersionUpdatable.md +docs/TemplateVersionWritable.md +docs/TemplateVersionsApi.md +docs/TemplateWritable.md +docs/TemplatesApi.md +docs/Thumbnail.md +docs/TmplId.md +docs/TrackingEventCertified.md +docs/TrackingEventDetails.md +docs/TrackingEventNormal.md +docs/UplId.md +docs/Upload.md +docs/UploadCreateExport.md +docs/UploadList.md +docs/UploadState.md +docs/UploadUpdatable.md +docs/UploadWritable.md +docs/UploadsApi.md +docs/Urbanization.md +docs/UsAutoId.md +docs/UsAutocompletions.md +docs/UsAutocompletionsApi.md +docs/UsAutocompletionsWritable.md +docs/UsComponents.md +docs/UsVerId.md +docs/UsVerification.md +docs/UsVerificationOrError.md +docs/UsVerifications.md +docs/UsVerificationsApi.md +docs/UsVerificationsWritable.md +docs/VrsnId.md +docs/Zip.md +docs/ZipCode.md +docs/ZipCodePlus4.md +docs/ZipCodeType.md +docs/ZipEditable.md +docs/ZipId.md +docs/ZipLookupCity.md +docs/ZipLookupsApi.md +git_push.sh +lob_python/__init__.py +lob_python/api/__init__.py +lob_python/api/addresses_api.py +lob_python/api/bank_accounts_api.py +lob_python/api/billing_groups_api.py +lob_python/api/campaigns_api.py +lob_python/api/card_orders_api.py +lob_python/api/cards_api.py +lob_python/api/checks_api.py +lob_python/api/creatives_api.py +lob_python/api/identity_validation_api.py +lob_python/api/intl_autocompletions_api.py +lob_python/api/intl_verifications_api.py +lob_python/api/letters_api.py +lob_python/api/postcards_api.py +lob_python/api/reverse_geocode_lookups_api.py +lob_python/api/self_mailers_api.py +lob_python/api/template_versions_api.py +lob_python/api/templates_api.py +lob_python/api/uploads_api.py +lob_python/api/us_autocompletions_api.py +lob_python/api/us_verifications_api.py +lob_python/api/zip_lookups_api.py +lob_python/api_client.py +lob_python/apis/__init__.py +lob_python/configuration.py +lob_python/exceptions.py +lob_python/model/__init__.py +lob_python/model/address.py +lob_python/model/address_deletion.py +lob_python/model/address_domestic.py +lob_python/model/address_domestic_expanded.py +lob_python/model/address_editable.py +lob_python/model/address_list.py +lob_python/model/adr_id.py +lob_python/model/bank_account.py +lob_python/model/bank_account_deletion.py +lob_python/model/bank_account_list.py +lob_python/model/bank_account_verify.py +lob_python/model/bank_account_writable.py +lob_python/model/bank_id.py +lob_python/model/bank_type_enum.py +lob_python/model/bg_description.py +lob_python/model/bg_id.py +lob_python/model/billing_group.py +lob_python/model/billing_group_editable.py +lob_python/model/billing_group_list.py +lob_python/model/bulk_error.py +lob_python/model/bulk_error_properties.py +lob_python/model/campaign.py +lob_python/model/campaign_updatable.py +lob_python/model/campaign_writable.py +lob_python/model/campaigns_list.py +lob_python/model/card.py +lob_python/model/card_deletion.py +lob_python/model/card_description.py +lob_python/model/card_editable.py +lob_python/model/card_id.py +lob_python/model/card_list.py +lob_python/model/card_order.py +lob_python/model/card_order_editable.py +lob_python/model/card_order_list.py +lob_python/model/card_updatable.py +lob_python/model/cents.py +lob_python/model/check.py +lob_python/model/check_deletion.py +lob_python/model/check_editable.py +lob_python/model/check_list.py +lob_python/model/chk_id.py +lob_python/model/city.py +lob_python/model/cmp_id.py +lob_python/model/cmp_schedule_type.py +lob_python/model/cmp_use_type.py +lob_python/model/co_id.py +lob_python/model/company.py +lob_python/model/country_extended.py +lob_python/model/country_extended_expanded.py +lob_python/model/creative_patch.py +lob_python/model/creative_response.py +lob_python/model/creative_writable.py +lob_python/model/crv_id.py +lob_python/model/custom_envelope_returned.py +lob_python/model/custom_envelope_user_provided.py +lob_python/model/deliverability_analysis.py +lob_python/model/dpv_footnote.py +lob_python/model/engine_html.py +lob_python/model/event_type.py +lob_python/model/events.py +lob_python/model/evnt_id.py +lob_python/model/ex_id.py +lob_python/model/export.py +lob_python/model/export_model.py +lob_python/model/geocode_addresses.py +lob_python/model/geocode_components.py +lob_python/model/identity_validation.py +lob_python/model/identity_validation_id.py +lob_python/model/include_model.py +lob_python/model/intl_auto_id.py +lob_python/model/intl_autocompletions.py +lob_python/model/intl_autocompletions_writable.py +lob_python/model/intl_components.py +lob_python/model/intl_suggestions.py +lob_python/model/intl_ver_id.py +lob_python/model/intl_verification.py +lob_python/model/intl_verification_or_error.py +lob_python/model/intl_verification_writable.py +lob_python/model/intl_verifications.py +lob_python/model/intl_verifications_payload.py +lob_python/model/letter.py +lob_python/model/letter_custom_envelope.py +lob_python/model/letter_deletion.py +lob_python/model/letter_details_returned.py +lob_python/model/letter_details_writable.py +lob_python/model/letter_editable.py +lob_python/model/letter_list.py +lob_python/model/lob_confidence_score.py +lob_python/model/lob_error.py +lob_python/model/location.py +lob_python/model/location_analysis.py +lob_python/model/ltr_id.py +lob_python/model/mail_type.py +lob_python/model/merge_variables.py +lob_python/model/metadata_model.py +lob_python/model/multi_line_address.py +lob_python/model/multiple_components.py +lob_python/model/multiple_components_intl.py +lob_python/model/multiple_components_list.py +lob_python/model/name.py +lob_python/model/postal_code.py +lob_python/model/postcard.py +lob_python/model/postcard_deletion.py +lob_python/model/postcard_details_returned.py +lob_python/model/postcard_details_writable.py +lob_python/model/postcard_editable.py +lob_python/model/postcard_list.py +lob_python/model/postcard_size.py +lob_python/model/primary_line_us.py +lob_python/model/psc_id.py +lob_python/model/recipient.py +lob_python/model/resource_description.py +lob_python/model/return_envelope.py +lob_python/model/reverse_geocode.py +lob_python/model/reverse_geocode_id.py +lob_python/model/secondary_line.py +lob_python/model/self_mailer.py +lob_python/model/self_mailer_deletion.py +lob_python/model/self_mailer_editable.py +lob_python/model/self_mailer_list.py +lob_python/model/self_mailer_size.py +lob_python/model/sfm_id.py +lob_python/model/signed_link.py +lob_python/model/sort_by.py +lob_python/model/sort_by1.py +lob_python/model/sort_by2.py +lob_python/model/sort_by3.py +lob_python/model/sort_by4.py +lob_python/model/sort_by5.py +lob_python/model/state.py +lob_python/model/suggestions.py +lob_python/model/template.py +lob_python/model/template_deletion.py +lob_python/model/template_html.py +lob_python/model/template_list.py +lob_python/model/template_update.py +lob_python/model/template_version.py +lob_python/model/template_version_deletion.py +lob_python/model/template_version_list.py +lob_python/model/template_version_updatable.py +lob_python/model/template_version_writable.py +lob_python/model/template_writable.py +lob_python/model/thumbnail.py +lob_python/model/tmpl_id.py +lob_python/model/tracking_event_certified.py +lob_python/model/tracking_event_details.py +lob_python/model/tracking_event_normal.py +lob_python/model/upl_id.py +lob_python/model/upload.py +lob_python/model/upload_create_export.py +lob_python/model/upload_list.py +lob_python/model/upload_state.py +lob_python/model/upload_updatable.py +lob_python/model/upload_writable.py +lob_python/model/urbanization.py +lob_python/model/us_auto_id.py +lob_python/model/us_autocompletions.py +lob_python/model/us_autocompletions_writable.py +lob_python/model/us_components.py +lob_python/model/us_ver_id.py +lob_python/model/us_verification.py +lob_python/model/us_verification_or_error.py +lob_python/model/us_verifications.py +lob_python/model/us_verifications_writable.py +lob_python/model/vrsn_id.py +lob_python/model/zip.py +lob_python/model/zip_code.py +lob_python/model/zip_code_plus4.py +lob_python/model/zip_code_type.py +lob_python/model/zip_editable.py +lob_python/model/zip_id.py +lob_python/model/zip_lookup_city.py +lob_python/model_utils.py +lob_python/models/__init__.py +lob_python/rest.py +setup.cfg +setup.py +test-requirements.txt +tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..8044406 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.2.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..129f1bb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project *does not yet* adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Upcoming] +### Added +- A Python SDK for Lob API, generated by [OpenAPI Generator](https://openapi-generator.tech/) +- Integration and unit tests for all Lob resources except for: + - Identity Validation + - Campaigns + - Creatives + - Uploads +- This CHANGELOG file to address [this issue](https://github.com/lob/lob-python/issues/186). + +### Changed + +### Removed + +## [Latest Version] - YYYY-MM-DD +### Added + +### Changed + +### Removed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index c68ad15..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,17 +0,0 @@ -# How to contribute -We welcome contributions from the community and are pleased to have them. Please follow this guide when logging issues or making code changes. - -## Logging Issues -All issues should be created using the [new issue form](https://github.com/lob/lob-python/issues/new). Clearly describe the issue including steps to reproduce if there are any. Also, make sure to indicate the earliest version that has the issue being reported. - -## Patching Code -Code changes are welcome and should follow the guidelines below. - -* Fork the repository on GitHub. -* Add tests for your new code ensuring that you have 100% code coverage (we can help you reach 100% but will not merge without it). - * Run `nosetests` to generate a report of the test coverage -* [Pull requests](https://help.github.com/articles/about-pull-requests/) should be made to the [master branch](https://github.com/lob/lob-python/tree/master). - -To help encourage consistent code style guidelines, we have included an `.editorconfig` file for use with your favorite [editor](http://editorconfig.org/#download). - -Read more about EditorConfig [here](http://editorconfig.org/). diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a83d4b6..0000000 --- a/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013-2016 Lob.com - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index ece6f6d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include VERSION setup.py -recursive-include lob *.py diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..bcc6ee0 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,197 @@ +# Migrate from version < v5.0.0 + +This guide illustrates differences between Lob’s the legacy versions of this SDK and the new current version. + +In this guide we compare how `v4.*.*` and >= `v5.0.0` implement the following method pattern. + +- CREATE +- LIST +- GET +- DELETE +- VERIFY (BANK ACCOUNTS) +- UPDATE + +## INSTALL + +Similar to the legacy version, the new lob-python SDK is available through `pip`: + +``` +$ pip install lob_python +``` + +## IMPORT AND INITIALIZE + + +```python +import lob_python +configuration = lob_python.Configuration( + username = os.getenv('LOB_API_TEST_KEY') +) +``` +You then instantiate the specific resource API that you need access to as follows: + +```python +with lob_python.ApiClient(configuration) as api_client: + addresses_api = AddressesApi(api_client) +``` + +## METHODS + +The new SDK version abstracts the request/response interaction out of the calling code such that you create the resource and pass it to the corresponding API in a try/catch such that any non-success is an `ApiException` that must be handled. + +### COMPARE CREATE METHODS + +Here is a sample of the legacy lob-python CREATE function: + +```python +lob.Address.create( + description='Harry - Office', + name='Harry Zhang', + company='Lob', + email='harry@lob.com', + phone='5555555555', + address_line1='210 King St', + address_line2='# 6100', + address_city='San Francisco', + address_state='CA', + address_zip='94107', + address_country='US', +) +``` + +Here is a sample of the updated CREATE method + +```python +address_editable = AddressEditable( + description = "Harry - Office", + name = "Harry Zhang", + company = "Lob", + email = "harry@lob.com", + phone = "5555555555", + address_line1 = "210 King St", + address_line2 = "# 6100", + address_city = "San Francisco", + address_state = "CA", + address_zip = "94107", + address_country = CountryExtended("US"), +) + +with lob_python.ApiClient(configuration) as api_client: + api = AddressesApi(api_client) + +try: + created_address = api.create(address_editable) +except ApiException as e: + print(e) +``` + +### COMPARE LIST METHODS + +Here is a sample of the legacy lob-python LIST method: + +```python +lob.Address.list(limit=2) +``` + +Here is a sample of the updated LIST method: + +```python +with lob_python.ApiClient(configuration) as api_client: + api = AddressesApi(api_client) + +try: + addresses = api.list(limit=2) +except ApiException as e: + print(e) +``` + +### COMPARE GET BY ID METHOD + +Here is a sample of the legacy lob-python GET method: + +```python +lob.Address.retrieve('adr_xxx') +``` + +Here is a sample of the updated GET method: + +```python +with lob_python.ApiClient(configuration) as api_client: + api = AddressesApi(api_client) + +try: + address = api.get('adr_xxx') +except ApiException as e: + print(e) +``` + +### COMPARE DELETE METHOD + +Here is a sample of the legacy lob-python DELETE method: + +```python +lob.Address.delete('adr_xxx') +``` + +Here is a sample of the updated DELETE method: + +```python +with lob_python.ApiClient(configuration) as api_client: + api = AddressesApi(api_client) + +try: + deleted_address = api.delete('adr_xxx') +except ApiException as e: + print(e) +``` + +### COMPARE BANK ACCOUNT VERIFY + +Here is a sample of the legacy lob-python BANK ACCOUNT VERIFY method: + +```python +lob.BankAccount.verify(id = 'bank_xxx', amounts = [25, 63]) +``` + +Here is a sample of the updated BANK ACCOUNT VERIFY method: + +```python +verification_data = BankAccountVerify( + amounts = [ + 25, + 63, + ], +) + +with lob_python.ApiClient(configuration) as api_client: + api = BankAccountsApi(api_client) + +try: + verifiedAccount = api.verify('bank_dfceb4a2a05b57e', verification_data) +except ApiException as e: + print(e) +``` + +### COMPARE UPDATE METHOD + +Here is a sample of the legacy lob-python UPDATE method: + +```python +This feature is not currently supported by this library. +``` + +Here is a sample of the updated UPDATE method: + +```python +with lob_python.ApiClient(configuration) as api_client: + api = TemplatesApi(api_client) + +template_update = TemplateUpdate( + description = "Updated template" +) + +try: + updated_template = api.update('tmpl_xxx', template_update) +except ApiException as e: + print(e) +``` diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 63110e1..0000000 --- a/Pipfile +++ /dev/null @@ -1,24 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -requests = "*" -requests-mock = "*" - -[dev-packages] -"flake8" = "*" -coverage = ">=5.5" -coveralls = ">=2.2.0" -bumpversion = "*" -setuptools = "*" -twine = "*" -pytest = ">=6.2.1" -pytest-cov = ">=2.11.1" -requests-mock = ">=1.9.3" - -[scripts] -# these commands can be invoked with `pipenv run ` -tests = "pytest --cov" -coveralls = "coveralls --service=github.com" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 10f71c5..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,440 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "c46403f5224e9c709d3828c374d193f1beebd0f7cbd0a5119745b71b0bf65149" - }, - "pipfile-spec": 6, - "requires": {}, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.python.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "certifi": { - "hashes": [ - "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872", - "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569" - ], - "version": "==2021.10.8" - }, - "charset-normalizer": { - "hashes": [ - "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd", - "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455" - ], - "markers": "python_version >= '3'", - "version": "==2.0.10" - }, - "idna": { - "hashes": [ - "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", - "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" - ], - "markers": "python_version >= '3'", - "version": "==3.3" - }, - "requests": { - "hashes": [ - "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61", - "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d" - ], - "index": "pypi", - "version": "==2.27.1" - }, - "requests-mock": { - "hashes": [ - "sha256:0a2d38a117c08bb78939ec163522976ad59a6b7fdd82b709e23bb98004a44970", - "sha256:8d72abe54546c1fc9696fa1516672f1031d72a55a1d66c85184f972a24ba0eba" - ], - "index": "pypi", - "version": "==1.9.3" - }, - "six": { - "hashes": [ - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.16.0" - }, - "urllib3": { - "hashes": [ - "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed", - "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", - "version": "==1.26.8" - } - }, - "develop": { - "attrs": { - "hashes": [ - "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4", - "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==21.4.0" - }, - "bleach": { - "hashes": [ - "sha256:0900d8b37eba61a802ee40ac0061f8c2b5dee29c1927dd1d233e075ebf5a71da", - "sha256:4d2651ab93271d1129ac9cbc679f524565cc8a1b791909c4a51eac4446a15994" - ], - "markers": "python_version >= '3.6'", - "version": "==4.1.0" - }, - "bump2version": { - "hashes": [ - "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410", - "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6" - ], - "markers": "python_version >= '3.5'", - "version": "==1.0.1" - }, - "bumpversion": { - "hashes": [ - "sha256:4ba55e4080d373f80177b4dabef146c07ce73c7d1377aabf9d3c3ae1f94584a6", - "sha256:4eb3267a38194d09f048a2179980bb4803701969bff2c85fa8f6d1ce050be15e" - ], - "index": "pypi", - "version": "==0.6.0" - }, - "certifi": { - "hashes": [ - "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872", - "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569" - ], - "version": "==2021.10.8" - }, - "charset-normalizer": { - "hashes": [ - "sha256:876d180e9d7432c5d1dfd4c5d26b72f099d503e8fcc0feb7532c9289be60fcbd", - "sha256:cb957888737fc0bbcd78e3df769addb41fd1ff8cf950dc9e7ad7793f1bf44455" - ], - "markers": "python_version >= '3'", - "version": "==2.0.10" - }, - "colorama": { - "hashes": [ - "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b", - "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==0.4.4" - }, - "coverage": { - "extras": [], - "hashes": [ - "sha256:01774a2c2c729619760320270e42cd9e797427ecfddd32c2a7b639cdc481f3c0", - "sha256:03b20e52b7d31be571c9c06b74746746d4eb82fc260e594dc662ed48145e9efd", - "sha256:0a7726f74ff63f41e95ed3a89fef002916c828bb5fcae83b505b49d81a066884", - "sha256:1219d760ccfafc03c0822ae2e06e3b1248a8e6d1a70928966bafc6838d3c9e48", - "sha256:13362889b2d46e8d9f97c421539c97c963e34031ab0cb89e8ca83a10cc71ac76", - "sha256:174cf9b4bef0db2e8244f82059a5a72bd47e1d40e71c68ab055425172b16b7d0", - "sha256:17e6c11038d4ed6e8af1407d9e89a2904d573be29d51515f14262d7f10ef0a64", - "sha256:215f8afcc02a24c2d9a10d3790b21054b58d71f4b3c6f055d4bb1b15cecce685", - "sha256:22e60a3ca5acba37d1d4a2ee66e051f5b0e1b9ac950b5b0cf4aa5366eda41d47", - "sha256:2641f803ee9f95b1f387f3e8f3bf28d83d9b69a39e9911e5bfee832bea75240d", - "sha256:276651978c94a8c5672ea60a2656e95a3cce2a3f31e9fb2d5ebd4c215d095840", - "sha256:3f7c17209eef285c86f819ff04a6d4cbee9b33ef05cbcaae4c0b4e8e06b3ec8f", - "sha256:3feac4084291642165c3a0d9eaebedf19ffa505016c4d3db15bfe235718d4971", - "sha256:49dbff64961bc9bdd2289a2bda6a3a5a331964ba5497f694e2cbd540d656dc1c", - "sha256:4e547122ca2d244f7c090fe3f4b5a5861255ff66b7ab6d98f44a0222aaf8671a", - "sha256:5829192582c0ec8ca4a2532407bc14c2f338d9878a10442f5d03804a95fac9de", - "sha256:5d6b09c972ce9200264c35a1d53d43ca55ef61836d9ec60f0d44273a31aa9f17", - "sha256:600617008aa82032ddeace2535626d1bc212dfff32b43989539deda63b3f36e4", - "sha256:619346d57c7126ae49ac95b11b0dc8e36c1dd49d148477461bb66c8cf13bb521", - "sha256:63c424e6f5b4ab1cf1e23a43b12f542b0ec2e54f99ec9f11b75382152981df57", - "sha256:6dbc1536e105adda7a6312c778f15aaabe583b0e9a0b0a324990334fd458c94b", - "sha256:6e1394d24d5938e561fbeaa0cd3d356207579c28bd1792f25a068743f2d5b282", - "sha256:86f2e78b1eff847609b1ca8050c9e1fa3bd44ce755b2ec30e70f2d3ba3844644", - "sha256:8bdfe9ff3a4ea37d17f172ac0dff1e1c383aec17a636b9b35906babc9f0f5475", - "sha256:8e2c35a4c1f269704e90888e56f794e2d9c0262fb0c1b1c8c4ee44d9b9e77b5d", - "sha256:92b8c845527eae547a2a6617d336adc56394050c3ed8a6918683646328fbb6da", - "sha256:9365ed5cce5d0cf2c10afc6add145c5037d3148585b8ae0e77cc1efdd6aa2953", - "sha256:9a29311bd6429be317c1f3fe4bc06c4c5ee45e2fa61b2a19d4d1d6111cb94af2", - "sha256:9a2b5b52be0a8626fcbffd7e689781bf8c2ac01613e77feda93d96184949a98e", - "sha256:a4bdeb0a52d1d04123b41d90a4390b096f3ef38eee35e11f0b22c2d031222c6c", - "sha256:a9c8c4283e17690ff1a7427123ffb428ad6a52ed720d550e299e8291e33184dc", - "sha256:b637c57fdb8be84e91fac60d9325a66a5981f8086c954ea2772efe28425eaf64", - "sha256:bf154ba7ee2fd613eb541c2bc03d3d9ac667080a737449d1a3fb342740eb1a74", - "sha256:c254b03032d5a06de049ce8bca8338a5185f07fb76600afff3c161e053d88617", - "sha256:c332d8f8d448ded473b97fefe4a0983265af21917d8b0cdcb8bb06b2afe632c3", - "sha256:c7912d1526299cb04c88288e148c6c87c0df600eca76efd99d84396cfe00ef1d", - "sha256:cfd9386c1d6f13b37e05a91a8583e802f8059bebfccde61a418c5808dea6bbfa", - "sha256:d5d2033d5db1d58ae2d62f095e1aefb6988af65b4b12cb8987af409587cc0739", - "sha256:dca38a21e4423f3edb821292e97cec7ad38086f84313462098568baedf4331f8", - "sha256:e2cad8093172b7d1595b4ad66f24270808658e11acf43a8f95b41276162eb5b8", - "sha256:e3db840a4dee542e37e09f30859f1612da90e1c5239a6a2498c473183a50e781", - "sha256:edcada2e24ed68f019175c2b2af2a8b481d3d084798b8c20d15d34f5c733fa58", - "sha256:f467bbb837691ab5a8ca359199d3429a11a01e6dfb3d9dcc676dc035ca93c0a9", - "sha256:f506af4f27def639ba45789fa6fde45f9a217da0be05f8910458e4557eed020c", - "sha256:f614fc9956d76d8a88a88bb41ddc12709caa755666f580af3a688899721efecd", - "sha256:f9afb5b746781fc2abce26193d1c817b7eb0e11459510fba65d2bd77fe161d9e", - "sha256:fb8b8ee99b3fffe4fd86f4c81b35a6bf7e4462cba019997af2fe679365db0c49" - ], - "index": "pypi", - "version": "==6.2" - }, - "coveralls": { - "hashes": [ - "sha256:b32a8bb5d2df585207c119d6c01567b81fba690c9c10a753bfe27a335bfc43ea", - "sha256:f42015f31d386b351d4226389b387ae173207058832fbf5c8ec4b40e27b16026" - ], - "index": "pypi", - "version": "==3.3.1" - }, - "docopt": { - "hashes": [ - "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" - ], - "version": "==0.6.2" - }, - "docutils": { - "hashes": [ - "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c", - "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==0.18.1" - }, - "flake8": { - "hashes": [ - "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d", - "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d" - ], - "index": "pypi", - "version": "==4.0.1" - }, - "idna": { - "hashes": [ - "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", - "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d" - ], - "markers": "python_version >= '3'", - "version": "==3.3" - }, - "importlib-metadata": { - "hashes": [ - "sha256:899e2a40a8c4a1aec681feef45733de8a6c58f3f6a0dbed2eb6574b4387a77b6", - "sha256:951f0d8a5b7260e9db5e41d429285b5f451e928479f19d80818878527d36e95e" - ], - "markers": "python_version >= '3.7'", - "version": "==4.10.1" - }, - "iniconfig": { - "hashes": [ - "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3", - "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32" - ], - "version": "==1.1.1" - }, - "keyring": { - "hashes": [ - "sha256:9012508e141a80bd1c0b6778d5c610dd9f8c464d75ac6774248500503f972fb9", - "sha256:b0d28928ac3ec8e42ef4cc227822647a19f1d544f21f96457965dc01cf555261" - ], - "markers": "python_version >= '3.7'", - "version": "==23.5.0" - }, - "mccabe": { - "hashes": [ - "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", - "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" - ], - "version": "==0.6.1" - }, - "packaging": { - "hashes": [ - "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb", - "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522" - ], - "markers": "python_version >= '3.6'", - "version": "==21.3" - }, - "pkginfo": { - "hashes": [ - "sha256:542e0d0b6750e2e21c20179803e40ab50598d8066d51097a0e382cba9eb02bff", - "sha256:c24c487c6a7f72c66e816ab1796b96ac6c3d14d49338293d2141664330b55ffc" - ], - "version": "==1.8.2" - }, - "pluggy": { - "hashes": [ - "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159", - "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3" - ], - "markers": "python_version >= '3.6'", - "version": "==1.0.0" - }, - "py": { - "hashes": [ - "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", - "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==1.11.0" - }, - "pycodestyle": { - "hashes": [ - "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20", - "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==2.8.0" - }, - "pyflakes": { - "hashes": [ - "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c", - "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.4.0" - }, - "pygments": { - "hashes": [ - "sha256:44238f1b60a76d78fc8ca0528ee429702aae011c265fe6a8dd8b63049ae41c65", - "sha256:4e426f72023d88d03b2fa258de560726ce890ff3b630f88c21cbb8b2503b8c6a" - ], - "markers": "python_version >= '3.5'", - "version": "==2.11.2" - }, - "pyparsing": { - "hashes": [ - "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea", - "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484" - ], - "markers": "python_version >= '3.6'", - "version": "==3.0.7" - }, - "pytest": { - "hashes": [ - "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89", - "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134" - ], - "index": "pypi", - "version": "==6.2.5" - }, - "pytest-cov": { - "hashes": [ - "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6", - "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470" - ], - "index": "pypi", - "version": "==3.0.0" - }, - "readme-renderer": { - "hashes": [ - "sha256:a50a0f2123a4c1145ac6f420e1a348aafefcc9211c846e3d51df05fe3d865b7d", - "sha256:b512beafa6798260c7d5af3e1b1f097e58bfcd9a575da7c4ddd5e037490a5b85" - ], - "markers": "python_version >= '3.6'", - "version": "==32.0" - }, - "requests": { - "hashes": [ - "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61", - "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d" - ], - "index": "pypi", - "version": "==2.27.1" - }, - "requests-mock": { - "hashes": [ - "sha256:0a2d38a117c08bb78939ec163522976ad59a6b7fdd82b709e23bb98004a44970", - "sha256:8d72abe54546c1fc9696fa1516672f1031d72a55a1d66c85184f972a24ba0eba" - ], - "index": "pypi", - "version": "==1.9.3" - }, - "requests-toolbelt": { - "hashes": [ - "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f", - "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0" - ], - "version": "==0.9.1" - }, - "rfc3986": { - "hashes": [ - "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", - "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c" - ], - "markers": "python_version >= '3.7'", - "version": "==2.0.0" - }, - "setuptools": { - "hashes": [ - "sha256:2404879cda71495fc4d5cbc445ed52fdaddf352b36e40be8dcc63147cb4edabe", - "sha256:68eb94073fc486091447fcb0501efd6560a0e5a1839ba249e5ff3c4c93f05f90" - ], - "index": "pypi", - "version": "==60.5.0" - }, - "six": { - "hashes": [ - "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", - "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==1.16.0" - }, - "toml": { - "hashes": [ - "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", - "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" - ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==0.10.2" - }, - "tomli": { - "hashes": [ - "sha256:b5bde28da1fed24b9bd1d4d2b8cba62300bfb4ec9a6187a957e8ddb9434c5224", - "sha256:c292c34f58502a1eb2bbb9f5bbc9a5ebc37bee10ffb8c2d6bbdfa8eb13cc14e1" - ], - "version": "==2.0.0" - }, - "tqdm": { - "hashes": [ - "sha256:8dd278a422499cd6b727e6ae4061c40b48fce8b76d1ccbf5d34fca9b7f925b0c", - "sha256:d359de7217506c9851b7869f3708d8ee53ed70a1b8edbba4dbcb47442592920d" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==4.62.3" - }, - "twine": { - "hashes": [ - "sha256:28460a3db6b4532bde6a5db6755cf2dce6c5020bada8a641bb2c5c7a9b1f35b8", - "sha256:8c120845fc05270f9ee3e9d7ebbed29ea840e41f48cd059e04733f7e1d401345" - ], - "index": "pypi", - "version": "==3.7.1" - }, - "urllib3": { - "hashes": [ - "sha256:000ca7f471a233c2251c6c7023ee85305721bfdf18621ebff4fd17a8653427ed", - "sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", - "version": "==1.26.8" - }, - "webencodings": { - "hashes": [ - "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", - "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - ], - "version": "==0.5.1" - }, - "zipp": { - "hashes": [ - "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d", - "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375" - ], - "markers": "python_version >= '3.7'", - "version": "==3.7.0" - } - } -} diff --git a/README.md b/README.md index c5b018a..7fe5a1c 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,115 @@ -# lob-python +# lob-python-sdk +The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. -[![Build Status](https://travis-ci.org/lob/lob-python.svg?branch=master)](https://travis-ci.org/lob/lob-python) -[![PyPI version](https://badge.fury.io/py/lob.svg)](http://badge.fury.io/py/lob) -[![Coverage Status](https://coveralls.io/repos/lob/lob-python/badge.svg?branch=master)](https://coveralls.io/r/lob/lob-python?branch=master) +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -This is the python wrapper for the Lob.com API. See full Lob.com documentation [here](https://lob.com/docs/python). For best results, be sure that you're using [the latest version](https://lob.com/docs/python#version) of the Lob API and the latest version of the python wrapper. +- API version: 1.3.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen +For more information, please visit [https://support.lob.com/](https://support.lob.com/) -This library supports active Python releases (i.e., versions which have not reached their end of life), as well as PyPy 3. -The currently supported versions include: +## Requirements -* Python 3.6 -* Python 3.7 -* Python 3.8 -* Python 3.9 -* PyPy 3 - -## Table of Contents - -- [Table of Contents](#table-of-contents) -- [Getting Started](#getting-started) - - [Registration](#registration) - - [Installation](#installation) - - [Usage](#usage) -- [Examples](#examples) -- [API Documentation](#api-documentation) -- [Testing](#testing) -- [Making Releases](#making-releases) +Python ## Getting Started -Lob Python wrapper works in the object oriented style. That is, to make calls you have to call the method on a class and the return types are python objects. To get a `dict` on any object, you can call the `to_dict()` method of the object. - -Here's a general overview of the Lob services available, click through to read more. - -- [Postcards API](https://lob.com/products/print-mail/postcards) -- [Letters API](https://lob.com/products/print-mail/letters) -- [Checks API](https://lob.com/products/print-mail/checks) -- [Address Verification API](https://lob.com/products/address-verification) - -Please read through the official [API Documentation](#api-documentation) to get a complete sense of what to expect from each endpoint. - ### Registration First, you will need to first create an account at [Lob.com](https://dashboard.lob.com/#/register) and obtain your Test and Live API Keys. Once you have created an account, you can access your API Keys from the [Settings Panel](https://dashboard.lob.com/#/settings). -### Installation +### Installation & Usage +#### pip install -You can use `pip` to install the package. +If the python package is hosted on a repository, you can install directly using: +```sh +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` -pip install lob +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) + +Then import the package: +```python +import lob_python ``` -To initialize the wrapper, import `lob` and set the `api_key` +#### Setuptools -```python -import lob -lob.api_key = 'your-api-key' +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). -// set an api version (optional) -lob.api_version = 'api-version' +```sh +python setup.py install --user ``` +(or `sudo python setup.py install` to install the package for all users) -### Usage - -We've provided an example script you can run in examples/ that has examples of how to use the lob-python wrapper with some of our core endpoints. +Then import the package: +```python +import lob_python +``` -## Examples +## First API Call -We've provided various examples for you to try out [here](https://github.com/lob/lob-python/tree/master/examples). +```python -There are simple scripts to demonstrate how to create all the core Lob objects (checks, letters, postcards. etc.) as well as more complex examples that utilize other libraries and external files. +import time +import lob_python +from pprint import pprint +from lob_python.api import addresses_api +from lob_python.model.address import Address +from lob_python.model.address_deletion import AddressDeletion +from lob_python.model.address_editable import AddressEditable +from lob_python.model.address_list import AddressList +from lob_python.model.adr_id import AdrId +from lob_python.model.include_model import IncludeModel +from lob_python.model.lob_error import LobError +from lob_python.model.metadata_model import MetadataModel +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = '<>', +) + + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = addresses_api.AddressesApi(api_client) + address_editable = AddressEditable( + address_line1="address_line1_example", + address_line2="address_line2_example", + address_city="address_city_example", + address_state="address_state_example", + address_zip="address_zip_example", + address_country=CountryExtended("AD"), + description=ResourceDescription("description_example"), + name="name_example", + company=Company("company_example"), + phone="phone_example", + email="email_example", + metadata=MetadataModel( + key="key_example", + ), + ) + + try: + # create + api_response = api_instance.create(address_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling AddressesApi->create: %s\n" % e) +``` ## API Documentation @@ -80,60 +117,64 @@ The full and comprehensive documentation of Lob's APIs is available [here](https ## Testing -lob-python uses [Pipenv](https://docs.pipenv.org/) to manage development environments and dependencies. +### Unit Tests + +```bash +$ python3 -m unittest discover test/Unit +``` + +### Integration Tests + +Integration tests run against a live deployment of the Lob API and require multiple valid API keys with access to specific features. As such, it is not expected that these tests will pass for every user in every environment. -You install all the development requirements by running +To run integration tests: -```shell -$ pipenv install --dev -$ pipenv shell +```bash +$ LOB_API_TEST_KEY=<> LOB_API_LIVE_KEY=<> python3 -m unittest discover test/Integration ``` -You can run all tests with the command `LOB_API_KEY=YOUR_TEST_API_KEY pytest` in the main directory. +#### A cleaner alternative if you are going to run integration tests frequently -```shell -$ LOB_API_KEY=YOUR_TEST_API_KEY pytest +Run this the first time: + +```bash +$ echo "LOB_API_TEST_KEY=<> LOB_API_LIVE_KEY=<>" > LOCAL.env ``` -Alternatively you can add the `LOB_API_KEY` to a `.env` file in the project root directory and use the `pipenv run tests` script. +Then, to run the integration tests: -```shell -pipenv run tests +```bash +$ env $(cat LOCAL.env) python3 -m unittest discover test/Integration ``` -## Making Releases +## Documentation For Authorization -lob-python includes [bumpversion](https://pypi.org/project/bumpversion/) as a development dependency. This -tool should be used when changing the version number, as it will ensure that it's updated correctly and -consistently. -Running bumpversion will increment the specified version part (`major`, `minor`, `patch`), commit the change, -and tag it. +## basicAuth -```shell -$ bumpversion -``` +- **Type**: HTTP basic authentication -After the version has been bumped, you can push the change and tag. -```shell -$ git push origin head -$ git push origin --tags -``` +## Author -Finally, create the distribution and push it to PyPI using [twine](https://pypi.org/project/twine/). +lob-openapi@lob.com -```shell -$ python setup.py sdist -... -Writing lob-4.0.0/setup.cfg -Creating tar archive -removing 'lob-4.0.0' (and everything under it) -$ twine upload dist/lob-4.0.0.tar.gz -``` ---- +## Notes for Large OpenAPI documents +If the OpenAPI document is large, imports in lob_python.apis and lob_python.models may fail with a +RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: -Copyright © 2013-2019 Lob.com +Solution 1: +Use specific imports for apis and models like: +- `from lob_python.api.default_api import DefaultApi` +- `from lob_python.model.pet import Pet` -Released under the MIT License, which can be found in the repository in `LICENSE.txt`. +Solution 2: +Before importing the package, adjust the maximum recursion limit as shown below: +``` +import sys +sys.setrecursionlimit(1500) +import lob_python +from lob_python.apis import * +from lob_python.models import * +``` diff --git a/docs/Address.md b/docs/Address.md new file mode 100644 index 0000000..843c14c --- /dev/null +++ b/docs/Address.md @@ -0,0 +1,29 @@ +# Address + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**AdrId**](AdrId.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**name** | **str, none_type** | name associated with address | [optional] +**company** | [**Company**](Company.md) | | [optional] +**phone** | **str, none_type** | Must be no longer than 40 characters. | [optional] +**email** | **str, none_type** | Must be no longer than 100 characters. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**address_line1** | **str** | | [optional] +**address_line2** | **str, none_type** | | [optional] +**address_city** | **str** | | [optional] +**address_state** | **str** | 2 letter state short-name code | [optional] +**address_zip** | **str** | Must follow the ZIP format of `12345` or ZIP+4 format of `12345-1234`. | [optional] +**address_country** | [**CountryExtendedExpanded**](CountryExtendedExpanded.md) | | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "address" +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**recipient_moved** | **bool, none_type** | Only returned for accounts on certain <a href=\"https://dashboard.lob.com/#/settings/editions\">Print &amp; Mail Editions</a>. Value is `true` if the address was altered because the recipient filed for a <a href=\"#ncoa\">National Change of Address (NCOA)</a>, `false` if the NCOA check was run but no altered address was found, and `null` if the NCOA check was not run. The NCOA check does not happen for non-US addresses, for non-deliverable US addresses, or for addresses created before the NCOA feature was added to your account. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressDeletion.md b/docs/AddressDeletion.md new file mode 100644 index 0000000..79be6a1 --- /dev/null +++ b/docs/AddressDeletion.md @@ -0,0 +1,15 @@ +# AddressDeletion + +Object returned upon deleting an address + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**AdrId**](AdrId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "address_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressDomestic.md b/docs/AddressDomestic.md new file mode 100644 index 0000000..a29d63d --- /dev/null +++ b/docs/AddressDomestic.md @@ -0,0 +1,23 @@ +# AddressDomestic + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_line1** | **str** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] +**address_line2** | **str, none_type** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] +**address_city** | **str, none_type** | | [optional] +**address_state** | **str, none_type** | | [optional] +**address_zip** | **str, none_type** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**name** | **str, none_type** | Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. | [optional] +**company** | [**Company**](Company.md) | | [optional] +**phone** | **str, none_type** | Must be no longer than 40 characters. | [optional] +**email** | **str, none_type** | Must be no longer than 100 characters. | [optional] +**address_country** | **str, none_type** | The country associated with this address. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressDomesticExpanded.md b/docs/AddressDomesticExpanded.md new file mode 100644 index 0000000..0156d4a --- /dev/null +++ b/docs/AddressDomesticExpanded.md @@ -0,0 +1,23 @@ +# AddressDomesticExpanded + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_line1** | **str** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] +**address_line2** | **str, none_type** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] +**address_city** | **str, none_type** | | [optional] +**address_state** | **str, none_type** | | [optional] +**address_zip** | **str, none_type** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**name** | **str, none_type** | Either `name` or `company` is required, you may also add both. Must be no longer than 40 characters. If both `name` and `company` are provided, they will be printed on two separate lines above the rest of the address. | [optional] +**company** | [**Company**](Company.md) | | [optional] +**phone** | **str, none_type** | Must be no longer than 40 characters. | [optional] +**email** | **str, none_type** | Must be no longer than 100 characters. | [optional] +**address_country** | **str** | The country associated with this address. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressEditable.md b/docs/AddressEditable.md new file mode 100644 index 0000000..415d957 --- /dev/null +++ b/docs/AddressEditable.md @@ -0,0 +1,23 @@ +# AddressEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_line1** | **str** | The building number, street name, street suffix, and any street directionals. For US addresses, the max length is 64 characters. | [optional] +**address_line2** | **str, none_type** | The suite or apartment number of the recipient address, if applicable. For US addresses, the max length is 64 characters. | [optional] +**address_city** | **str, none_type** | | [optional] +**address_state** | **str, none_type** | | [optional] +**address_zip** | **str, none_type** | Optional postal code. For US addresses, must be either 5 or 9 digits. | [optional] +**address_country** | [**CountryExtended**](CountryExtended.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**name** | **str, none_type** | name associated with address. | [optional] +**company** | [**Company**](Company.md) | | [optional] +**phone** | **str, none_type** | Must be no longer than 40 characters. | [optional] +**email** | **str, none_type** | Must be no longer than 100 characters. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressList.md b/docs/AddressList.md new file mode 100644 index 0000000..3652009 --- /dev/null +++ b/docs/AddressList.md @@ -0,0 +1,17 @@ +# AddressList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Address]**](Address.md) | list of addresses | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddressesApi.md b/docs/AddressesApi.md new file mode 100644 index 0000000..d214351 --- /dev/null +++ b/docs/AddressesApi.md @@ -0,0 +1,369 @@ +# lob_python.AddressesApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](AddressesApi.md#create) | **POST** /addresses | create +[**delete**](AddressesApi.md#delete) | **DELETE** /addresses/{adr_id} | delete +[**get**](AddressesApi.md#get) | **GET** /addresses/{adr_id} | get +[**list**](AddressesApi.md#list) | **GET** /addresses | list + + +# **create** +> Address create(address_editable) + +create + +Creates a new address given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import addresses_api +from lob_python.model.address import Address +from lob_python.model.address_editable import AddressEditable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = addresses_api.AddressesApi(api_client) + address_editable = AddressEditable( + address_line1="address_line1_example", + address_line2="address_line2_example", + address_city="address_city_example", + address_state="address_state_example", + address_zip="address_zip_example", + address_country=CountryExtended("AD"), + description=ResourceDescription("description_example"), + name="name_example", + company=Company("company_example"), + phone="phone_example", + email="email_example", + metadata=MetadataModel( + key="key_example", + ), + ) # AddressEditable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(address_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling AddressesApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **address_editable** | [**AddressEditable**](AddressEditable.md)| | + +### Return type + +[**Address**](Address.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Echos the writable fields of a newly created address object. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> AddressDeletion delete(adr_id) + +delete + +Deletes the details of an existing address. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import addresses_api +from lob_python.model.adr_id import AdrId +from lob_python.model.lob_error import LobError +from lob_python.model.address_deletion import AddressDeletion +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = addresses_api.AddressesApi(api_client) + adr_id = AdrId("adr_C") # AdrId | id of the address + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(adr_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling AddressesApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **adr_id** | **AdrId**| id of the address | + +### Return type + +[**AddressDeletion**](AddressDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Address get(adr_id) + +get + +Retrieves the details of an existing address. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import addresses_api +from lob_python.model.adr_id import AdrId +from lob_python.model.address import Address +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = addresses_api.AddressesApi(api_client) + adr_id = AdrId("adr_C") # AdrId | id of the address + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(adr_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling AddressesApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **adr_id** | **AdrId**| id of the address | + +### Return type + +[**Address**](Address.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an address object if a valid identifier was provided. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> AddressList list() + +list + +Returns a list of your addresses. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import addresses_api +from lob_python.model.include_model import IncludeModel +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from lob_python.model.address_list import AddressList +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = addresses_api.AddressesApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling AddressesApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + +### Return type + +[**AddressList**](AddressList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` addresses. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AdrId.md b/docs/AdrId.md new file mode 100644 index 0000000..b2d5f8b --- /dev/null +++ b/docs/AdrId.md @@ -0,0 +1,13 @@ +# AdrId + +Unique identifier prefixed with `adr_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `adr_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccount.md b/docs/BankAccount.md new file mode 100644 index 0000000..edbcdbb --- /dev/null +++ b/docs/BankAccount.md @@ -0,0 +1,25 @@ +# BankAccount + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**routing_number** | **str** | Must be a [valid US routing number](https://www.frbservices.org/index.html). | +**account_number** | **str** | | +**account_type** | **str** | The type of entity that holds the account. | +**signatory** | **str** | The signatory associated with your account. This name will be printed on checks created with this bank account. If you prefer to use a custom signature image on your checks instead, please create your bank account from the [Dashboard](https://dashboard.lob.com/#/login). | +**id** | [**BankId**](BankId.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**object** | **str** | | defaults to "bank_account" +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**signature_url** | **str, none_type** | A signed link to the signature image. will be generated. | [optional] +**bank_name** | **str** | The name of the bank based on the provided routing number, e.g. `JPMORGAN CHASE BANK`. | [optional] +**verified** | **bool** | A bank account must be verified before a check can be created. | [optional] if omitted the server will use the default value of False +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccountDeletion.md b/docs/BankAccountDeletion.md new file mode 100644 index 0000000..166de98 --- /dev/null +++ b/docs/BankAccountDeletion.md @@ -0,0 +1,15 @@ +# BankAccountDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**BankId**](BankId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "bank_account_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccountList.md b/docs/BankAccountList.md new file mode 100644 index 0000000..c93b14f --- /dev/null +++ b/docs/BankAccountList.md @@ -0,0 +1,17 @@ +# BankAccountList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[BankAccount]**](BankAccount.md) | list of addresses | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccountVerify.md b/docs/BankAccountVerify.md new file mode 100644 index 0000000..8187e5d --- /dev/null +++ b/docs/BankAccountVerify.md @@ -0,0 +1,12 @@ +# BankAccountVerify + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amounts** | [**[Cents]**](Cents.md) | In live mode, an array containing the two micro deposits (in cents) placed in the bank account. In test mode, no micro deposits will be placed, so any two integers between `1` and `100` will work. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccountWritable.md b/docs/BankAccountWritable.md new file mode 100644 index 0000000..f70edb9 --- /dev/null +++ b/docs/BankAccountWritable.md @@ -0,0 +1,17 @@ +# BankAccountWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**routing_number** | **str** | Must be a [valid US routing number](https://www.frbservices.org/index.html). | +**account_number** | **str** | | +**account_type** | [**BankTypeEnum**](BankTypeEnum.md) | | +**signatory** | **str** | The signatory associated with your account. This name will be printed on checks created with this bank account. If you prefer to use a custom signature image on your checks instead, please create your bank account from the [Dashboard](https://dashboard.lob.com/#/login). | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankAccountsApi.md b/docs/BankAccountsApi.md new file mode 100644 index 0000000..cd5f773 --- /dev/null +++ b/docs/BankAccountsApi.md @@ -0,0 +1,452 @@ +# lob_python.BankAccountsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](BankAccountsApi.md#create) | **POST** /bank_accounts | create +[**delete**](BankAccountsApi.md#delete) | **DELETE** /bank_accounts/{bank_id} | delete +[**get**](BankAccountsApi.md#get) | **GET** /bank_accounts/{bank_id} | get +[**verify**](BankAccountsApi.md#verify) | **POST** /bank_accounts/{bank_id}/verify | verify +[**list**](BankAccountsApi.md#list) | **GET** /bank_accounts | list + + +# **create** +> BankAccount create(bank_account_writable) + +create + +Creates a new bank account with the provided properties. Bank accounts created in live mode will need to be verified via micro deposits before being able to send live checks. The deposits will appear in the bank account in 2-3 business days and have the description \"VERIFICATION\". + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import bank_accounts_api +from lob_python.model.bank_account import BankAccount +from lob_python.model.bank_account_writable import BankAccountWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bank_accounts_api.BankAccountsApi(api_client) + bank_account_writable = BankAccountWritable( + description=ResourceDescription("description_example"), + routing_number="routing_number_example", + account_number="account_number_example", + account_type=BankTypeEnum("company"), + signatory="signatory_example", + metadata=MetadataModel( + key="key_example", + ), + ) # BankAccountWritable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(bank_account_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BankAccountsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_account_writable** | [**BankAccountWritable**](BankAccountWritable.md)| | + +### Return type + +[**BankAccount**](BankAccount.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a bank_account object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> BankAccountDeletion delete(bank_id) + +delete + +Permanently deletes a bank account. It cannot be undone. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import bank_accounts_api +from lob_python.model.bank_id import BankId +from lob_python.model.bank_account_deletion import BankAccountDeletion +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bank_accounts_api.BankAccountsApi(api_client) + bank_id = BankId("bank_C") # BankId | id of the bank account + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(bank_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BankAccountsApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **BankId**| id of the bank account | + +### Return type + +[**BankAccountDeletion**](BankAccountDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> BankAccount get(bank_id) + +get + +Retrieves the details of an existing bank account. You need only supply the unique bank account identifier that was returned upon bank account creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import bank_accounts_api +from lob_python.model.bank_account import BankAccount +from lob_python.model.bank_id import BankId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bank_accounts_api.BankAccountsApi(api_client) + bank_id = BankId("bank_C") # BankId | id of the bank account + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(bank_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BankAccountsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **BankId**| id of the bank account | + +### Return type + +[**BankAccount**](BankAccount.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a bank account object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **verify** +> BankAccount verify(bank_id, bank_account_verify) + +verify + +Verify a bank account in order to create a check. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import bank_accounts_api +from lob_python.model.bank_account import BankAccount +from lob_python.model.bank_account_verify import BankAccountVerify +from lob_python.model.bank_id import BankId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bank_accounts_api.BankAccountsApi(api_client) + bank_id = BankId("bank_C") # BankId | id of the bank account to be verified + bank_account_verify = BankAccountVerify( + amounts=[ + Cents(1), + ], + ) # BankAccountVerify | + + # example passing only required values which don't have defaults set + try: + # verify + api_response = api_instance.verify(bank_id, bank_account_verify) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BankAccountsApi->verify: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bank_id** | **BankId**| id of the bank account to be verified | + **bank_account_verify** | [**BankAccountVerify**](BankAccountVerify.md)| | + +### Return type + +[**BankAccount**](BankAccount.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a bank_account object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> BankAccountList list() + +list + +Returns a list of your bank accounts. The bank accounts are returned sorted by creation date, with the most recently created bank accounts appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import bank_accounts_api +from lob_python.model.bank_account_list import BankAccountList +from lob_python.model.include_model import IncludeModel +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = bank_accounts_api.BankAccountsApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BankAccountsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + +### Return type + +[**BankAccountList**](BankAccountList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` bank_accounts. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BankId.md b/docs/BankId.md new file mode 100644 index 0000000..33fddbb --- /dev/null +++ b/docs/BankId.md @@ -0,0 +1,13 @@ +# BankId + +Unique identifier prefixed with `bank_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `bank_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BankTypeEnum.md b/docs/BankTypeEnum.md new file mode 100644 index 0000000..9f0801c --- /dev/null +++ b/docs/BankTypeEnum.md @@ -0,0 +1,13 @@ +# BankTypeEnum + +The type of entity that holds the account. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The type of entity that holds the account. | must be one of ["company", "individual", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BgDescription.md b/docs/BgDescription.md new file mode 100644 index 0000000..921f428 --- /dev/null +++ b/docs/BgDescription.md @@ -0,0 +1,13 @@ +# BgDescription + +Description of the billing group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Description of the billing group. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BgId.md b/docs/BgId.md new file mode 100644 index 0000000..2a5c968 --- /dev/null +++ b/docs/BgId.md @@ -0,0 +1,13 @@ +# BgId + +Unique identifier prefixed with `bg_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `bg_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingGroup.md b/docs/BillingGroup.md new file mode 100644 index 0000000..54a8b48 --- /dev/null +++ b/docs/BillingGroup.md @@ -0,0 +1,17 @@ +# BillingGroup + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Name**](Name.md) | | +**id** | [**BgId**](BgId.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**object** | **str** | Value is resource type. | defaults to "billing_group" +**description** | [**BgDescription**](BgDescription.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingGroupEditable.md b/docs/BillingGroupEditable.md new file mode 100644 index 0000000..ac5cc9d --- /dev/null +++ b/docs/BillingGroupEditable.md @@ -0,0 +1,13 @@ +# BillingGroupEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**Name**](Name.md) | | +**description** | [**BgDescription**](BgDescription.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingGroupList.md b/docs/BillingGroupList.md new file mode 100644 index 0000000..e7abe3a --- /dev/null +++ b/docs/BillingGroupList.md @@ -0,0 +1,16 @@ +# BillingGroupList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[BillingGroup]**](BillingGroup.md) | list of billing groups | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BillingGroupsApi.md b/docs/BillingGroupsApi.md new file mode 100644 index 0000000..f32e1d7 --- /dev/null +++ b/docs/BillingGroupsApi.md @@ -0,0 +1,366 @@ +# lob_python.BillingGroupsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](BillingGroupsApi.md#create) | **POST** /billing_groups | create +[**get**](BillingGroupsApi.md#get) | **GET** /billing_groups/{bg_id} | get +[**update**](BillingGroupsApi.md#update) | **POST** /billing_groups/{bg_id} | update +[**list**](BillingGroupsApi.md#list) | **GET** /billing_groups | list + + +# **create** +> BillingGroup create(billing_group_editable) + +create + +Creates a new billing_group with the provided properties. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import billing_groups_api +from lob_python.model.billing_group_editable import BillingGroupEditable +from lob_python.model.billing_group import BillingGroup +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_groups_api.BillingGroupsApi(api_client) + billing_group_editable = BillingGroupEditable( + description=BgDescription("description_example"), + name=Name("name_example"), + ) # BillingGroupEditable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(billing_group_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BillingGroupsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **billing_group_editable** | [**BillingGroupEditable**](BillingGroupEditable.md)| | + +### Return type + +[**BillingGroup**](BillingGroup.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a billing group object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> BillingGroup get(bg_id) + +get + +Retrieves the details of an existing billing_group. You need only supply the unique billing_group identifier that was returned upon billing_group creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import billing_groups_api +from lob_python.model.billing_group import BillingGroup +from lob_python.model.bg_id import BgId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_groups_api.BillingGroupsApi(api_client) + bg_id = BgId("bg_C") # BgId | id of the billing_group + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(bg_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BillingGroupsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bg_id** | **BgId**| id of the billing_group | + +### Return type + +[**BillingGroup**](BillingGroup.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a billing_group object. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> BillingGroup update(bg_id, billing_group_editable) + +update + +Updates all editable attributes of the billing_group with the given id. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import billing_groups_api +from lob_python.model.billing_group_editable import BillingGroupEditable +from lob_python.model.billing_group import BillingGroup +from lob_python.model.bg_id import BgId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_groups_api.BillingGroupsApi(api_client) + bg_id = BgId("bg_C") # BgId | id of the billing_group + billing_group_editable = BillingGroupEditable( + description=BgDescription("description_example"), + name=Name("name_example"), + ) # BillingGroupEditable | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(bg_id, billing_group_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BillingGroupsApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **bg_id** | **BgId**| id of the billing_group | + **billing_group_editable** | [**BillingGroupEditable**](BillingGroupEditable.md)| | + +### Return type + +[**BillingGroup**](BillingGroup.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a billing group object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> BillingGroupList list() + +list + +Returns a list of your billing_groups. The billing_groups are returned sorted by creation date, with the most recently created billing_groups appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import billing_groups_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.include_model import IncludeModel +from lob_python.model.billing_group_list import BillingGroupList +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = billing_groups_api.BillingGroupsApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + offset = 0 # int | An integer that designates the offset at which to begin returning results. Defaults to 0. (optional) if omitted the server will use the default value of 0 + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + date_modified = { + "key": "key_example", + } # {str: (str,)} | Filter by date modified. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, offset=offset, include=include, date_created=date_created, date_modified=date_modified, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling BillingGroupsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **offset** | **int**| An integer that designates the offset at which to begin returning results. Defaults to 0. | [optional] if omitted the server will use the default value of 0 + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **date_modified** | **{str: (str,)}**| Filter by date modified. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**BillingGroupList**](BillingGroupList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a list of billing_groups. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BulkError.md b/docs/BulkError.md new file mode 100644 index 0000000..03f3ff7 --- /dev/null +++ b/docs/BulkError.md @@ -0,0 +1,13 @@ +# BulkError + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | [**BulkErrorProperties**](BulkErrorProperties.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BulkErrorProperties.md b/docs/BulkErrorProperties.md new file mode 100644 index 0000000..055adcc --- /dev/null +++ b/docs/BulkErrorProperties.md @@ -0,0 +1,14 @@ +# BulkErrorProperties + +Bulk error properties + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | A human-readable message with more details about the error | [optional] +**status_code** | **int** | A conventional HTTP status code. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Campaign.md b/docs/Campaign.md new file mode 100644 index 0000000..3e69954 --- /dev/null +++ b/docs/Campaign.md @@ -0,0 +1,29 @@ +# Campaign + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the campaign. | +**schedule_type** | [**CmpScheduleType**](CmpScheduleType.md) | | +**auto_cancel_if_ncoa** | **bool** | Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA. | +**id** | [**CmpId**](CmpId.md) | | +**creatives** | **list** | An array of creatives that have been associated with this campaign. | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**is_draft** | **bool** | Whether or not the campaign is still a draft. | defaults to True +**object** | **str** | Value is resource type. | defaults to "campaign" +**billing_group_id** | **str, none_type** | Unique identifier prefixed with `bg_`. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**target_delivery_date** | **datetime, none_type** | If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. | [optional] +**send_date** | **datetime, none_type** | If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. | [optional] +**cancel_window_campaign_minutes** | **int, none_type** | A window, in minutes, within which the campaign can be canceled. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**use_type** | [**CmpUseType**](CmpUseType.md) | | [optional] +**account_id** | **str** | Account ID that this campaign is associated with. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignUpdatable.md b/docs/CampaignUpdatable.md new file mode 100644 index 0000000..ceef126 --- /dev/null +++ b/docs/CampaignUpdatable.md @@ -0,0 +1,21 @@ +# CampaignUpdatable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**schedule_type** | [**CmpScheduleType**](CmpScheduleType.md) | | [optional] +**target_delivery_date** | **datetime** | If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. | [optional] +**send_date** | **datetime** | If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. | [optional] +**cancel_window_campaign_minutes** | **int** | A window, in minutes, within which the campaign can be canceled. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**is_draft** | **bool** | Whether or not the campaign is still a draft. | [optional] if omitted the server will use the default value of True +**use_type** | [**CmpUseType**](CmpUseType.md) | | [optional] +**auto_cancel_if_ncoa** | **bool** | Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignWritable.md b/docs/CampaignWritable.md new file mode 100644 index 0000000..8c06e5d --- /dev/null +++ b/docs/CampaignWritable.md @@ -0,0 +1,21 @@ +# CampaignWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the campaign. | +**schedule_type** | [**CmpScheduleType**](CmpScheduleType.md) | | +**billing_group_id** | **str, none_type** | Unique identifier prefixed with `bg_`. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**target_delivery_date** | **datetime, none_type** | If `schedule_type` is `target_delivery_date`, provide a targeted delivery date for mail pieces in this campaign. | [optional] +**send_date** | **datetime, none_type** | If `schedule_type` is `scheduled_send_date`, provide a date to send this campaign. | [optional] +**cancel_window_campaign_minutes** | **int, none_type** | A window, in minutes, within which the campaign can be canceled. | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**use_type** | [**CmpUseType**](CmpUseType.md) | | [optional] +**auto_cancel_if_ncoa** | **bool** | Whether or not a mail piece should be automatically canceled and not sent if the address is updated via NCOA. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md new file mode 100644 index 0000000..5d51d32 --- /dev/null +++ b/docs/CampaignsApi.md @@ -0,0 +1,464 @@ +# lob_python.CampaignsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](CampaignsApi.md#create) | **POST** /campaigns | create +[**delete**](CampaignsApi.md#delete) | **DELETE** /campaigns/{cmp_id} | delete +[**get**](CampaignsApi.md#get) | **GET** /campaigns/{cmp_id} | get +[**update**](CampaignsApi.md#update) | **PATCH** /campaigns/{cmp_id} | update +[**list**](CampaignsApi.md#list) | **GET** /campaigns | list + + +# **create** +> Campaign create(campaign_writable) + +create + +Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign). + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import campaigns_api +from lob_python.model.campaign import Campaign +from lob_python.model.campaign_writable import CampaignWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = campaigns_api.CampaignsApi(api_client) + campaign_writable = CampaignWritable( + billing_group_id="bg_C", + name="name_example", + description=ResourceDescription("description_example"), + schedule_type=CmpScheduleType("immediate"), + target_delivery_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + cancel_window_campaign_minutes=1, + metadata=MetadataModel( + key="key_example", + ), + use_type=CmpUseType("marketing"), + auto_cancel_if_ncoa=True, + ) # CampaignWritable | + x_lang_output = "native" # str | * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(campaign_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(campaign_writable, x_lang_output=x_lang_output) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_writable** | [**CampaignWritable**](CampaignWritable.md)| | + **x_lang_output** | **str**| * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. | [optional] + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Campaign created successfully | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> dict delete(cmp_id) + +delete + +Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign's `send_date` matches its associated mail pieces' `send_date`s. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import campaigns_api +from lob_python.model.cmp_id import CmpId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = campaigns_api.CampaignsApi(api_client) + cmp_id = CmpId("cmp_C") # CmpId | id of the campaign + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(cmp_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cmp_id** | **CmpId**| id of the campaign | + +### Return type + +**dict** + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted the campaign. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Campaign get(cmp_id) + +get + +Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import campaigns_api +from lob_python.model.campaign import Campaign +from lob_python.model.cmp_id import CmpId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = campaigns_api.CampaignsApi(api_client) + cmp_id = CmpId("cmp_C") # CmpId | id of the campaign + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(cmp_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cmp_id** | **CmpId**| id of the campaign | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a campaign object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> Campaign update(cmp_id, campaign_updatable) + +update + +Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import campaigns_api +from lob_python.model.campaign import Campaign +from lob_python.model.cmp_id import CmpId +from lob_python.model.campaign_updatable import CampaignUpdatable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = campaigns_api.CampaignsApi(api_client) + cmp_id = CmpId("cmp_C") # CmpId | id of the campaign + campaign_updatable = CampaignUpdatable( + name="name_example", + description=ResourceDescription("description_example"), + schedule_type=CmpScheduleType("immediate"), + target_delivery_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + cancel_window_campaign_minutes=1, + metadata=MetadataModel( + key="key_example", + ), + is_draft=True, + use_type=CmpUseType("marketing"), + auto_cancel_if_ncoa=True, + ) # CampaignUpdatable | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(cmp_id, campaign_updatable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **cmp_id** | **CmpId**| id of the campaign | + **campaign_updatable** | [**CampaignUpdatable**](CampaignUpdatable.md)| | + +### Return type + +[**Campaign**](Campaign.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a campaign object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> CampaignsList list() + +list + +Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import campaigns_api +from lob_python.model.include_model import IncludeModel +from lob_python.model.campaigns_list import CampaignsList +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = campaigns_api.CampaignsApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, include=include, before=before, after=after) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CampaignsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + +### Return type + +[**CampaignsList**](CampaignsList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` campaigns. Each entry in the array is a separate letter. The previous and next page of campaigns can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more campaigns are available beyond the current set of returned results, the `next_url` field will be empty. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CampaignsList.md b/docs/CampaignsList.md new file mode 100644 index 0000000..c6b8fa4 --- /dev/null +++ b/docs/CampaignsList.md @@ -0,0 +1,17 @@ +# CampaignsList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Campaign]**](Campaign.md) | list of campaigns | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Card.md b/docs/Card.md new file mode 100644 index 0000000..ebbb678 --- /dev/null +++ b/docs/Card.md @@ -0,0 +1,30 @@ +# Card + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**CardId**](CardId.md) | | +**url** | **str** | The signed link for the card. | +**thumbnails** | [**[Thumbnail]**](Thumbnail.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**auto_reorder** | **bool** | True if the cards should be auto-reordered. | defaults to False +**available_quantity** | **int** | The available quantity of cards. | defaults to 0 +**pending_quantity** | **int** | The pending quantity of cards. | defaults to 0 +**object** | **str** | object | defaults to "card" +**size** | **str** | The size of the card | defaults to "2.125x3.375" +**reorder_quantity** | **int, none_type** | The number of cards to be reordered. Only present when auto_reorder is True. | [optional] +**raw_url** | **str** | The raw URL of the card. | [optional] +**front_original_url** | **str** | The original URL of the front template. | [optional] +**back_original_url** | **str** | The original URL of the back template. | [optional] +**status** | **str** | | [optional] +**orientation** | **str** | The orientation of the card. | [optional] if omitted the server will use the default value of "horizontal" +**threshold_amount** | **int** | The threshold amount of the card | [optional] if omitted the server will use the default value of 0 +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**description** | [**CardDescription**](CardDescription.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardDeletion.md b/docs/CardDeletion.md new file mode 100644 index 0000000..3337368 --- /dev/null +++ b/docs/CardDeletion.md @@ -0,0 +1,15 @@ +# CardDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**CardId**](CardId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "card_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardDescription.md b/docs/CardDescription.md new file mode 100644 index 0000000..6653162 --- /dev/null +++ b/docs/CardDescription.md @@ -0,0 +1,13 @@ +# CardDescription + +Description of the card. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Description of the card. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardEditable.md b/docs/CardEditable.md new file mode 100644 index 0000000..b370629 --- /dev/null +++ b/docs/CardEditable.md @@ -0,0 +1,15 @@ +# CardEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**front** | **str** | A PDF template for the front of the card | +**back** | **str** | A PDF template for the back of the card | [optional] if omitted the server will use the default value of "https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf" +**size** | **str** | The size of the card | [optional] if omitted the server will use the default value of "2.125x3.375" +**description** | [**CardDescription**](CardDescription.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardId.md b/docs/CardId.md new file mode 100644 index 0000000..c31299d --- /dev/null +++ b/docs/CardId.md @@ -0,0 +1,13 @@ +# CardId + +Unique identifier prefixed with `card_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `card_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardList.md b/docs/CardList.md new file mode 100644 index 0000000..dfd5336 --- /dev/null +++ b/docs/CardList.md @@ -0,0 +1,17 @@ +# CardList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Card]**](Card.md) | list of cards | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardOrder.md b/docs/CardOrder.md new file mode 100644 index 0000000..759be25 --- /dev/null +++ b/docs/CardOrder.md @@ -0,0 +1,24 @@ +# CardOrder + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**object** | **str** | Value is type of resource. | +**id** | [**CoId**](CoId.md) | | [optional] +**card_id** | [**CardId**](CardId.md) | | [optional] +**status** | **str** | The status of the card order. | [optional] +**inventory** | **float** | The inventory of the card order. | [optional] if omitted the server will use the default value of 0 +**quantity_ordered** | **float** | The quantity of cards ordered | [optional] if omitted the server will use the default value of 0 +**unit_price** | **float** | The unit price for the card order. | [optional] if omitted the server will use the default value of 0 +**cancelled_reason** | **str** | The reason for cancellation. | [optional] +**availability_date** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**expected_availability_date** | **datetime** | The fixed deadline for the cards to be printed. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardOrderEditable.md b/docs/CardOrderEditable.md new file mode 100644 index 0000000..181e6cd --- /dev/null +++ b/docs/CardOrderEditable.md @@ -0,0 +1,12 @@ +# CardOrderEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quantity** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardOrderList.md b/docs/CardOrderList.md new file mode 100644 index 0000000..f21af4e --- /dev/null +++ b/docs/CardOrderList.md @@ -0,0 +1,16 @@ +# CardOrderList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[CardOrder]**](CardOrder.md) | list of card orders | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardOrdersApi.md b/docs/CardOrdersApi.md new file mode 100644 index 0000000..6f5506f --- /dev/null +++ b/docs/CardOrdersApi.md @@ -0,0 +1,190 @@ +# lob_python.CardOrdersApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](CardOrdersApi.md#create) | **POST** /cards/{card_id}/orders | create +[**get**](CardOrdersApi.md#get) | **GET** /cards/{card_id}/orders | get + + +# **create** +> CardOrder create(card_id, card_order_editable) + +create + +Creates a new card order given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import card_orders_api +from lob_python.model.card_order_editable import CardOrderEditable +from lob_python.model.card_id import CardId +from lob_python.model.card_order import CardOrder +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = card_orders_api.CardOrdersApi(api_client) + card_id = CardId("card_C") # CardId | The ID of the card to which the card orders belong. + card_order_editable = CardOrderEditable( + quantity=10000, + ) # CardOrderEditable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(card_id, card_order_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardOrdersApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_id** | **CardId**| The ID of the card to which the card orders belong. | + **card_order_editable** | [**CardOrderEditable**](CardOrderEditable.md)| | + +### Return type + +[**CardOrder**](CardOrder.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Card order created successfully | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> CardOrderList get(card_id) + +get + +Retrieves the card orders associated with the given card id. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import card_orders_api +from lob_python.model.card_order_list import CardOrderList +from lob_python.model.card_id import CardId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = card_orders_api.CardOrdersApi(api_client) + card_id = CardId("card_C") # CardId | The ID of the card to which the card orders belong. + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + offset = 0 # int | An integer that designates the offset at which to begin returning results. Defaults to 0. (optional) if omitted the server will use the default value of 0 + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(card_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardOrdersApi->get: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # get + api_response = api_instance.get(card_id, limit=limit, offset=offset) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardOrdersApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_id** | **CardId**| The ID of the card to which the card orders belong. | + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **offset** | **int**| An integer that designates the offset at which to begin returning results. Defaults to 0. | [optional] if omitted the server will use the default value of 0 + +### Return type + +[**CardOrderList**](CardOrderList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the card orders associated with the given card id | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CardUpdatable.md b/docs/CardUpdatable.md new file mode 100644 index 0000000..f898891 --- /dev/null +++ b/docs/CardUpdatable.md @@ -0,0 +1,14 @@ +# CardUpdatable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | [**CardDescription**](CardDescription.md) | | [optional] +**auto_reorder** | **bool** | Allows for auto reordering | [optional] +**reorder_quantity** | **float** | The quantity of items to be reordered (only required when auto_reorder is true). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardsApi.md b/docs/CardsApi.md new file mode 100644 index 0000000..4233a35 --- /dev/null +++ b/docs/CardsApi.md @@ -0,0 +1,440 @@ +# lob_python.CardsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](CardsApi.md#create) | **POST** /cards | create +[**delete**](CardsApi.md#delete) | **DELETE** /cards/{card_id} | delete +[**get**](CardsApi.md#get) | **GET** /cards/{card_id} | get +[**update**](CardsApi.md#update) | **POST** /cards/{card_id} | update +[**list**](CardsApi.md#list) | **GET** /cards | list + + +# **create** +> Card create(card_editable) + +create + +Creates a new card given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import cards_api +from lob_python.model.card_editable import CardEditable +from lob_python.model.card import Card +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cards_api.CardsApi(api_client) + card_editable = CardEditable( + front="front_example", + back="https://s3.us-west-2.amazonaws.com/public.lob.com/assets/card_blank_horizontal.pdf", + size="2.125x3.375", + description=CardDescription("description_example"), + ) # CardEditable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(card_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_editable** | [**CardEditable**](CardEditable.md)| | + +### Return type + +[**Card**](Card.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Card created successfully | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> CardDeletion delete(card_id) + +delete + +Delete an existing card. You need only supply the unique identifier that was returned upon card creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import cards_api +from lob_python.model.card_deletion import CardDeletion +from lob_python.model.card_id import CardId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cards_api.CardsApi(api_client) + card_id = CardId("card_C") # CardId | id of the card + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(card_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardsApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_id** | **CardId**| id of the card | + +### Return type + +[**CardDeletion**](CardDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted the card | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Card get(card_id) + +get + +Retrieves the details of an existing card. You need only supply the unique customer identifier that was returned upon card creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import cards_api +from lob_python.model.card_id import CardId +from lob_python.model.card import Card +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cards_api.CardsApi(api_client) + card_id = CardId("card_C") # CardId | id of the card + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(card_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_id** | **CardId**| id of the card | + +### Return type + +[**Card**](Card.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a card object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> Card update(card_id, card_updatable) + +update + +Update the details of an existing card. You need only supply the unique identifier that was returned upon card creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import cards_api +from lob_python.model.card_updatable import CardUpdatable +from lob_python.model.card_id import CardId +from lob_python.model.card import Card +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cards_api.CardsApi(api_client) + card_id = CardId("card_C") # CardId | id of the card + card_updatable = CardUpdatable( + description=CardDescription("description_example"), + auto_reorder=True, + reorder_quantity=10000, + ) # CardUpdatable | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(card_id, card_updatable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardsApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **card_id** | **CardId**| id of the card | + **card_updatable** | [**CardUpdatable**](CardUpdatable.md)| | + +### Return type + +[**Card**](Card.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a card object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> CardList list() + +list + +Returns a list of your cards. The cards are returned sorted by creation date, with the most recently created addresses appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import cards_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.card_list import CardList +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cards_api.CardsApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CardsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**CardList**](CardList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a list of card objects | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Cents.md b/docs/Cents.md new file mode 100644 index 0000000..e461457 --- /dev/null +++ b/docs/Cents.md @@ -0,0 +1,12 @@ +# Cents + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **int** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Check.md b/docs/Check.md new file mode 100644 index 0000000..78130fb --- /dev/null +++ b/docs/Check.md @@ -0,0 +1,37 @@ +# Check + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ChkId**](ChkId.md) | | +**to** | [**Address**](Address.md) | | +**amount** | **float** | The payment amount to be sent in US dollars. | +**bank_account** | [**BankAccount**](BankAccount.md) | | +**url** | [**SignedLink**](SignedLink.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**carrier** | **str** | | defaults to "USPS" +**object** | **str** | | defaults to "check" +**_from** | [**Address**](Address.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**mail_type** | **str** | Checks must be sent `usps_first_class` | [optional] if omitted the server will use the default value of "usps_first_class" +**memo** | **str, none_type** | Text to include on the memo line of the check. | [optional] +**check_number** | **int** | An integer that designates the check number. If `check_number` is not provided, checks created from a new `bank_account` will start at `10000` and increment with each check created with the `bank_account`. A provided `check_number` overrides the defaults. Subsequent checks created with the same `bank_account` will increment from the provided check number. | [optional] +**message** | **str** | Max of 400 characters to be included at the bottom of the check page. | [optional] +**check_bottom_template_id** | [**TmplId**](TmplId.md) | | [optional] +**attachment_template_id** | [**TmplId**](TmplId.md) | | [optional] +**check_bottom_template_version_id** | [**VrsnId**](VrsnId.md) | | [optional] +**attachment_template_version_id** | [**VrsnId**](VrsnId.md) | | [optional] +**thumbnails** | [**[Thumbnail]**](Thumbnail.md) | | [optional] +**expected_delivery_date** | **date** | A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`. | [optional] +**tracking_events** | [**[TrackingEventNormal], none_type**](TrackingEventNormal.md) | An array of tracking_event objects ordered by ascending `time`. Will not be populated for checks created in test mode. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckDeletion.md b/docs/CheckDeletion.md new file mode 100644 index 0000000..c0ba712 --- /dev/null +++ b/docs/CheckDeletion.md @@ -0,0 +1,15 @@ +# CheckDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ChkId**](ChkId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "check_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckEditable.md b/docs/CheckEditable.md new file mode 100644 index 0000000..83918b2 --- /dev/null +++ b/docs/CheckEditable.md @@ -0,0 +1,27 @@ +# CheckEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**to** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**bank_account** | **str, none_type** | | +**amount** | **float** | The payment amount to be sent in US dollars. | +**logo** | **str** | Accepts a remote URL or local file upload to an image to print (in grayscale) in the upper-left corner of your check. | [optional] +**check_bottom** | **str** | The artwork to use on the bottom of the check page. Notes: - HTML merge variables should not include delimiting whitespace. - PDF, PNG, and JPGs must be sized at 8.5\"x11\" at 300 DPI, while supplied HTML will be rendered and trimmed to fit on a 8.5\"x11\" page. - The check bottom will always be printed in black & white. - Must conform to [this template](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_bottom_template.pdf). Need more help? Consult our [HTML examples](#section/HTML-Examples). | [optional] +**attachment** | **str** | A document to include with the check. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**mail_type** | **str** | Checks must be sent `usps_first_class` | [optional] if omitted the server will use the default value of "usps_first_class" +**memo** | **str, none_type** | Text to include on the memo line of the check. | [optional] +**check_number** | **int** | An integer that designates the check number. | [optional] +**message** | **str** | Max of 400 characters to be included at the bottom of the check page. | [optional] +**billing_group_id** | **str** | An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See [Billing Group API](https://lob.github.io/lob-openapi/#tag/Billing-Groups) for more information. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CheckList.md b/docs/CheckList.md new file mode 100644 index 0000000..aa0f06e --- /dev/null +++ b/docs/CheckList.md @@ -0,0 +1,17 @@ +# CheckList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Check]**](Check.md) | list of checks | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChecksApi.md b/docs/ChecksApi.md new file mode 100644 index 0000000..cb64b5a --- /dev/null +++ b/docs/ChecksApi.md @@ -0,0 +1,399 @@ +# lob_python.ChecksApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel**](ChecksApi.md#cancel) | **DELETE** /checks/{chk_id} | cancel +[**create**](ChecksApi.md#create) | **POST** /checks | create +[**get**](ChecksApi.md#get) | **GET** /checks/{chk_id} | get +[**list**](ChecksApi.md#list) | **GET** /checks | list + + +# **cancel** +> CheckDeletion cancel(chk_id) + +cancel + +Completely removes a check from production. This can only be done if the check has a `send_date` and the `send_date` has not yet passed. If the check is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import checks_api +from lob_python.model.chk_id import ChkId +from lob_python.model.check_deletion import CheckDeletion +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = checks_api.ChecksApi(api_client) + chk_id = ChkId("chk_C") # ChkId | id of the check + + # example passing only required values which don't have defaults set + try: + # cancel + api_response = api_instance.cancel(chk_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ChecksApi->cancel: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chk_id** | **ChkId**| id of the check | + +### Return type + +[**CheckDeletion**](CheckDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create** +> Check create(check_editable) + +create + +Creates a new check with the provided properties. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import checks_api +from lob_python.model.check_editable import CheckEditable +from lob_python.model.check import Check +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = checks_api.ChecksApi(api_client) + check_editable = CheckEditable( + _from="_from_example", + to="to_example", + bank_account="bank_account_example", + amount=3.14, + logo="logo_example", + check_bottom="check_bottom_example", + attachment="attachment_example", + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + merge_variables=MergeVariables(), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + mail_type="usps_first_class", + memo="memo_example", + check_number=1, + message="message_example", + billing_group_id="billing_group_id_example", + ) # CheckEditable | + idempotency_key = "Idempotency-Key_example" # str | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(check_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ChecksApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(check_editable, idempotency_key=idempotency_key) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ChecksApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **check_editable** | [**CheckEditable**](CheckEditable.md)| | + **idempotency_key** | **str**| A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). | [optional] + +### Return type + +[**Check**](Check.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a check object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Check get(chk_id) + +get + +Retrieves the details of an existing check. You need only supply the unique check identifier that was returned upon check creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import checks_api +from lob_python.model.check import Check +from lob_python.model.chk_id import ChkId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = checks_api.ChecksApi(api_client) + chk_id = ChkId("chk_C") # ChkId | id of the check + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(chk_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ChecksApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **chk_id** | **ChkId**| id of the check | + +### Return type + +[**Check**](Check.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a check object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> CheckList list() + +list + +Returns a list of your checks. The checks are returned sorted by creation date, with the most recently created checks appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import checks_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.include_model import IncludeModel +from lob_python.model.check_list import CheckList +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from lob_python.model.mail_type import MailType +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = checks_api.ChecksApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + scheduled = True # bool | * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional) + send_date = { + "key": "key_example", + } # {str: (str,)} | Filter by date sent. (optional) + mail_type = MailType("usps_first_class") # MailType | A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata, scheduled=scheduled, send_date=send_date, mail_type=mail_type, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ChecksApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + **scheduled** | **bool**| * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` | [optional] + **send_date** | **{str: (str,)}**| Filter by date sent. | [optional] + **mail_type** | **MailType**| A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**CheckList**](CheckList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` checks. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ChkId.md b/docs/ChkId.md new file mode 100644 index 0000000..bb91c4c --- /dev/null +++ b/docs/ChkId.md @@ -0,0 +1,13 @@ +# ChkId + +Unique identifier prefixed with `chk_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `chk_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/City.md b/docs/City.md new file mode 100644 index 0000000..5fec812 --- /dev/null +++ b/docs/City.md @@ -0,0 +1,12 @@ +# City + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CmpId.md b/docs/CmpId.md new file mode 100644 index 0000000..b84e895 --- /dev/null +++ b/docs/CmpId.md @@ -0,0 +1,13 @@ +# CmpId + +Unique identifier prefixed with `cmp_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `cmp_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CmpScheduleType.md b/docs/CmpScheduleType.md new file mode 100644 index 0000000..84a3f52 --- /dev/null +++ b/docs/CmpScheduleType.md @@ -0,0 +1,13 @@ +# CmpScheduleType + +How the campaign should be scheduled. Only value available today is `immediate`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | How the campaign should be scheduled. Only value available today is `immediate`. | defaults to "immediate", must be one of ["immediate", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CmpUseType.md b/docs/CmpUseType.md new file mode 100644 index 0000000..21ef2c0 --- /dev/null +++ b/docs/CmpUseType.md @@ -0,0 +1,13 @@ +# CmpUseType + +The usage type of this campaign. Can be one of `marketing` or `operational`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The usage type of this campaign. Can be one of `marketing` or `operational`. | must be one of ["marketing", "operational", "null", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CoId.md b/docs/CoId.md new file mode 100644 index 0000000..7a5062d --- /dev/null +++ b/docs/CoId.md @@ -0,0 +1,13 @@ +# CoId + +Unique identifier prefixed with `co_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `co_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Company.md b/docs/Company.md new file mode 100644 index 0000000..eee7806 --- /dev/null +++ b/docs/Company.md @@ -0,0 +1,13 @@ +# Company + +Either `name` or `company` is required, you may also add both. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Either `name` or `company` is required, you may also add both. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountryExtended.md b/docs/CountryExtended.md new file mode 100644 index 0000000..af45c0f --- /dev/null +++ b/docs/CountryExtended.md @@ -0,0 +1,13 @@ +# CountryExtended + +Must be a 2 letter country short-name code (ISO 3166). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Must be a 2 letter country short-name code (ISO 3166). | must be one of ["AD", "AE", "AF", "AG", "AI", "AL", "AN", "AO", "AQ", "AR", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CD", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CS", "CU", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FO", "FR", "GA", "GB", "GD", "GE", "GH", "GI", "GL", "GM", "GN", "GQ", "GR", "GS", "GT", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN", "IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MK", "ML", "MM", "MN", "MO", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PG", "PH", "PK", "PL", "PN", "PT", "PY", "QA", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VN", "VU", "WS", "YE", "ZA", "ZM", "ZW", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountryExtendedExpanded.md b/docs/CountryExtendedExpanded.md new file mode 100644 index 0000000..8aa108b --- /dev/null +++ b/docs/CountryExtendedExpanded.md @@ -0,0 +1,13 @@ +# CountryExtendedExpanded + +Full name of country + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Full name of country | must be one of ["", "AFGHANISTAN", "ALBANIA", "ALGERIA", "AMERICAN SAMOA", "ANDORRA", "ANGOLA", "ANGUILLA", "ANTARCTICA", "ANTIGUA AND BARBUDA", "ARGENTINA", "ARUBA", "AUSTRALIA", "AUSTRIA", "AZERBAIJAN", "BAHRAIN", "BANGLADESH", "BARBADOS", "BELARUS", "BELGIUM", "BELIZE", "BENIN", "BERMUDA", "BHUTAN", "BOLIVIA (PLURINATIONAL STATE OF)", "BONAIRE, SAINT EUSTATIUS AND SABA", "BOSNIA AND HERZEGOVINA", "BOTSWANA", "BRAZIL", "BRITISH INDIAN OCEAN TERRITORY", "BRITISH VIRGIN ISLANDS", "BRUNEI DARUSSALAM", "BULGARIA", "BURKINA FASO", "BURUNDI", "CABO VERDE", "CAMBODIA", "CAMEROON", "CANADA", "CAYMAN ISLANDS", "CENTRAL AFRICAN REPUBLIC", "CHAD", "CHILE", "CHINA", "COLOMBIA", "COMOROS", "CONGO", "CONGO, DEMOCRATIC REPUBLIC OF THE", "COOK ISLANDS", "COSTA RICA", "CÔTE D`IVOIRE", "CROATIA", "CUBA", "CURAÇAO", "CYPRUS", "CZECH REPUBLIC", "DENMARK", "DJIBOUTI", "DOMINICA", "DOMINICAN REPUBLIC", "ECUADOR", "EGYPT", "EL SALVADOR", "EQUATORIAL GUINEA", "ERITREA", "ESTONIA", "ESWATINI", "ETHIOPIA", "FALKLAND ISLANDS (MALVINAS)", "FAROE ISLANDS", "FIJI", "FINLAND", "FRANCE", "GABON", "GAMBIA", "GEORGIA", "GERMANY", "GHANA", "GIBRALTAR", "GREECE", "GREENLAND", "GRENADA", "GUATEMALA", "GUINEA", "GUINEA-BISSAU", "GUYANA", "HAITI", "HOLY SEE", "HONDURAS", "HONG KONG", "HUNGARY", "ICELAND", "INDIA", "INDONESIA", "IRAN (ISLAMIC REPUBLIC OF)", "IRAQ", "IRELAND", "ISRAEL", "ITALY", "JAMAICA", "JAPAN", "JORDAN", "KAZAKHSTAN", "KENYA", "KIRIBATI", "KOREA (DEMOCRATIC PEOPLE’S REPUBLIC OF)", "KOREA, REPUBLIC OF", "KUWAIT", "KYRGYZSTAN", "LAO PEOPLE’S DEMOCRATIC REPUBLIC", "LATVIA", "LEBANON", "LESOTHO", "LIBERIA", "LIBYA", "LIECHTENSTEIN", "LITHUANIA", "LUXEMBOURG", "MACAO", "MACEDONIA", "MADAGASCAR", "MALAWI", "MALAYSIA", "MALDIVES", "MALI", "MALTA", "MAURITANIA", "MAURITIUS", "MEXICO", "MOLDOVA, REPUBLIC OF", "MONACO", "MONGOLIA", "MONTENEGRO", "MONTSERRAT", "MOROCCO", "MOZAMBIQUE", "MYANMAR", "NAMIBIA", "NAURU", "NEPAL", "NETHERLAND ANTILLES", "NETHERLANDS", "NEW ZEALAND", "NICARAGUA", "NIGER", "NIGERIA", "NIUE", "NORFOLK ISLAND", "NORWAY", "OMAN", "PAKISTAN", "PANAMA", "PAPUA NEW GUINEA", "PARAGUAY", "PERU", "PHILIPPINES", "PITCAIRN", "POLAND", "PORTUGAL", "QATAR", "ROMANIA", "RUSSIAN FEDERATION", "RWANDA", "SAINT HELENA", "SAINT KITTS AND NEVIS", "SAINT LUCIA", "SAINT VINCENT AND THE GRENADINES", "SAMOA", "SAN MARINO", "SAO TOME AND PRINCIPE", "SAUDI ARABIA", "SENEGAL", "SERBIA", "SEYCHELLES", "SIERRA LEONE", "SINGAPORE", "SINT MAARTEN", "SLOVAKIA", "SLOVENIA", "SOLOMON ISLANDS", "SOMALIA", "SOUTH AFRICA", "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS", "SOUTH SUDAN", "SPAIN", "SRI LANKA", "SUDAN", "SURINAME", "SWEDEN", "SWITZERLAND", "SYRIAN ARAB REPUBLIC", "TAIWAN", "TAJIKISTAN", "TANZANIA", "THAILAND", "THE BAHAMAS", "TIMOR-LESTE", "TOGO", "TOKELAU", "TONGA", "TRINIDAD AND TOBAGO", "TUNISIA", "TURKEY", "TURKMENISTAN", "TURKS AND CAICOS ISLANDS", "TUVALU", "UGANDA", "UKRAINE", "UNITED ARAB EMIRATES", "UNITED KINGDOM", "UNITED STATES", "URUGUAY", "UZBEKISTAN", "VANUATU", "VENEZUELA", "VIET NAM", "WESTERN SAHARA", "YEMEN", "ZAMBIA", "ZIMBABWE", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CountyFips.md b/docs/CountyFips.md new file mode 100644 index 0000000..fa9e8ca --- /dev/null +++ b/docs/CountyFips.md @@ -0,0 +1,13 @@ +# CountyFips + +A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativePatch.md b/docs/CreativePatch.md new file mode 100644 index 0000000..c7a1e45 --- /dev/null +++ b/docs/CreativePatch.md @@ -0,0 +1,14 @@ +# CreativePatch + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeResponse.md b/docs/CreativeResponse.md new file mode 100644 index 0000000..70770ed --- /dev/null +++ b/docs/CreativeResponse.md @@ -0,0 +1,24 @@ +# CreativeResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**CrvId**](CrvId.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**resource_type** | **str** | Mailpiece type for the creative | [optional] +**details** | **bool, date, datetime, dict, float, int, list, str, none_type** | Either PostcardDetailsReturned or LetterDetailsReturned | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**template_preview_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. | [optional] +**template_previews** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**campaigns** | [**[Campaign]**](Campaign.md) | Array of campaigns associated with the creative ID | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "creative" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativeWritable.md b/docs/CreativeWritable.md new file mode 100644 index 0000000..8ca50d3 --- /dev/null +++ b/docs/CreativeWritable.md @@ -0,0 +1,20 @@ +# CreativeWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | +**resource_type** | **str** | Mailpiece type for the creative | +**campaign_id** | [**CmpId**](CmpId.md) | | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**details** | **bool, date, datetime, dict, float, int, list, str, none_type** | Either PostcardDetailsWritable or LetterDetailsWritable | [optional] +**file** | **str** | PDF file containing the letter's formatting. Do not include for resource_type = postcard. | [optional] +**front** | **str** | The artwork to use as the front of your postcard. Do not include for resource_type = letter. | [optional] +**back** | **str** | The artwork to use as the back of your postcard. Do not include for resource_type = letter. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreativesApi.md b/docs/CreativesApi.md new file mode 100644 index 0000000..04e1ade --- /dev/null +++ b/docs/CreativesApi.md @@ -0,0 +1,286 @@ +# lob_python.CreativesApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](CreativesApi.md#create) | **POST** /creatives | create +[**get**](CreativesApi.md#get) | **GET** /creatives/{crv_id} | get +[**update**](CreativesApi.md#update) | **PATCH** /creatives/{crv_id} | update + + +# **create** +> CreativeResponse create(creative_writable) + +create + +Creates a new creative with the provided properties + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import creatives_api +from lob_python.model.creative_writable import CreativeWritable +from lob_python.model.creative_response import CreativeResponse +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = creatives_api.CreativesApi(api_client) + creative_writable = CreativeWritable( + _from=None, + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + resource_type="letter", + campaign_id=CmpId("cmp_C"), + details=None, + file="file_example", + front="front_example", + back="back_example", + ) # CreativeWritable | + x_lang_output = "native" # str | * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(creative_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CreativesApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(creative_writable, x_lang_output=x_lang_output) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CreativesApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **creative_writable** | [**CreativeWritable**](CreativeWritable.md)| | + **x_lang_output** | **str**| * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. | [optional] + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Creative created successfully | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> CreativeResponse get(crv_id) + +get + +Retrieves the details of an existing creative. You need only supply the unique creative identifier that was returned upon creative creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import creatives_api +from lob_python.model.crv_id import CrvId +from lob_python.model.creative_response import CreativeResponse +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = creatives_api.CreativesApi(api_client) + crv_id = CrvId("crv_C") # CrvId | id of the creative + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(crv_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CreativesApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **crv_id** | **CrvId**| id of the creative | + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a creative object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> CreativeResponse update(crv_id, creative_patch) + +update + +Update the details of an existing creative. You need only supply the unique identifier that was returned upon creative creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import creatives_api +from lob_python.model.crv_id import CrvId +from lob_python.model.creative_patch import CreativePatch +from lob_python.model.creative_response import CreativeResponse +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = creatives_api.CreativesApi(api_client) + crv_id = CrvId("crv_C") # CrvId | id of the creative + creative_patch = CreativePatch( + _from=None, + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + ) # CreativePatch | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(crv_id, creative_patch) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling CreativesApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **crv_id** | **CrvId**| id of the creative | + **creative_patch** | [**CreativePatch**](CreativePatch.md)| | + +### Return type + +[**CreativeResponse**](CreativeResponse.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a creative object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/CrvId.md b/docs/CrvId.md new file mode 100644 index 0000000..ee0cc18 --- /dev/null +++ b/docs/CrvId.md @@ -0,0 +1,13 @@ +# CrvId + +Unique identifier prefixed with `crv_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `crv_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomEnvelopeReturned.md b/docs/CustomEnvelopeReturned.md new file mode 100644 index 0000000..5c36ea8 --- /dev/null +++ b/docs/CustomEnvelopeReturned.md @@ -0,0 +1,15 @@ +# CustomEnvelopeReturned + +A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the custom envelope used. | +**url** | **str** | The url of the envelope asset used. | +**object** | **str** | | defaults to "envelope" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomEnvelopeUserProvided.md b/docs/CustomEnvelopeUserProvided.md new file mode 100644 index 0000000..6713ab5 --- /dev/null +++ b/docs/CustomEnvelopeUserProvided.md @@ -0,0 +1,13 @@ +# CustomEnvelopeUserProvided + +Accepts an envelope ID for any customized envelope with available inventory. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Accepts an envelope ID for any customized envelope with available inventory. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeliverabilityAnalysis.md b/docs/DeliverabilityAnalysis.md new file mode 100644 index 0000000..3ddbb8b --- /dev/null +++ b/docs/DeliverabilityAnalysis.md @@ -0,0 +1,21 @@ +# DeliverabilityAnalysis + +A nested object containing a breakdown of the deliverability of an address. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dpv_confirmation** | **str** | Result of Delivery Point Validation (DPV), which determines whether or not the address is deliverable by the USPS. Possible values are: * `Y` –– The address is deliverable by the USPS. * `S` –– The address is deliverable by removing the provided secondary unit designator. This information may be incorrect or unnecessary. * `D` –– The address is deliverable to the building's default address but is missing a secondary unit designator and/or number. There is a chance the mail will not reach the intended recipient. * `N` –– The address is not deliverable according to the USPS, but parts of the address are valid (such as the street and ZIP code). * `''` –– This address is not deliverable. No matching street could be found within the city or ZIP code. | +**dpv_cmra** | **str** | indicates whether or not the address is [CMRA-authorized](https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency). Possible values are: * `Y` –– Address is CMRA-authorized. * `N` –– Address is not CMRA-authorized. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | +**dpv_vacant** | **str** | indicates that an address was once deliverable, but has become vacant and is no longer receiving deliveries. Possible values are: * `Y` –– Address is vacant. * `N` –– Address is not vacant. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | +**dpv_active** | **str** | Corresponds to the USPS field `dpv_no_stat`. Indicates that an address has been vacated in the recent past, and is no longer receiving deliveries. If it's been unoccupied for 90+ days, or temporarily vacant, this will be flagged. Possible values are: * `Y` –– Address is active. * `N` –– Address is not active. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | +**dpv_footnotes** | [**[DpvFootnote]**](DpvFootnote.md) | An array of 2-character strings that gives more insight into how `deliverability_analysis[dpv_confirmation]` was determined. Will always include at least 1 string, and can include up to 3. For details, see [US Verification Details](#tag/US-Verification-Types). | +**ews_match** | **bool** | indicates whether or not an address has been flagged in the [Early Warning System](https://docs.informatica.com/data-engineering/data-engineering-quality/10-4-0/address-validator-port-reference/postal-carrier-certification-data-ports/early-warning-system-return-code.html), meaning the address is under development and not yet ready to receive mail. However, it should become available in a few months. | +**lacs_indicator** | **str** | indicates whether this address has been converted by [LACS<sup>Link</sup>](https://postalpro.usps.com/address-quality/lacslink). LACS<sup>Link</sup> corrects outdated addresses into their modern counterparts. Possible values are: * `Y` –– New address produced with a matching record in LACS<sup>Link</sup>. * `N` –– New address could not be produced with a matching record in LACS<sup>Link</sup>. * `''` –– A DPV match is not made (`deliverability_analysis[dpv_confirmation]` is `N` or an empty string). | +**lacs_return_code** | **str** | A code indicating how `deliverability_analysis[lacs_indicator]` was determined. Possible values are: * `A` — A new address was produced because a match was found in LACS<sup>Link</sup>. * `92` — A LACS<sup>Link</sup> record was matched after dropping secondary information. * `14` — A match was found in LACS<sup>Link</sup>, but could not be converted to a deliverable address. * `00` — A match was not found in LACS<sup>Link</sup>, and no new address was produced. * `''` — LACS<sup>Link</sup> was not attempted. | +**suite_return_code** | **str** | A return code that indicates whether the address was matched and corrected by [Suite<sup>Link</sup>](https://postalpro.usps.com/address-quality-solutions/suitelink). Suite<sup>Link</sup> attempts to provide secondary information to business addresses. Possible values are: * `A` –– A Suite<sup>Link</sup> match was found and secondary information was added. * `00` –– A Suite<sup>Link</sup> match could not be found and no secondary information was added. * `''` –– Suite<sup>Link</sup> lookup was not attempted. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DpvFootnote.md b/docs/DpvFootnote.md new file mode 100644 index 0000000..5fd71cc --- /dev/null +++ b/docs/DpvFootnote.md @@ -0,0 +1,12 @@ +# DpvFootnote + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["AA", "A1", "BB", "CC", "N1", "F1", "G1", "U1", "M1", "M3", "P1", "P3", "R1", "R7", "RR", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EngineHtml.md b/docs/EngineHtml.md new file mode 100644 index 0000000..1e172fc --- /dev/null +++ b/docs/EngineHtml.md @@ -0,0 +1,13 @@ +# EngineHtml + +The engine used to combine HTML template with merge variables. * `legacy` - Lob's original engine * `handlebars` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The engine used to combine HTML template with merge variables. * `legacy` - Lob's original engine * `handlebars` | defaults to "legacy", must be one of ["legacy", "handlebars", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventType.md b/docs/EventType.md new file mode 100644 index 0000000..13e07f2 --- /dev/null +++ b/docs/EventType.md @@ -0,0 +1,15 @@ +# EventType + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | +**enabled_for_test** | **bool** | Value is `true` if the event type is enabled in both the test and live environments. | +**resource** | **str** | | +**object** | **str** | Value is resource type. | defaults to "event_type" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Events.md b/docs/Events.md new file mode 100644 index 0000000..fe36ef4 --- /dev/null +++ b/docs/Events.md @@ -0,0 +1,17 @@ +# Events + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | Unique identifier prefixed with `evt_`. | +**body** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The body of the associated resource as they were at the time of the event, i.e. the [postcard object](https://docs.lob.com/#tag/Postcards/operation/postcard_retrieve), [the letter object](https://docs.lob.com/#tag/Letters/operation/letter_retrieve), [the check object](https://docs.lob.com/#tag/Checks/operation/check_retrieve), [the address object](https://docs.lob.com/#tag/Addresses/operation/address_retrieve), or [the bank account object](https://docs.lob.com/#tag/Bank-Accounts/operation/bank_account_retrieve). For `.deleted` events, the body matches the response for the corresponding delete endpoint for that resource (e.g. the [postcard cancel response](https://docs.lob.com/#tag/Postcards/operation/postcard_delete)). | +**reference_id** | **str** | Unique identifier of the related resource for the event. | +**event_type** | [**EventType**](EventType.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**object** | **str** | Value is resource type. | defaults to "event" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EvntId.md b/docs/EvntId.md new file mode 100644 index 0000000..a7d8f6e --- /dev/null +++ b/docs/EvntId.md @@ -0,0 +1,13 @@ +# EvntId + +Unique identifier prefixed with `evnt_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `evnt_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExId.md b/docs/ExId.md new file mode 100644 index 0000000..7d6ad6c --- /dev/null +++ b/docs/ExId.md @@ -0,0 +1,13 @@ +# ExId + +Unique identifier prefixed with `ex_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `ex_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Export.md b/docs/Export.md new file mode 100644 index 0000000..318724d --- /dev/null +++ b/docs/Export.md @@ -0,0 +1,19 @@ +# Export + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ExId**](ExId.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the export was created | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the export was last modified | +**deleted** | **bool** | Returns as `true` if the resource has been successfully deleted. | +**state** | **str** | The state of the export file, which can be `in_progress`, `failed` or `succeeded`. | +**type** | **str** | The export file type, which can be `all`, `failures` or `successes`. | +**upload_id** | [**UplId**](UplId.md) | | +**s3_url** | **str** | The URL for the generated export file. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportModel.md b/docs/ExportModel.md new file mode 100644 index 0000000..a4ca6ff --- /dev/null +++ b/docs/ExportModel.md @@ -0,0 +1,12 @@ +# ExportModel + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GeocodeAddresses.md b/docs/GeocodeAddresses.md new file mode 100644 index 0000000..16b88ef --- /dev/null +++ b/docs/GeocodeAddresses.md @@ -0,0 +1,13 @@ +# GeocodeAddresses + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**components** | [**GeocodeComponents**](GeocodeComponents.md) | | [optional] +**location_analysis** | [**LocationAnalysis**](LocationAnalysis.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GeocodeComponents.md b/docs/GeocodeComponents.md new file mode 100644 index 0000000..ceff6ed --- /dev/null +++ b/docs/GeocodeComponents.md @@ -0,0 +1,14 @@ +# GeocodeComponents + +A nested object containing a breakdown of each component of a reverse geocoded response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**zip_code** | **str** | The 5-digit ZIP code | +**zip_code_plus_4** | [**ZipCodePlus4**](ZipCodePlus4.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdentityValidation.md b/docs/IdentityValidation.md new file mode 100644 index 0000000..5c89a89 --- /dev/null +++ b/docs/IdentityValidation.md @@ -0,0 +1,20 @@ +# IdentityValidation + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**IdentityValidationId**](IdentityValidationId.md) | | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**last_line** | **str** | Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`) | [optional] +**score** | **float, none_type** | A numerical score between 0 and 100 that represents the likelihood the provided name is associated with a physical address. | [optional] +**confidence** | **str** | Indicates the likelihood the recipient name and address match based on our custom internal calculation. Possible values are: - `high` — Has a Lob confidence score greater than 70. - `medium` — Has a Lob confidence score between 40 and 70. - `low` — Has a Lob confidence score less than 40. - `\"\"` — No tracking data exists for this address. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "id_validation" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IdentityValidationApi.md b/docs/IdentityValidationApi.md new file mode 100644 index 0000000..e56cbcb --- /dev/null +++ b/docs/IdentityValidationApi.md @@ -0,0 +1,99 @@ +# lob_python.IdentityValidationApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**validate**](IdentityValidationApi.md#validate) | **POST** /identity_validation | validate + + +# **validate** +> IdentityValidation validate(multi_line_address) + +validate + +Validates whether a given name is associated with an address. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import identity_validation_api +from lob_python.model.multi_line_address import MultiLineAddress +from lob_python.model.identity_validation import IdentityValidation +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = identity_validation_api.IdentityValidationApi(api_client) + multi_line_address = MultiLineAddress( + recipient=Recipient("recipient_example"), + company=Company("company_example"), + primary_line=PrimaryLineUs("primary_line_example"), + secondary_line=SecondaryLine("secondary_line_example"), + urbanization=Urbanization("urbanization_example"), + city=City("city_example"), + state="state_example", + zip_code=ZipCode("04807"), + ) # MultiLineAddress | + + # example passing only required values which don't have defaults set + try: + # validate + api_response = api_instance.validate(multi_line_address) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IdentityValidationApi->validate: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **multi_line_address** | [**MultiLineAddress**](MultiLineAddress.md)| | + +### Return type + +[**IdentityValidation**](IdentityValidation.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the likelihood a given name is associated with an address. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IdentityValidationId.md b/docs/IdentityValidationId.md new file mode 100644 index 0000000..e1b096d --- /dev/null +++ b/docs/IdentityValidationId.md @@ -0,0 +1,13 @@ +# IdentityValidationId + +Unique identifier prefixed with `id_validation_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `id_validation_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncludeModel.md b/docs/IncludeModel.md new file mode 100644 index 0000000..4024cc7 --- /dev/null +++ b/docs/IncludeModel.md @@ -0,0 +1,13 @@ +# IncludeModel + +Use this to include total count in the response. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **[str]** | Use this to include total count in the response. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..41adaf3 --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,19 @@ +# InlineResponse200 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ExId**](ExId.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the export was created | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the export was last modified | +**deleted** | **bool** | Returns as `true` if the resource has been successfully deleted. | +**s3_url** | **str** | The URL for the generated export file. | +**state** | **str** | The state of the export file, which can be `in_progress`, `failed` or `succeeded`. | +**type** | **str** | The export file type, which can be `all`, `failures` or `successes`. | +**upload_id** | [**UplId**](UplId.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlAutoId.md b/docs/IntlAutoId.md new file mode 100644 index 0000000..d042bc4 --- /dev/null +++ b/docs/IntlAutoId.md @@ -0,0 +1,13 @@ +# IntlAutoId + +Unique identifier prefixed with `intl_auto_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `intl_auto_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlAutocompletions.md b/docs/IntlAutocompletions.md new file mode 100644 index 0000000..6a3758c --- /dev/null +++ b/docs/IntlAutocompletions.md @@ -0,0 +1,13 @@ +# IntlAutocompletions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**IntlAutoId**](IntlAutoId.md) | | [optional] +**suggestions** | [**[IntlSuggestions]**](IntlSuggestions.md) | An array of objects representing suggested addresses. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlAutocompletionsApi.md b/docs/IntlAutocompletionsApi.md new file mode 100644 index 0000000..757adc2 --- /dev/null +++ b/docs/IntlAutocompletionsApi.md @@ -0,0 +1,107 @@ +# lob_python.IntlAutocompletionsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**autocomplete**](IntlAutocompletionsApi.md#autocomplete) | **POST** /intl_autocompletions | autocomplete + + +# **autocomplete** +> IntlAutocompletions autocomplete(intl_autocompletions_writable) + +autocomplete + +Given an address prefix consisting of a partial primary line and country, as well as optional input of city, state, and zip code, this functionality returns up to 10 full International address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/intl_verification). + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import intl_autocompletions_api +from lob_python.model.intl_autocompletions import IntlAutocompletions +from lob_python.model.intl_autocompletions_writable import IntlAutocompletionsWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = intl_autocompletions_api.IntlAutocompletionsApi(api_client) + intl_autocompletions_writable = IntlAutocompletionsWritable( + address_prefix="address_prefix_example", + city="city_example", + state="state_example", + zip_code="zip_code_example", + country=CountryExtended("AD"), + ) # IntlAutocompletionsWritable | + x_lang_output = "native" # str | * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) + + # example passing only required values which don't have defaults set + try: + # autocomplete + api_response = api_instance.autocomplete(intl_autocompletions_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IntlAutocompletionsApi->autocomplete: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # autocomplete + api_response = api_instance.autocomplete(intl_autocompletions_writable, x_lang_output=x_lang_output) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IntlAutocompletionsApi->autocomplete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **intl_autocompletions_writable** | [**IntlAutocompletionsWritable**](IntlAutocompletionsWritable.md)| | + **x_lang_output** | **str**| * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. | [optional] + +### Return type + +[**IntlAutocompletions**](IntlAutocompletions.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an international autocompletions object. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IntlAutocompletionsWritable.md b/docs/IntlAutocompletionsWritable.md new file mode 100644 index 0000000..77c79b1 --- /dev/null +++ b/docs/IntlAutocompletionsWritable.md @@ -0,0 +1,16 @@ +# IntlAutocompletionsWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_prefix** | **str** | Only accepts numbers and street names in an alphanumeric format. | +**country** | [**CountryExtended**](CountryExtended.md) | | +**city** | **str** | An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] +**state** | **str** | An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] +**zip_code** | **str** | An optional Zip Code input used to filter suggestions. Matches partial entries. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlComponents.md b/docs/IntlComponents.md new file mode 100644 index 0000000..ce60314 --- /dev/null +++ b/docs/IntlComponents.md @@ -0,0 +1,17 @@ +# IntlComponents + +A nested object containing a breakdown of each component of an address. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_number** | **str** | The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number. | [optional] +**street_name** | **str** | The name of the street. | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | [**State**](State.md) | | [optional] +**postal_code** | [**PostalCode**](PostalCode.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlSuggestions.md b/docs/IntlSuggestions.md new file mode 100644 index 0000000..e5ea112 --- /dev/null +++ b/docs/IntlSuggestions.md @@ -0,0 +1,18 @@ +# IntlSuggestions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_number_range** | **str** | The primary number range of the address that identifies a building at street level. | +**primary_line** | **str** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components` (primary number & secondary information may be missing or inaccurate): * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | +**city** | [**City**](City.md) | | +**state** | **str** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | +**country** | [**CountryExtendedExpanded**](CountryExtendedExpanded.md) | | +**zip_code** | **str** | A 5-digit zip code. Left empty if a test key is used. | +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "intl_autocompletion" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerId.md b/docs/IntlVerId.md new file mode 100644 index 0000000..2f3bb8e --- /dev/null +++ b/docs/IntlVerId.md @@ -0,0 +1,13 @@ +# IntlVerId + +Unique identifier prefixed with `intl_ver_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `intl_ver_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerification.md b/docs/IntlVerification.md new file mode 100644 index 0000000..59ba145 --- /dev/null +++ b/docs/IntlVerification.md @@ -0,0 +1,22 @@ +# IntlVerification + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**IntlVerId**](IntlVerId.md) | | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | **str** | The primary delivery line (usually the street address) of the address. | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**last_line** | **str** | Combination of the following applicable `components`: * `city` * `state` * `zip_code` * `zip_code_plus_4` | [optional] +**country** | **str** | The country of the address. Will be returned as a 2 letter country short-name code (ISO 3166). | [optional] +**coverage** | **str** | The coverage level for the country. This represents the maximum level of accuracy an input address can be verified to. * `SUBBUILDING` - Coverage down to unit numbers. For example, in an apartment or a large building * `HOUSENUMBER/BUILDING` - Coverage down to house number. For example, the address where a house or building may be located * `STREET` - Coverage down to street. This means that we can verify that an street exists in a city, state, country * `LOCALITY` - Coverage down to city, state, or village or province. This means that we can verify that a city, village, province, or state exists in a country. Countries differ in how they define what is a province, state, city, village, etc. This attempts to group eveyrthing together. * `SPARSE` - Some addresses for this country exist in our databases | [optional] +**deliverability** | **str** | Summarizes the deliverability of the `intl_verification` object. Possible values are: * `deliverable` — The address is deliverable. * `deliverable_missing_info` — The address is missing some information, but is most likely deliverable. * `undeliverable` — The address is most likely not deliverable. Some components of the address (such as city or postal code) may have been found. * `no_match` — This address is not deliverable. No matching street could be found within the city or postal code. | [optional] +**status** | **str** | The status level for the country. This represents the maximum level of accuracy an input address can be verified to. * `LV4` - Verified. The input data is correct. All input data was able to match in databases. * `LV3` - Verified. The input data is correct. All input data was able to match in databases <em>after</em> some or all elements were standarized. The input data may also be using outdated city, state, or country names. * `LV2` - Verified. The input data is correct although some input data is unverifiable due to incomplete data. * `LV1` - Verified. The input data is acceptable but in an attempt to standarize user input, errors were introduced. * `LF4` - Fixed. The input data is matched and fixed. (Example: Brighon, UK -> Brighton, UK) * `LF3` - Fixed. The input data is matched and fixed but some elements such as Subbuilding number and house number cannot be checked. * `LF2` - Fixed. The input data is matched but some elements such as Street cannot be checked. * `LF1` - Fixed. The input data is acceptable but in an attempt to standarize user input, errors were introduced. * `LM4` - Missing Info. The input data cannot be corrected completely. * `LM3` - Missing Info. The input data cannot be corrected completely and there were multiple matches found in databases. * `LM2` - Missing Info. The input data cannot be corrected completely and only some elements were found. * `LU1` - Unverified. The input data cannot be corrected or matched. | [optional] +**components** | [**IntlComponents**](IntlComponents.md) | | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "intl_verification" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerificationOrError.md b/docs/IntlVerificationOrError.md new file mode 100644 index 0000000..5da12f2 --- /dev/null +++ b/docs/IntlVerificationOrError.md @@ -0,0 +1,24 @@ +# IntlVerificationOrError + +A model used to represent an entry in a result list where the entry can either be a intl_verification or an Error. The SDK will perform necessary casting into the correct corresponding type. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**IntlVerId**](IntlVerId.md) | | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | **str** | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**last_line** | **str** | | [optional] +**country** | **str** | | [optional] +**coverage** | **str** | | [optional] +**deliverability** | **str** | | [optional] +**status** | **str** | | [optional] +**components** | [**IntlComponents**](IntlComponents.md) | | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "intl_verification" +**error** | [**BulkError**](BulkError.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerificationWritable.md b/docs/IntlVerificationWritable.md new file mode 100644 index 0000000..8b4873e --- /dev/null +++ b/docs/IntlVerificationWritable.md @@ -0,0 +1,19 @@ +# IntlVerificationWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | **str** | The primary delivery line (usually the street address) of the address. | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | **str** | The name of the state. | [optional] +**postal_code** | [**PostalCode**](PostalCode.md) | | [optional] +**country** | [**CountryExtended**](CountryExtended.md) | | [optional] +**address** | **str** | The entire address in one string (e.g., \"370 Water St C1N 1C4\"). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerifications.md b/docs/IntlVerifications.md new file mode 100644 index 0000000..9a8c58c --- /dev/null +++ b/docs/IntlVerifications.md @@ -0,0 +1,13 @@ +# IntlVerifications + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | [**[IntlVerificationOrError]**](IntlVerificationOrError.md) | | +**errors** | **bool** | Indicates whether any errors occurred during the verification process. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntlVerificationsApi.md b/docs/IntlVerificationsApi.md new file mode 100644 index 0000000..4ffd1b9 --- /dev/null +++ b/docs/IntlVerificationsApi.md @@ -0,0 +1,204 @@ +# lob_python.IntlVerificationsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**verifyBulk**](IntlVerificationsApi.md#verifyBulk) | **POST** /bulk/intl_verifications | verifyBulk +[**verifySingle**](IntlVerificationsApi.md#verifySingle) | **POST** /intl_verifications | verifySingle + + +# **verifyBulk** +> IntlVerifications verifyBulk(intl_verifications_payload) + +verifyBulk + +Verify a list of international (except US or US territories) address with a live API key. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import intl_verifications_api +from lob_python.model.intl_verifications_payload import IntlVerificationsPayload +from lob_python.model.lob_error import LobError +from lob_python.model.intl_verifications import IntlVerifications +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = intl_verifications_api.IntlVerificationsApi(api_client) + intl_verifications_payload = IntlVerificationsPayload( + addresses=[ + MultipleComponentsIntl( + recipient=Recipient("recipient_example"), + primary_line="primary_line_example", + secondary_line=SecondaryLine("secondary_line_example"), + city=City("city_example"), + state="state_example", + postal_code=PostalCode("postal_code_example"), + country=CountryExtended("AD"), + ), + ], + ) # IntlVerificationsPayload | + + # example passing only required values which don't have defaults set + try: + # verifyBulk + api_response = api_instance.verifyBulk(intl_verifications_payload) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IntlVerificationsApi->verifyBulk: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **intl_verifications_payload** | [**IntlVerificationsPayload**](IntlVerificationsPayload.md)| | + +### Return type + +[**IntlVerifications**](IntlVerifications.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an array of international verification objects. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **verifySingle** +> IntlVerification verifySingle(intl_verification_writable) + +verifySingle + +Verify an international (except US or US territories) address with a live API key. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import intl_verifications_api +from lob_python.model.intl_verification import IntlVerification +from lob_python.model.intl_verification_writable import IntlVerificationWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = intl_verifications_api.IntlVerificationsApi(api_client) + intl_verification_writable = IntlVerificationWritable( + recipient=Recipient("recipient_example"), + primary_line="primary_line_example", + secondary_line=SecondaryLine("secondary_line_example"), + city=City("city_example"), + state="state_example", + postal_code=PostalCode("postal_code_example"), + country=CountryExtended("AD"), + address="address_example", + ) # IntlVerificationWritable | + x_lang_output = "native" # str | * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional) + + # example passing only required values which don't have defaults set + try: + # verifySingle + api_response = api_instance.verifySingle(intl_verification_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IntlVerificationsApi->verifySingle: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # verifySingle + api_response = api_instance.verifySingle(intl_verification_writable, x_lang_output=x_lang_output) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling IntlVerificationsApi->verifySingle: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **intl_verification_writable** | [**IntlVerificationWritable**](IntlVerificationWritable.md)| | + **x_lang_output** | **str**| * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. | [optional] + +### Return type + +[**IntlVerification**](IntlVerification.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an international verification object. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/IntlVerificationsPayload.md b/docs/IntlVerificationsPayload.md new file mode 100644 index 0000000..08b2d62 --- /dev/null +++ b/docs/IntlVerificationsPayload.md @@ -0,0 +1,12 @@ +# IntlVerificationsPayload + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | [**[MultipleComponentsIntl]**](MultipleComponentsIntl.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Letter.md b/docs/Letter.md new file mode 100644 index 0000000..d890d45 --- /dev/null +++ b/docs/Letter.md @@ -0,0 +1,38 @@ +# Letter + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | [**Address**](Address.md) | | +**_from** | [**Address**](Address.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**id** | [**LtrId**](LtrId.md) | | +**return_envelope** | **bool, date, datetime, dict, float, int, list, str, none_type** | | +**object** | **str** | | defaults to "letter" +**carrier** | **str** | | [optional] if omitted the server will use the default value of "USPS" +**thumbnails** | [**[Thumbnail]**](Thumbnail.md) | | [optional] +**expected_delivery_date** | **date** | A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**template_id** | [**TmplId**](TmplId.md) | | [optional] +**template_version_id** | [**VrsnId**](VrsnId.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**extra_service** | **str** | Add an extra service to your letter. See [pricing](https://www.lob.com/pricing/print-mail#compare) for extra costs incurred. | [optional] +**tracking_number** | **str, none_type** | The tracking number, if applicable, will appear here when it becomes available. Dummy tracking numbers are not created in test mode. | [optional] +**tracking_events** | [**[TrackingEventNormal]**](TrackingEventNormal.md) | Tracking events are not populated for registered or regular (no extra service) letters. | [optional] +**return_address** | **str** | Specifies the address the return envelope will be sent back to. This is an optional argument that is available if an account is signed up for the return envelope tracking beta, and has `return_envelope`, and `perforated_page` fields populated in the API request. | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**color** | **bool** | Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white. | [optional] +**double_sided** | **bool** | Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`. | [optional] if omitted the server will use the default value of True +**address_placement** | **str** | Specifies the location of the address information that will show through the double-window envelope. | [optional] if omitted the server will use the default value of "top_first_page" +**perforated_page** | **int, none_type** | Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our [perforation guide](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf). | [optional] +**custom_envelope** | [**LetterCustomEnvelope**](LetterCustomEnvelope.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterCustomEnvelope.md b/docs/LetterCustomEnvelope.md new file mode 100644 index 0000000..414c66d --- /dev/null +++ b/docs/LetterCustomEnvelope.md @@ -0,0 +1,15 @@ +# LetterCustomEnvelope + +A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the custom envelope used. | [optional] +**url** | **str** | The url of the envelope asset used. | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "envelope" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterDeletion.md b/docs/LetterDeletion.md new file mode 100644 index 0000000..0549e8d --- /dev/null +++ b/docs/LetterDeletion.md @@ -0,0 +1,15 @@ +# LetterDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**LtrId**](LtrId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "letter_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterDetailsReturned.md b/docs/LetterDetailsReturned.md new file mode 100644 index 0000000..6624978 --- /dev/null +++ b/docs/LetterDetailsReturned.md @@ -0,0 +1,22 @@ +# LetterDetailsReturned + +Properties that the letters in your Creative should have. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **bool** | Set this key to `true` if you would like to print in color, false for black and white. | +**cards** | [**[CardId], none_type**](CardId.md) | A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. | +**address_placement** | **str** | Specifies the location of the address information that will show through the double-window envelope. | [optional] if omitted the server will use the default value of "top_first_page" +**custom_envelope** | [**CustomEnvelopeReturned**](CustomEnvelopeReturned.md) | | [optional] +**double_sided** | **bool** | Set this attribute to `true` for double sided printing, `false` for for single sided printing. | [optional] if omitted the server will use the default value of True +**extra_service** | **str** | Add an extra service to your letter. | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**return_envelope** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**bleed** | **bool** | Allows for letter bleed. Enabled only with specific feature flags. | [optional] if omitted the server will use the default value of False +**file_original_url** | **str, none_type** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterDetailsWritable.md b/docs/LetterDetailsWritable.md new file mode 100644 index 0000000..955ed2f --- /dev/null +++ b/docs/LetterDetailsWritable.md @@ -0,0 +1,20 @@ +# LetterDetailsWritable + +Properties that the letters in your Creative should have. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cards** | [**[CardId], none_type**](CardId.md) | A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. | +**color** | **bool** | Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white. | +**address_placement** | **str** | Specifies the location of the address information that will show through the double-window envelope. | [optional] if omitted the server will use the default value of "top_first_page" +**double_sided** | **bool** | Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`. | [optional] if omitted the server will use the default value of True +**extra_service** | **str** | Add an extra service to your letter. | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**return_envelope** | **bool** | | [optional] if omitted the server will use the default value of False +**custom_envelope** | [**CustomEnvelopeUserProvided**](CustomEnvelopeUserProvided.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterEditable.md b/docs/LetterEditable.md new file mode 100644 index 0000000..40e3af3 --- /dev/null +++ b/docs/LetterEditable.md @@ -0,0 +1,28 @@ +# LetterEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **bool** | Set this key to `true` if you would like to print in color. Set to `false` if you would like to print in black and white. | +**to** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**_from** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**file** | **str** | PDF file containing the letter's formatting. | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**double_sided** | **bool** | Set this attribute to `true` for double sided printing, or `false` for for single sided printing. Defaults to `true`. | [optional] if omitted the server will use the default value of True +**address_placement** | **str** | Specifies the location of the address information that will show through the double-window envelope. To see how this will impact your letter design, view our letter template. * `top_first_page` - (default) print address information at the top of your provided first page * `insert_blank_page` - insert a blank address page at the beginning of your file (you will be charged for the extra page) * `bottom_first_page_center` - **(deprecation planned within a few months)** print address information at the bottom center of your provided first page * `bottom_first_page` - print address information at the bottom of your provided first page | [optional] if omitted the server will use the default value of "top_first_page" +**return_envelope** | **bool, date, datetime, dict, float, int, list, str, none_type** | indicates if a return envelope is requested for the letter. The value corresponding to this field is by default a boolean. But if the account is signed up for custom return envelopes, the value is of type string and is `no_9_single_window` for a standard return envelope and a custom `return_envelope_id` for non-standard return envelopes. To include a return envelope with your letter, set to `true` and specify the `perforated_page`. See [pricing](https://www.lob.com/pricing/print-mail#compare) for extra costs incurred. | [optional] +**perforated_page** | **int, none_type** | Required if `return_envelope` is `true`. The number of the page that should be perforated for use with the return envelope. Must be greater than or equal to `1`. The blank page added by `address_placement=insert_blank_page` will be ignored when considering the perforated page number. To see how perforation will impact your letter design, view our [perforation guide](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_perf_template.pdf). | [optional] +**custom_envelope** | **str, none_type** | | [optional] +**extra_service** | **str, none_type** | Add an extra service to your letter: * `certified` - track and confirm delivery for domestic destinations. An extra sheet (1 PDF page single-sided or 2 PDF pages double-sided) is added to the beginning of your letter for address and barcode information. See here for templates: [#10 envelope](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_template.pdf) and [flat envelope](https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/letter_certified_flat_template.pdf) (used for letters over 6 pages single-sided or 12 pages double-sided). You will not be charged for this extra sheet. * `certified_return_receipt` - request an electronic copy of the recipient's signature to prove delivery of your certified letter * `registered` - provides tracking and confirmation for international addresses | [optional] +**cards** | [**[CardId], none_type**](CardId.md) | A single-element array containing an existing card id in a string format. See [cards](#tag/Cards) for more information. | [optional] +**billing_group_id** | **str** | An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See [Billing Group API](https://lob.github.io/lob-openapi/#tag/Billing-Groups) for more information. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterEditableCustomEnvelope.md b/docs/LetterEditableCustomEnvelope.md new file mode 100644 index 0000000..fa56660 --- /dev/null +++ b/docs/LetterEditableCustomEnvelope.md @@ -0,0 +1,15 @@ +# LetterEditableCustomEnvelope + +A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. Accepts an envelope ID for any customized envelope with available inventory. If no inventory is available for the specified ID, the letter will not be sent, and an error will be returned. If the letter has more than 6 sheets, it will be sent in a blank flat envelope. Custom envelopes may be created and ordered from the dashboard. This feature is exclusive to certain customers. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the custom envelope used. | +**url** | **str** | The url of the envelope asset used. | +**object** | **str** | | defaults to "envelope" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterList.md b/docs/LetterList.md new file mode 100644 index 0000000..4d88ef7 --- /dev/null +++ b/docs/LetterList.md @@ -0,0 +1,17 @@ +# LetterList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Letter]**](Letter.md) | list of letters | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterRequest.md b/docs/LetterRequest.md new file mode 100644 index 0000000..1bc654f --- /dev/null +++ b/docs/LetterRequest.md @@ -0,0 +1,18 @@ +# LetterRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**resource_type** | **str** | Mailpiece type for the creative | [optional] if omitted the server will use the default value of "letter" +**campaign_id** | [**CmpId**](CmpId.md) | | [optional] +**details** | [**LetterDetailsWritable**](LetterDetailsWritable.md) | | [optional] +**file** | **str** | PDF file containing the letter's formatting. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LetterResponse.md b/docs/LetterResponse.md new file mode 100644 index 0000000..170568f --- /dev/null +++ b/docs/LetterResponse.md @@ -0,0 +1,24 @@ +# LetterResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**CrvId**](CrvId.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**resource_type** | **str** | Mailpiece type for the creative | [optional] if omitted the server will use the default value of "letter" +**details** | [**LetterDetailsReturned**](LetterDetailsReturned.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**template_preview_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. | [optional] +**template_previews** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**campaigns** | [**[Campaign]**](Campaign.md) | Array of campaigns associated with the creative ID | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "creative" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LettersApi.md b/docs/LettersApi.md new file mode 100644 index 0000000..dd0694b --- /dev/null +++ b/docs/LettersApi.md @@ -0,0 +1,404 @@ +# lob_python.LettersApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**cancel**](LettersApi.md#cancel) | **DELETE** /letters/{ltr_id} | cancel +[**create**](LettersApi.md#create) | **POST** /letters | create +[**get**](LettersApi.md#get) | **GET** /letters/{ltr_id} | get +[**list**](LettersApi.md#list) | **GET** /letters | list + + +# **cancel** +> LetterDeletion cancel(ltr_id) + +cancel + +Completely removes a letter from production. This can only be done if the letter has a `send_date` and the `send_date` has not yet passed. If the letter is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import letters_api +from lob_python.model.letter_deletion import LetterDeletion +from lob_python.model.ltr_id import LtrId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = letters_api.LettersApi(api_client) + ltr_id = LtrId("ltr_C") # LtrId | id of the letter + + # example passing only required values which don't have defaults set + try: + # cancel + api_response = api_instance.cancel(ltr_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling LettersApi->cancel: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ltr_id** | **LtrId**| id of the letter | + +### Return type + +[**LetterDeletion**](LetterDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create** +> Letter create(letter_editable) + +create + +Creates a new letter given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import letters_api +from lob_python.model.letter import Letter +from lob_python.model.letter_editable import LetterEditable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = letters_api.LettersApi(api_client) + letter_editable = LetterEditable( + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + mail_type=MailType("usps_first_class"), + merge_variables=MergeVariables(), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + color=True, + double_sided=True, + address_placement="top_first_page", + return_envelope=None, + perforated_page=1, + custom_envelope="custom_envelope_example", + to="to_example", + _from="_from_example", + file="file_example", + extra_service="certified", + cards=[ + CardId("cards_example"), + ], + billing_group_id="billing_group_id_example", + ) # LetterEditable | + idempotency_key = "Idempotency-Key_example" # str | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(letter_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling LettersApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(letter_editable, idempotency_key=idempotency_key) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling LettersApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letter_editable** | [**LetterEditable**](LetterEditable.md)| | + **idempotency_key** | **str**| A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). | [optional] + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a letter object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Letter get(ltr_id) + +get + +Retrieves the details of an existing letter. You need only supply the unique letter identifier that was returned upon letter creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import letters_api +from lob_python.model.letter import Letter +from lob_python.model.ltr_id import LtrId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = letters_api.LettersApi(api_client) + ltr_id = LtrId("ltr_C") # LtrId | id of the letter + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(ltr_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling LettersApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ltr_id** | **LtrId**| id of the letter | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a letter object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> LetterList list() + +list + +Returns a list of your letters. The letters are returned sorted by creation date, with the most recently created letters appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import letters_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.include_model import IncludeModel +from lob_python.model.letter_list import LetterList +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from lob_python.model.mail_type import MailType +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = letters_api.LettersApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + color = True # bool | Set to `true` to return only color letters. Set to `false` to return only black & white letters. (optional) + scheduled = True # bool | * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional) + send_date = { + "key": "key_example", + } # {str: (str,)} | Filter by date sent. (optional) + mail_type = MailType("usps_first_class") # MailType | A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata, color=color, scheduled=scheduled, send_date=send_date, mail_type=mail_type, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling LettersApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + **color** | **bool**| Set to `true` to return only color letters. Set to `false` to return only black & white letters. | [optional] + **scheduled** | **bool**| * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` | [optional] + **send_date** | **{str: (str,)}**| Filter by date sent. | [optional] + **mail_type** | **MailType**| A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**LetterList**](LetterList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` letters. Each entry in the array is a separate letter. The previous and next page of letters can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively. If no more letters are available beyond the current set of returned results, the `next_url` field will be empty. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/LobConfidenceScore.md b/docs/LobConfidenceScore.md new file mode 100644 index 0000000..ee55042 --- /dev/null +++ b/docs/LobConfidenceScore.md @@ -0,0 +1,14 @@ +# LobConfidenceScore + +Lob Confidence Score is a nested object that provides a numerical value between 0-100 of the likelihood that an address is deliverable based on Lob’s mail delivery data to over half of US households. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**score** | **float, none_type** | A numerical score between 0 and 100 that represents the percentage of mailpieces Lob has sent to this addresses that have been delivered successfully over the past 2 years. Will be `null` if no tracking data exists for this address. | [optional] +**level** | **str** | indicates the likelihood that the address is a valid, mail-receiving address. Possible values are: - `high` — Over 70% of mailpieces Lob has sent to this address were delivered successfully and recent mailings were also successful. - `medium` — Between 40% and 70% of mailpieces Lob has sent to this address were delivered successfully. - `low` — Less than 40% of mailpieces Lob has sent to this address were delivered successfully and recent mailings weren't successful. - `\"\"` — No tracking data exists for this address or lob deliverability was unable to find a corresponding level of mail success. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LobError.md b/docs/LobError.md new file mode 100644 index 0000000..b867a08 --- /dev/null +++ b/docs/LobError.md @@ -0,0 +1,15 @@ +# LobError + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | A human-readable message with more details about the error | [optional] +**status_code** | **int** | A conventional HTTP status code. | [optional] +**code** | **str** | A pre-defined string identifying an error. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Location.md b/docs/Location.md new file mode 100644 index 0000000..9f5226d --- /dev/null +++ b/docs/Location.md @@ -0,0 +1,13 @@ +# Location + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latitude** | **float, none_type** | A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be input with `longitude` to pinpoint locations on a map. | +**longitude** | **float, none_type** | A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be input with `latitude` to pinpoint locations on a map. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LocationAnalysis.md b/docs/LocationAnalysis.md new file mode 100644 index 0000000..2e20104 --- /dev/null +++ b/docs/LocationAnalysis.md @@ -0,0 +1,15 @@ +# LocationAnalysis + +A nested object containing a breakdown of the analysis of a reverse geocoded location. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latitude** | **float, none_type** | A positive or negative decimal indicating the geographic latitude of the address. | +**longitude** | **float, none_type** | A positive or negative decimal indicating the geographic longitude of the address. | +**distance** | **float** | The distance from the input location to this exact zip code in miles. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LtrId.md b/docs/LtrId.md new file mode 100644 index 0000000..21135fa --- /dev/null +++ b/docs/LtrId.md @@ -0,0 +1,13 @@ +# LtrId + +Unique identifier prefixed with `ltr_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `ltr_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MailType.md b/docs/MailType.md new file mode 100644 index 0000000..235226a --- /dev/null +++ b/docs/MailType.md @@ -0,0 +1,13 @@ +# MailType + +A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. | defaults to "usps_first_class", must be one of ["usps_first_class", "usps_standard", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MergeVariables.md b/docs/MergeVariables.md new file mode 100644 index 0000000..1b40f2b --- /dev/null +++ b/docs/MergeVariables.md @@ -0,0 +1,12 @@ +# MergeVariables + +You can input a merge variable payload object to your template to render dynamic content. For example, if you have a template like: `{{variable_name}}`, pass in `{\"variable_name\": \"Harry\"}` to render `Harry`. `merge_variables` must be an object. Any type of value is accepted as long as the object is valid JSON; you can use `strings`, `numbers`, `booleans`, `arrays`, `objects`, or `null`. The max length of the object is 25,000 characters. If you call `JSON.stringify` on your object, it can be no longer than 25,000 characters. Your variable names cannot contain any whitespace or any of the following special characters: `!`, `\"`, `#`, `%`, `&`, `'`, `(`, `)`, `*`, `+`, `,`, `/`, `;`, `<`, `=`, `>`, `@`, `[`, `\\`, `]`, `^`, `` ` ``, `{`, `|`, `}`, `~`. More instructions can be found in [our guide to using html and merge variables](https://lob.com/resources/guides/general/using-html-and-merge-variables). Depending on your [Merge Variable strictness](https://dashboard.lob.com/#/settings/account) setting, if you define variables in your HTML but do not pass them here, you will either receive an error or the variable will render as an empty string. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MetadataModel.md b/docs/MetadataModel.md new file mode 100644 index 0000000..4b1d2cf --- /dev/null +++ b/docs/MetadataModel.md @@ -0,0 +1,12 @@ +# MetadataModel + +Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. '{\"customer_id\" : \"NEWYORK2015\"}' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**any string name** | **str** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultiLineAddress.md b/docs/MultiLineAddress.md new file mode 100644 index 0000000..598f85c --- /dev/null +++ b/docs/MultiLineAddress.md @@ -0,0 +1,19 @@ +# MultiLineAddress + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**company** | [**Company**](Company.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | **str** | The <a href=\"https://en.wikipedia.org/wiki/ISO_3166-2:US\" target=\"_blank\">ISO 3166-2</a> two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] +**zip_code** | [**ZipCode**](ZipCode.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultipleComponents.md b/docs/MultipleComponents.md new file mode 100644 index 0000000..90d9c2e --- /dev/null +++ b/docs/MultipleComponents.md @@ -0,0 +1,18 @@ +# MultipleComponents + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | **str** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] +**zip_code** | [**ZipCode**](ZipCode.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultipleComponentsIntl.md b/docs/MultipleComponentsIntl.md new file mode 100644 index 0000000..f976cab --- /dev/null +++ b/docs/MultipleComponentsIntl.md @@ -0,0 +1,18 @@ +# MultipleComponentsIntl + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_line** | **str** | The primary delivery line (usually the street address) of the address. | +**country** | [**CountryExtended**](CountryExtended.md) | | +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | **str** | The name of the state. | [optional] +**postal_code** | [**PostalCode**](PostalCode.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MultipleComponentsList.md b/docs/MultipleComponentsList.md new file mode 100644 index 0000000..dfd3234 --- /dev/null +++ b/docs/MultipleComponentsList.md @@ -0,0 +1,12 @@ +# MultipleComponentsList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | [**[MultipleComponents]**](MultipleComponents.md) | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Name.md b/docs/Name.md new file mode 100644 index 0000000..2b7b8d7 --- /dev/null +++ b/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +Name of the billing group. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Name of the billing group. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostalCode.md b/docs/PostalCode.md new file mode 100644 index 0000000..071b1da --- /dev/null +++ b/docs/PostalCode.md @@ -0,0 +1,13 @@ +# PostalCode + +The postal code. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The postal code. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Postcard.md b/docs/Postcard.md new file mode 100644 index 0000000..bd0e178 --- /dev/null +++ b/docs/Postcard.md @@ -0,0 +1,33 @@ +# Postcard + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**PscId**](PscId.md) | | +**url** | [**SignedLink**](SignedLink.md) | | +**to** | [**Address**](Address.md) | | [optional] +**_from** | [**AddressDomesticExpanded**](AddressDomesticExpanded.md) | | [optional] +**carrier** | **str** | | [optional] if omitted the server will use the default value of "USPS" +**thumbnails** | [**[Thumbnail]**](Thumbnail.md) | | [optional] +**size** | [**PostcardSize**](PostcardSize.md) | | [optional] +**expected_delivery_date** | **date** | A date in YYYY-MM-DD format of the mailpiece's expected delivery date based on its `send_date`. | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**front_template_id** | **str, none_type** | The unique ID of the HTML template used for the front of the postcard. | [optional] +**back_template_id** | **str, none_type** | The unique ID of the HTML template used for the back of the postcard. | [optional] +**front_template_version_id** | **str, none_type** | The unique ID of the specific version of the HTML template used for the front of the postcard. | [optional] +**back_template_version_id** | **str, none_type** | The unique ID of the specific version of the HTML template used for the back of the postcard. | [optional] +**tracking_events** | [**[TrackingEventNormal], none_type**](TrackingEventNormal.md) | An array of tracking_event objects ordered by ascending `time`. Will not be populated for postcards created in test mode. | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "postcard" +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardDeletion.md b/docs/PostcardDeletion.md new file mode 100644 index 0000000..74e52bb --- /dev/null +++ b/docs/PostcardDeletion.md @@ -0,0 +1,15 @@ +# PostcardDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**PscId**](PscId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "postcard_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardDetailsReturned.md b/docs/PostcardDetailsReturned.md new file mode 100644 index 0000000..4304b2c --- /dev/null +++ b/docs/PostcardDetailsReturned.md @@ -0,0 +1,17 @@ +# PostcardDetailsReturned + +Properties that the postcards in your Creative should have. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mail_type** | [**MailType**](MailType.md) | | [optional] +**size** | [**PostcardSize**](PostcardSize.md) | | [optional] +**setting** | **int** | | [optional] if omitted the server will use the default value of 1001 +**front_original_url** | **str** | The original URL of the front template. | [optional] +**back_original_url** | **str** | The original URL of the back template. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardDetailsWritable.md b/docs/PostcardDetailsWritable.md new file mode 100644 index 0000000..c865d49 --- /dev/null +++ b/docs/PostcardDetailsWritable.md @@ -0,0 +1,14 @@ +# PostcardDetailsWritable + +Properties that the postcards in your Creative should have. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mail_type** | [**MailType**](MailType.md) | | [optional] +**size** | [**PostcardSize**](PostcardSize.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardEditable.md b/docs/PostcardEditable.md new file mode 100644 index 0000000..5df36c6 --- /dev/null +++ b/docs/PostcardEditable.md @@ -0,0 +1,22 @@ +# PostcardEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**front** | **str** | The artwork to use as the front of your postcard. | +**back** | **str** | The artwork to use as the back of your postcard. | +**_from** | **str** | Required if `to` address is international. Must either be an address ID or an inline object with correct address parameters. | [optional] +**size** | [**PostcardSize**](PostcardSize.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**billing_group_id** | **str** | An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See [Billing Group API](https://lob.github.io/lob-openapi/#tag/Billing-Groups) for more information. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardList.md b/docs/PostcardList.md new file mode 100644 index 0000000..a88189a --- /dev/null +++ b/docs/PostcardList.md @@ -0,0 +1,17 @@ +# PostcardList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Postcard]**](Postcard.md) | list of postcards | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardRequest.md b/docs/PostcardRequest.md new file mode 100644 index 0000000..29e7f56 --- /dev/null +++ b/docs/PostcardRequest.md @@ -0,0 +1,19 @@ +# PostcardRequest + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**campaign_id** | [**CmpId**](CmpId.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**details** | [**PostcardDetailsWritable**](PostcardDetailsWritable.md) | | [optional] +**resource_type** | **str** | Mailpiece type for the creative | [optional] if omitted the server will use the default value of "postcard" +**front** | **str** | The artwork to use as the front of your postcard. | [optional] +**back** | **str** | The artwork to use as the back of your postcard. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardResponse.md b/docs/PostcardResponse.md new file mode 100644 index 0000000..fbaa54f --- /dev/null +++ b/docs/PostcardResponse.md @@ -0,0 +1,24 @@ +# PostcardResponse + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**CrvId**](CrvId.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**resource_type** | **str** | Mailpiece type for the creative | [optional] if omitted the server will use the default value of "postcard" +**details** | [**PostcardDetailsReturned**](PostcardDetailsReturned.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**template_preview_urls** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Preview URLs associated with a creative's artwork asset(s) if the creative uses HTML templates as assets. | [optional] +**template_previews** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | A list of template preview objects if the creative uses HTML template(s) as artwork asset(s). | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**campaigns** | [**[Campaign]**](Campaign.md) | Array of campaigns associated with the creative ID | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "creative" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardSize.md b/docs/PostcardSize.md new file mode 100644 index 0000000..ef8b03c --- /dev/null +++ b/docs/PostcardSize.md @@ -0,0 +1,13 @@ +# PostcardSize + +Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. | defaults to "4x6", must be one of ["4x6", "6x9", "6x11", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PostcardsApi.md b/docs/PostcardsApi.md new file mode 100644 index 0000000..fe4b8d3 --- /dev/null +++ b/docs/PostcardsApi.md @@ -0,0 +1,399 @@ +# lob_python.PostcardsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](PostcardsApi.md#create) | **POST** /postcards | create +[**cancel**](PostcardsApi.md#cancel) | **DELETE** /postcards/{psc_id} | cancel +[**get**](PostcardsApi.md#get) | **GET** /postcards/{psc_id} | get +[**list**](PostcardsApi.md#list) | **GET** /postcards | list + + +# **create** +> Postcard create(postcard_editable) + +create + +Creates a new postcard given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import postcards_api +from lob_python.model.postcard_editable import PostcardEditable +from lob_python.model.postcard import Postcard +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = postcards_api.PostcardsApi(api_client) + postcard_editable = PostcardEditable( + to="to_example", + _from="_from_example", + size=PostcardSize("4x6"), + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + mail_type=MailType("usps_first_class"), + merge_variables=MergeVariables(), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + front="front_example", + back="back_example", + billing_group_id="billing_group_id_example", + ) # PostcardEditable | + idempotency_key = "Idempotency-Key_example" # str | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(postcard_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling PostcardsApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(postcard_editable, idempotency_key=idempotency_key) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling PostcardsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **postcard_editable** | [**PostcardEditable**](PostcardEditable.md)| | + **idempotency_key** | **str**| A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). | [optional] + +### Return type + +[**Postcard**](Postcard.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a postcard object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **cancel** +> PostcardDeletion cancel(psc_id) + +cancel + +Completely removes a postcard from production. This can only be done if the postcard has a `send_date` and the `send_date` has not yet passed. If the postcard is successfully canceled, you will not be charged for it. Read more on [cancellation windows](#section/Cancellation-Windows) and [scheduling](#section/Scheduled-Mailings). Scheduling and cancellation is a premium feature. Upgrade to the appropriate [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions) to gain access. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import postcards_api +from lob_python.model.psc_id import PscId +from lob_python.model.postcard_deletion import PostcardDeletion +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = postcards_api.PostcardsApi(api_client) + psc_id = PscId("psc_C") # PscId | id of the postcard + + # example passing only required values which don't have defaults set + try: + # cancel + api_response = api_instance.cancel(psc_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling PostcardsApi->cancel: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **psc_id** | **PscId**| id of the postcard | + +### Return type + +[**PostcardDeletion**](PostcardDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Postcard get(psc_id) + +get + +Retrieves the details of an existing postcard. You need only supply the unique customer identifier that was returned upon postcard creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import postcards_api +from lob_python.model.postcard import Postcard +from lob_python.model.psc_id import PscId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = postcards_api.PostcardsApi(api_client) + psc_id = PscId("psc_C") # PscId | id of the postcard + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(psc_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling PostcardsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **psc_id** | **PscId**| id of the postcard | + +### Return type + +[**Postcard**](Postcard.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a postcard object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> PostcardList list() + +list + +Returns a list of your postcards. The addresses are returned sorted by creation date, with the most recently created addresses appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import postcards_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.include_model import IncludeModel +from lob_python.model.postcard_size import PostcardSize +from lob_python.model.postcard_list import PostcardList +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from lob_python.model.mail_type import MailType +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = postcards_api.PostcardsApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + size = [ + PostcardSize("4x6"), + ] # [PostcardSize] | Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. (optional) + scheduled = True # bool | * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional) + send_date = { + "key": "key_example", + } # {str: (str,)} | Filter by date sent. (optional) + mail_type = MailType("usps_first_class") # MailType | A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata, size=size, scheduled=scheduled, send_date=send_date, mail_type=mail_type, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling PostcardsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + **size** | [**[PostcardSize]**](PostcardSize.md)| Specifies the size of the postcard. Only `4x6` postcards can be sent to international destinations. | [optional] + **scheduled** | **bool**| * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` | [optional] + **send_date** | **{str: (str,)}**| Filter by date sent. | [optional] + **mail_type** | **MailType**| A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**PostcardList**](PostcardList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` postcards. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PrimaryLineUs.md b/docs/PrimaryLineUs.md new file mode 100644 index 0000000..95bda35 --- /dev/null +++ b/docs/PrimaryLineUs.md @@ -0,0 +1,13 @@ +# PrimaryLineUs + +The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components`: * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PscId.md b/docs/PscId.md new file mode 100644 index 0000000..104b056 --- /dev/null +++ b/docs/PscId.md @@ -0,0 +1,13 @@ +# PscId + +Unique identifier prefixed with `psc_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `psc_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Recipient.md b/docs/Recipient.md new file mode 100644 index 0000000..9a1da24 --- /dev/null +++ b/docs/Recipient.md @@ -0,0 +1,13 @@ +# Recipient + +The intended recipient, typically a person's or firm's name. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The intended recipient, typically a person's or firm's name. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResourceDescription.md b/docs/ResourceDescription.md new file mode 100644 index 0000000..6a00d4c --- /dev/null +++ b/docs/ResourceDescription.md @@ -0,0 +1,13 @@ +# ResourceDescription + +An internal description that identifies this resource. Must be no longer than 255 characters. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | An internal description that identifies this resource. Must be no longer than 255 characters. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReturnEnvelope.md b/docs/ReturnEnvelope.md new file mode 100644 index 0000000..c80dd8c --- /dev/null +++ b/docs/ReturnEnvelope.md @@ -0,0 +1,15 @@ +# ReturnEnvelope + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique ID of the Return Envelope | [optional] +**alias** | **str** | A quick reference name for the Return Envelope | [optional] +**url** | **str** | The url of the return envelope | [optional] +**object** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Returned.md b/docs/Returned.md new file mode 100644 index 0000000..73af5ed --- /dev/null +++ b/docs/Returned.md @@ -0,0 +1,15 @@ +# Returned + +A nested custom envelope object containing more information about the custom envelope used or `null` if a custom envelope was not used. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | The unique identifier of the custom envelope used. | +**url** | **str** | The url of the envelope asset used. | +**object** | **str** | | defaults to "envelope" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReverseGeocode.md b/docs/ReverseGeocode.md new file mode 100644 index 0000000..f48ff1b --- /dev/null +++ b/docs/ReverseGeocode.md @@ -0,0 +1,14 @@ +# ReverseGeocode + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ReverseGeocodeId**](ReverseGeocodeId.md) | | [optional] +**addresses** | [**[GeocodeAddresses]**](GeocodeAddresses.md) | list of addresses | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "us_reverse_geocode_lookup" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReverseGeocodeId.md b/docs/ReverseGeocodeId.md new file mode 100644 index 0000000..c55e1b5 --- /dev/null +++ b/docs/ReverseGeocodeId.md @@ -0,0 +1,13 @@ +# ReverseGeocodeId + +Unique identifier prefixed with `us_reverse_geocode_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `us_reverse_geocode_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReverseGeocodeLookupsApi.md b/docs/ReverseGeocodeLookupsApi.md new file mode 100644 index 0000000..9123097 --- /dev/null +++ b/docs/ReverseGeocodeLookupsApi.md @@ -0,0 +1,104 @@ +# lob_python.ReverseGeocodeLookupsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**lookup**](ReverseGeocodeLookupsApi.md#lookup) | **POST** /us_reverse_geocode_lookups | lookup + + +# **lookup** +> ReverseGeocode lookup(location) + +lookup + +Reverse geocode a valid US location with a live API key. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import reverse_geocode_lookups_api +from lob_python.model.location import Location +from lob_python.model.reverse_geocode import ReverseGeocode +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = reverse_geocode_lookups_api.ReverseGeocodeLookupsApi(api_client) + location = Location( + latitude=-90, + longitude=-180, + ) # Location | + size = 5 # int | Determines the number of locations returned. Possible values are between 1 and 50 and any number higher will be rounded down to 50. Default size is a list of 5 reverse geocoded locations. (optional) if omitted the server will use the default value of 5 + + # example passing only required values which don't have defaults set + try: + # lookup + api_response = api_instance.lookup(location) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ReverseGeocodeLookupsApi->lookup: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # lookup + api_response = api_instance.lookup(location, size=size) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ReverseGeocodeLookupsApi->lookup: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **location** | [**Location**](Location.md)| | + **size** | **int**| Determines the number of locations returned. Possible values are between 1 and 50 and any number higher will be rounded down to 50. Default size is a list of 5 reverse geocoded locations. | [optional] if omitted the server will use the default value of 5 + +### Return type + +[**ReverseGeocode**](ReverseGeocode.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a zip lookup object if a valid zip was provided. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SecondaryLine.md b/docs/SecondaryLine.md new file mode 100644 index 0000000..fe3aa1f --- /dev/null +++ b/docs/SecondaryLine.md @@ -0,0 +1,13 @@ +# SecondaryLine + +The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The secondary delivery line of the address. This field is typically empty but may contain information if `primary_line` is too long. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailer.md b/docs/SelfMailer.md new file mode 100644 index 0000000..d89b920 --- /dev/null +++ b/docs/SelfMailer.md @@ -0,0 +1,27 @@ +# SelfMailer + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**SfmId**](SfmId.md) | | +**to** | **bool, date, datetime, dict, float, int, list, str, none_type** | | +**url** | [**SignedLink**](SignedLink.md) | | +**_from** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**size** | [**SelfMailerSize**](SelfMailerSize.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**outside_template_id** | **str, none_type** | The unique ID of the HTML template used for the outside of the self mailer. | [optional] +**inside_template_id** | **str, none_type** | The unique ID of the HTML template used for the inside of the self mailer. | [optional] +**outside_template_version_id** | **str, none_type** | The unique ID of the specific version of the HTML template used for the outside of the self mailer. | [optional] +**inside_template_version_id** | **str, none_type** | The unique ID of the specific version of the HTML template used for the inside of the self mailer. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "self_mailer" +**tracking_events** | [**[TrackingEventCertified]**](TrackingEventCertified.md) | An array of certified tracking events ordered by ascending `time`. Not populated in test mode. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailerDeletion.md b/docs/SelfMailerDeletion.md new file mode 100644 index 0000000..007d1b3 --- /dev/null +++ b/docs/SelfMailerDeletion.md @@ -0,0 +1,15 @@ +# SelfMailerDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**SfmId**](SfmId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "self_mailer_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailerEditable.md b/docs/SelfMailerEditable.md new file mode 100644 index 0000000..dbca85b --- /dev/null +++ b/docs/SelfMailerEditable.md @@ -0,0 +1,22 @@ +# SelfMailerEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **str** | Must either be an address ID or an inline object with correct address parameters. | +**inside** | **str** | The artwork to use as the inside of your self mailer. | +**outside** | **str** | The artwork to use as the outside of your self mailer. | +**_from** | **str** | Must either be an address ID or an inline object with correct address parameters. | [optional] +**size** | [**SelfMailerSize**](SelfMailerSize.md) | | [optional] +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**mail_type** | [**MailType**](MailType.md) | | [optional] +**merge_variables** | [**MergeVariables**](MergeVariables.md) | | [optional] +**send_date** | **datetime** | A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. | [optional] +**billing_group_id** | **str** | An optional string with the billing group ID to tag your usage with. Is used for billing purposes. Requires special activation to use. See [Billing Group API](https://lob.github.io/lob-openapi/#tag/Billing-Groups) for more information. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailerList.md b/docs/SelfMailerList.md new file mode 100644 index 0000000..76e2590 --- /dev/null +++ b/docs/SelfMailerList.md @@ -0,0 +1,17 @@ +# SelfMailerList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[SelfMailer]**](SelfMailer.md) | list of self-mailers | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailerSize.md b/docs/SelfMailerSize.md new file mode 100644 index 0000000..e3cda89 --- /dev/null +++ b/docs/SelfMailerSize.md @@ -0,0 +1,13 @@ +# SelfMailerSize + +Specifies the size of the self mailer. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Specifies the size of the self mailer. | defaults to "6x18_bifold", must be one of ["6x18_bifold", "11x9_bifold", "12x9_bifold", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SelfMailersApi.md b/docs/SelfMailersApi.md new file mode 100644 index 0000000..3e76a49 --- /dev/null +++ b/docs/SelfMailersApi.md @@ -0,0 +1,399 @@ +# lob_python.SelfMailersApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](SelfMailersApi.md#create) | **POST** /self_mailers | create +[**delete**](SelfMailersApi.md#delete) | **DELETE** /self_mailers/{sfm_id} | delete +[**get**](SelfMailersApi.md#get) | **GET** /self_mailers/{sfm_id} | get +[**list**](SelfMailersApi.md#list) | **GET** /self_mailers | list + + +# **create** +> SelfMailer create(self_mailer_editable) + +create + +Creates a new self_mailer given information + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import self_mailers_api +from lob_python.model.self_mailer import SelfMailer +from lob_python.model.lob_error import LobError +from lob_python.model.self_mailer_editable import SelfMailerEditable +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = self_mailers_api.SelfMailersApi(api_client) + self_mailer_editable = SelfMailerEditable( + to="to_example", + _from="_from_example", + size=SelfMailerSize("6x18_bifold"), + description=ResourceDescription("description_example"), + metadata=MetadataModel( + key="key_example", + ), + mail_type=MailType("usps_first_class"), + merge_variables=MergeVariables(), + send_date=dateutil_parser('1970-01-01T00:00:00.00Z'), + inside="inside_example", + outside="outside_example", + billing_group_id="billing_group_id_example", + ) # SelfMailerEditable | + idempotency_key = "Idempotency-Key_example" # str | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). (optional) + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(self_mailer_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling SelfMailersApi->create: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # create + api_response = api_instance.create(self_mailer_editable, idempotency_key=idempotency_key) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling SelfMailersApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **self_mailer_editable** | [**SelfMailerEditable**](SelfMailerEditable.md)| | + **idempotency_key** | **str**| A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our [implementation guide](https://www.lob.com/guides#idempotent_request). | [optional] + +### Return type + +[**SelfMailer**](SelfMailer.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a self_mailer object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> SelfMailerDeletion delete(sfm_id) + +delete + +Completely removes a self mailer from production. This can only be done if the self mailer's `send_date` has not yet passed. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import self_mailers_api +from lob_python.model.sfm_id import SfmId +from lob_python.model.lob_error import LobError +from lob_python.model.self_mailer_deletion import SelfMailerDeletion +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = self_mailers_api.SelfMailersApi(api_client) + sfm_id = SfmId("sfm_C") # SfmId | id of the self_mailer + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(sfm_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling SelfMailersApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sfm_id** | **SfmId**| id of the self_mailer | + +### Return type + +[**SelfMailerDeletion**](SelfMailerDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted the card | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> SelfMailer get(sfm_id) + +get + +Retrieves the details of an existing self_mailer. You need only supply the unique self_mailer identifier that was returned upon self_mailer creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import self_mailers_api +from lob_python.model.self_mailer import SelfMailer +from lob_python.model.sfm_id import SfmId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = self_mailers_api.SelfMailersApi(api_client) + sfm_id = SfmId("sfm_C") # SfmId | id of the self_mailer + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(sfm_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling SelfMailersApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sfm_id** | **SfmId**| id of the self_mailer | + +### Return type + +[**SelfMailer**](SelfMailer.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a self_mailer object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> SelfMailerList list() + +list + +Returns a list of your self_mailers. The self_mailers are returned sorted by creation date, with the most recently created self_mailers appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import self_mailers_api +from lob_python.model.sort_by5 import SortBy5 +from lob_python.model.include_model import IncludeModel +from lob_python.model.self_mailer_size import SelfMailerSize +from lob_python.model.self_mailer_list import SelfMailerList +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from lob_python.model.mail_type import MailType +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = self_mailers_api.SelfMailersApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + size = [ + SelfMailerSize("6x18_bifold"), + ] # [SelfMailerSize] | The self mailer sizes to be returned. (optional) + scheduled = True # bool | * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` (optional) + send_date = { + "key": "key_example", + } # {str: (str,)} | Filter by date sent. (optional) + mail_type = MailType("usps_first_class") # MailType | A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. (optional) + sort_by = { + date_created="asc", + send_date="asc", + } # SortBy5 | Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata, size=size, scheduled=scheduled, send_date=send_date, mail_type=mail_type, sort_by=sort_by) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling SelfMailersApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + **size** | [**[SelfMailerSize]**](SelfMailerSize.md)| The self mailer sizes to be returned. | [optional] + **scheduled** | **bool**| * `true` - only return orders (past or future) where `send_date` is greater than `date_created` * `false` - only return orders where `send_date` is equal to `date_created` | [optional] + **send_date** | **{str: (str,)}**| Filter by date sent. | [optional] + **mail_type** | **MailType**| A string designating the mail postage type: * `usps_first_class` - (default) * `usps_standard` - a [cheaper option](https://lob.com/pricing/print-mail#compare) which is less predictable and takes longer to deliver. `usps_standard` cannot be used with `4x6` postcards or for any postcards sent outside of the United States. | [optional] + **sort_by** | **SortBy5**| Sorts items by ascending or descending dates. Use either `date_created` or `send_date`, not both. | [optional] + +### Return type + +[**SelfMailerList**](SelfMailerList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` self_mailers. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/SfmId.md b/docs/SfmId.md new file mode 100644 index 0000000..1f3f3d8 --- /dev/null +++ b/docs/SfmId.md @@ -0,0 +1,13 @@ +# SfmId + +Unique identifier prefixed with `sfm_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `sfm_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SignedLink.md b/docs/SignedLink.md new file mode 100644 index 0000000..7a839f8 --- /dev/null +++ b/docs/SignedLink.md @@ -0,0 +1,13 @@ +# SignedLink + +A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy.md b/docs/SortBy.md new file mode 100644 index 0000000..bdce5d4 --- /dev/null +++ b/docs/SortBy.md @@ -0,0 +1,13 @@ +# SortBy + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy1.md b/docs/SortBy1.md new file mode 100644 index 0000000..2221117 --- /dev/null +++ b/docs/SortBy1.md @@ -0,0 +1,13 @@ +# SortBy1 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy2.md b/docs/SortBy2.md new file mode 100644 index 0000000..ee26fe1 --- /dev/null +++ b/docs/SortBy2.md @@ -0,0 +1,13 @@ +# SortBy2 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy3.md b/docs/SortBy3.md new file mode 100644 index 0000000..f694888 --- /dev/null +++ b/docs/SortBy3.md @@ -0,0 +1,13 @@ +# SortBy3 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy4.md b/docs/SortBy4.md new file mode 100644 index 0000000..68256db --- /dev/null +++ b/docs/SortBy4.md @@ -0,0 +1,13 @@ +# SortBy4 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SortBy5.md b/docs/SortBy5.md new file mode 100644 index 0000000..1e18f6a --- /dev/null +++ b/docs/SortBy5.md @@ -0,0 +1,13 @@ +# SortBy5 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date_created** | **str** | | [optional] +**send_date** | **str** | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/State.md b/docs/State.md new file mode 100644 index 0000000..4b592a5 --- /dev/null +++ b/docs/State.md @@ -0,0 +1,13 @@ +# State + +The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Suggestions.md b/docs/Suggestions.md new file mode 100644 index 0000000..b0d70c1 --- /dev/null +++ b/docs/Suggestions.md @@ -0,0 +1,16 @@ +# Suggestions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_line** | **str** | The primary delivery line (usually the street address) of the address. Combination of the following applicable `components` (primary number & secondary information may be missing or inaccurate): * `primary_number` * `street_predirection` * `street_name` * `street_suffix` * `street_postdirection` * `secondary_designator` * `secondary_number` * `pmb_designator` * `pmb_number` | +**city** | [**City**](City.md) | | +**state** | **str** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) two letter code for the state. | +**zip_code** | **str** | A 5-digit zip code. Left empty if a test key is used. | +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "us_autocompletion" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Template.md b/docs/Template.md new file mode 100644 index 0000000..cc189f0 --- /dev/null +++ b/docs/Template.md @@ -0,0 +1,20 @@ +# Template + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**TmplId**](TmplId.md) | | +**versions** | [**[TemplateVersion]**](TemplateVersion.md) | An array of all non-deleted [version objects](#tag/Template-Versions) associated with the template. | +**published_version** | [**TemplateVersion**](TemplateVersion.md) | | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "template" +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateDeletion.md b/docs/TemplateDeletion.md new file mode 100644 index 0000000..b1f3dd8 --- /dev/null +++ b/docs/TemplateDeletion.md @@ -0,0 +1,15 @@ +# TemplateDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**TmplId**](TmplId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "template_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateHtml.md b/docs/TemplateHtml.md new file mode 100644 index 0000000..fe3435d --- /dev/null +++ b/docs/TemplateHtml.md @@ -0,0 +1,13 @@ +# TemplateHtml + +An HTML string of less than 100,000 characters to be used as the `published_version` of this template. See [here](#section/HTML-Examples) for guidance on designing HTML templates. Please see endpoint specific documentation for any other product-specific HTML details: - [Postcards](https://docs.lob.com/#tag/Postcards/operation/postcard_create) - `front` and `back` - [Self Mailers](https://docs.lob.com/#tag/Self-Mailers/operation/self_mailer_create) - `inside` and `outside` - [Letters](https://docs.lob.com/#tag/Letters/operation/letter_create) - `file` - [Checks](https://docs.lob.com/#tag/Checks/operation/check_create) - `check_bottom` and `attachment` - [Cards](https://docs.lob.com/#tag/Cards/operation/card_create) - `front` and `back` If there is a syntax error with your variable names within your HTML, then an error will be thrown, e.g. using a `{{#users}}` opening tag without the corresponding closing tag `{{/users}}`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | An HTML string of less than 100,000 characters to be used as the `published_version` of this template. See [here](#section/HTML-Examples) for guidance on designing HTML templates. Please see endpoint specific documentation for any other product-specific HTML details: - [Postcards](https://docs.lob.com/#tag/Postcards/operation/postcard_create) - `front` and `back` - [Self Mailers](https://docs.lob.com/#tag/Self-Mailers/operation/self_mailer_create) - `inside` and `outside` - [Letters](https://docs.lob.com/#tag/Letters/operation/letter_create) - `file` - [Checks](https://docs.lob.com/#tag/Checks/operation/check_create) - `check_bottom` and `attachment` - [Cards](https://docs.lob.com/#tag/Cards/operation/card_create) - `front` and `back` If there is a syntax error with your variable names within your HTML, then an error will be thrown, e.g. using a `{{#users}}` opening tag without the corresponding closing tag `{{/users}}`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateList.md b/docs/TemplateList.md new file mode 100644 index 0000000..ec1335f --- /dev/null +++ b/docs/TemplateList.md @@ -0,0 +1,17 @@ +# TemplateList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Template]**](Template.md) | list of templates | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateUpdate.md b/docs/TemplateUpdate.md new file mode 100644 index 0000000..8431e74 --- /dev/null +++ b/docs/TemplateUpdate.md @@ -0,0 +1,13 @@ +# TemplateUpdate + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**published_version** | [**VrsnId**](VrsnId.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersion.md b/docs/TemplateVersion.md new file mode 100644 index 0000000..05c0eda --- /dev/null +++ b/docs/TemplateVersion.md @@ -0,0 +1,21 @@ +# TemplateVersion + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**VrsnId**](VrsnId.md) | | +**html** | [**TemplateHtml**](TemplateHtml.md) | | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**engine** | [**EngineHtml**](EngineHtml.md) | | [optional] +**suggest_json_editor** | **bool** | Used by frontend, true if the template uses advanced features. | [optional] +**merge_variables** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Used by frontend, an object representing the keys of every merge variable present in the template. It has one key named 'keys', and its value is an array of strings. | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "version" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersionDeletion.md b/docs/TemplateVersionDeletion.md new file mode 100644 index 0000000..d997e66 --- /dev/null +++ b/docs/TemplateVersionDeletion.md @@ -0,0 +1,15 @@ +# TemplateVersionDeletion + +Lob uses RESTful HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicate an input error, and 5xx indicates an error on Lob's end. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**VrsnId**](VrsnId.md) | | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**object** | **str** | Value is type of resource. | [optional] if omitted the server will use the default value of "template_version_deleted" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersionList.md b/docs/TemplateVersionList.md new file mode 100644 index 0000000..ce48cb1 --- /dev/null +++ b/docs/TemplateVersionList.md @@ -0,0 +1,17 @@ +# TemplateVersionList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[TemplateVersion]**](TemplateVersion.md) | list of template versions | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersionUpdatable.md b/docs/TemplateVersionUpdatable.md new file mode 100644 index 0000000..60cf522 --- /dev/null +++ b/docs/TemplateVersionUpdatable.md @@ -0,0 +1,13 @@ +# TemplateVersionUpdatable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**engine** | [**EngineHtml**](EngineHtml.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersionWritable.md b/docs/TemplateVersionWritable.md new file mode 100644 index 0000000..c473810 --- /dev/null +++ b/docs/TemplateVersionWritable.md @@ -0,0 +1,14 @@ +# TemplateVersionWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html** | [**TemplateHtml**](TemplateHtml.md) | | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**engine** | [**EngineHtml**](EngineHtml.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplateVersionsApi.md b/docs/TemplateVersionsApi.md new file mode 100644 index 0000000..750c1f1 --- /dev/null +++ b/docs/TemplateVersionsApi.md @@ -0,0 +1,464 @@ +# lob_python.TemplateVersionsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](TemplateVersionsApi.md#create) | **POST** /templates/{tmpl_id}/versions | create +[**delete**](TemplateVersionsApi.md#delete) | **DELETE** /templates/{tmpl_id}/versions/{vrsn_id} | delete +[**get**](TemplateVersionsApi.md#get) | **GET** /templates/{tmpl_id}/versions/{vrsn_id} | get +[**update**](TemplateVersionsApi.md#update) | **POST** /templates/{tmpl_id}/versions/{vrsn_id} | update +[**list**](TemplateVersionsApi.md#list) | **GET** /templates/{tmpl_id}/versions | list + + +# **create** +> TemplateVersion create(tmpl_id, template_version_writable) + +create + +Creates a new template version attached to the specified template. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import template_versions_api +from lob_python.model.template_version import TemplateVersion +from lob_python.model.tmpl_id import TmplId +from lob_python.model.template_version_writable import TemplateVersionWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = template_versions_api.TemplateVersionsApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | The ID of the template the new version will be attached to + template_version_writable = TemplateVersionWritable( + description=ResourceDescription("description_example"), + html=TemplateHtml("html_example"), + engine=EngineHtml("legacy"), + ) # TemplateVersionWritable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(tmpl_id, template_version_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| The ID of the template the new version will be attached to | + **template_version_writable** | [**TemplateVersionWritable**](TemplateVersionWritable.md)| | + +### Return type + +[**TemplateVersion**](TemplateVersion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the template version with the given template and version ids. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> TemplateVersionDeletion delete(tmpl_id, vrsn_id) + +delete + +Permanently deletes a template version. A template's `published_version` can not be deleted. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import template_versions_api +from lob_python.model.template_version_deletion import TemplateVersionDeletion +from lob_python.model.tmpl_id import TmplId +from lob_python.model.vrsn_id import VrsnId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = template_versions_api.TemplateVersionsApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | The ID of the template to which the version belongs. + vrsn_id = VrsnId("vrsn_C") # VrsnId | id of the template_version + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(tmpl_id, vrsn_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| The ID of the template to which the version belongs. | + **vrsn_id** | **VrsnId**| id of the template_version | + +### Return type + +[**TemplateVersionDeletion**](TemplateVersionDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> TemplateVersion get(tmpl_id, vrsn_id) + +get + +Retrieves the template version with the given template and version ids. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import template_versions_api +from lob_python.model.template_version import TemplateVersion +from lob_python.model.tmpl_id import TmplId +from lob_python.model.vrsn_id import VrsnId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = template_versions_api.TemplateVersionsApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | The ID of the template to which the version belongs. + vrsn_id = VrsnId("vrsn_C") # VrsnId | id of the template_version + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(tmpl_id, vrsn_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| The ID of the template to which the version belongs. | + **vrsn_id** | **VrsnId**| id of the template_version | + +### Return type + +[**TemplateVersion**](TemplateVersion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the template version with the given template and version ids. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> TemplateVersion update(tmpl_id, vrsn_id, template_version_updatable) + +update + +Updates the template version with the given template and version ids. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import template_versions_api +from lob_python.model.template_version import TemplateVersion +from lob_python.model.tmpl_id import TmplId +from lob_python.model.template_version_updatable import TemplateVersionUpdatable +from lob_python.model.vrsn_id import VrsnId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = template_versions_api.TemplateVersionsApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | The ID of the template to which the version belongs. + vrsn_id = VrsnId("vrsn_C") # VrsnId | id of the template_version + template_version_updatable = TemplateVersionUpdatable( + description=ResourceDescription("description_example"), + engine=EngineHtml("legacy"), + ) # TemplateVersionUpdatable | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(tmpl_id, vrsn_id, template_version_updatable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| The ID of the template to which the version belongs. | + **vrsn_id** | **VrsnId**| id of the template_version | + **template_version_updatable** | [**TemplateVersionUpdatable**](TemplateVersionUpdatable.md)| | + +### Return type + +[**TemplateVersion**](TemplateVersion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the template version with the given template and version ids. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> TemplateVersionList list(tmpl_id) + +list + +Returns a list of template versions for the given template ID. The template versions are sorted by creation date, with the most recently created appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import template_versions_api +from lob_python.model.template_version_list import TemplateVersionList +from lob_python.model.include_model import IncludeModel +from lob_python.model.tmpl_id import TmplId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = template_versions_api.TemplateVersionsApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | The ID of the template associated with the retrieved versions + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + + # example passing only required values which don't have defaults set + try: + # list + api_response = api_instance.list(tmpl_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->list: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(tmpl_id, limit=limit, before=before, after=after, include=include, date_created=date_created) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplateVersionsApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| The ID of the template associated with the retrieved versions | + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + +### Return type + +[**TemplateVersionList**](TemplateVersionList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` template versions. Each entry in the array is a separate template version object. The previous and next page of template versions can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more template versions are available beyond the current set of returned results, the `next_url` field will be empty. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TemplateWritable.md b/docs/TemplateWritable.md new file mode 100644 index 0000000..26c92b5 --- /dev/null +++ b/docs/TemplateWritable.md @@ -0,0 +1,15 @@ +# TemplateWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**html** | [**TemplateHtml**](TemplateHtml.md) | | +**description** | [**ResourceDescription**](ResourceDescription.md) | | [optional] +**metadata** | [**MetadataModel**](MetadataModel.md) | | [optional] +**engine** | [**EngineHtml**](EngineHtml.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TemplatesApi.md b/docs/TemplatesApi.md new file mode 100644 index 0000000..92ef2d0 --- /dev/null +++ b/docs/TemplatesApi.md @@ -0,0 +1,449 @@ +# lob_python.TemplatesApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create**](TemplatesApi.md#create) | **POST** /templates | create +[**delete**](TemplatesApi.md#delete) | **DELETE** /templates/{tmpl_id} | delete +[**get**](TemplatesApi.md#get) | **GET** /templates/{tmpl_id} | get +[**update**](TemplatesApi.md#update) | **POST** /templates/{tmpl_id} | update +[**list**](TemplatesApi.md#list) | **GET** /templates | list + + +# **create** +> Template create(template_writable) + +create + +Creates a new template for use with the Print & Mail API. In Live mode, you can only have as many non-deleted templates as allotted in your current [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions). If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import templates_api +from lob_python.model.template_writable import TemplateWritable +from lob_python.model.template import Template +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + template_writable = TemplateWritable( + description=ResourceDescription("description_example"), + html=TemplateHtml("html_example"), + metadata=MetadataModel( + key="key_example", + ), + engine=EngineHtml("legacy"), + ) # TemplateWritable | + + # example passing only required values which don't have defaults set + try: + # create + api_response = api_instance.create(template_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplatesApi->create: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **template_writable** | [**TemplateWritable**](TemplateWritable.md)| | + +### Return type + +[**Template**](Template.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a template object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete** +> TemplateDeletion delete(tmpl_id) + +delete + +Permanently deletes a template. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import templates_api +from lob_python.model.tmpl_id import TmplId +from lob_python.model.template_deletion import TemplateDeletion +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | id of the template + + # example passing only required values which don't have defaults set + try: + # delete + api_response = api_instance.delete(tmpl_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplatesApi->delete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| id of the template | + +### Return type + +[**TemplateDeletion**](TemplateDeletion.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Deleted | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get** +> Template get(tmpl_id) + +get + +Retrieves the details of an existing template. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import templates_api +from lob_python.model.tmpl_id import TmplId +from lob_python.model.template import Template +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | id of the template + + # example passing only required values which don't have defaults set + try: + # get + api_response = api_instance.get(tmpl_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplatesApi->get: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| id of the template | + +### Return type + +[**Template**](Template.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a template object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update** +> Template update(tmpl_id, template_update) + +update + +Updates the description and/or published version of the template with the given id. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import templates_api +from lob_python.model.tmpl_id import TmplId +from lob_python.model.template_update import TemplateUpdate +from lob_python.model.template import Template +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + tmpl_id = TmplId("tmpl_C") # TmplId | id of the template + template_update = TemplateUpdate( + description=ResourceDescription("description_example"), + published_version=VrsnId("vrsn_C"), + ) # TemplateUpdate | + + # example passing only required values which don't have defaults set + try: + # update + api_response = api_instance.update(tmpl_id, template_update) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplatesApi->update: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tmpl_id** | **TmplId**| id of the template | + **template_update** | [**TemplateUpdate**](TemplateUpdate.md)| | + +### Return type + +[**Template**](Template.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns the updated template object | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list** +> TemplateList list() + +list + +Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import templates_api +from lob_python.model.include_model import IncludeModel +from lob_python.model.template_list import TemplateList +from lob_python.model.metadata_model import MetadataModel +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = templates_api.TemplatesApi(api_client) + limit = 10 # int | How many results to return. (optional) if omitted the server will use the default value of 10 + before = "before_example" # str | A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. (optional) + after = "after_example" # str | A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. (optional) + include = IncludeModel([ + "include_example", + ]) # IncludeModel | Request that the response include the total count by specifying `include[]=total_count`. (optional) + date_created = { + "key": dateutil_parser('1970-01-01T00:00:00.00Z'), + } # {str: (datetime,)} | Filter by date created. (optional) + metadata = MetadataModel( + key="key_example", + ) # MetadataModel | Filter by metadata key-value pair`. (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list + api_response = api_instance.list(limit=limit, before=before, after=after, include=include, date_created=date_created, metadata=metadata) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling TemplatesApi->list: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **int**| How many results to return. | [optional] if omitted the server will use the default value of 10 + **before** | **str**| A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the `previous_url` field in the return response. | [optional] + **after** | **str**| A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the `next_url` field in the return response. | [optional] + **include** | **IncludeModel**| Request that the response include the total count by specifying `include[]=total_count`. | [optional] + **date_created** | **{str: (datetime,)}**| Filter by date created. | [optional] + **metadata** | **MetadataModel**| Filter by metadata key-value pair`. | [optional] + +### Return type + +[**TemplateList**](TemplateList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A dictionary with a data property that contains an array of up to `limit` templates. Each entry in the array is a separate template. The previous and next page of templates can be retrieved by calling the endpoint contained in the `previous_url` and `next_url` fields in the API response respectively.<br>If no more templates are available beyond the current set of returned results, the `next_url` field will be empty. | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Thumbnail.md b/docs/Thumbnail.md new file mode 100644 index 0000000..d2abcdf --- /dev/null +++ b/docs/Thumbnail.md @@ -0,0 +1,14 @@ +# Thumbnail + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**small** | [**SignedLink**](SignedLink.md) | | [optional] +**medium** | [**SignedLink**](SignedLink.md) | | [optional] +**large** | [**SignedLink**](SignedLink.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TmplId.md b/docs/TmplId.md new file mode 100644 index 0000000..a73ca9a --- /dev/null +++ b/docs/TmplId.md @@ -0,0 +1,13 @@ +# TmplId + +Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `tmpl_`. ID of a saved [HTML template](#section/HTML-Templates). | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrackingEventCertified.md b/docs/TrackingEventCertified.md new file mode 100644 index 0000000..a75e9ca --- /dev/null +++ b/docs/TrackingEventCertified.md @@ -0,0 +1,20 @@ +# TrackingEventCertified + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tracking event for Certified letters. Letters sent with USPS Certified Mail are fully tracked by USPS, therefore their tracking events have an additional details object with more detailed information about the tracking event. Some certified tracking event names have multiple meanings, noted in the list here. See the description of the details object for the full set of combined certified tracking event name meanings. * `Mailed` - Package has been accepted into the carrier network for delivery. * `In Transit` - Maps to four distinct stages of transit. * `In Local Area` - Package is at a location near the end destination. * `Processed for Delivery` - Maps to two distinct stages of delivery. * `Pickup Available` - Package is available for pickup at carrier location. * `Delivered` - Package has been delivered. * `Re-Routed` - Package has been forwarded. * `Returned to Sender` - Package is to be returned to sender. * `Issue` - Maps to (at least) 15 possible issues, some of which are actionable. | +**id** | [**EvntId**](EvntId.md) | | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | +**type** | **str** | a Certified letter tracking event | defaults to "certified" +**object** | **str** | | defaults to "tracking_event" +**details** | [**TrackingEventDetails**](TrackingEventDetails.md) | | [optional] +**location** | **str, none_type** | The zip code in which the event occurred if it exists, otherwise will be the name of a Regional Distribution Center if it exists, otherwise will be null. | [optional] +**time** | **datetime** | A timestamp in ISO 8601 format of the date USPS registered the event. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrackingEventDetails.md b/docs/TrackingEventDetails.md new file mode 100644 index 0000000..686f4f4 --- /dev/null +++ b/docs/TrackingEventDetails.md @@ -0,0 +1,15 @@ +# TrackingEventDetails + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event** | **str** | Find the full table [here](#tag/Tracking-Events). A detailed substatus about the event: * `package_accepted` - Package has been accepted into the carrier network for delivery. * `package_arrived` - Package has arrived at an intermediate location in the carrier network. * `package_departed` - Package has departed from an intermediate location in the carrier network. * `package_processing` - Package is processing at an intermediate location in the carrier network. * `package_processed` - Package has been processed at an intermediate location. * `package_in_local_area` - Package is at a location near the end destination. * `delivery_scheduled` - Package is scheduled for delivery. * `out_for_delivery` - Package is out for delivery. * `pickup_available` - Package is available for pickup at carrier location. * `delivered` - Package has been delivered. * `package_forwarded` - Package has been forwarded. * `returned_to_sender` - Package is to be returned to sender. * `address_issue` - Address information is incorrect. Contact carrier to ensure delivery. * `contact_carrier` - Contact the carrier for more information. * `delayed` - Delivery of package is delayed. * `delivery_attempted` - Delivery of package has been attempted. Contact carrier to ensure delivery. * `delivery_rescheduled` - Delivery of package has been rescheduled. * `location_inaccessible` - Delivery location inaccessible to carrier. Contact carrier to ensure delivery. * `notice_left` - Carrier left notice during attempted delivery. Follow carrier instructions on notice. * `package_damaged` - Package has been damaged. Contact carrier for more details. * `package_disposed` - Package has been disposed. * `package_held` - Package held at carrier location. Contact carrier for more details. * `package_lost` - Package has been lost. Contact carrier for more details. * `package_unclaimed` - Package is unclaimed. * `package_undeliverable` - Package is not able to be delivered. * `reschedule_delivery` - Contact carrier to reschedule delivery. * `other` - Unrecognized carrier status. | +**description** | **str** | The description as listed in the description for event. | +**action_required** | **bool** | `true` if action is required by the end recipient, `false` otherwise. | +**notes** | **str** | Event-specific notes from USPS about the tracking event. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TrackingEventNormal.md b/docs/TrackingEventNormal.md new file mode 100644 index 0000000..0f8d4b7 --- /dev/null +++ b/docs/TrackingEventNormal.md @@ -0,0 +1,20 @@ +# TrackingEventNormal + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of tracking event (for normal postcards, self mailers, letters, and checks): * `In Transit` - The mailpiece is being processed at the entry/origin facility. * `In Local Area` - The mailpiece is being processed at the destination facility. * `Processed for Delivery` - The mailpiece has been greenlit for delivery at the recipient's nearest postal facility. The mailpiece should reach the mailbox within 1 business day of this tracking event. * `Re-Routed` - The mailpiece is re-routed due to recipient change of address, address errors, or USPS relabeling of barcode/ID tag area. * `Returned to Sender` - The mailpiece is being returned to sender due to barcode, ID tag area, or address errors. * `Mailed` - The mailpiece has been handed off to and accepted by USPS and is en route. [More about Mailed.](https://support.lob.com/hc/en-us/articles/360001724400-What-does-a-Mailed-tracking-event-mean-) Note this data is only available in Enterprise editions of Lob. [Contact Sales](https://lob.com/support/contact#contact) if you want access to this feature. [More about tracking](https://support.lob.com/hc/en-us/articles/115000097404-Can-I-track-my-mail-) | +**type** | **str** | non-Certified postcards, self mailers, letters, and checks | defaults to "normal" +**details** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Will be `null` for `type=normal` events | [optional] +**location** | **str, none_type** | The zip code in which the scan event occurred. Null for `Mailed` events. | [optional] +**id** | [**EvntId**](EvntId.md) | | [optional] +**time** | **datetime** | A timestamp in ISO 8601 format of the date USPS registered the event. | [optional] +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the resource was created. | [optional] +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the resource was last modified. | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "tracking_event" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UplId.md b/docs/UplId.md new file mode 100644 index 0000000..74add80 --- /dev/null +++ b/docs/UplId.md @@ -0,0 +1,13 @@ +# UplId + +Unique identifier prefixed with `upl_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `upl_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Upload.md b/docs/Upload.md new file mode 100644 index 0000000..da474d4 --- /dev/null +++ b/docs/Upload.md @@ -0,0 +1,26 @@ +# Upload + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**UplId**](UplId.md) | | +**account_id** | **str** | Account ID that made the request | +**campaign_id** | [**CmpId**](CmpId.md) | | +**column_mapping** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The mapping of column headers in your file to Lob-required fields for the resource created. See our <a href=\"https://help.lob.com/best-practices/campaign-audience-guide\" target=\"_blank\">Campaign Audience Guide</a> for additional details. | +**mode** | **str** | The environment in which the mailpieces were created. Today, will only be `live`. | +**state** | [**UploadState**](UploadState.md) | | +**total_mailpieces** | **int** | Total number of recipients for the campaign | +**failed_mailpieces** | **int** | Number of mailpieces that failed to create | +**validated_mailpieces** | **int** | Number of mailpieces that were successfully created | +**bytes_processed** | **int** | Number of bytes processed in your CSV | +**date_created** | **datetime** | A timestamp in ISO 8601 format of the date the upload was created | +**date_modified** | **datetime** | A timestamp in ISO 8601 format of the date the upload was last modified | +**failures_url** | **str** | Url where your campaign mailpiece failures can be retrieved | [optional] +**original_filename** | **str** | Filename of the upload | [optional] +**deleted** | **bool** | Only returned if the resource has been successfully deleted. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadCreateExport.md b/docs/UploadCreateExport.md new file mode 100644 index 0000000..f969f7f --- /dev/null +++ b/docs/UploadCreateExport.md @@ -0,0 +1,13 @@ +# UploadCreateExport + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**export_id** | **str** | | +**message** | **str** | | defaults to "Export is processing." +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadList.md b/docs/UploadList.md new file mode 100644 index 0000000..4d70f44 --- /dev/null +++ b/docs/UploadList.md @@ -0,0 +1,17 @@ +# UploadList + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**[Upload]**](Upload.md) | list of uploads | [optional] +**object** | **str** | Value is type of resource. | [optional] +**next_url** | **str, none_type** | url of next page of items in list. | [optional] +**previous_url** | **str, none_type** | url of previous page of items in list. | [optional] +**count** | **int** | number of resources in a set | [optional] +**total_count** | **int** | indicates the total number of records. Provided when the request specifies an \"include\" query parameter | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadState.md b/docs/UploadState.md new file mode 100644 index 0000000..6179e1e --- /dev/null +++ b/docs/UploadState.md @@ -0,0 +1,13 @@ +# UploadState + +The `state` property on the `upload` object. As the file is processed, the `state` will change from `Ready for Validation` to `Validating` and then will be either `Scheduled` (successfully processed) or `Errored` (Unsuccessfully processed). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | The `state` property on the `upload` object. As the file is processed, the `state` will change from `Ready for Validation` to `Validating` and then will be either `Scheduled` (successfully processed) or `Errored` (Unsuccessfully processed). | defaults to "Draft", must be one of ["Preprocessing", "Draft", "Ready for Validation", "Validating", "Scheduled", "Cancelled", "Errored", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadUpdatable.md b/docs/UploadUpdatable.md new file mode 100644 index 0000000..83754b1 --- /dev/null +++ b/docs/UploadUpdatable.md @@ -0,0 +1,15 @@ +# UploadUpdatable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**column_mapping** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The mapping of column headers in your file to Lob-required fields for the resource created. See our <a href=\"https://help.lob.com/best-practices/campaign-audience-guide\" target=\"_blank\">Campaign Audience Guide</a> for additional details. | [optional] +**state** | [**UploadState**](UploadState.md) | | [optional] +**original_filename** | **str** | Original filename provided when the upload is created. | [optional] +**overwrite_column_mapping** | **bool** | Properties in `columnMapping` will be appended to the existing `columnMapping` object if set to `false`. If set to `true`, the existing `columnMapping` object will be overwritten with the data supplied in `columnMapping` property. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadWritable.md b/docs/UploadWritable.md new file mode 100644 index 0000000..9943cac --- /dev/null +++ b/docs/UploadWritable.md @@ -0,0 +1,13 @@ +# UploadWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaign_id** | [**CmpId**](CmpId.md) | | +**column_mapping** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The mapping of column headers in your file to Lob-required fields for the resource created. See our <a href=\"https://help.lob.com/best-practices/campaign-audience-guide\" target=\"_blank\">Campaign Audience Guide</a> for additional details. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UploadsApi.md b/docs/UploadsApi.md new file mode 100644 index 0000000..4066d28 --- /dev/null +++ b/docs/UploadsApi.md @@ -0,0 +1,596 @@ +# lob_python.UploadsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_export**](UploadsApi.md#get_export) | **GET** /uploads/{upl_id}/exports/{ex_id} | get_export +[**create_upload**](UploadsApi.md#create_upload) | **POST** /uploads | create_upload +[**delete_upload**](UploadsApi.md#delete_upload) | **DELETE** /uploads/{upl_id} | delete_upload +[**create_export**](UploadsApi.md#create_export) | **POST** /uploads/{upl_id}/exports | create_export +[**get_upload**](UploadsApi.md#get_upload) | **GET** /uploads/{upl_id} | get_upload +[**update_upload**](UploadsApi.md#update_upload) | **PATCH** /uploads/{upl_id} | update_upload +[**list_upload**](UploadsApi.md#list_upload) | **GET** /uploads | list_upload + + +# **get_export** +> Export get_export(upl_id, ex_id) + +get_export + +Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we're done processing the export), you will get back an export object with `state = in_progress`. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.export import Export +from lob_python.model.upl_id import UplId +from lob_python.model.ex_id import ExId +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upl_id = UplId("upl_C") # UplId | ID of the upload + ex_id = ExId("ex_C") # ExId | ID of the export + + # example passing only required values which don't have defaults set + try: + # get_export + api_response = api_instance.get_export(upl_id, ex_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->get_export: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upl_id** | **UplId**| ID of the upload | + **ex_id** | **ExId**| ID of the export | + +### Return type + +[**Export**](Export.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an export object | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_upload** +> Upload create_upload(upload_writable) + +create_upload + +Creates a new upload with the provided properties. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.upload import Upload +from lob_python.model.upload_writable import UploadWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upload_writable = UploadWritable( + campaign_id=CmpId("cmp_C"), + column_mapping={}, + ) # UploadWritable | + + # example passing only required values which don't have defaults set + try: + # create_upload + api_response = api_instance.create_upload(upload_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->create_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upload_writable** | [**UploadWritable**](UploadWritable.md)| | + +### Return type + +[**Upload**](Upload.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Upload created successfully | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **delete_upload** +> delete_upload(upl_id) + +delete_upload + +Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.upl_id import UplId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upl_id = UplId("upl_C") # UplId | id of the upload + + # example passing only required values which don't have defaults set + try: + # delete_upload + api_instance.delete_upload(upl_id) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->delete_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upl_id** | **UplId**| id of the upload | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Successful Response | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **create_export** +> UploadCreateExport create_export(upl_id, export_model) + +create_export + +Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.upload_create_export import UploadCreateExport +from lob_python.model.export_model import ExportModel +from lob_python.model.upl_id import UplId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upl_id = UplId("upl_C") # UplId | ID of the upload + export_model = ExportModel( + type="all", + ) # ExportModel | + + # example passing only required values which don't have defaults set + try: + # create_export + api_response = api_instance.create_export(upl_id, export_model) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->create_export: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upl_id** | **UplId**| ID of the upload | + **export_model** | [**ExportModel**](ExportModel.md)| | + +### Return type + +[**UploadCreateExport**](UploadCreateExport.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_upload** +> Upload get_upload(upl_id) + +get_upload + +Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.upload import Upload +from lob_python.model.upl_id import UplId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upl_id = UplId("upl_C") # UplId | id of the upload + + # example passing only required values which don't have defaults set + try: + # get_upload + api_response = api_instance.get_upload(upl_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->get_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upl_id** | **UplId**| id of the upload | + +### Return type + +[**Upload**](Upload.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an upload object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **update_upload** +> Upload update_upload(upl_id, upload_updatable) + +update_upload + +Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.upload import Upload +from lob_python.model.upload_updatable import UploadUpdatable +from lob_python.model.upl_id import UplId +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + upl_id = UplId("upl_C") # UplId | id of the upload + upload_updatable = UploadUpdatable( + column_mapping={}, + state=UploadState("Draft"), + original_filename="original_filename_example", + overwrite_column_mapping=True, + ) # UploadUpdatable | + + # example passing only required values which don't have defaults set + try: + # update_upload + api_response = api_instance.update_upload(upl_id, upload_updatable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->update_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **upl_id** | **UplId**| id of the upload | + **upload_updatable** | [**UploadUpdatable**](UploadUpdatable.md)| | + +### Return type + +[**Upload**](Upload.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns an upload object | - | +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_upload** +> UploadList list_upload() + +list_upload + +Returns a list of your uploads. Optionally, filter uploads by campaign. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import uploads_api +from lob_python.model.cmp_id import CmpId +from lob_python.model.upload_list import UploadList +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = uploads_api.UploadsApi(api_client) + campaign_id = CmpId("cmp_C") # CmpId | id of the campaign (optional) + + # example passing only required values which don't have defaults set + # and optional values + try: + # list_upload + api_response = api_instance.list_upload(campaign_id=campaign_id) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UploadsApi->list_upload: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **campaign_id** | **CmpId**| id of the campaign | [optional] + +### Return type + +[**UploadList**](UploadList.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An array of matching uploads. Each entry in the array is a separate upload. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/Urbanization.md b/docs/Urbanization.md new file mode 100644 index 0000000..e7e28bc --- /dev/null +++ b/docs/Urbanization.md @@ -0,0 +1,13 @@ +# Urbanization + +Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Only present for addresses in Puerto Rico. An urbanization refers to an area, sector, or development within a city. See [USPS documentation](https://pe.usps.com/text/pub28/28api_008.htm#:~:text=I51.,-4%20Urbanizations&text=In%20Puerto%20Rico%2C%20identical%20street,placed%20before%20the%20urbanization%20name.) for clarification. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsAutoId.md b/docs/UsAutoId.md new file mode 100644 index 0000000..aea8be3 --- /dev/null +++ b/docs/UsAutoId.md @@ -0,0 +1,13 @@ +# UsAutoId + +Unique identifier prefixed with `us_auto_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `us_auto_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsAutocompletions.md b/docs/UsAutocompletions.md new file mode 100644 index 0000000..07b48a6 --- /dev/null +++ b/docs/UsAutocompletions.md @@ -0,0 +1,14 @@ +# UsAutocompletions + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**UsAutoId**](UsAutoId.md) | | [optional] +**suggestions** | [**[Suggestions]**](Suggestions.md) | An array of objects representing suggested addresses. | [optional] +**object** | **str** | Value is resource type. | [optional] if omitted the server will use the default value of "us_autocompletion" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsAutocompletionsApi.md b/docs/UsAutocompletionsApi.md new file mode 100644 index 0000000..983858a --- /dev/null +++ b/docs/UsAutocompletionsApi.md @@ -0,0 +1,96 @@ +# lob_python.UsAutocompletionsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**autocomplete**](UsAutocompletionsApi.md#autocomplete) | **POST** /us_autocompletions | autocomplete + + +# **autocomplete** +> UsAutocompletions autocomplete(us_autocompletions_writable) + +autocomplete + +Given an address prefix consisting of a partial primary line, as well as optional input of city, state, and zip code, this functionality returns up to 10 full US address suggestions. Not all of them will turn out to be valid addresses; they'll need to be [verified](#operation/verification_us). + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import us_autocompletions_api +from lob_python.model.us_autocompletions import UsAutocompletions +from lob_python.model.us_autocompletions_writable import UsAutocompletionsWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = us_autocompletions_api.UsAutocompletionsApi(api_client) + us_autocompletions_writable = UsAutocompletionsWritable( + address_prefix="address_prefix_example", + city="city_example", + state="state_example", + zip_code="zip_code_example", + geo_ip_sort=True, + ) # UsAutocompletionsWritable | + + # example passing only required values which don't have defaults set + try: + # autocomplete + api_response = api_instance.autocomplete(us_autocompletions_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UsAutocompletionsApi->autocomplete: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **us_autocompletions_writable** | [**UsAutocompletionsWritable**](UsAutocompletionsWritable.md)| | + +### Return type + +[**UsAutocompletions**](UsAutocompletions.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a US autocompletion object. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UsAutocompletionsWritable.md b/docs/UsAutocompletionsWritable.md new file mode 100644 index 0000000..f1cba8e --- /dev/null +++ b/docs/UsAutocompletionsWritable.md @@ -0,0 +1,16 @@ +# UsAutocompletionsWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address_prefix** | **str** | Only accepts numbers and street names in an alphanumeric format. | +**city** | **str** | An optional city input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] +**state** | **str** | An optional state input used to filter suggestions. Case insensitive and does not match partial abbreviations. | [optional] +**zip_code** | **str** | An optional ZIP Code input used to filter suggestions. Matches partial entries. | [optional] +**geo_ip_sort** | **bool** | If `true`, sort suggestions by proximity to the IP set in the `X-Forwarded-For` header. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsComponents.md b/docs/UsComponents.md new file mode 100644 index 0000000..62fc72a --- /dev/null +++ b/docs/UsComponents.md @@ -0,0 +1,38 @@ +# UsComponents + +A nested object containing a breakdown of each component of an address. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**primary_number** | **str** | The numeric or alphanumeric part of an address preceding the street name. Often the house, building, or PO Box number. | +**street_predirection** | **str** | Geographic direction preceding a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`). | +**street_name** | **str** | The name of the street. | +**street_suffix** | **str** | The standard USPS abbreviation for the street suffix (`ST`, `AVE`, `BLVD`, etc). | +**street_postdirection** | **str** | Geographic direction following a street name (`N`, `S`, `E`, `W`, `NE`, `SW`, `SE`, `NW`). | +**secondary_designator** | **str** | The standard USPS abbreviation describing the `components[secondary_number]` (`STE`, `APT`, `BLDG`, etc). | +**secondary_number** | **str** | Number of the apartment/unit/etc. | +**pmb_designator** | **str** | Designator of a [CMRA-authorized](https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency) private mailbox. | +**pmb_number** | **str** | Number of a [CMRA-authorized](https://en.wikipedia.org/wiki/Commercial_mail_receiving_agency) private mailbox. | +**extra_secondary_designator** | **str** | An extra (often unnecessary) secondary designator provided with the input address. | +**extra_secondary_number** | **str** | An extra (often unnecessary) secondary number provided with the input address. | +**city** | [**City**](City.md) | | +**state** | [**State**](State.md) | | +**zip_code** | **str** | The 5-digit ZIP code | +**zip_code_plus_4** | [**ZipCodePlus4**](ZipCodePlus4.md) | | +**zip_code_type** | [**ZipCodeType**](ZipCodeType.md) | | +**delivery_point_barcode** | **str** | A 12-digit identifier that uniquely identifies a delivery point (location where mail can be sent and received). It consists of the 5-digit ZIP code (`zip_code`), 4-digit ZIP+4 add-on (`zip_code_plus_4`), 2-digit delivery point, and 1-digit delivery point check digit. | +**address_type** | **str** | Uses USPS's [Residential Delivery Indicator (RDI)](https://www.usps.com/nationalpremieraccounts/rdi.htm) to identify whether an address is classified as residential or business. Possible values are: * `residential` –– The address is residential or a PO Box. * `commercial` –– The address is commercial. * `''` –– Not enough information provided to be determined. | +**record_type** | **str** | A description of the type of address. Populated if a DPV match is made (`deliverability_analysis[dpv_confirmation]` is `Y`, `S`, or `D`). For more detailed information about each record type, see [US Verification Details](#tag/US-Verification-Types). | +**default_building_address** | **bool** | Designates whether or not the address is the default address for a building containing multiple delivery points. | +**county** | **str** | County name of the address city. | +**county_fips** | **str** | A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. | +**carrier_route** | **str** | A 4-character code assigned to a mail delivery route within a ZIP code. | +**carrier_route_type** | **str** | The type of `components[carrier_route]`. For more detailed information about each carrier route type, see [US Verification Details](#tag/US-Verification-Types). | +**latitude** | **float, none_type** | A positive or negative decimal indicating the geographic latitude of the address, specifying the north-to-south position of a location. This should be used with `longitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`). | [optional] +**longitude** | **float, none_type** | A positive or negative decimal indicating the geographic longitude of the address, specifying the north-to-south position of a location. This should be used with `latitude` to pinpoint locations on a map. Will not be returned for undeliverable addresses or military addresses (state is `AA`, `AE`, or `AP`). | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsVerId.md b/docs/UsVerId.md new file mode 100644 index 0000000..5042cd7 --- /dev/null +++ b/docs/UsVerId.md @@ -0,0 +1,13 @@ +# UsVerId + +Unique identifier prefixed with `us_ver_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `us_ver_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsVerification.md b/docs/UsVerification.md new file mode 100644 index 0000000..073ba7c --- /dev/null +++ b/docs/UsVerification.md @@ -0,0 +1,22 @@ +# UsVerification + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**UsVerId**](UsVerId.md) | | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**last_line** | **str** | Combination of the following applicable `components`: * City (`city`) * State (`state`) * ZIP code (`zip_code`) * ZIP+4 (`zip_code_plus_4`) | [optional] +**deliverability** | **str** | Summarizes the deliverability of the `us_verification` object. For full details, see the `deliverability_analysis` field. Possible values are: * `deliverable` – The address is deliverable by the USPS. * `deliverable_unnecessary_unit` – The address is deliverable, but the secondary unit information is unnecessary. * `deliverable_incorrect_unit` – The address is deliverable to the building's default address but the secondary unit provided may not exist. There is a chance the mail will not reach the intended recipient. * `deliverable_missing_unit` – The address is deliverable to the building's default address but is missing secondary unit information. There is a chance the mail will not reach the intended recipient. * `undeliverable` – The address is not deliverable according to the USPS. | [optional] +**components** | [**UsComponents**](UsComponents.md) | | [optional] +**deliverability_analysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional] +**lob_confidence_score** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "us_verification" +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsVerificationOrError.md b/docs/UsVerificationOrError.md new file mode 100644 index 0000000..ba5b0b7 --- /dev/null +++ b/docs/UsVerificationOrError.md @@ -0,0 +1,24 @@ +# UsVerificationOrError + +A model used to represent an entry in a result list where the entry can either be a us_verification or an Error. The SDK will perform necessary casting into the correct corresponding type. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**UsVerId**](UsVerId.md) | | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**last_line** | **str** | | [optional] +**deliverability** | **str** | | [optional] +**components** | [**UsComponents**](UsComponents.md) | | [optional] +**deliverability_analysis** | [**DeliverabilityAnalysis**](DeliverabilityAnalysis.md) | | [optional] +**lob_confidence_score** | [**LobConfidenceScore**](LobConfidenceScore.md) | | [optional] +**object** | **str** | | [optional] if omitted the server will use the default value of "us_verification" +**error** | [**BulkError**](BulkError.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsVerifications.md b/docs/UsVerifications.md new file mode 100644 index 0000000..4df2aee --- /dev/null +++ b/docs/UsVerifications.md @@ -0,0 +1,13 @@ +# UsVerifications + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**addresses** | [**[UsVerificationOrError]**](UsVerificationOrError.md) | | +**errors** | **bool** | Indicates whether any errors occurred during the verification process. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UsVerificationsApi.md b/docs/UsVerificationsApi.md new file mode 100644 index 0000000..755957a --- /dev/null +++ b/docs/UsVerificationsApi.md @@ -0,0 +1,215 @@ +# lob_python.UsVerificationsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**verifyBulk**](UsVerificationsApi.md#verifyBulk) | **POST** /bulk/us_verifications | verifyBulk +[**verifySingle**](UsVerificationsApi.md#verifySingle) | **POST** /us_verifications | verifySingle + + +# **verifyBulk** +> UsVerifications verifyBulk(multiple_components_list) + +verifyBulk + +Verify a list of US or US territory addresses with a live API key. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import us_verifications_api +from lob_python.model.multiple_components_list import MultipleComponentsList +from lob_python.model.us_verifications import UsVerifications +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = us_verifications_api.UsVerificationsApi(api_client) + multiple_components_list = MultipleComponentsList( + addresses=[ + MultipleComponents( + recipient=Recipient("recipient_example"), + primary_line=PrimaryLineUs("primary_line_example"), + secondary_line=SecondaryLine("secondary_line_example"), + urbanization=Urbanization("urbanization_example"), + city=City("city_example"), + state="state_example", + zip_code=ZipCode("04807"), + ), + ], + ) # MultipleComponentsList | + case = "upper" # str | Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional) if omitted the server will use the default value of "upper" + + # example passing only required values which don't have defaults set + try: + # verifyBulk + api_response = api_instance.verifyBulk(multiple_components_list) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UsVerificationsApi->verifyBulk: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # verifyBulk + api_response = api_instance.verifyBulk(multiple_components_list, case=case) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UsVerificationsApi->verifyBulk: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **multiple_components_list** | [**MultipleComponentsList**](MultipleComponentsList.md)| | + **case** | **str**| Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. | [optional] if omitted the server will use the default value of "upper" + +### Return type + +[**UsVerifications**](UsVerifications.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a list of US verification objects. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **verifySingle** +> UsVerification verifySingle(us_verifications_writable) + +verifySingle + +Verify a US or US territory address with a live API key. + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import us_verifications_api +from lob_python.model.us_verification import UsVerification +from lob_python.model.us_verifications_writable import UsVerificationsWritable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = us_verifications_api.UsVerificationsApi(api_client) + us_verifications_writable = UsVerificationsWritable( + address="address_example", + recipient=Recipient("recipient_example"), + primary_line=PrimaryLineUs("primary_line_example"), + secondary_line=SecondaryLine("secondary_line_example"), + urbanization=Urbanization("urbanization_example"), + city=City("city_example"), + state="state_example", + zip_code=ZipCode("04807"), + ) # UsVerificationsWritable | + case = "upper" # str | Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional) if omitted the server will use the default value of "upper" + + # example passing only required values which don't have defaults set + try: + # verifySingle + api_response = api_instance.verifySingle(us_verifications_writable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UsVerificationsApi->verifySingle: %s\n" % e) + + # example passing only required values which don't have defaults set + # and optional values + try: + # verifySingle + api_response = api_instance.verifySingle(us_verifications_writable, case=case) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling UsVerificationsApi->verifySingle: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **us_verifications_writable** | [**UsVerificationsWritable**](UsVerificationsWritable.md)| | + **case** | **str**| Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. | [optional] if omitted the server will use the default value of "upper" + +### Return type + +[**UsVerification**](UsVerification.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a US verification object. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/UsVerificationsWritable.md b/docs/UsVerificationsWritable.md new file mode 100644 index 0000000..09aae9f --- /dev/null +++ b/docs/UsVerificationsWritable.md @@ -0,0 +1,19 @@ +# UsVerificationsWritable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | The entire address in one string (e.g., \"210 King Street 94107\"). _Does not support a recipient and will error when other payload parameters are provided._ | [optional] +**recipient** | [**Recipient**](Recipient.md) | | [optional] +**primary_line** | [**PrimaryLineUs**](PrimaryLineUs.md) | | [optional] +**secondary_line** | [**SecondaryLine**](SecondaryLine.md) | | [optional] +**urbanization** | [**Urbanization**](Urbanization.md) | | [optional] +**city** | [**City**](City.md) | | [optional] +**state** | **str** | The [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2:US) two letter code or subdivision name for the state. `city` and `state` are required if no `zip_code` is passed. | [optional] +**zip_code** | [**ZipCode**](ZipCode.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/VrsnId.md b/docs/VrsnId.md new file mode 100644 index 0000000..9ef1912 --- /dev/null +++ b/docs/VrsnId.md @@ -0,0 +1,13 @@ +# VrsnId + +Unique identifier prefixed with `vrsn_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `vrsn_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Zip.md b/docs/Zip.md new file mode 100644 index 0000000..fac140b --- /dev/null +++ b/docs/Zip.md @@ -0,0 +1,16 @@ +# Zip + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**ZipId**](ZipId.md) | | +**cities** | [**[ZipLookupCity]**](ZipLookupCity.md) | An array of city objects containing valid cities for the `zip_code`. Multiple cities will be returned if more than one city is associated with the input ZIP code. | +**zip_code_type** | [**ZipCodeType**](ZipCodeType.md) | | +**object** | **str** | | defaults to "us_zip_lookup" +**zip_code** | **str** | A 5-digit ZIP code. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipCode.md b/docs/ZipCode.md new file mode 100644 index 0000000..8d9c55b --- /dev/null +++ b/docs/ZipCode.md @@ -0,0 +1,13 @@ +# ZipCode + +Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Required if `city` and `state` are not passed in. If included, must be formatted as a US ZIP or ZIP+4 (e.g. `94107`, `941072282`, `94107-2282`). | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipCodePlus4.md b/docs/ZipCodePlus4.md new file mode 100644 index 0000000..e2042b8 --- /dev/null +++ b/docs/ZipCodePlus4.md @@ -0,0 +1,12 @@ +# ZipCodePlus4 + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipCodeType.md b/docs/ZipCodeType.md new file mode 100644 index 0000000..95f64e1 --- /dev/null +++ b/docs/ZipCodeType.md @@ -0,0 +1,13 @@ +# ZipCodeType + +A description of the ZIP code type. For more detailed information about each ZIP code type, see [US Verification Details](#tag/US-Verification-Types). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | A description of the ZIP code type. For more detailed information about each ZIP code type, see [US Verification Details](#tag/US-Verification-Types). | must be one of ["standard", "po_box", "unique", "military", "", ] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipEditable.md b/docs/ZipEditable.md new file mode 100644 index 0000000..c7cf343 --- /dev/null +++ b/docs/ZipEditable.md @@ -0,0 +1,12 @@ +# ZipEditable + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**zip_code** | **str** | A 5-digit ZIP code. | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipId.md b/docs/ZipId.md new file mode 100644 index 0000000..63450a5 --- /dev/null +++ b/docs/ZipId.md @@ -0,0 +1,13 @@ +# ZipId + +Unique identifier prefixed with `us_zip_`. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Unique identifier prefixed with `us_zip_`. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipLookupCity.md b/docs/ZipLookupCity.md new file mode 100644 index 0000000..55b89b0 --- /dev/null +++ b/docs/ZipLookupCity.md @@ -0,0 +1,16 @@ +# ZipLookupCity + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**city** | [**City**](City.md) | | +**state** | [**State**](State.md) | | +**county** | **str** | County name of the address city. | +**county_fips** | **str** | A 5-digit [FIPS county code](https://en.wikipedia.org/wiki/FIPS_county_code) which uniquely identifies `components[county]`. It consists of a 2-digit state code and a 3-digit county code. | +**preferred** | **bool** | Indicates whether or not the city is the [USPS default city](https://en.wikipedia.org/wiki/ZIP_Code#ZIP_Codes_and_previous_zoning_lines) (preferred city) of a ZIP code. There is only one preferred city per ZIP code, which will always be in position 0 in the array of cities. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ZipLookupsApi.md b/docs/ZipLookupsApi.md new file mode 100644 index 0000000..b4dea99 --- /dev/null +++ b/docs/ZipLookupsApi.md @@ -0,0 +1,92 @@ +# lob_python.ZipLookupsApi + +All URIs are relative to *https://api.lob.com/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**lookup**](ZipLookupsApi.md#lookup) | **POST** /us_zip_lookups | lookup + + +# **lookup** +> Zip lookup(zip_editable) + +lookup + +Returns information about a ZIP code + +### Example + +* Basic Authentication (basicAuth): + +```python +import time +import lob_python +from lob_python.api import zip_lookups_api +from lob_python.model.zip import Zip +from lob_python.model.zip_editable import ZipEditable +from lob_python.model.lob_error import LobError +from pprint import pprint +# Defining the host is optional and defaults to https://api.lob.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = lob_python.Configuration( + host = "https://api.lob.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = lob_python.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) + +# Enter a context with an instance of the API client +with lob_python.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = zip_lookups_api.ZipLookupsApi(api_client) + zip_editable = ZipEditable( + zip_code="04807", + ) # ZipEditable | + + # example passing only required values which don't have defaults set + try: + # lookup + api_response = api_instance.lookup(zip_editable) + pprint(api_response) + except lob_python.ApiException as e: + print("Exception when calling ZipLookupsApi->lookup: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **zip_editable** | [**ZipEditable**](ZipEditable.md)| | + +### Return type + +[**Zip**](Zip.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns a zip lookup object if a valid zip was provided. | * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
| +**0** | Lob uses RESTful HTTP response codes to indicate success or failure of an API request. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..f53a75d --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/lob/version.py b/lob/version.py deleted file mode 100644 index 7871c3f..0000000 --- a/lob/version.py +++ /dev/null @@ -1,3 +0,0 @@ -from __future__ import unicode_literals - -VERSION = '5.0.0-beta' diff --git a/lob/__init__.py b/lob_python/__init__.py similarity index 100% rename from lob/__init__.py rename to lob_python/__init__.py diff --git a/lob/api/__init__.py b/lob_python/api/__init__.py similarity index 100% rename from lob/api/__init__.py rename to lob_python/api/__init__.py diff --git a/lob/api/addresses_api.py b/lob_python/api/addresses_api.py similarity index 100% rename from lob/api/addresses_api.py rename to lob_python/api/addresses_api.py diff --git a/lob/api/bank_accounts_api.py b/lob_python/api/bank_accounts_api.py similarity index 100% rename from lob/api/bank_accounts_api.py rename to lob_python/api/bank_accounts_api.py diff --git a/lob/api/billing_groups_api.py b/lob_python/api/billing_groups_api.py similarity index 100% rename from lob/api/billing_groups_api.py rename to lob_python/api/billing_groups_api.py diff --git a/lob/api/campaigns_api.py b/lob_python/api/campaigns_api.py similarity index 100% rename from lob/api/campaigns_api.py rename to lob_python/api/campaigns_api.py diff --git a/lob/api/card_orders_api.py b/lob_python/api/card_orders_api.py similarity index 100% rename from lob/api/card_orders_api.py rename to lob_python/api/card_orders_api.py diff --git a/lob/api/cards_api.py b/lob_python/api/cards_api.py similarity index 100% rename from lob/api/cards_api.py rename to lob_python/api/cards_api.py diff --git a/lob/api/checks_api.py b/lob_python/api/checks_api.py similarity index 100% rename from lob/api/checks_api.py rename to lob_python/api/checks_api.py diff --git a/lob/api/creatives_api.py b/lob_python/api/creatives_api.py similarity index 100% rename from lob/api/creatives_api.py rename to lob_python/api/creatives_api.py diff --git a/lob/api/default_api.py b/lob_python/api/default_api.py similarity index 100% rename from lob/api/default_api.py rename to lob_python/api/default_api.py diff --git a/lob/api/identity_validation_api.py b/lob_python/api/identity_validation_api.py similarity index 100% rename from lob/api/identity_validation_api.py rename to lob_python/api/identity_validation_api.py diff --git a/lob/api/intl_autocompletions_api.py b/lob_python/api/intl_autocompletions_api.py similarity index 100% rename from lob/api/intl_autocompletions_api.py rename to lob_python/api/intl_autocompletions_api.py diff --git a/lob/api/intl_verifications_api.py b/lob_python/api/intl_verifications_api.py similarity index 100% rename from lob/api/intl_verifications_api.py rename to lob_python/api/intl_verifications_api.py diff --git a/lob/api/letters_api.py b/lob_python/api/letters_api.py similarity index 100% rename from lob/api/letters_api.py rename to lob_python/api/letters_api.py diff --git a/lob/api/postcards_api.py b/lob_python/api/postcards_api.py similarity index 100% rename from lob/api/postcards_api.py rename to lob_python/api/postcards_api.py diff --git a/lob/api/reverse_geocode_lookups_api.py b/lob_python/api/reverse_geocode_lookups_api.py similarity index 100% rename from lob/api/reverse_geocode_lookups_api.py rename to lob_python/api/reverse_geocode_lookups_api.py diff --git a/lob/api/self_mailers_api.py b/lob_python/api/self_mailers_api.py similarity index 100% rename from lob/api/self_mailers_api.py rename to lob_python/api/self_mailers_api.py diff --git a/lob/api/template_versions_api.py b/lob_python/api/template_versions_api.py similarity index 100% rename from lob/api/template_versions_api.py rename to lob_python/api/template_versions_api.py diff --git a/lob/api/templates_api.py b/lob_python/api/templates_api.py similarity index 100% rename from lob/api/templates_api.py rename to lob_python/api/templates_api.py diff --git a/lob/api/uploads_api.py b/lob_python/api/uploads_api.py similarity index 100% rename from lob/api/uploads_api.py rename to lob_python/api/uploads_api.py diff --git a/lob/api/us_autocompletions_api.py b/lob_python/api/us_autocompletions_api.py similarity index 100% rename from lob/api/us_autocompletions_api.py rename to lob_python/api/us_autocompletions_api.py diff --git a/lob/api/us_verifications_api.py b/lob_python/api/us_verifications_api.py similarity index 100% rename from lob/api/us_verifications_api.py rename to lob_python/api/us_verifications_api.py diff --git a/lob/api/zip_lookups_api.py b/lob_python/api/zip_lookups_api.py similarity index 100% rename from lob/api/zip_lookups_api.py rename to lob_python/api/zip_lookups_api.py diff --git a/lob/api_client.py b/lob_python/api_client.py similarity index 100% rename from lob/api_client.py rename to lob_python/api_client.py diff --git a/lob/apis/__init__.py b/lob_python/apis/__init__.py similarity index 100% rename from lob/apis/__init__.py rename to lob_python/apis/__init__.py diff --git a/lob/configuration.py b/lob_python/configuration.py similarity index 100% rename from lob/configuration.py rename to lob_python/configuration.py diff --git a/lob/exceptions.py b/lob_python/exceptions.py similarity index 100% rename from lob/exceptions.py rename to lob_python/exceptions.py diff --git a/lob/model/__init__.py b/lob_python/model/__init__.py similarity index 100% rename from lob/model/__init__.py rename to lob_python/model/__init__.py diff --git a/lob/model/address.py b/lob_python/model/address.py similarity index 100% rename from lob/model/address.py rename to lob_python/model/address.py diff --git a/lob/model/address_deletion.py b/lob_python/model/address_deletion.py similarity index 100% rename from lob/model/address_deletion.py rename to lob_python/model/address_deletion.py diff --git a/lob/model/address_domestic.py b/lob_python/model/address_domestic.py similarity index 100% rename from lob/model/address_domestic.py rename to lob_python/model/address_domestic.py diff --git a/lob/model/address_domestic_expanded.py b/lob_python/model/address_domestic_expanded.py similarity index 100% rename from lob/model/address_domestic_expanded.py rename to lob_python/model/address_domestic_expanded.py diff --git a/lob/model/address_editable.py b/lob_python/model/address_editable.py similarity index 100% rename from lob/model/address_editable.py rename to lob_python/model/address_editable.py diff --git a/lob/model/address_list.py b/lob_python/model/address_list.py similarity index 100% rename from lob/model/address_list.py rename to lob_python/model/address_list.py diff --git a/lob/model/adr_id.py b/lob_python/model/adr_id.py similarity index 100% rename from lob/model/adr_id.py rename to lob_python/model/adr_id.py diff --git a/lob/model/bank_account.py b/lob_python/model/bank_account.py similarity index 100% rename from lob/model/bank_account.py rename to lob_python/model/bank_account.py diff --git a/lob/model/bank_account_deletion.py b/lob_python/model/bank_account_deletion.py similarity index 100% rename from lob/model/bank_account_deletion.py rename to lob_python/model/bank_account_deletion.py diff --git a/lob/model/bank_account_list.py b/lob_python/model/bank_account_list.py similarity index 100% rename from lob/model/bank_account_list.py rename to lob_python/model/bank_account_list.py diff --git a/lob/model/bank_account_verify.py b/lob_python/model/bank_account_verify.py similarity index 100% rename from lob/model/bank_account_verify.py rename to lob_python/model/bank_account_verify.py diff --git a/lob/model/bank_account_writable.py b/lob_python/model/bank_account_writable.py similarity index 100% rename from lob/model/bank_account_writable.py rename to lob_python/model/bank_account_writable.py diff --git a/lob/model/bank_id.py b/lob_python/model/bank_id.py similarity index 100% rename from lob/model/bank_id.py rename to lob_python/model/bank_id.py diff --git a/lob/model/bank_type_enum.py b/lob_python/model/bank_type_enum.py similarity index 100% rename from lob/model/bank_type_enum.py rename to lob_python/model/bank_type_enum.py diff --git a/lob/model/bg_description.py b/lob_python/model/bg_description.py similarity index 100% rename from lob/model/bg_description.py rename to lob_python/model/bg_description.py diff --git a/lob/model/bg_id.py b/lob_python/model/bg_id.py similarity index 100% rename from lob/model/bg_id.py rename to lob_python/model/bg_id.py diff --git a/lob/model/billing_group.py b/lob_python/model/billing_group.py similarity index 100% rename from lob/model/billing_group.py rename to lob_python/model/billing_group.py diff --git a/lob/model/billing_group_editable.py b/lob_python/model/billing_group_editable.py similarity index 100% rename from lob/model/billing_group_editable.py rename to lob_python/model/billing_group_editable.py diff --git a/lob/model/billing_group_list.py b/lob_python/model/billing_group_list.py similarity index 100% rename from lob/model/billing_group_list.py rename to lob_python/model/billing_group_list.py diff --git a/lob/model/bulk_error.py b/lob_python/model/bulk_error.py similarity index 100% rename from lob/model/bulk_error.py rename to lob_python/model/bulk_error.py diff --git a/lob/model/bulk_error_properties.py b/lob_python/model/bulk_error_properties.py similarity index 100% rename from lob/model/bulk_error_properties.py rename to lob_python/model/bulk_error_properties.py diff --git a/lob/model/campaign.py b/lob_python/model/campaign.py similarity index 100% rename from lob/model/campaign.py rename to lob_python/model/campaign.py diff --git a/lob/model/campaign_updatable.py b/lob_python/model/campaign_updatable.py similarity index 100% rename from lob/model/campaign_updatable.py rename to lob_python/model/campaign_updatable.py diff --git a/lob/model/campaign_writable.py b/lob_python/model/campaign_writable.py similarity index 100% rename from lob/model/campaign_writable.py rename to lob_python/model/campaign_writable.py diff --git a/lob/model/campaigns_list.py b/lob_python/model/campaigns_list.py similarity index 100% rename from lob/model/campaigns_list.py rename to lob_python/model/campaigns_list.py diff --git a/lob/model/card.py b/lob_python/model/card.py similarity index 100% rename from lob/model/card.py rename to lob_python/model/card.py diff --git a/lob/model/card_deletion.py b/lob_python/model/card_deletion.py similarity index 100% rename from lob/model/card_deletion.py rename to lob_python/model/card_deletion.py diff --git a/lob/model/card_description.py b/lob_python/model/card_description.py similarity index 100% rename from lob/model/card_description.py rename to lob_python/model/card_description.py diff --git a/lob/model/card_editable.py b/lob_python/model/card_editable.py similarity index 100% rename from lob/model/card_editable.py rename to lob_python/model/card_editable.py diff --git a/lob/model/card_id.py b/lob_python/model/card_id.py similarity index 100% rename from lob/model/card_id.py rename to lob_python/model/card_id.py diff --git a/lob/model/card_list.py b/lob_python/model/card_list.py similarity index 100% rename from lob/model/card_list.py rename to lob_python/model/card_list.py diff --git a/lob/model/card_order.py b/lob_python/model/card_order.py similarity index 100% rename from lob/model/card_order.py rename to lob_python/model/card_order.py diff --git a/lob/model/card_order_editable.py b/lob_python/model/card_order_editable.py similarity index 100% rename from lob/model/card_order_editable.py rename to lob_python/model/card_order_editable.py diff --git a/lob/model/card_order_list.py b/lob_python/model/card_order_list.py similarity index 100% rename from lob/model/card_order_list.py rename to lob_python/model/card_order_list.py diff --git a/lob/model/card_updatable.py b/lob_python/model/card_updatable.py similarity index 100% rename from lob/model/card_updatable.py rename to lob_python/model/card_updatable.py diff --git a/lob/model/cents.py b/lob_python/model/cents.py similarity index 100% rename from lob/model/cents.py rename to lob_python/model/cents.py diff --git a/lob/model/check.py b/lob_python/model/check.py similarity index 100% rename from lob/model/check.py rename to lob_python/model/check.py diff --git a/lob/model/check_deletion.py b/lob_python/model/check_deletion.py similarity index 100% rename from lob/model/check_deletion.py rename to lob_python/model/check_deletion.py diff --git a/lob/model/check_editable.py b/lob_python/model/check_editable.py similarity index 100% rename from lob/model/check_editable.py rename to lob_python/model/check_editable.py diff --git a/lob/model/check_list.py b/lob_python/model/check_list.py similarity index 100% rename from lob/model/check_list.py rename to lob_python/model/check_list.py diff --git a/lob/model/chk_id.py b/lob_python/model/chk_id.py similarity index 100% rename from lob/model/chk_id.py rename to lob_python/model/chk_id.py diff --git a/lob/model/city.py b/lob_python/model/city.py similarity index 100% rename from lob/model/city.py rename to lob_python/model/city.py diff --git a/lob/model/cmp_id.py b/lob_python/model/cmp_id.py similarity index 100% rename from lob/model/cmp_id.py rename to lob_python/model/cmp_id.py diff --git a/lob/model/cmp_schedule_type.py b/lob_python/model/cmp_schedule_type.py similarity index 100% rename from lob/model/cmp_schedule_type.py rename to lob_python/model/cmp_schedule_type.py diff --git a/lob/model/cmp_use_type.py b/lob_python/model/cmp_use_type.py similarity index 100% rename from lob/model/cmp_use_type.py rename to lob_python/model/cmp_use_type.py diff --git a/lob/model/co_id.py b/lob_python/model/co_id.py similarity index 100% rename from lob/model/co_id.py rename to lob_python/model/co_id.py diff --git a/lob/model/company.py b/lob_python/model/company.py similarity index 100% rename from lob/model/company.py rename to lob_python/model/company.py diff --git a/lob/model/country_extended.py b/lob_python/model/country_extended.py similarity index 100% rename from lob/model/country_extended.py rename to lob_python/model/country_extended.py diff --git a/lob/model/country_extended_expanded.py b/lob_python/model/country_extended_expanded.py similarity index 100% rename from lob/model/country_extended_expanded.py rename to lob_python/model/country_extended_expanded.py diff --git a/lob/model/creative_patch.py b/lob_python/model/creative_patch.py similarity index 100% rename from lob/model/creative_patch.py rename to lob_python/model/creative_patch.py diff --git a/lob/model/creative_response.py b/lob_python/model/creative_response.py similarity index 100% rename from lob/model/creative_response.py rename to lob_python/model/creative_response.py diff --git a/lob/model/creative_writable.py b/lob_python/model/creative_writable.py similarity index 100% rename from lob/model/creative_writable.py rename to lob_python/model/creative_writable.py diff --git a/lob/model/crv_id.py b/lob_python/model/crv_id.py similarity index 100% rename from lob/model/crv_id.py rename to lob_python/model/crv_id.py diff --git a/lob/model/custom_envelope_returned.py b/lob_python/model/custom_envelope_returned.py similarity index 100% rename from lob/model/custom_envelope_returned.py rename to lob_python/model/custom_envelope_returned.py diff --git a/lob/model/custom_envelope_user_provided.py b/lob_python/model/custom_envelope_user_provided.py similarity index 100% rename from lob/model/custom_envelope_user_provided.py rename to lob_python/model/custom_envelope_user_provided.py diff --git a/lob/model/deliverability_analysis.py b/lob_python/model/deliverability_analysis.py similarity index 100% rename from lob/model/deliverability_analysis.py rename to lob_python/model/deliverability_analysis.py diff --git a/lob/model/dpv_footnote.py b/lob_python/model/dpv_footnote.py similarity index 100% rename from lob/model/dpv_footnote.py rename to lob_python/model/dpv_footnote.py diff --git a/lob/model/engine_html.py b/lob_python/model/engine_html.py similarity index 100% rename from lob/model/engine_html.py rename to lob_python/model/engine_html.py diff --git a/lob/model/event_type.py b/lob_python/model/event_type.py similarity index 100% rename from lob/model/event_type.py rename to lob_python/model/event_type.py diff --git a/lob/model/events.py b/lob_python/model/events.py similarity index 100% rename from lob/model/events.py rename to lob_python/model/events.py diff --git a/lob/model/evnt_id.py b/lob_python/model/evnt_id.py similarity index 100% rename from lob/model/evnt_id.py rename to lob_python/model/evnt_id.py diff --git a/lob/model/ex_id.py b/lob_python/model/ex_id.py similarity index 100% rename from lob/model/ex_id.py rename to lob_python/model/ex_id.py diff --git a/lob/model/export.py b/lob_python/model/export.py similarity index 100% rename from lob/model/export.py rename to lob_python/model/export.py diff --git a/lob/model/export_model.py b/lob_python/model/export_model.py similarity index 100% rename from lob/model/export_model.py rename to lob_python/model/export_model.py diff --git a/lob/model/geocode_addresses.py b/lob_python/model/geocode_addresses.py similarity index 100% rename from lob/model/geocode_addresses.py rename to lob_python/model/geocode_addresses.py diff --git a/lob/model/geocode_components.py b/lob_python/model/geocode_components.py similarity index 100% rename from lob/model/geocode_components.py rename to lob_python/model/geocode_components.py diff --git a/lob/model/http_validation_error.py b/lob_python/model/http_validation_error.py similarity index 100% rename from lob/model/http_validation_error.py rename to lob_python/model/http_validation_error.py diff --git a/lob/model/identity_validation.py b/lob_python/model/identity_validation.py similarity index 100% rename from lob/model/identity_validation.py rename to lob_python/model/identity_validation.py diff --git a/lob/model/identity_validation_id.py b/lob_python/model/identity_validation_id.py similarity index 100% rename from lob/model/identity_validation_id.py rename to lob_python/model/identity_validation_id.py diff --git a/lob/model/include_model.py b/lob_python/model/include_model.py similarity index 100% rename from lob/model/include_model.py rename to lob_python/model/include_model.py diff --git a/lob/model/inline_object.py b/lob_python/model/inline_object.py similarity index 100% rename from lob/model/inline_object.py rename to lob_python/model/inline_object.py diff --git a/lob/model/inline_response200.py b/lob_python/model/inline_response200.py similarity index 100% rename from lob/model/inline_response200.py rename to lob_python/model/inline_response200.py diff --git a/lob/model/inline_response204.py b/lob_python/model/inline_response204.py similarity index 100% rename from lob/model/inline_response204.py rename to lob_python/model/inline_response204.py diff --git a/lob/model/intl_auto_id.py b/lob_python/model/intl_auto_id.py similarity index 100% rename from lob/model/intl_auto_id.py rename to lob_python/model/intl_auto_id.py diff --git a/lob/model/intl_autocompletions.py b/lob_python/model/intl_autocompletions.py similarity index 100% rename from lob/model/intl_autocompletions.py rename to lob_python/model/intl_autocompletions.py diff --git a/lob/model/intl_autocompletions_writable.py b/lob_python/model/intl_autocompletions_writable.py similarity index 100% rename from lob/model/intl_autocompletions_writable.py rename to lob_python/model/intl_autocompletions_writable.py diff --git a/lob/model/intl_components.py b/lob_python/model/intl_components.py similarity index 100% rename from lob/model/intl_components.py rename to lob_python/model/intl_components.py diff --git a/lob/model/intl_suggestions.py b/lob_python/model/intl_suggestions.py similarity index 100% rename from lob/model/intl_suggestions.py rename to lob_python/model/intl_suggestions.py diff --git a/lob/model/intl_ver_id.py b/lob_python/model/intl_ver_id.py similarity index 100% rename from lob/model/intl_ver_id.py rename to lob_python/model/intl_ver_id.py diff --git a/lob/model/intl_verification.py b/lob_python/model/intl_verification.py similarity index 100% rename from lob/model/intl_verification.py rename to lob_python/model/intl_verification.py diff --git a/lob/model/intl_verification_or_error.py b/lob_python/model/intl_verification_or_error.py similarity index 100% rename from lob/model/intl_verification_or_error.py rename to lob_python/model/intl_verification_or_error.py diff --git a/lob/model/intl_verification_writable.py b/lob_python/model/intl_verification_writable.py similarity index 100% rename from lob/model/intl_verification_writable.py rename to lob_python/model/intl_verification_writable.py diff --git a/lob/model/intl_verifications.py b/lob_python/model/intl_verifications.py similarity index 100% rename from lob/model/intl_verifications.py rename to lob_python/model/intl_verifications.py diff --git a/lob/model/intl_verifications_payload.py b/lob_python/model/intl_verifications_payload.py similarity index 100% rename from lob/model/intl_verifications_payload.py rename to lob_python/model/intl_verifications_payload.py diff --git a/lob/model/letter.py b/lob_python/model/letter.py similarity index 100% rename from lob/model/letter.py rename to lob_python/model/letter.py diff --git a/lob/model/letter_custom_envelope.py b/lob_python/model/letter_custom_envelope.py similarity index 100% rename from lob/model/letter_custom_envelope.py rename to lob_python/model/letter_custom_envelope.py diff --git a/lob/model/letter_deletion.py b/lob_python/model/letter_deletion.py similarity index 100% rename from lob/model/letter_deletion.py rename to lob_python/model/letter_deletion.py diff --git a/lob/model/letter_details_returned.py b/lob_python/model/letter_details_returned.py similarity index 100% rename from lob/model/letter_details_returned.py rename to lob_python/model/letter_details_returned.py diff --git a/lob/model/letter_details_writable.py b/lob_python/model/letter_details_writable.py similarity index 100% rename from lob/model/letter_details_writable.py rename to lob_python/model/letter_details_writable.py diff --git a/lob/model/letter_editable.py b/lob_python/model/letter_editable.py similarity index 100% rename from lob/model/letter_editable.py rename to lob_python/model/letter_editable.py diff --git a/lob/model/letter_editable_custom_envelope.py b/lob_python/model/letter_editable_custom_envelope.py similarity index 100% rename from lob/model/letter_editable_custom_envelope.py rename to lob_python/model/letter_editable_custom_envelope.py diff --git a/lob/model/letter_list.py b/lob_python/model/letter_list.py similarity index 100% rename from lob/model/letter_list.py rename to lob_python/model/letter_list.py diff --git a/lob/model/lob_confidence_score.py b/lob_python/model/lob_confidence_score.py similarity index 100% rename from lob/model/lob_confidence_score.py rename to lob_python/model/lob_confidence_score.py diff --git a/lob/model/lob_error.py b/lob_python/model/lob_error.py similarity index 100% rename from lob/model/lob_error.py rename to lob_python/model/lob_error.py diff --git a/lob/model/location.py b/lob_python/model/location.py similarity index 100% rename from lob/model/location.py rename to lob_python/model/location.py diff --git a/lob/model/location_analysis.py b/lob_python/model/location_analysis.py similarity index 100% rename from lob/model/location_analysis.py rename to lob_python/model/location_analysis.py diff --git a/lob/model/ltr_id.py b/lob_python/model/ltr_id.py similarity index 100% rename from lob/model/ltr_id.py rename to lob_python/model/ltr_id.py diff --git a/lob/model/mail_type.py b/lob_python/model/mail_type.py similarity index 100% rename from lob/model/mail_type.py rename to lob_python/model/mail_type.py diff --git a/lob/model/merge_variables.py b/lob_python/model/merge_variables.py similarity index 100% rename from lob/model/merge_variables.py rename to lob_python/model/merge_variables.py diff --git a/lob/model/metadata_model.py b/lob_python/model/metadata_model.py similarity index 100% rename from lob/model/metadata_model.py rename to lob_python/model/metadata_model.py diff --git a/lob/model/multi_line_address.py b/lob_python/model/multi_line_address.py similarity index 100% rename from lob/model/multi_line_address.py rename to lob_python/model/multi_line_address.py diff --git a/lob/model/multiple_components.py b/lob_python/model/multiple_components.py similarity index 100% rename from lob/model/multiple_components.py rename to lob_python/model/multiple_components.py diff --git a/lob/model/multiple_components_intl.py b/lob_python/model/multiple_components_intl.py similarity index 100% rename from lob/model/multiple_components_intl.py rename to lob_python/model/multiple_components_intl.py diff --git a/lob/model/multiple_components_list.py b/lob_python/model/multiple_components_list.py similarity index 100% rename from lob/model/multiple_components_list.py rename to lob_python/model/multiple_components_list.py diff --git a/lob/model/name.py b/lob_python/model/name.py similarity index 100% rename from lob/model/name.py rename to lob_python/model/name.py diff --git a/lob/model/placeholder_model.py b/lob_python/model/placeholder_model.py similarity index 100% rename from lob/model/placeholder_model.py rename to lob_python/model/placeholder_model.py diff --git a/lob/model/postal_code.py b/lob_python/model/postal_code.py similarity index 100% rename from lob/model/postal_code.py rename to lob_python/model/postal_code.py diff --git a/lob/model/postcard.py b/lob_python/model/postcard.py similarity index 100% rename from lob/model/postcard.py rename to lob_python/model/postcard.py diff --git a/lob/model/postcard_deletion.py b/lob_python/model/postcard_deletion.py similarity index 100% rename from lob/model/postcard_deletion.py rename to lob_python/model/postcard_deletion.py diff --git a/lob/model/postcard_details_returned.py b/lob_python/model/postcard_details_returned.py similarity index 100% rename from lob/model/postcard_details_returned.py rename to lob_python/model/postcard_details_returned.py diff --git a/lob/model/postcard_details_writable.py b/lob_python/model/postcard_details_writable.py similarity index 100% rename from lob/model/postcard_details_writable.py rename to lob_python/model/postcard_details_writable.py diff --git a/lob/model/postcard_editable.py b/lob_python/model/postcard_editable.py similarity index 100% rename from lob/model/postcard_editable.py rename to lob_python/model/postcard_editable.py diff --git a/lob/model/postcard_list.py b/lob_python/model/postcard_list.py similarity index 100% rename from lob/model/postcard_list.py rename to lob_python/model/postcard_list.py diff --git a/lob/model/postcard_size.py b/lob_python/model/postcard_size.py similarity index 100% rename from lob/model/postcard_size.py rename to lob_python/model/postcard_size.py diff --git a/lob/model/primary_line_us.py b/lob_python/model/primary_line_us.py similarity index 100% rename from lob/model/primary_line_us.py rename to lob_python/model/primary_line_us.py diff --git a/lob/model/psc_id.py b/lob_python/model/psc_id.py similarity index 100% rename from lob/model/psc_id.py rename to lob_python/model/psc_id.py diff --git a/lob/model/recipient.py b/lob_python/model/recipient.py similarity index 100% rename from lob/model/recipient.py rename to lob_python/model/recipient.py diff --git a/lob/model/resource_description.py b/lob_python/model/resource_description.py similarity index 100% rename from lob/model/resource_description.py rename to lob_python/model/resource_description.py diff --git a/lob/model/return_envelope.py b/lob_python/model/return_envelope.py similarity index 100% rename from lob/model/return_envelope.py rename to lob_python/model/return_envelope.py diff --git a/lob/model/reverse_geocode.py b/lob_python/model/reverse_geocode.py similarity index 100% rename from lob/model/reverse_geocode.py rename to lob_python/model/reverse_geocode.py diff --git a/lob/model/reverse_geocode_id.py b/lob_python/model/reverse_geocode_id.py similarity index 100% rename from lob/model/reverse_geocode_id.py rename to lob_python/model/reverse_geocode_id.py diff --git a/lob/model/secondary_line.py b/lob_python/model/secondary_line.py similarity index 100% rename from lob/model/secondary_line.py rename to lob_python/model/secondary_line.py diff --git a/lob/model/self_mailer.py b/lob_python/model/self_mailer.py similarity index 100% rename from lob/model/self_mailer.py rename to lob_python/model/self_mailer.py diff --git a/lob/model/self_mailer_deletion.py b/lob_python/model/self_mailer_deletion.py similarity index 100% rename from lob/model/self_mailer_deletion.py rename to lob_python/model/self_mailer_deletion.py diff --git a/lob/model/self_mailer_editable.py b/lob_python/model/self_mailer_editable.py similarity index 100% rename from lob/model/self_mailer_editable.py rename to lob_python/model/self_mailer_editable.py diff --git a/lob/model/self_mailer_list.py b/lob_python/model/self_mailer_list.py similarity index 100% rename from lob/model/self_mailer_list.py rename to lob_python/model/self_mailer_list.py diff --git a/lob/model/self_mailer_size.py b/lob_python/model/self_mailer_size.py similarity index 100% rename from lob/model/self_mailer_size.py rename to lob_python/model/self_mailer_size.py diff --git a/lob/model/sfm_id.py b/lob_python/model/sfm_id.py similarity index 100% rename from lob/model/sfm_id.py rename to lob_python/model/sfm_id.py diff --git a/lob/model/signed_link.py b/lob_python/model/signed_link.py similarity index 100% rename from lob/model/signed_link.py rename to lob_python/model/signed_link.py diff --git a/lob/model/sort_by.py b/lob_python/model/sort_by.py similarity index 100% rename from lob/model/sort_by.py rename to lob_python/model/sort_by.py diff --git a/lob/model/sort_by1.py b/lob_python/model/sort_by1.py similarity index 100% rename from lob/model/sort_by1.py rename to lob_python/model/sort_by1.py diff --git a/lob/model/sort_by2.py b/lob_python/model/sort_by2.py similarity index 100% rename from lob/model/sort_by2.py rename to lob_python/model/sort_by2.py diff --git a/lob/model/sort_by3.py b/lob_python/model/sort_by3.py similarity index 100% rename from lob/model/sort_by3.py rename to lob_python/model/sort_by3.py diff --git a/lob/model/sort_by4.py b/lob_python/model/sort_by4.py similarity index 100% rename from lob/model/sort_by4.py rename to lob_python/model/sort_by4.py diff --git a/lob/model/sort_by5.py b/lob_python/model/sort_by5.py similarity index 100% rename from lob/model/sort_by5.py rename to lob_python/model/sort_by5.py diff --git a/lob/model/sort_by_date_modified.py b/lob_python/model/sort_by_date_modified.py similarity index 100% rename from lob/model/sort_by_date_modified.py rename to lob_python/model/sort_by_date_modified.py diff --git a/lob/model/state.py b/lob_python/model/state.py similarity index 100% rename from lob/model/state.py rename to lob_python/model/state.py diff --git a/lob/model/suggestions.py b/lob_python/model/suggestions.py similarity index 100% rename from lob/model/suggestions.py rename to lob_python/model/suggestions.py diff --git a/lob/model/template.py b/lob_python/model/template.py similarity index 100% rename from lob/model/template.py rename to lob_python/model/template.py diff --git a/lob/model/template_deletion.py b/lob_python/model/template_deletion.py similarity index 100% rename from lob/model/template_deletion.py rename to lob_python/model/template_deletion.py diff --git a/lob/model/template_html.py b/lob_python/model/template_html.py similarity index 100% rename from lob/model/template_html.py rename to lob_python/model/template_html.py diff --git a/lob/model/template_list.py b/lob_python/model/template_list.py similarity index 100% rename from lob/model/template_list.py rename to lob_python/model/template_list.py diff --git a/lob/model/template_update.py b/lob_python/model/template_update.py similarity index 100% rename from lob/model/template_update.py rename to lob_python/model/template_update.py diff --git a/lob/model/template_version.py b/lob_python/model/template_version.py similarity index 100% rename from lob/model/template_version.py rename to lob_python/model/template_version.py diff --git a/lob/model/template_version_deletion.py b/lob_python/model/template_version_deletion.py similarity index 100% rename from lob/model/template_version_deletion.py rename to lob_python/model/template_version_deletion.py diff --git a/lob/model/template_version_list.py b/lob_python/model/template_version_list.py similarity index 100% rename from lob/model/template_version_list.py rename to lob_python/model/template_version_list.py diff --git a/lob/model/template_version_updatable.py b/lob_python/model/template_version_updatable.py similarity index 100% rename from lob/model/template_version_updatable.py rename to lob_python/model/template_version_updatable.py diff --git a/lob/model/template_version_writable.py b/lob_python/model/template_version_writable.py similarity index 100% rename from lob/model/template_version_writable.py rename to lob_python/model/template_version_writable.py diff --git a/lob/model/template_writable.py b/lob_python/model/template_writable.py similarity index 100% rename from lob/model/template_writable.py rename to lob_python/model/template_writable.py diff --git a/lob/model/thumbnail.py b/lob_python/model/thumbnail.py similarity index 100% rename from lob/model/thumbnail.py rename to lob_python/model/thumbnail.py diff --git a/lob/model/tmpl_id.py b/lob_python/model/tmpl_id.py similarity index 100% rename from lob/model/tmpl_id.py rename to lob_python/model/tmpl_id.py diff --git a/lob/model/tracking_event_certified.py b/lob_python/model/tracking_event_certified.py similarity index 100% rename from lob/model/tracking_event_certified.py rename to lob_python/model/tracking_event_certified.py diff --git a/lob/model/tracking_event_details.py b/lob_python/model/tracking_event_details.py similarity index 100% rename from lob/model/tracking_event_details.py rename to lob_python/model/tracking_event_details.py diff --git a/lob/model/tracking_event_normal.py b/lob_python/model/tracking_event_normal.py similarity index 100% rename from lob/model/tracking_event_normal.py rename to lob_python/model/tracking_event_normal.py diff --git a/lob/model/upl_id.py b/lob_python/model/upl_id.py similarity index 100% rename from lob/model/upl_id.py rename to lob_python/model/upl_id.py diff --git a/lob/model/upload.py b/lob_python/model/upload.py similarity index 100% rename from lob/model/upload.py rename to lob_python/model/upload.py diff --git a/lob/model/upload_create_export.py b/lob_python/model/upload_create_export.py similarity index 100% rename from lob/model/upload_create_export.py rename to lob_python/model/upload_create_export.py diff --git a/lob/model/upload_deletion.py b/lob_python/model/upload_deletion.py similarity index 100% rename from lob/model/upload_deletion.py rename to lob_python/model/upload_deletion.py diff --git a/lob/model/upload_file.py b/lob_python/model/upload_file.py similarity index 100% rename from lob/model/upload_file.py rename to lob_python/model/upload_file.py diff --git a/lob/model/upload_list.py b/lob_python/model/upload_list.py similarity index 100% rename from lob/model/upload_list.py rename to lob_python/model/upload_list.py diff --git a/lob/model/upload_state.py b/lob_python/model/upload_state.py similarity index 100% rename from lob/model/upload_state.py rename to lob_python/model/upload_state.py diff --git a/lob/model/upload_updatable.py b/lob_python/model/upload_updatable.py similarity index 100% rename from lob/model/upload_updatable.py rename to lob_python/model/upload_updatable.py diff --git a/lob/model/upload_writable.py b/lob_python/model/upload_writable.py similarity index 100% rename from lob/model/upload_writable.py rename to lob_python/model/upload_writable.py diff --git a/lob/model/urbanization.py b/lob_python/model/urbanization.py similarity index 100% rename from lob/model/urbanization.py rename to lob_python/model/urbanization.py diff --git a/lob/model/us_auto_id.py b/lob_python/model/us_auto_id.py similarity index 100% rename from lob/model/us_auto_id.py rename to lob_python/model/us_auto_id.py diff --git a/lob/model/us_autocompletions.py b/lob_python/model/us_autocompletions.py similarity index 100% rename from lob/model/us_autocompletions.py rename to lob_python/model/us_autocompletions.py diff --git a/lob/model/us_autocompletions_writable.py b/lob_python/model/us_autocompletions_writable.py similarity index 100% rename from lob/model/us_autocompletions_writable.py rename to lob_python/model/us_autocompletions_writable.py diff --git a/lob/model/us_components.py b/lob_python/model/us_components.py similarity index 100% rename from lob/model/us_components.py rename to lob_python/model/us_components.py diff --git a/lob/model/us_ver_id.py b/lob_python/model/us_ver_id.py similarity index 100% rename from lob/model/us_ver_id.py rename to lob_python/model/us_ver_id.py diff --git a/lob/model/us_verification.py b/lob_python/model/us_verification.py similarity index 100% rename from lob/model/us_verification.py rename to lob_python/model/us_verification.py diff --git a/lob/model/us_verification_or_error.py b/lob_python/model/us_verification_or_error.py similarity index 100% rename from lob/model/us_verification_or_error.py rename to lob_python/model/us_verification_or_error.py diff --git a/lob/model/us_verifications.py b/lob_python/model/us_verifications.py similarity index 100% rename from lob/model/us_verifications.py rename to lob_python/model/us_verifications.py diff --git a/lob/model/us_verifications_writable.py b/lob_python/model/us_verifications_writable.py similarity index 100% rename from lob/model/us_verifications_writable.py rename to lob_python/model/us_verifications_writable.py diff --git a/lob/model/validation_error.py b/lob_python/model/validation_error.py similarity index 100% rename from lob/model/validation_error.py rename to lob_python/model/validation_error.py diff --git a/lob/model/vrsn_id.py b/lob_python/model/vrsn_id.py similarity index 100% rename from lob/model/vrsn_id.py rename to lob_python/model/vrsn_id.py diff --git a/lob/model/zip.py b/lob_python/model/zip.py similarity index 100% rename from lob/model/zip.py rename to lob_python/model/zip.py diff --git a/lob/model/zip_code.py b/lob_python/model/zip_code.py similarity index 100% rename from lob/model/zip_code.py rename to lob_python/model/zip_code.py diff --git a/lob/model/zip_code_plus4.py b/lob_python/model/zip_code_plus4.py similarity index 100% rename from lob/model/zip_code_plus4.py rename to lob_python/model/zip_code_plus4.py diff --git a/lob/model/zip_code_type.py b/lob_python/model/zip_code_type.py similarity index 100% rename from lob/model/zip_code_type.py rename to lob_python/model/zip_code_type.py diff --git a/lob/model/zip_editable.py b/lob_python/model/zip_editable.py similarity index 100% rename from lob/model/zip_editable.py rename to lob_python/model/zip_editable.py diff --git a/lob/model/zip_id.py b/lob_python/model/zip_id.py similarity index 100% rename from lob/model/zip_id.py rename to lob_python/model/zip_id.py diff --git a/lob/model/zip_lookup_city.py b/lob_python/model/zip_lookup_city.py similarity index 100% rename from lob/model/zip_lookup_city.py rename to lob_python/model/zip_lookup_city.py diff --git a/lob/model_utils.py b/lob_python/model_utils.py similarity index 100% rename from lob/model_utils.py rename to lob_python/model_utils.py diff --git a/lob/models/__init__.py b/lob_python/models/__init__.py similarity index 100% rename from lob/models/__init__.py rename to lob_python/models/__init__.py diff --git a/lob/rest.py b/lob_python/rest.py similarity index 100% rename from lob/rest.py rename to lob_python/rest.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..43464a6 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,9 @@ +certifi==2022.6.15 +charset-normalizer==2.1.1 +idna==3.3 +lob==4.5.4 +python-dateutil==2.8.2 +requests==2.28.1 +six==1.16.0 +urllib3==1.26.12 +python-dotenv>=0.21.0 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..11433ee --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[flake8] +max-line-length=99 diff --git a/setup.py b/setup.py index 8ea6963..dd17507 100644 --- a/setup.py +++ b/setup.py @@ -1,31 +1,44 @@ -from setuptools import setup +""" + Lob -README = open('README.md').read() + The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors.

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? # noqa: E501 + + The version of the OpenAPI document: 1.3.0 + Contact: lob-openapi@lob.com + Generated by: https://openapi-generator.tech +""" + + +from setuptools import setup, find_packages # noqa: H301 + +NAME = "lob-python" +VERSION = "5.0.0" +# To install the library, run the following +# +# python setup.py install +# +# prerequisite: setuptools +# http://pypi.python.org/pypi/setuptools + +REQUIRES = [ + "urllib3 >= 1.25.3", + "python-dateutil", +] setup( - name='lob', - version='4.5.4', - author='Lob', - author_email='support@lob.com', - packages=['lob'], - description='Lob Python Bindings', - long_description=README, - long_description_content_type="text/markdown", - url='https://github.com/lob/lob-python', - license='MIT', - install_requires=[ - 'requests' - ], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy" - ] + name=NAME, + version=VERSION, + description="Lob", + author="Lob Developer Experience", + author_email="lob-openapi@lob.com", + url="https://github.com/lob/lob-python", + keywords=["OpenAPI", "OpenAPI-Generator", "Lob"], + python_requires="", + install_requires=REQUIRES, + packages=find_packages(exclude=["test", "tests"]), + include_package_data=True, + license="MIT", + long_description="""\ + The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? # noqa: E501 + """ ) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..8f262b4 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +pytest-cov>=2.8.1 +unittest-data-provider>=1.0.1 \ No newline at end of file diff --git a/tests/Integration/test_addresses_api.py b/test/Integration/test_addresses_api.py similarity index 100% rename from tests/Integration/test_addresses_api.py rename to test/Integration/test_addresses_api.py diff --git a/tests/Integration/test_bank_accounts_api.py b/test/Integration/test_bank_accounts_api.py similarity index 100% rename from tests/Integration/test_bank_accounts_api.py rename to test/Integration/test_bank_accounts_api.py diff --git a/tests/Integration/test_billing_groups_api.py b/test/Integration/test_billing_groups_api.py similarity index 100% rename from tests/Integration/test_billing_groups_api.py rename to test/Integration/test_billing_groups_api.py diff --git a/tests/Integration/test_campaigns_api.py b/test/Integration/test_campaigns_api.py similarity index 100% rename from tests/Integration/test_campaigns_api.py rename to test/Integration/test_campaigns_api.py diff --git a/tests/Integration/test_card_orders_api.py b/test/Integration/test_card_orders_api.py similarity index 100% rename from tests/Integration/test_card_orders_api.py rename to test/Integration/test_card_orders_api.py diff --git a/tests/Integration/test_cards_api.py b/test/Integration/test_cards_api.py similarity index 100% rename from tests/Integration/test_cards_api.py rename to test/Integration/test_cards_api.py diff --git a/tests/Integration/test_checks_api.py b/test/Integration/test_checks_api.py similarity index 100% rename from tests/Integration/test_checks_api.py rename to test/Integration/test_checks_api.py diff --git a/tests/Integration/test_creatives_api.py b/test/Integration/test_creatives_api.py similarity index 100% rename from tests/Integration/test_creatives_api.py rename to test/Integration/test_creatives_api.py diff --git a/tests/Integration/test_exports_api.py b/test/Integration/test_exports_api.py similarity index 100% rename from tests/Integration/test_exports_api.py rename to test/Integration/test_exports_api.py diff --git a/tests/Integration/test_id_validation_api.py b/test/Integration/test_id_validation_api.py similarity index 100% rename from tests/Integration/test_id_validation_api.py rename to test/Integration/test_id_validation_api.py diff --git a/tests/Integration/test_intl_autocompletions_api.py b/test/Integration/test_intl_autocompletions_api.py similarity index 100% rename from tests/Integration/test_intl_autocompletions_api.py rename to test/Integration/test_intl_autocompletions_api.py diff --git a/tests/Integration/test_intl_verifications_api.py b/test/Integration/test_intl_verifications_api.py similarity index 100% rename from tests/Integration/test_intl_verifications_api.py rename to test/Integration/test_intl_verifications_api.py diff --git a/tests/Integration/test_letters_api.py b/test/Integration/test_letters_api.py similarity index 100% rename from tests/Integration/test_letters_api.py rename to test/Integration/test_letters_api.py diff --git a/tests/Integration/test_postcards_api.py b/test/Integration/test_postcards_api.py similarity index 100% rename from tests/Integration/test_postcards_api.py rename to test/Integration/test_postcards_api.py diff --git a/tests/Integration/test_reverse_geocode_lookups_api.py b/test/Integration/test_reverse_geocode_lookups_api.py similarity index 100% rename from tests/Integration/test_reverse_geocode_lookups_api.py rename to test/Integration/test_reverse_geocode_lookups_api.py diff --git a/tests/Integration/test_self_mailers_api.py b/test/Integration/test_self_mailers_api.py similarity index 100% rename from tests/Integration/test_self_mailers_api.py rename to test/Integration/test_self_mailers_api.py diff --git a/tests/Integration/test_template_versions_api.py b/test/Integration/test_template_versions_api.py similarity index 100% rename from tests/Integration/test_template_versions_api.py rename to test/Integration/test_template_versions_api.py diff --git a/tests/Integration/test_templates_api.py b/test/Integration/test_templates_api.py similarity index 100% rename from tests/Integration/test_templates_api.py rename to test/Integration/test_templates_api.py diff --git a/tests/Integration/test_uploads_api.py b/test/Integration/test_uploads_api.py similarity index 100% rename from tests/Integration/test_uploads_api.py rename to test/Integration/test_uploads_api.py diff --git a/tests/Integration/test_us_autocompletions_api.py b/test/Integration/test_us_autocompletions_api.py similarity index 100% rename from tests/Integration/test_us_autocompletions_api.py rename to test/Integration/test_us_autocompletions_api.py diff --git a/tests/Integration/test_us_verifications_api.py b/test/Integration/test_us_verifications_api.py similarity index 100% rename from tests/Integration/test_us_verifications_api.py rename to test/Integration/test_us_verifications_api.py diff --git a/tests/Integration/test_zip_lookups_api.py b/test/Integration/test_zip_lookups_api.py similarity index 100% rename from tests/Integration/test_zip_lookups_api.py rename to test/Integration/test_zip_lookups_api.py diff --git a/tests/Unit/test_addresses_api.py b/test/Unit/test_addresses_api.py similarity index 100% rename from tests/Unit/test_addresses_api.py rename to test/Unit/test_addresses_api.py diff --git a/tests/Unit/test_bank_accounts_api.py b/test/Unit/test_bank_accounts_api.py similarity index 100% rename from tests/Unit/test_bank_accounts_api.py rename to test/Unit/test_bank_accounts_api.py diff --git a/tests/Unit/test_billing_groups_api.py b/test/Unit/test_billing_groups_api.py similarity index 100% rename from tests/Unit/test_billing_groups_api.py rename to test/Unit/test_billing_groups_api.py diff --git a/tests/Unit/test_campaigns_api.py b/test/Unit/test_campaigns_api.py similarity index 100% rename from tests/Unit/test_campaigns_api.py rename to test/Unit/test_campaigns_api.py diff --git a/tests/Unit/test_card_orders_api.py b/test/Unit/test_card_orders_api.py similarity index 100% rename from tests/Unit/test_card_orders_api.py rename to test/Unit/test_card_orders_api.py diff --git a/tests/Unit/test_cards_api.py b/test/Unit/test_cards_api.py similarity index 100% rename from tests/Unit/test_cards_api.py rename to test/Unit/test_cards_api.py diff --git a/tests/Unit/test_checks_api.py b/test/Unit/test_checks_api.py similarity index 100% rename from tests/Unit/test_checks_api.py rename to test/Unit/test_checks_api.py diff --git a/tests/Unit/test_creatives_api.py b/test/Unit/test_creatives_api.py similarity index 100% rename from tests/Unit/test_creatives_api.py rename to test/Unit/test_creatives_api.py diff --git a/tests/Unit/test_exports_api.py b/test/Unit/test_exports_api.py similarity index 100% rename from tests/Unit/test_exports_api.py rename to test/Unit/test_exports_api.py diff --git a/tests/Unit/test_identity_validation_api.py b/test/Unit/test_identity_validation_api.py similarity index 100% rename from tests/Unit/test_identity_validation_api.py rename to test/Unit/test_identity_validation_api.py diff --git a/tests/Unit/test_intl_autocompletions_api.py b/test/Unit/test_intl_autocompletions_api.py similarity index 100% rename from tests/Unit/test_intl_autocompletions_api.py rename to test/Unit/test_intl_autocompletions_api.py diff --git a/tests/Unit/test_intl_verifications_api.py b/test/Unit/test_intl_verifications_api.py similarity index 100% rename from tests/Unit/test_intl_verifications_api.py rename to test/Unit/test_intl_verifications_api.py diff --git a/tests/Unit/test_letters_api.py b/test/Unit/test_letters_api.py similarity index 100% rename from tests/Unit/test_letters_api.py rename to test/Unit/test_letters_api.py diff --git a/tests/Unit/test_postcards_api.py b/test/Unit/test_postcards_api.py similarity index 100% rename from tests/Unit/test_postcards_api.py rename to test/Unit/test_postcards_api.py diff --git a/tests/Unit/test_reverse_geocode_lookups_api.py b/test/Unit/test_reverse_geocode_lookups_api.py similarity index 100% rename from tests/Unit/test_reverse_geocode_lookups_api.py rename to test/Unit/test_reverse_geocode_lookups_api.py diff --git a/tests/Unit/test_self_mailers_api.py b/test/Unit/test_self_mailers_api.py similarity index 100% rename from tests/Unit/test_self_mailers_api.py rename to test/Unit/test_self_mailers_api.py diff --git a/tests/Unit/test_template_versions_api.py b/test/Unit/test_template_versions_api.py similarity index 100% rename from tests/Unit/test_template_versions_api.py rename to test/Unit/test_template_versions_api.py diff --git a/tests/Unit/test_templates_api.py b/test/Unit/test_templates_api.py similarity index 100% rename from tests/Unit/test_templates_api.py rename to test/Unit/test_templates_api.py diff --git a/tests/Unit/test_uploads_api.py b/test/Unit/test_uploads_api.py similarity index 100% rename from tests/Unit/test_uploads_api.py rename to test/Unit/test_uploads_api.py diff --git a/tests/Unit/test_us_autocompletions_api.py b/test/Unit/test_us_autocompletions_api.py similarity index 100% rename from tests/Unit/test_us_autocompletions_api.py rename to test/Unit/test_us_autocompletions_api.py diff --git a/tests/Unit/test_zip_lookups_api.py b/test/Unit/test_zip_lookups_api.py similarity index 100% rename from tests/Unit/test_zip_lookups_api.py rename to test/Unit/test_zip_lookups_api.py diff --git a/tests/__init__.py b/test/__init__.py similarity index 100% rename from tests/__init__.py rename to test/__init__.py diff --git a/tests/assets/lobster-family.csv b/test/assets/lobster-family.csv similarity index 100% rename from tests/assets/lobster-family.csv rename to test/assets/lobster-family.csv diff --git a/tox.ini b/tox.ini index cca7c50..1531440 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,9 @@ [tox] -envlist = py27,py35,py36,py37,pypy,pypy3 +envlist = py3 [testenv] -usedevelop = True -commands = - rm -f .coverage* - pytest --cov=lob" -deps = - -r{toxinidir}/requirements.txt -whitelist_externals = rm +deps=-r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt + +commands= + pytest --cov=lob_python