diff --git a/.gitignore b/.gitignore index a655050..43995bd 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,9 @@ coverage.xml *,cover .hypothesis/ venv/ +.venv/ .python-version +.pytest_cache # Translations *.mo diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..d5fe201 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,33 @@ +# ref: https://docs.gitlab.com/ee/ci/README.html + +stages: + - test + +.nosetest: + stage: test + script: + - pip install -r requirements.txt + - pip install -r test-requirements.txt + - pytest --cov=messente_api + +nosetest-2.7: + extends: .nosetest + image: python:2.7-alpine +nosetest-3.3: + extends: .nosetest + image: python:3.3-alpine +nosetest-3.4: + extends: .nosetest + image: python:3.4-alpine +nosetest-3.5: + extends: .nosetest + image: python:3.5-alpine +nosetest-3.6: + extends: .nosetest + image: python:3.6-alpine +nosetest-3.7: + extends: .nosetest + image: python:3.7-alpine +nosetest-3.8: + extends: .nosetest + image: python:3.8-alpine diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index aa31e71..8191138 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.3 \ No newline at end of file +4.3.0 \ No newline at end of file diff --git a/README.md b/README.md index d01d103..ac49074 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Messente API Library - Messente API version: 1.2.0 -- Python package version: 1.2.0 +- Python package version: 1.2.1 [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. diff --git a/docs/BlacklistApi.md b/docs/BlacklistApi.md index e8b4ef5..9f544a9 100644 --- a/docs/BlacklistApi.md +++ b/docs/BlacklistApi.md @@ -31,15 +31,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration)) -number_to_blacklist = {"phoneNumber":"+37251000000"} # NumberToBlacklist | Phone number to be blacklisted - -try: - # Adds a phone number to the blacklist - api_instance.add_to_blacklist(number_to_blacklist) -except ApiException as e: - print("Exception when calling BlacklistApi->add_to_blacklist: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.BlacklistApi(api_client) + number_to_blacklist = {"phoneNumber":"+37251000000"} # NumberToBlacklist | Phone number to be blacklisted + + try: + # Adds a phone number to the blacklist + api_instance.add_to_blacklist(number_to_blacklist) + except ApiException as e: + print("Exception when calling BlacklistApi->add_to_blacklist: %s\n" % e) ``` ### Parameters @@ -93,15 +96,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number - -try: - # Deletes a phone number from the blacklist - api_instance.delete_from_blacklist(phone) -except ApiException as e: - print("Exception when calling BlacklistApi->delete_from_blacklist: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.BlacklistApi(api_client) + phone = '+37251000000' # str | A phone number + + try: + # Deletes a phone number from the blacklist + api_instance.delete_from_blacklist(phone) + except ApiException as e: + print("Exception when calling BlacklistApi->delete_from_blacklist: %s\n" % e) ``` ### Parameters @@ -155,15 +161,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration)) - -try: - # Returns all blacklisted phone numbers - api_response = api_instance.fetch_blacklist() - pprint(api_response) -except ApiException as e: - print("Exception when calling BlacklistApi->fetch_blacklist: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.BlacklistApi(api_client) + + try: + # Returns all blacklisted phone numbers + api_response = api_instance.fetch_blacklist() + pprint(api_response) + except ApiException as e: + print("Exception when calling BlacklistApi->fetch_blacklist: %s\n" % e) ``` ### Parameters @@ -212,15 +221,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number - -try: - # Checks if a phone number is blacklisted - api_instance.is_blacklisted(phone) -except ApiException as e: - print("Exception when calling BlacklistApi->is_blacklisted: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.BlacklistApi(api_client) + phone = '+37251000000' # str | A phone number + + try: + # Checks if a phone number is blacklisted + api_instance.is_blacklisted(phone) + except ApiException as e: + print("Exception when calling BlacklistApi->is_blacklisted: %s\n" % e) ``` ### Parameters diff --git a/docs/Channel.md b/docs/Channel.md index a76c8af..261cc84 100644 --- a/docs/Channel.md +++ b/docs/Channel.md @@ -1,5 +1,6 @@ # Channel +Defines the delivery channel ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ContactEnvelope.md b/docs/ContactEnvelope.md index cfb8cc8..05b8a9e 100644 --- a/docs/ContactEnvelope.md +++ b/docs/ContactEnvelope.md @@ -1,5 +1,6 @@ # ContactEnvelope +A container for a contact ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ContactFields.md b/docs/ContactFields.md index 3e97de7..5242003 100644 --- a/docs/ContactFields.md +++ b/docs/ContactFields.md @@ -1,5 +1,6 @@ # ContactFields +A container for fields of a contact ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ContactListEnvelope.md b/docs/ContactListEnvelope.md index 22b82de..a26300e 100644 --- a/docs/ContactListEnvelope.md +++ b/docs/ContactListEnvelope.md @@ -1,5 +1,6 @@ # ContactListEnvelope +A container for contacts ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ContactUpdateFields.md b/docs/ContactUpdateFields.md index 2628bad..c075ba5 100644 --- a/docs/ContactUpdateFields.md +++ b/docs/ContactUpdateFields.md @@ -1,5 +1,6 @@ # ContactUpdateFields +A container for fields of a contact ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index e460599..beda8c3 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -35,17 +35,20 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format phone = '+37251000000' # str | A phone number -try: - # Adds a contact to a group - api_response = api_instance.add_contact_to_group(group_id, phone) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->add_contact_to_group: %s\n" % e) + try: + # Adds a contact to a group + api_response = api_instance.add_contact_to_group(group_id, phone) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->add_contact_to_group: %s\n" % e) ``` ### Parameters @@ -101,16 +104,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -contact_fields = {"phoneNumber":"+37251000000","email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"} # ContactFields | - -try: - # Creates a new contact - api_response = api_instance.create_contact(contact_fields) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->create_contact: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + contact_fields = {"phoneNumber":"+37251000000","email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"} # ContactFields | + + try: + # Creates a new contact + api_response = api_instance.create_contact(contact_fields) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->create_contact: %s\n" % e) ``` ### Parameters @@ -164,15 +170,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number -try: - # Deletes a contact - api_instance.delete_contact(phone) -except ApiException as e: - print("Exception when calling ContactsApi->delete_contact: %s\n" % e) +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + phone = '+37251000000' # str | A phone number + + try: + # Deletes a contact + api_instance.delete_contact(phone) + except ApiException as e: + print("Exception when calling ContactsApi->delete_contact: %s\n" % e) ``` ### Parameters @@ -226,16 +235,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number -try: - # Lists a contact - api_response = api_instance.fetch_contact(phone) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->fetch_contact: %s\n" % e) +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + phone = '+37251000000' # str | A phone number + + try: + # Lists a contact + api_response = api_instance.fetch_contact(phone) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->fetch_contact: %s\n" % e) ``` ### Parameters @@ -288,16 +300,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number -try: - # Lists groups of a contact - api_response = api_instance.fetch_contact_groups(phone) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->fetch_contact_groups: %s\n" % e) +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + phone = '+37251000000' # str | A phone number + + try: + # Lists groups of a contact + api_response = api_instance.fetch_contact_groups(phone) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->fetch_contact_groups: %s\n" % e) ``` ### Parameters @@ -350,16 +365,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -group_ids = ['[\"5792a02a-e5c2-422b-a0a0-0ae65d814663\",\"4792a02a-e5c2-422b-a0a0-0ae65d814662\"]'] # list[str] | Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) - -try: - # Returns all contacts - api_response = api_instance.fetch_contacts(group_ids=group_ids) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->fetch_contacts: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + group_ids = ['[\"5792a02a-e5c2-422b-a0a0-0ae65d814663\",\"4792a02a-e5c2-422b-a0a0-0ae65d814662\"]'] # list[str] | Optional one or many group id strings in UUID format. For example: \"/contacts?groupIds=group_id_one&groupIds=group_id_two\" (optional) + + try: + # Returns all contacts + api_response = api_instance.fetch_contacts(group_ids=group_ids) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->fetch_contacts: %s\n" % e) ``` ### Parameters @@ -412,16 +430,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format phone = '+37251000000' # str | A phone number -try: - # Removes a contact from a group - api_instance.remove_contact_from_group(group_id, phone) -except ApiException as e: - print("Exception when calling ContactsApi->remove_contact_from_group: %s\n" % e) + try: + # Removes a contact from a group + api_instance.remove_contact_from_group(group_id, phone) + except ApiException as e: + print("Exception when calling ContactsApi->remove_contact_from_group: %s\n" % e) ``` ### Parameters @@ -476,17 +497,20 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.ContactsApi(messente_api.ApiClient(configuration)) -phone = '+37251000000' # str | A phone number + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.ContactsApi(api_client) + phone = '+37251000000' # str | A phone number contact_update_fields = {"email":"anyone@messente.com","firstName":"Any","lastName":"One","company":"Messente","title":"Sir","custom":"Any custom","custom2":"Any custom two","custom3":"Any custom three","custom4":"Any custom four"} # ContactUpdateFields | -try: - # Updates a contact - api_response = api_instance.update_contact(phone, contact_update_fields) - pprint(api_response) -except ApiException as e: - print("Exception when calling ContactsApi->update_contact: %s\n" % e) + try: + # Updates a contact + api_response = api_instance.update_contact(phone, contact_update_fields) + pprint(api_response) + except ApiException as e: + print("Exception when calling ContactsApi->update_contact: %s\n" % e) ``` ### Parameters diff --git a/docs/DeliveryReportApi.md b/docs/DeliveryReportApi.md index f843cf5..65ccb11 100644 --- a/docs/DeliveryReportApi.md +++ b/docs/DeliveryReportApi.md @@ -28,16 +28,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.DeliveryReportApi(messente_api.ApiClient(configuration)) -omnimessage_id = 'omnimessage_id_example' # str | UUID of the omnimessage to for which the delivery report is to be retrieved - -try: - # Retrieves the delivery report for the Omnimessage - api_response = api_instance.retrieve_delivery_report(omnimessage_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling DeliveryReportApi->retrieve_delivery_report: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.DeliveryReportApi(api_client) + omnimessage_id = 'omnimessage_id_example' # str | UUID of the omnimessage to for which the delivery report is to be retrieved + + try: + # Retrieves the delivery report for the Omnimessage + api_response = api_instance.retrieve_delivery_report(omnimessage_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling DeliveryReportApi->retrieve_delivery_report: %s\n" % e) ``` ### Parameters diff --git a/docs/DeliveryReportResponse.md b/docs/DeliveryReportResponse.md index b6b6360..37e919c 100644 --- a/docs/DeliveryReportResponse.md +++ b/docs/DeliveryReportResponse.md @@ -1,5 +1,6 @@ # DeliveryReportResponse +A container for successful delivery report response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/DeliveryResult.md b/docs/DeliveryResult.md index f038a75..f0be1e4 100644 --- a/docs/DeliveryResult.md +++ b/docs/DeliveryResult.md @@ -1,5 +1,6 @@ # DeliveryResult +A delivery report ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorCodeOmnichannel.md b/docs/ErrorCodeOmnichannel.md index c1b0288..d340d21 100644 --- a/docs/ErrorCodeOmnichannel.md +++ b/docs/ErrorCodeOmnichannel.md @@ -1,5 +1,6 @@ # ErrorCodeOmnichannel +Matches the following error title. This field is a constant * 101 - Not found * 102 - Forbidden * 103 - Unauthorized * 104 - Internal Server Error * 105 - Invalid data * 106 - Missing data * 107 - Method not allowed ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorCodeOmnichannelMachine.md b/docs/ErrorCodeOmnichannelMachine.md index 7efcc02..07ae9bc 100644 --- a/docs/ErrorCodeOmnichannelMachine.md +++ b/docs/ErrorCodeOmnichannelMachine.md @@ -1,5 +1,6 @@ # ErrorCodeOmnichannelMachine +Machine-readable error code, 'null' when the message has not been processed yet Matches the following meanings * 0 - No error * 1 - Delivery failure * 2 - Sending message expired * 3 - Invalid number * 4 - Error crediting account * 5 - Invalid number format * 6 - Too many identical messages * 7 - Sender name not allowed * 8 - Operator blacklisted * 9 - Unroutable * 10 - Seen * 999 - General temporary error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorCodePhonebook.md b/docs/ErrorCodePhonebook.md index fdc5ce8..c06d389 100644 --- a/docs/ErrorCodePhonebook.md +++ b/docs/ErrorCodePhonebook.md @@ -1,5 +1,6 @@ # ErrorCodePhonebook +Matches the following error title. This field is a constant * 201 - Invalid data * 202 - Unauthorized * 203 - Missing resource * 204 - Conflict * 244 - Client error * 205 - General error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorCodeStatistics.md b/docs/ErrorCodeStatistics.md index acecb43..0f02ffe 100644 --- a/docs/ErrorCodeStatistics.md +++ b/docs/ErrorCodeStatistics.md @@ -1,5 +1,6 @@ # ErrorCodeStatistics +Matches the following error title. This field is a constant * 100 - Client Error * 103 - Unauthorized * 104 - Invalid data * 105 - Internal Server Error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorItemNumberLookup.md b/docs/ErrorItemNumberLookup.md index becec20..03792a9 100644 --- a/docs/ErrorItemNumberLookup.md +++ b/docs/ErrorItemNumberLookup.md @@ -1,5 +1,6 @@ # ErrorItemNumberLookup +A container for Number Lookup API error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorItemNumberLookupError.md b/docs/ErrorItemNumberLookupError.md index c634005..17e5b5a 100644 --- a/docs/ErrorItemNumberLookupError.md +++ b/docs/ErrorItemNumberLookupError.md @@ -1,5 +1,6 @@ # ErrorItemNumberLookupError +Error fields container ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorItemOmnichannel.md b/docs/ErrorItemOmnichannel.md index a88f79b..c14794e 100644 --- a/docs/ErrorItemOmnichannel.md +++ b/docs/ErrorItemOmnichannel.md @@ -1,5 +1,6 @@ # ErrorItemOmnichannel +A container for Omnichannel API error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorItemPhonebook.md b/docs/ErrorItemPhonebook.md index 2212061..d0b8188 100644 --- a/docs/ErrorItemPhonebook.md +++ b/docs/ErrorItemPhonebook.md @@ -1,5 +1,6 @@ # ErrorItemPhonebook +A container for Phonebook API error ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorItemStatistics.md b/docs/ErrorItemStatistics.md index f5776f1..c518e26 100644 --- a/docs/ErrorItemStatistics.md +++ b/docs/ErrorItemStatistics.md @@ -1,5 +1,6 @@ # ErrorItemStatistics +Error fields container ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorNumberLookup.md b/docs/ErrorNumberLookup.md index 9c21aa9..446bf7b 100644 --- a/docs/ErrorNumberLookup.md +++ b/docs/ErrorNumberLookup.md @@ -1,5 +1,6 @@ # ErrorNumberLookup +A container for errors ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorOmnichannel.md b/docs/ErrorOmnichannel.md index c99d1c7..a53771f 100644 --- a/docs/ErrorOmnichannel.md +++ b/docs/ErrorOmnichannel.md @@ -1,5 +1,6 @@ # ErrorOmnichannel +A container for errors ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorPhonebook.md b/docs/ErrorPhonebook.md index 9268f29..37dfdbb 100644 --- a/docs/ErrorPhonebook.md +++ b/docs/ErrorPhonebook.md @@ -1,5 +1,6 @@ # ErrorPhonebook +A container for errors ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorStatistics.md b/docs/ErrorStatistics.md index 3031ba7..bc334b0 100644 --- a/docs/ErrorStatistics.md +++ b/docs/ErrorStatistics.md @@ -1,5 +1,6 @@ # ErrorStatistics +A container for errors ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorTitleOmnichannel.md b/docs/ErrorTitleOmnichannel.md index 4988d32..8111988 100644 --- a/docs/ErrorTitleOmnichannel.md +++ b/docs/ErrorTitleOmnichannel.md @@ -1,5 +1,6 @@ # ErrorTitleOmnichannel +Textual value which corresponds to an error code ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/ErrorTitlePhonebook.md b/docs/ErrorTitlePhonebook.md index cbd0cee..0778249 100644 --- a/docs/ErrorTitlePhonebook.md +++ b/docs/ErrorTitlePhonebook.md @@ -1,5 +1,6 @@ # ErrorTitlePhonebook +Textual value which corresponds to an error code ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/FetchBlacklistSuccess.md b/docs/FetchBlacklistSuccess.md index 5f49faf..8633347 100644 --- a/docs/FetchBlacklistSuccess.md +++ b/docs/FetchBlacklistSuccess.md @@ -1,5 +1,6 @@ # FetchBlacklistSuccess +A container for blacklisted numbers ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupEnvelope.md b/docs/GroupEnvelope.md index 84bc29b..42281ef 100644 --- a/docs/GroupEnvelope.md +++ b/docs/GroupEnvelope.md @@ -1,5 +1,6 @@ # GroupEnvelope +A container for a group ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupListEnvelope.md b/docs/GroupListEnvelope.md index ce4e0e2..2663014 100644 --- a/docs/GroupListEnvelope.md +++ b/docs/GroupListEnvelope.md @@ -1,5 +1,6 @@ # GroupListEnvelope +A container for groups ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupName.md b/docs/GroupName.md index de04bf6..5cf3225 100644 --- a/docs/GroupName.md +++ b/docs/GroupName.md @@ -1,5 +1,6 @@ # GroupName +A group name container ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupResponseFields.md b/docs/GroupResponseFields.md index 5ef7581..171255d 100644 --- a/docs/GroupResponseFields.md +++ b/docs/GroupResponseFields.md @@ -1,5 +1,6 @@ # GroupResponseFields +A container for fields of a group ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index 995de21..ef69fe2 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -32,16 +32,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.GroupsApi(messente_api.ApiClient(configuration)) -group_name = {"name":"Any group name"} # GroupName | -try: - # Creates a new group with the provided name - api_response = api_instance.create_group(group_name) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupsApi->create_group: %s\n" % e) +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.GroupsApi(api_client) + group_name = {"name":"Any group name"} # GroupName | + + try: + # Creates a new group with the provided name + api_response = api_instance.create_group(group_name) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupsApi->create_group: %s\n" % e) ``` ### Parameters @@ -94,15 +97,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.GroupsApi(messente_api.ApiClient(configuration)) -group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format - -try: - # Deletes a group - api_instance.delete_group(group_id) -except ApiException as e: - print("Exception when calling GroupsApi->delete_group: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.GroupsApi(api_client) + group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format + + try: + # Deletes a group + api_instance.delete_group(group_id) + except ApiException as e: + print("Exception when calling GroupsApi->delete_group: %s\n" % e) ``` ### Parameters @@ -155,16 +161,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.GroupsApi(messente_api.ApiClient(configuration)) -group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format - -try: - # Lists a group - api_response = api_instance.fetch_group(group_id) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupsApi->fetch_group: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.GroupsApi(api_client) + group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format + + try: + # Lists a group + api_response = api_instance.fetch_group(group_id) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupsApi->fetch_group: %s\n" % e) ``` ### Parameters @@ -216,15 +225,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.GroupsApi(messente_api.ApiClient(configuration)) - -try: - # Returns all groups - api_response = api_instance.fetch_groups() - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupsApi->fetch_groups: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.GroupsApi(api_client) + + try: + # Returns all groups + api_response = api_instance.fetch_groups() + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupsApi->fetch_groups: %s\n" % e) ``` ### Parameters @@ -273,17 +285,20 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.GroupsApi(messente_api.ApiClient(configuration)) -group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.GroupsApi(api_client) + group_id = '5792a02a-e5c2-422b-a0a0-0ae65d814663' # str | String in UUID format group_name = {"name":"Any group name"} # GroupName | -try: - # Updates a group with the provided name - api_response = api_instance.update_group(group_id, group_name) - pprint(api_response) -except ApiException as e: - print("Exception when calling GroupsApi->update_group: %s\n" % e) + try: + # Updates a group with the provided name + api_response = api_instance.update_group(group_id, group_name) + pprint(api_response) + except ApiException as e: + print("Exception when calling GroupsApi->update_group: %s\n" % e) ``` ### Parameters diff --git a/docs/MessageResult.md b/docs/MessageResult.md index 14549a2..e889aa7 100644 --- a/docs/MessageResult.md +++ b/docs/MessageResult.md @@ -1,5 +1,6 @@ # MessageResult +A message part of an omnimessage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/MobileNetwork.md b/docs/MobileNetwork.md index 50704a6..d51ed2f 100644 --- a/docs/MobileNetwork.md +++ b/docs/MobileNetwork.md @@ -1,5 +1,6 @@ # MobileNetwork +Info about the network related to the phone number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/NumberLookupApi.md b/docs/NumberLookupApi.md index c221500..ae2435c 100644 --- a/docs/NumberLookupApi.md +++ b/docs/NumberLookupApi.md @@ -28,16 +28,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.NumberLookupApi(messente_api.ApiClient(configuration)) -numbers_to_investigate = {"numbers":["+37251000000","+37251000001"]} # NumbersToInvestigate | Numbers for lookup - -try: - # Requests info about phone numbers - api_response = api_instance.fetch_info(numbers_to_investigate) - pprint(api_response) -except ApiException as e: - print("Exception when calling NumberLookupApi->fetch_info: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.NumberLookupApi(api_client) + numbers_to_investigate = {"numbers":["+37251000000","+37251000001"]} # NumbersToInvestigate | Numbers for lookup + + try: + # Requests info about phone numbers + api_response = api_instance.fetch_info(numbers_to_investigate) + pprint(api_response) + except ApiException as e: + print("Exception when calling NumberLookupApi->fetch_info: %s\n" % e) ``` ### Parameters diff --git a/docs/NumberToBlacklist.md b/docs/NumberToBlacklist.md index ac9d1d5..bd9a052 100644 --- a/docs/NumberToBlacklist.md +++ b/docs/NumberToBlacklist.md @@ -1,5 +1,6 @@ # NumberToBlacklist +A container for a soon-to-be blacklisted number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/NumbersToInvestigate.md b/docs/NumbersToInvestigate.md index bccb64d..a69bb61 100644 --- a/docs/NumbersToInvestigate.md +++ b/docs/NumbersToInvestigate.md @@ -1,5 +1,6 @@ # NumbersToInvestigate +A container for phone numbers ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OmniMessageCreateSuccessResponse.md b/docs/OmniMessageCreateSuccessResponse.md index ef5e2d4..6f8419b 100644 --- a/docs/OmniMessageCreateSuccessResponse.md +++ b/docs/OmniMessageCreateSuccessResponse.md @@ -1,5 +1,6 @@ # OmniMessageCreateSuccessResponse +A container for a response received after successfully created omnimessage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Omnimessage.md b/docs/Omnimessage.md index 4638c6b..9103cd5 100644 --- a/docs/Omnimessage.md +++ b/docs/Omnimessage.md @@ -1,5 +1,6 @@ # Omnimessage +An omnimessage ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/OmnimessageApi.md b/docs/OmnimessageApi.md index e0f907e..f0de845 100644 --- a/docs/OmnimessageApi.md +++ b/docs/OmnimessageApi.md @@ -29,15 +29,18 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.OmnimessageApi(messente_api.ApiClient(configuration)) -omnimessage_id = 'omnimessage_id_example' # str | UUID of the scheduled omnimessage to be cancelled - -try: - # Cancels a scheduled Omnimessage - api_instance.cancel_scheduled_message(omnimessage_id) -except ApiException as e: - print("Exception when calling OmnimessageApi->cancel_scheduled_message: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.OmnimessageApi(api_client) + omnimessage_id = 'omnimessage_id_example' # str | UUID of the scheduled omnimessage to be cancelled + + try: + # Cancels a scheduled Omnimessage + api_instance.cancel_scheduled_message(omnimessage_id) + except ApiException as e: + print("Exception when calling OmnimessageApi->cancel_scheduled_message: %s\n" % e) ``` ### Parameters @@ -88,16 +91,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.OmnimessageApi(messente_api.ApiClient(configuration)) -omnimessage = messente_api.Omnimessage() # Omnimessage | Omnimessage to be sent - -try: - # Sends an Omnimessage - api_response = api_instance.send_omnimessage(omnimessage) - pprint(api_response) -except ApiException as e: - print("Exception when calling OmnimessageApi->send_omnimessage: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.OmnimessageApi(api_client) + omnimessage = messente_api.Omnimessage() # Omnimessage | Omnimessage to be sent + + try: + # Sends an Omnimessage + api_response = api_instance.send_omnimessage(omnimessage) + pprint(api_response) + except ApiException as e: + print("Exception when calling OmnimessageApi->send_omnimessage: %s\n" % e) ``` ### Parameters diff --git a/docs/SMS.md b/docs/SMS.md index 05d2751..d1d1359 100644 --- a/docs/SMS.md +++ b/docs/SMS.md @@ -1,5 +1,6 @@ # SMS +SMS message content ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index 5a859ff..7444dfa 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -28,16 +28,19 @@ configuration.password = 'YOUR_PASSWORD' # Defining host is optional and default to https://api.messente.com/v1 configuration.host = "https://api.messente.com/v1" -# Create an instance of the API class -api_instance = messente_api.StatisticsApi(messente_api.ApiClient(configuration)) -statistics_report_settings = {"start_date":"2017-01-01","end_date":"2019-06-20","message_types":["sms"]} # StatisticsReportSettings | Settings for statistics report - -try: - # Requests statistics reports for each country - api_response = api_instance.create_statistics_report(statistics_report_settings) - pprint(api_response) -except ApiException as e: - print("Exception when calling StatisticsApi->create_statistics_report: %s\n" % e) + +# Enter a context with an instance of the API client +with messente_api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = messente_api.StatisticsApi(api_client) + statistics_report_settings = {"start_date":"2017-01-01","end_date":"2019-06-20","message_types":["sms"]} # StatisticsReportSettings | Settings for statistics report + + try: + # Requests statistics reports for each country + api_response = api_instance.create_statistics_report(statistics_report_settings) + pprint(api_response) + except ApiException as e: + print("Exception when calling StatisticsApi->create_statistics_report: %s\n" % e) ``` ### Parameters diff --git a/docs/StatisticsReport.md b/docs/StatisticsReport.md index 6052b9a..c805b76 100644 --- a/docs/StatisticsReport.md +++ b/docs/StatisticsReport.md @@ -1,5 +1,6 @@ # StatisticsReport +Report for one country ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/StatisticsReportSettings.md b/docs/StatisticsReportSettings.md index ab97820..108ffcd 100644 --- a/docs/StatisticsReportSettings.md +++ b/docs/StatisticsReportSettings.md @@ -1,5 +1,6 @@ # StatisticsReportSettings +A container for statistics report settings ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/StatisticsReportSuccess.md b/docs/StatisticsReportSuccess.md index 67fda84..eafaca2 100644 --- a/docs/StatisticsReportSuccess.md +++ b/docs/StatisticsReportSuccess.md @@ -1,5 +1,6 @@ # StatisticsReportSuccess +A container for statistics reports ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Status.md b/docs/Status.md index 347eb0b..1b712fa 100644 --- a/docs/Status.md +++ b/docs/Status.md @@ -1,5 +1,6 @@ # Status +The human-readable equivalent for this field is contained in \"error\". This value is *null* if the message is still being processed ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/SyncNumberLookupResult.md b/docs/SyncNumberLookupResult.md index ae5ab14..bc82167 100644 --- a/docs/SyncNumberLookupResult.md +++ b/docs/SyncNumberLookupResult.md @@ -1,5 +1,6 @@ # SyncNumberLookupResult +Info about a phone number ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/SyncNumberLookupSuccess.md b/docs/SyncNumberLookupSuccess.md index ec4cbb3..5493bd6 100644 --- a/docs/SyncNumberLookupSuccess.md +++ b/docs/SyncNumberLookupSuccess.md @@ -1,5 +1,6 @@ # SyncNumberLookupSuccess +A container for number lookup response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Telegram.md b/docs/Telegram.md index a407443..897ca30 100644 --- a/docs/Telegram.md +++ b/docs/Telegram.md @@ -1,5 +1,6 @@ # Telegram +Telegram message content ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/TextStore.md b/docs/TextStore.md index 8f97f95..5d87ec0 100644 --- a/docs/TextStore.md +++ b/docs/TextStore.md @@ -1,5 +1,6 @@ # TextStore +Whether to store message content as is (plaintext), as a hashed value (sha256) or not at all (nostore) ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/Viber.md b/docs/Viber.md index 75b138f..9dc788e 100644 --- a/docs/Viber.md +++ b/docs/Viber.md @@ -1,5 +1,6 @@ # Viber +Viber message content ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/WhatsApp.md b/docs/WhatsApp.md index 191e095..c38ccd1 100644 --- a/docs/WhatsApp.md +++ b/docs/WhatsApp.md @@ -1,5 +1,6 @@ # WhatsApp +WhatsApp message content. Only one of \"text\", \"image\", \"document\" or \"audio\" can be provided ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/WhatsAppAudio.md b/docs/WhatsAppAudio.md index 5934ca4..fc345fb 100644 --- a/docs/WhatsAppAudio.md +++ b/docs/WhatsAppAudio.md @@ -1,5 +1,6 @@ # WhatsAppAudio +A sound ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/WhatsAppDocument.md b/docs/WhatsAppDocument.md index 08b9968..1a269d2 100644 --- a/docs/WhatsAppDocument.md +++ b/docs/WhatsAppDocument.md @@ -1,5 +1,6 @@ # WhatsAppDocument +A document ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/WhatsAppImage.md b/docs/WhatsAppImage.md index 8a28102..1911c31 100644 --- a/docs/WhatsAppImage.md +++ b/docs/WhatsAppImage.md @@ -1,5 +1,6 @@ # WhatsAppImage +An image ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/docs/WhatsAppText.md b/docs/WhatsAppText.md index fc48d73..661c1bf 100644 --- a/docs/WhatsAppText.md +++ b/docs/WhatsAppText.md @@ -1,5 +1,6 @@ # WhatsAppText +A text ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/git_push.sh b/git_push.sh index 8442b80..ced3be2 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,11 +1,17 @@ #!/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-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-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" @@ -28,7 +34,7 @@ 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. +# Commits the tracked changes and prepares them to be pushed to a remote repository. git commit -m "$release_note" # Sets the new remote @@ -37,9 +43,9 @@ 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://github.com/${git_user_id}/${git_repo_id}.git + 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}@github.com/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -47,6 +53,6 @@ fi git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +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/messente_api/__init__.py b/messente_api/__init__.py index 1dc51d5..a933fd9 100644 --- a/messente_api/__init__.py +++ b/messente_api/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "1.2.0" +__version__ = "1.2.1" # import apis into sdk package from messente_api.api.blacklist_api import BlacklistApi diff --git a/messente_api/api/blacklist_api.py b/messente_api/api/blacklist_api.py index 764d6e9..a860f26 100644 --- a/messente_api/api/blacklist_api.py +++ b/messente_api/api/blacklist_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def add_to_blacklist_with_http_info(self, number_to_blacklist, **kwargs): # noq local_var_params = locals() - all_params = ['number_to_blacklist'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'number_to_blacklist' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def add_to_blacklist_with_http_info(self, number_to_blacklist, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'number_to_blacklist' is set - if ('number_to_blacklist' not in local_var_params or - local_var_params['number_to_blacklist'] is None): + if self.api_client.client_side_validation and ('number_to_blacklist' not in local_var_params or # noqa: E501 + local_var_params['number_to_blacklist'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `number_to_blacklist` when calling `add_to_blacklist`") # noqa: E501 collection_formats = {} @@ -197,11 +203,17 @@ def delete_from_blacklist_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -212,8 +224,8 @@ def delete_from_blacklist_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `delete_from_blacklist`") # noqa: E501 collection_formats = {} @@ -301,11 +313,16 @@ def fetch_blacklist_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -401,11 +418,17 @@ def is_blacklisted_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -416,8 +439,8 @@ def is_blacklisted_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `is_blacklisted`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/contacts_api.py b/messente_api/api/contacts_api.py index 32a0683..3a7d328 100644 --- a/messente_api/api/contacts_api.py +++ b/messente_api/api/contacts_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -89,11 +89,18 @@ def add_contact_to_group_with_http_info(self, group_id, phone, **kwargs): # noq local_var_params = locals() - all_params = ['group_id', 'phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_id', + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -104,12 +111,12 @@ def add_contact_to_group_with_http_info(self, group_id, phone, **kwargs): # noq local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set - if ('group_id' not in local_var_params or - local_var_params['group_id'] is None): + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `add_contact_to_group`") # noqa: E501 # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `add_contact_to_group`") # noqa: E501 collection_formats = {} @@ -201,11 +208,17 @@ def create_contact_with_http_info(self, contact_fields, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['contact_fields'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'contact_fields' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -216,8 +229,8 @@ def create_contact_with_http_info(self, contact_fields, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'contact_fields' is set - if ('contact_fields' not in local_var_params or - local_var_params['contact_fields'] is None): + if self.api_client.client_side_validation and ('contact_fields' not in local_var_params or # noqa: E501 + local_var_params['contact_fields'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `contact_fields` when calling `create_contact`") # noqa: E501 collection_formats = {} @@ -311,11 +324,17 @@ def delete_contact_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -326,8 +345,8 @@ def delete_contact_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `delete_contact`") # noqa: E501 collection_formats = {} @@ -417,11 +436,17 @@ def fetch_contact_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -432,8 +457,8 @@ def fetch_contact_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `fetch_contact`") # noqa: E501 collection_formats = {} @@ -523,11 +548,17 @@ def fetch_contact_groups_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -538,8 +569,8 @@ def fetch_contact_groups_with_http_info(self, phone, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `fetch_contact_groups`") # noqa: E501 collection_formats = {} @@ -629,11 +660,17 @@ def fetch_contacts_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['group_ids'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_ids' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -649,7 +686,7 @@ def fetch_contacts_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] - if 'group_ids' in local_var_params: + if 'group_ids' in local_var_params and local_var_params['group_ids'] is not None: # noqa: E501 query_params.append(('groupIds', local_var_params['group_ids'])) # noqa: E501 collection_formats['groupIds'] = 'multi' # noqa: E501 @@ -734,11 +771,18 @@ def remove_contact_from_group_with_http_info(self, group_id, phone, **kwargs): local_var_params = locals() - all_params = ['group_id', 'phone'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_id', + 'phone' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -749,12 +793,12 @@ def remove_contact_from_group_with_http_info(self, group_id, phone, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set - if ('group_id' not in local_var_params or - local_var_params['group_id'] is None): + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `remove_contact_from_group`") # noqa: E501 # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `remove_contact_from_group`") # noqa: E501 collection_formats = {} @@ -848,11 +892,18 @@ def update_contact_with_http_info(self, phone, contact_update_fields, **kwargs): local_var_params = locals() - all_params = ['phone', 'contact_update_fields'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'phone', + 'contact_update_fields' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -863,12 +914,12 @@ def update_contact_with_http_info(self, phone, contact_update_fields, **kwargs): local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'phone' is set - if ('phone' not in local_var_params or - local_var_params['phone'] is None): + if self.api_client.client_side_validation and ('phone' not in local_var_params or # noqa: E501 + local_var_params['phone'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `phone` when calling `update_contact`") # noqa: E501 # verify the required parameter 'contact_update_fields' is set - if ('contact_update_fields' not in local_var_params or - local_var_params['contact_update_fields'] is None): + if self.api_client.client_side_validation and ('contact_update_fields' not in local_var_params or # noqa: E501 + local_var_params['contact_update_fields'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `contact_update_fields` when calling `update_contact`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/delivery_report_api.py b/messente_api/api/delivery_report_api.py index f842840..6fb63a2 100644 --- a/messente_api/api/delivery_report_api.py +++ b/messente_api/api/delivery_report_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def retrieve_delivery_report_with_http_info(self, omnimessage_id, **kwargs): # local_var_params = locals() - all_params = ['omnimessage_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'omnimessage_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def retrieve_delivery_report_with_http_info(self, omnimessage_id, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'omnimessage_id' is set - if ('omnimessage_id' not in local_var_params or - local_var_params['omnimessage_id'] is None): + if self.api_client.client_side_validation and ('omnimessage_id' not in local_var_params or # noqa: E501 + local_var_params['omnimessage_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `omnimessage_id` when calling `retrieve_delivery_report`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/groups_api.py b/messente_api/api/groups_api.py index 6c06048..a216009 100644 --- a/messente_api/api/groups_api.py +++ b/messente_api/api/groups_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def create_group_with_http_info(self, group_name, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['group_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def create_group_with_http_info(self, group_name, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_name' is set - if ('group_name' not in local_var_params or - local_var_params['group_name'] is None): + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_name` when calling `create_group`") # noqa: E501 collection_formats = {} @@ -197,11 +203,17 @@ def delete_group_with_http_info(self, group_id, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['group_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -212,8 +224,8 @@ def delete_group_with_http_info(self, group_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set - if ('group_id' not in local_var_params or - local_var_params['group_id'] is None): + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `delete_group`") # noqa: E501 collection_formats = {} @@ -303,11 +315,17 @@ def fetch_group_with_http_info(self, group_id, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['group_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -318,8 +336,8 @@ def fetch_group_with_http_info(self, group_id, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set - if ('group_id' not in local_var_params or - local_var_params['group_id'] is None): + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `fetch_group`") # noqa: E501 collection_formats = {} @@ -407,11 +425,16 @@ def fetch_groups_with_http_info(self, **kwargs): # noqa: E501 local_var_params = locals() - all_params = [] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -509,11 +532,18 @@ def update_group_with_http_info(self, group_id, group_name, **kwargs): # noqa: local_var_params = locals() - all_params = ['group_id', 'group_name'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'group_id', + 'group_name' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -524,12 +554,12 @@ def update_group_with_http_info(self, group_id, group_name, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'group_id' is set - if ('group_id' not in local_var_params or - local_var_params['group_id'] is None): + if self.api_client.client_side_validation and ('group_id' not in local_var_params or # noqa: E501 + local_var_params['group_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_id` when calling `update_group`") # noqa: E501 # verify the required parameter 'group_name' is set - if ('group_name' not in local_var_params or - local_var_params['group_name'] is None): + if self.api_client.client_side_validation and ('group_name' not in local_var_params or # noqa: E501 + local_var_params['group_name'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `group_name` when calling `update_group`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/number_lookup_api.py b/messente_api/api/number_lookup_api.py index a4289fe..72f63da 100644 --- a/messente_api/api/number_lookup_api.py +++ b/messente_api/api/number_lookup_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def fetch_info_with_http_info(self, numbers_to_investigate, **kwargs): # noqa: local_var_params = locals() - all_params = ['numbers_to_investigate'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'numbers_to_investigate' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def fetch_info_with_http_info(self, numbers_to_investigate, **kwargs): # noqa: local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'numbers_to_investigate' is set - if ('numbers_to_investigate' not in local_var_params or - local_var_params['numbers_to_investigate'] is None): + if self.api_client.client_side_validation and ('numbers_to_investigate' not in local_var_params or # noqa: E501 + local_var_params['numbers_to_investigate'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `numbers_to_investigate` when calling `fetch_info`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/omnimessage_api.py b/messente_api/api/omnimessage_api.py index add1f5a..cbc7f33 100644 --- a/messente_api/api/omnimessage_api.py +++ b/messente_api/api/omnimessage_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def cancel_scheduled_message_with_http_info(self, omnimessage_id, **kwargs): # local_var_params = locals() - all_params = ['omnimessage_id'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'omnimessage_id' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def cancel_scheduled_message_with_http_info(self, omnimessage_id, **kwargs): # local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'omnimessage_id' is set - if ('omnimessage_id' not in local_var_params or - local_var_params['omnimessage_id'] is None): + if self.api_client.client_side_validation and ('omnimessage_id' not in local_var_params or # noqa: E501 + local_var_params['omnimessage_id'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `omnimessage_id` when calling `cancel_scheduled_message`") # noqa: E501 collection_formats = {} @@ -193,11 +199,17 @@ def send_omnimessage_with_http_info(self, omnimessage, **kwargs): # noqa: E501 local_var_params = locals() - all_params = ['omnimessage'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'omnimessage' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -208,8 +220,8 @@ def send_omnimessage_with_http_info(self, omnimessage, **kwargs): # noqa: E501 local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'omnimessage' is set - if ('omnimessage' not in local_var_params or - local_var_params['omnimessage'] is None): + if self.api_client.client_side_validation and ('omnimessage' not in local_var_params or # noqa: E501 + local_var_params['omnimessage'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `omnimessage` when calling `send_omnimessage`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api/statistics_api.py b/messente_api/api/statistics_api.py index c390f87..3b51b06 100644 --- a/messente_api/api/statistics_api.py +++ b/messente_api/api/statistics_api.py @@ -19,7 +19,7 @@ import six from messente_api.api_client import ApiClient -from messente_api.exceptions import ( +from messente_api.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) @@ -87,11 +87,17 @@ def create_statistics_report_with_http_info(self, statistics_report_settings, ** local_var_params = locals() - all_params = ['statistics_report_settings'] # noqa: E501 - all_params.append('async_req') - all_params.append('_return_http_data_only') - all_params.append('_preload_content') - all_params.append('_request_timeout') + all_params = [ + 'statistics_report_settings' + ] + all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout' + ] + ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: @@ -102,8 +108,8 @@ def create_statistics_report_with_http_info(self, statistics_report_settings, ** local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'statistics_report_settings' is set - if ('statistics_report_settings' not in local_var_params or - local_var_params['statistics_report_settings'] is None): + if self.api_client.client_side_validation and ('statistics_report_settings' not in local_var_params or # noqa: E501 + local_var_params['statistics_report_settings'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `statistics_report_settings` when calling `create_statistics_report`") # noqa: E501 collection_formats = {} diff --git a/messente_api/api_client.py b/messente_api/api_client.py index 34f8e67..b1a1983 100644 --- a/messente_api/api_client.py +++ b/messente_api/api_client.py @@ -11,7 +11,9 @@ from __future__ import absolute_import +import atexit import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -67,7 +69,7 @@ class ApiClient(object): def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration self.pool_threads = pool_threads @@ -77,13 +79,22 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.2.0/python' + self.user_agent = 'OpenAPI-Generator/1.2.1/python' + self.client_side_validation = configuration.client_side_validation - def __del__(self): + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): if self._pool: self._pool.close() self._pool.join() self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) @property def pool(self): @@ -91,6 +102,7 @@ def pool(self): avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: + atexit.register(self.close) self._pool = ThreadPool(self.pool_threads) return self._pool @@ -287,7 +299,7 @@ def __deserialize(self, data, klass): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -340,18 +352,19 @@ def call_api(self, resource_path, method, response_type, auth_settings, _return_http_data_only, collection_formats, _preload_content, _request_timeout, _host) - else: - thread = self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, query_params, - header_params, body, - post_params, files, - response_type, auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host)) - return thread + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -373,10 +386,8 @@ def request(self, method, url, query_params=None, headers=None, return self.rest_client.OPTIONS(url, query_params=query_params, headers=headers, - post_params=post_params, _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, @@ -513,9 +524,7 @@ def update_params_for_auth(self, headers, querys, auth_settings): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue - elif auth_setting['in'] == 'cookie': + if auth_setting['in'] == 'cookie': headers['Cookie'] = auth_setting['value'] elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] @@ -579,7 +588,6 @@ def __deserialize_date(self, string): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -589,7 +597,7 @@ def __deserialize_date(self, string): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -598,7 +606,6 @@ def __deserialize_datatime(self, string): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string @@ -624,11 +631,11 @@ def __deserialize_model(self, data, klass): return data kwargs = {} - if klass.openapi_types is not None: + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): for attr, attr_type in six.iteritems(klass.openapi_types): - if (data is not None and - klass.attribute_map[attr] in data and - isinstance(data, (list, dict))): + if klass.attribute_map[attr] in data: value = data[klass.attribute_map[attr]] kwargs[attr] = self.__deserialize(value, attr_type) diff --git a/messente_api/configuration.py b/messente_api/configuration.py index 0c8bb51..8fd81dd 100644 --- a/messente_api/configuration.py +++ b/messente_api/configuration.py @@ -23,36 +23,58 @@ from six.moves import http_client as httplib -class TypeWithDefault(type): - def __init__(cls, name, bases, dct): - super(TypeWithDefault, cls).__init__(name, bases, dct) - cls._default = None - - def __call__(cls, **kwargs): - if cls._default is None: - cls._default = type.__call__(cls, **kwargs) - return copy.copy(cls._default) - - def set_default(cls, default): - cls._default = copy.copy(default) - - -class Configuration(six.with_metaclass(TypeWithDefault, object)): +class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. :param host: Base url - :param api_key: Dict to store API key(s) + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. :param username: Username for HTTP basic authentication :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + + :Example: + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + conf = messente_api.Configuration( + username='the-user', + password='the-password', + ) """ + _default = None + def __init__(self, host="https://api.messente.com/v1", - api_key={}, api_key_prefix={}, - username="", password=""): + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): """Constructor """ self.host = host @@ -62,18 +84,26 @@ def __init__(self, host="https://api.messente.com/v1", """Temp file folder for downloading files """ # Authentication Settings - self.api_key = api_key + self.api_key = {} + if api_key: + self.api_key = api_key """dict to store API key(s) """ - self.api_key_prefix = api_key_prefix + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix """dict to store API prefix (e.g. Bearer) """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ self.username = username """Username for HTTP basic authentication """ self.password = password """Password for HTTP basic authentication """ + self.discard_unknown_keys = discard_unknown_keys self.logger = {} """Logging Settings """ @@ -133,6 +163,47 @@ def __init__(self, host="https://api.messente.com/v1", self.retries = None """Adding retries to override urllib3 default value 3 """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + @classmethod + def set_default(cls, default): + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property def logger_file(self): @@ -225,19 +296,29 @@ def get_api_key_with_prefix(self, identifier): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if (self.api_key.get(identifier) and - self.api_key_prefix.get(identifier)): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 - elif self.api_key.get(identifier): - return self.api_key[identifier] + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -245,15 +326,15 @@ def auth_settings(self): :return: The Auth Settings information dict. """ - return { - 'basicAuth': - { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - }, - } + auth = {} + if self.username is not None and self.password is not None: + auth['basicAuth'] = { + 'type': 'basic', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_basic_auth_token() + } + return auth def to_debug_report(self): """Gets the essential information for debugging. @@ -264,7 +345,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.2.0".\ + "SDK Package Version: 1.2.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): @@ -279,41 +360,37 @@ def get_host_settings(self): } ] - def get_host_from_settings(self, index, variables={}): + def get_host_from_settings(self, index, variables=None): """Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :return: URL based on host settings """ - + variables = {} if variables is None else variables servers = self.get_host_settings() - # check array index out of bound - if index < 0 or index >= len(servers): + try: + server = servers[index] + except IndexError: raise ValueError( - "Invalid index {} when selecting the host settings. Must be less than {}" # noqa: E501 - .format(index, len(servers))) + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) - server = servers[index] url = server['url'] - # go through variable and assign a value - for variable_name in server['variables']: - if variable_name in variables: - if variables[variable_name] in server['variables'][ - variable_name]['enum_values']: - url = url.replace("{" + variable_name + "}", - variables[variable_name]) - else: - raise ValueError( - "The variable `{}` in the host URL has invalid value {}. Must be {}." # noqa: E501 - .format( - variable_name, variables[variable_name], - server['variables'][variable_name]['enum_values'])) - else: - # use default value - url = url.replace( - "{" + variable_name + "}", - server['variables'][variable_name]['default_value']) + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) return url diff --git a/messente_api/models/channel.py b/messente_api/models/channel.py index 4ba0006..1f79e65 100644 --- a/messente_api/models/channel.py +++ b/messente_api/models/channel.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class Channel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class Channel(object): WHATSAPP = "whatsapp" TELEGRAM = "telegram" + allowable_values = [SMS, VIBER, WHATSAPP, TELEGRAM] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class Channel(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """Channel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, Channel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Channel): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/contact_envelope.py b/messente_api/models/contact_envelope.py index 2463b1d..58642cc 100644 --- a/messente_api/models/contact_envelope.py +++ b/messente_api/models/contact_envelope.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ContactEnvelope(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ContactEnvelope(object): 'contact': 'contact' } - def __init__(self, contact=None): # noqa: E501 + def __init__(self, contact=None, local_vars_configuration=None): # noqa: E501 """ContactEnvelope - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._contact = None self.discriminator = None @@ -106,8 +111,11 @@ def __eq__(self, other): if not isinstance(other, ContactEnvelope): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ContactEnvelope): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/contact_fields.py b/messente_api/models/contact_fields.py index 5f7760e..5cfe7a7 100644 --- a/messente_api/models/contact_fields.py +++ b/messente_api/models/contact_fields.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ContactFields(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -57,8 +59,11 @@ class ContactFields(object): 'custom4': 'custom4' } - def __init__(self, phone_number=None, email=None, first_name=None, last_name=None, company=None, title=None, custom=None, custom2=None, custom3=None, custom4=None): # noqa: E501 + def __init__(self, phone_number=None, email=None, first_name=None, last_name=None, company=None, title=None, custom=None, custom2=None, custom3=None, custom4=None, local_vars_configuration=None): # noqa: E501 """ContactFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._phone_number = None self._email = None @@ -103,7 +108,7 @@ def phone_number(self, phone_number): :param phone_number: The phone_number of this ContactFields. # noqa: E501 :type: str """ - if phone_number is None: + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 self._phone_number = phone_number @@ -352,8 +357,11 @@ def __eq__(self, other): if not isinstance(other, ContactFields): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ContactFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/contact_list_envelope.py b/messente_api/models/contact_list_envelope.py index d170859..f9f1e00 100644 --- a/messente_api/models/contact_list_envelope.py +++ b/messente_api/models/contact_list_envelope.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ContactListEnvelope(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ContactListEnvelope(object): 'contacts': 'contacts' } - def __init__(self, contacts=None): # noqa: E501 + def __init__(self, contacts=None, local_vars_configuration=None): # noqa: E501 """ContactListEnvelope - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._contacts = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, ContactListEnvelope): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ContactListEnvelope): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/contact_update_fields.py b/messente_api/models/contact_update_fields.py index afa82bc..9ac05bf 100644 --- a/messente_api/models/contact_update_fields.py +++ b/messente_api/models/contact_update_fields.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ContactUpdateFields(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -55,8 +57,11 @@ class ContactUpdateFields(object): 'custom4': 'custom4' } - def __init__(self, email=None, first_name=None, last_name=None, company=None, title=None, custom=None, custom2=None, custom3=None, custom4=None): # noqa: E501 + def __init__(self, email=None, first_name=None, last_name=None, company=None, title=None, custom=None, custom2=None, custom3=None, custom4=None, local_vars_configuration=None): # noqa: E501 """ContactUpdateFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._email = None self._first_name = None @@ -323,8 +328,11 @@ def __eq__(self, other): if not isinstance(other, ContactUpdateFields): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ContactUpdateFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/delivery_report_response.py b/messente_api/models/delivery_report_response.py index 1e1fcd9..ed6f957 100644 --- a/messente_api/models/delivery_report_response.py +++ b/messente_api/models/delivery_report_response.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class DeliveryReportResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class DeliveryReportResponse(object): 'omnimessage_id': 'omnimessage_id' } - def __init__(self, statuses=None, to=None, omnimessage_id=None): # noqa: E501 + def __init__(self, statuses=None, to=None, omnimessage_id=None, local_vars_configuration=None): # noqa: E501 """DeliveryReportResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._statuses = None self._to = None @@ -75,7 +80,7 @@ def statuses(self, statuses): :param statuses: The statuses of this DeliveryReportResponse. # noqa: E501 :type: list[DeliveryResult] """ - if statuses is None: + if self.local_vars_configuration.client_side_validation and statuses is None: # noqa: E501 raise ValueError("Invalid value for `statuses`, must not be `None`") # noqa: E501 self._statuses = statuses @@ -100,7 +105,7 @@ def to(self, to): :param to: The to of this DeliveryReportResponse. # noqa: E501 :type: str """ - if to is None: + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 self._to = to @@ -125,7 +130,7 @@ def omnimessage_id(self, omnimessage_id): :param omnimessage_id: The omnimessage_id of this DeliveryReportResponse. # noqa: E501 :type: str """ - if omnimessage_id is None: + if self.local_vars_configuration.client_side_validation and omnimessage_id is None: # noqa: E501 raise ValueError("Invalid value for `omnimessage_id`, must not be `None`") # noqa: E501 self._omnimessage_id = omnimessage_id @@ -167,8 +172,11 @@ def __eq__(self, other): if not isinstance(other, DeliveryReportResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DeliveryReportResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/delivery_result.py b/messente_api/models/delivery_result.py index ebfb6c7..21c0e8e 100644 --- a/messente_api/models/delivery_result.py +++ b/messente_api/models/delivery_result.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class DeliveryResult(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class DeliveryResult(object): 'timestamp': 'timestamp' } - def __init__(self, status=None, channel=None, message_id=None, error=None, err=None, timestamp=None): # noqa: E501 + def __init__(self, status=None, channel=None, message_id=None, error=None, err=None, timestamp=None, local_vars_configuration=None): # noqa: E501 """DeliveryResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._status = None self._channel = None @@ -242,8 +247,11 @@ def __eq__(self, other): if not isinstance(other, DeliveryResult): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, DeliveryResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_code_omnichannel.py b/messente_api/models/error_code_omnichannel.py index 6c312df..997accc 100644 --- a/messente_api/models/error_code_omnichannel.py +++ b/messente_api/models/error_code_omnichannel.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorCodeOmnichannel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -35,6 +37,8 @@ class ErrorCodeOmnichannel(object): _106 = "106" _107 = "107" + allowable_values = [_101, _102, _103, _104, _105, _106, _107] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -48,8 +52,11 @@ class ErrorCodeOmnichannel(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorCodeOmnichannel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -89,8 +96,11 @@ def __eq__(self, other): if not isinstance(other, ErrorCodeOmnichannel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorCodeOmnichannel): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_code_omnichannel_machine.py b/messente_api/models/error_code_omnichannel_machine.py index eaff84c..a2c0da9 100644 --- a/messente_api/models/error_code_omnichannel_machine.py +++ b/messente_api/models/error_code_omnichannel_machine.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorCodeOmnichannelMachine(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -40,6 +42,8 @@ class ErrorCodeOmnichannelMachine(object): _10 = "10" _999 = "999" + allowable_values = [_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _999] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -53,8 +57,11 @@ class ErrorCodeOmnichannelMachine(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorCodeOmnichannelMachine - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -94,8 +101,11 @@ def __eq__(self, other): if not isinstance(other, ErrorCodeOmnichannelMachine): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorCodeOmnichannelMachine): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_code_phonebook.py b/messente_api/models/error_code_phonebook.py index 955eb7b..b9bea0a 100644 --- a/messente_api/models/error_code_phonebook.py +++ b/messente_api/models/error_code_phonebook.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorCodePhonebook(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -34,6 +36,8 @@ class ErrorCodePhonebook(object): _244 = "244" _205 = "205" + allowable_values = [_201, _202, _203, _204, _244, _205] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -47,8 +51,11 @@ class ErrorCodePhonebook(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorCodePhonebook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -88,8 +95,11 @@ def __eq__(self, other): if not isinstance(other, ErrorCodePhonebook): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorCodePhonebook): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_code_statistics.py b/messente_api/models/error_code_statistics.py index 8bb9020..11a3e86 100644 --- a/messente_api/models/error_code_statistics.py +++ b/messente_api/models/error_code_statistics.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorCodeStatistics(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -32,6 +34,8 @@ class ErrorCodeStatistics(object): _104 = "104" _105 = "105" + allowable_values = [_100, _103, _104, _105] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -45,8 +49,11 @@ class ErrorCodeStatistics(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorCodeStatistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -86,8 +93,11 @@ def __eq__(self, other): if not isinstance(other, ErrorCodeStatistics): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorCodeStatistics): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_item_number_lookup.py b/messente_api/models/error_item_number_lookup.py index e398f8e..ab58909 100644 --- a/messente_api/models/error_item_number_lookup.py +++ b/messente_api/models/error_item_number_lookup.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorItemNumberLookup(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ErrorItemNumberLookup(object): 'error': 'error' } - def __init__(self, error=None): # noqa: E501 + def __init__(self, error=None, local_vars_configuration=None): # noqa: E501 """ErrorItemNumberLookup - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._error = None self.discriminator = None @@ -65,7 +70,7 @@ def error(self, error): :param error: The error of this ErrorItemNumberLookup. # noqa: E501 :type: ErrorItemNumberLookupError """ - if error is None: + if self.local_vars_configuration.client_side_validation and error is None: # noqa: E501 raise ValueError("Invalid value for `error`, must not be `None`") # noqa: E501 self._error = error @@ -107,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, ErrorItemNumberLookup): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorItemNumberLookup): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_item_number_lookup_error.py b/messente_api/models/error_item_number_lookup_error.py index 44e5c9f..97d29f2 100644 --- a/messente_api/models/error_item_number_lookup_error.py +++ b/messente_api/models/error_item_number_lookup_error.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorItemNumberLookupError(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class ErrorItemNumberLookupError(object): 'code': 'code' } - def __init__(self, description=None, code=None): # noqa: E501 + def __init__(self, description=None, code=None, local_vars_configuration=None): # noqa: E501 """ErrorItemNumberLookupError - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._description = None self._code = None @@ -71,7 +76,7 @@ def description(self, description): :param description: The description of this ErrorItemNumberLookupError. # noqa: E501 :type: str """ - if description is None: + if self.local_vars_configuration.client_side_validation and description is None: # noqa: E501 raise ValueError("Invalid value for `description`, must not be `None`") # noqa: E501 self._description = description @@ -96,11 +101,13 @@ def code(self, code): :param code: The code of this ErrorItemNumberLookupError. # noqa: E501 :type: int """ - if code is None: + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 - if code is not None and code > 106: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and code > 106): # noqa: E501 raise ValueError("Invalid value for `code`, must be a value less than or equal to `106`") # noqa: E501 - if code is not None and code < 101: # noqa: E501 + if (self.local_vars_configuration.client_side_validation and + code is not None and code < 101): # noqa: E501 raise ValueError("Invalid value for `code`, must be a value greater than or equal to `101`") # noqa: E501 self._code = code @@ -142,8 +149,11 @@ def __eq__(self, other): if not isinstance(other, ErrorItemNumberLookupError): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorItemNumberLookupError): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_item_omnichannel.py b/messente_api/models/error_item_omnichannel.py index 2828d47..59b4486 100644 --- a/messente_api/models/error_item_omnichannel.py +++ b/messente_api/models/error_item_omnichannel.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorItemOmnichannel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class ErrorItemOmnichannel(object): 'source': 'source' } - def __init__(self, title=None, detail=None, code=None, source=None): # noqa: E501 + def __init__(self, title=None, detail=None, code=None, source=None, local_vars_configuration=None): # noqa: E501 """ErrorItemOmnichannel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._detail = None @@ -77,7 +82,7 @@ def title(self, title): :param title: The title of this ErrorItemOmnichannel. # noqa: E501 :type: ErrorTitleOmnichannel """ - if title is None: + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -102,7 +107,7 @@ def detail(self, detail): :param detail: The detail of this ErrorItemOmnichannel. # noqa: E501 :type: str """ - if detail is None: + if self.local_vars_configuration.client_side_validation and detail is None: # noqa: E501 raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501 self._detail = detail @@ -125,7 +130,7 @@ def code(self, code): :param code: The code of this ErrorItemOmnichannel. # noqa: E501 :type: ErrorCodeOmnichannel """ - if code is None: + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 self._code = code @@ -150,7 +155,7 @@ def source(self, source): :param source: The source of this ErrorItemOmnichannel. # noqa: E501 :type: str """ - if source is None: + if self.local_vars_configuration.client_side_validation and source is None: # noqa: E501 raise ValueError("Invalid value for `source`, must not be `None`") # noqa: E501 self._source = source @@ -192,8 +197,11 @@ def __eq__(self, other): if not isinstance(other, ErrorItemOmnichannel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorItemOmnichannel): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_item_phonebook.py b/messente_api/models/error_item_phonebook.py index 671fdec..d2e0921 100644 --- a/messente_api/models/error_item_phonebook.py +++ b/messente_api/models/error_item_phonebook.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorItemPhonebook(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ErrorItemPhonebook(object): 'code': 'code' } - def __init__(self, title=None, detail=None, code=None): # noqa: E501 + def __init__(self, title=None, detail=None, code=None, local_vars_configuration=None): # noqa: E501 """ErrorItemPhonebook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._detail = None @@ -73,7 +78,7 @@ def title(self, title): :param title: The title of this ErrorItemPhonebook. # noqa: E501 :type: ErrorTitlePhonebook """ - if title is None: + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -98,7 +103,7 @@ def detail(self, detail): :param detail: The detail of this ErrorItemPhonebook. # noqa: E501 :type: str """ - if detail is None: + if self.local_vars_configuration.client_side_validation and detail is None: # noqa: E501 raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501 self._detail = detail @@ -121,7 +126,7 @@ def code(self, code): :param code: The code of this ErrorItemPhonebook. # noqa: E501 :type: ErrorCodePhonebook """ - if code is None: + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 self._code = code @@ -163,8 +168,11 @@ def __eq__(self, other): if not isinstance(other, ErrorItemPhonebook): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorItemPhonebook): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_item_statistics.py b/messente_api/models/error_item_statistics.py index a3cc45e..dcc8801 100644 --- a/messente_api/models/error_item_statistics.py +++ b/messente_api/models/error_item_statistics.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorItemStatistics(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class ErrorItemStatistics(object): 'code': 'code' } - def __init__(self, title=None, details=None, code=None): # noqa: E501 + def __init__(self, title=None, details=None, code=None, local_vars_configuration=None): # noqa: E501 """ErrorItemStatistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._title = None self._details = None @@ -75,7 +80,7 @@ def title(self, title): :param title: The title of this ErrorItemStatistics. # noqa: E501 :type: str """ - if title is None: + if self.local_vars_configuration.client_side_validation and title is None: # noqa: E501 raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501 self._title = title @@ -100,7 +105,7 @@ def details(self, details): :param details: The details of this ErrorItemStatistics. # noqa: E501 :type: str """ - if details is None: + if self.local_vars_configuration.client_side_validation and details is None: # noqa: E501 raise ValueError("Invalid value for `details`, must not be `None`") # noqa: E501 self._details = details @@ -123,7 +128,7 @@ def code(self, code): :param code: The code of this ErrorItemStatistics. # noqa: E501 :type: ErrorCodeStatistics """ - if code is None: + if self.local_vars_configuration.client_side_validation and code is None: # noqa: E501 raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501 self._code = code @@ -165,8 +170,11 @@ def __eq__(self, other): if not isinstance(other, ErrorItemStatistics): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorItemStatistics): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_number_lookup.py b/messente_api/models/error_number_lookup.py index bc03506..91c89d9 100644 --- a/messente_api/models/error_number_lookup.py +++ b/messente_api/models/error_number_lookup.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorNumberLookup(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ErrorNumberLookup(object): 'errors': 'errors' } - def __init__(self, errors=None): # noqa: E501 + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 """ErrorNumberLookup - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None @@ -67,7 +72,7 @@ def errors(self, errors): :param errors: The errors of this ErrorNumberLookup. # noqa: E501 :type: list[ErrorItemNumberLookup] """ - if errors is None: + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 self._errors = errors @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, ErrorNumberLookup): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorNumberLookup): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_omnichannel.py b/messente_api/models/error_omnichannel.py index 3a9bc86..d6a080d 100644 --- a/messente_api/models/error_omnichannel.py +++ b/messente_api/models/error_omnichannel.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorOmnichannel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ErrorOmnichannel(object): 'errors': 'errors' } - def __init__(self, errors=None): # noqa: E501 + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 """ErrorOmnichannel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None @@ -67,7 +72,7 @@ def errors(self, errors): :param errors: The errors of this ErrorOmnichannel. # noqa: E501 :type: list[ErrorItemOmnichannel] """ - if errors is None: + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 self._errors = errors @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, ErrorOmnichannel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorOmnichannel): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_phonebook.py b/messente_api/models/error_phonebook.py index 0b241a2..a3a6747 100644 --- a/messente_api/models/error_phonebook.py +++ b/messente_api/models/error_phonebook.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorPhonebook(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ErrorPhonebook(object): 'errors': 'errors' } - def __init__(self, errors=None): # noqa: E501 + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 """ErrorPhonebook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None @@ -67,7 +72,7 @@ def errors(self, errors): :param errors: The errors of this ErrorPhonebook. # noqa: E501 :type: list[ErrorItemPhonebook] """ - if errors is None: + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 self._errors = errors @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, ErrorPhonebook): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorPhonebook): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_statistics.py b/messente_api/models/error_statistics.py index a55b734..8a7aa6a 100644 --- a/messente_api/models/error_statistics.py +++ b/messente_api/models/error_statistics.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorStatistics(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class ErrorStatistics(object): 'errors': 'errors' } - def __init__(self, errors=None): # noqa: E501 + def __init__(self, errors=None, local_vars_configuration=None): # noqa: E501 """ErrorStatistics - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._errors = None self.discriminator = None @@ -67,7 +72,7 @@ def errors(self, errors): :param errors: The errors of this ErrorStatistics. # noqa: E501 :type: list[ErrorItemStatistics] """ - if errors is None: + if self.local_vars_configuration.client_side_validation and errors is None: # noqa: E501 raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501 self._errors = errors @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, ErrorStatistics): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorStatistics): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_title_omnichannel.py b/messente_api/models/error_title_omnichannel.py index 4466081..1b0cbb2 100644 --- a/messente_api/models/error_title_omnichannel.py +++ b/messente_api/models/error_title_omnichannel.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorTitleOmnichannel(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -35,6 +37,8 @@ class ErrorTitleOmnichannel(object): MISSING_DATA = "Missing data" METHOD_NOT_ALLOWED = "Method not allowed" + allowable_values = [NOT_FOUND, FORBIDDEN, UNAUTHORIZED, INVALID_DATA, INTERNAL_SERVER_ERROR, MISSING_DATA, METHOD_NOT_ALLOWED] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -48,8 +52,11 @@ class ErrorTitleOmnichannel(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorTitleOmnichannel - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -89,8 +96,11 @@ def __eq__(self, other): if not isinstance(other, ErrorTitleOmnichannel): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorTitleOmnichannel): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/error_title_phonebook.py b/messente_api/models/error_title_phonebook.py index 3ff3dbe..ec9334f 100644 --- a/messente_api/models/error_title_phonebook.py +++ b/messente_api/models/error_title_phonebook.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class ErrorTitlePhonebook(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -34,6 +36,8 @@ class ErrorTitlePhonebook(object): CLIENT_ERROR = "Client error" GENERAL_ERROR = "General error" + allowable_values = [INVALID_DATA, UNAUTHORIZED, MISSING_RESOURCE, CONFLICT, CLIENT_ERROR, GENERAL_ERROR] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -47,8 +51,11 @@ class ErrorTitlePhonebook(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """ErrorTitlePhonebook - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -88,8 +95,11 @@ def __eq__(self, other): if not isinstance(other, ErrorTitlePhonebook): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, ErrorTitlePhonebook): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/fetch_blacklist_success.py b/messente_api/models/fetch_blacklist_success.py index 13c3b4d..0488ac8 100644 --- a/messente_api/models/fetch_blacklist_success.py +++ b/messente_api/models/fetch_blacklist_success.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class FetchBlacklistSuccess(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class FetchBlacklistSuccess(object): 'phone_numbers': 'phoneNumbers' } - def __init__(self, phone_numbers=None): # noqa: E501 + def __init__(self, phone_numbers=None, local_vars_configuration=None): # noqa: E501 """FetchBlacklistSuccess - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._phone_numbers = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, FetchBlacklistSuccess): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, FetchBlacklistSuccess): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/group_envelope.py b/messente_api/models/group_envelope.py index 2c548bf..4c9a682 100644 --- a/messente_api/models/group_envelope.py +++ b/messente_api/models/group_envelope.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class GroupEnvelope(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class GroupEnvelope(object): 'group': 'group' } - def __init__(self, group=None): # noqa: E501 + def __init__(self, group=None, local_vars_configuration=None): # noqa: E501 """GroupEnvelope - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._group = None self.discriminator = None @@ -106,8 +111,11 @@ def __eq__(self, other): if not isinstance(other, GroupEnvelope): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupEnvelope): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/group_list_envelope.py b/messente_api/models/group_list_envelope.py index ed2ce5a..c79e5c6 100644 --- a/messente_api/models/group_list_envelope.py +++ b/messente_api/models/group_list_envelope.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class GroupListEnvelope(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class GroupListEnvelope(object): 'groups': 'groups' } - def __init__(self, groups=None): # noqa: E501 + def __init__(self, groups=None, local_vars_configuration=None): # noqa: E501 """GroupListEnvelope - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._groups = None self.discriminator = None @@ -108,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, GroupListEnvelope): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupListEnvelope): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/group_name.py b/messente_api/models/group_name.py index 65aa219..e473dea 100644 --- a/messente_api/models/group_name.py +++ b/messente_api/models/group_name.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class GroupName(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class GroupName(object): 'name': 'name' } - def __init__(self, name=None): # noqa: E501 + def __init__(self, name=None, local_vars_configuration=None): # noqa: E501 """GroupName - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self.discriminator = None @@ -67,9 +72,10 @@ def name(self, name): :param name: The name of this GroupName. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 - if name is not None and len(name) < 1: + if (self.local_vars_configuration.client_side_validation and + name is not None and len(name) < 1): raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 self._name = name @@ -111,8 +117,11 @@ def __eq__(self, other): if not isinstance(other, GroupName): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupName): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/group_response_fields.py b/messente_api/models/group_response_fields.py index 133d7b0..d1b24c2 100644 --- a/messente_api/models/group_response_fields.py +++ b/messente_api/models/group_response_fields.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class GroupResponseFields(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -45,8 +47,11 @@ class GroupResponseFields(object): 'contacts_count': 'contactsCount' } - def __init__(self, id=None, name=None, created_on=None, contacts_count=None): # noqa: E501 + def __init__(self, id=None, name=None, created_on=None, contacts_count=None, local_vars_configuration=None): # noqa: E501 """GroupResponseFields - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._id = None self._name = None @@ -79,7 +84,7 @@ def id(self, id): :param id: The id of this GroupResponseFields. # noqa: E501 :type: str """ - if id is None: + if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501 raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501 self._id = id @@ -104,7 +109,7 @@ def name(self, name): :param name: The name of this GroupResponseFields. # noqa: E501 :type: str """ - if name is None: + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 self._name = name @@ -152,7 +157,7 @@ def contacts_count(self, contacts_count): :param contacts_count: The contacts_count of this GroupResponseFields. # noqa: E501 :type: int """ - if contacts_count is None: + if self.local_vars_configuration.client_side_validation and contacts_count is None: # noqa: E501 raise ValueError("Invalid value for `contacts_count`, must not be `None`") # noqa: E501 self._contacts_count = contacts_count @@ -194,8 +199,11 @@ def __eq__(self, other): if not isinstance(other, GroupResponseFields): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, GroupResponseFields): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/message_result.py b/messente_api/models/message_result.py index 733d88a..d327dc7 100644 --- a/messente_api/models/message_result.py +++ b/messente_api/models/message_result.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class MessageResult(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class MessageResult(object): 'sender': 'sender' } - def __init__(self, message_id=None, channel=None, sender=None): # noqa: E501 + def __init__(self, message_id=None, channel=None, sender=None, local_vars_configuration=None): # noqa: E501 """MessageResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._message_id = None self._channel = None @@ -75,7 +80,7 @@ def message_id(self, message_id): :param message_id: The message_id of this MessageResult. # noqa: E501 :type: str """ - if message_id is None: + if self.local_vars_configuration.client_side_validation and message_id is None: # noqa: E501 raise ValueError("Invalid value for `message_id`, must not be `None`") # noqa: E501 self._message_id = message_id @@ -98,7 +103,7 @@ def channel(self, channel): :param channel: The channel of this MessageResult. # noqa: E501 :type: Channel """ - if channel is None: + if self.local_vars_configuration.client_side_validation and channel is None: # noqa: E501 raise ValueError("Invalid value for `channel`, must not be `None`") # noqa: E501 self._channel = channel @@ -123,7 +128,7 @@ def sender(self, sender): :param sender: The sender of this MessageResult. # noqa: E501 :type: str """ - if sender is None: + if self.local_vars_configuration.client_side_validation and sender is None: # noqa: E501 raise ValueError("Invalid value for `sender`, must not be `None`") # noqa: E501 self._sender = sender @@ -165,8 +170,11 @@ def __eq__(self, other): if not isinstance(other, MessageResult): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MessageResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/mobile_network.py b/messente_api/models/mobile_network.py index cd94a6f..35a1f6f 100644 --- a/messente_api/models/mobile_network.py +++ b/messente_api/models/mobile_network.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class MobileNetwork(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,8 +49,11 @@ class MobileNetwork(object): 'country_code': 'countryCode' } - def __init__(self, mccmnc=None, network_name=None, country_name=None, country_prefix=None, country_code=None): # noqa: E501 + def __init__(self, mccmnc=None, network_name=None, country_name=None, country_prefix=None, country_code=None, local_vars_configuration=None): # noqa: E501 """MobileNetwork - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._mccmnc = None self._network_name = None @@ -220,8 +225,11 @@ def __eq__(self, other): if not isinstance(other, MobileNetwork): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, MobileNetwork): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/number_to_blacklist.py b/messente_api/models/number_to_blacklist.py index 68498ac..8c08f28 100644 --- a/messente_api/models/number_to_blacklist.py +++ b/messente_api/models/number_to_blacklist.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class NumberToBlacklist(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class NumberToBlacklist(object): 'phone_number': 'phoneNumber' } - def __init__(self, phone_number=None): # noqa: E501 + def __init__(self, phone_number=None, local_vars_configuration=None): # noqa: E501 """NumberToBlacklist - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._phone_number = None self.discriminator = None @@ -67,7 +72,7 @@ def phone_number(self, phone_number): :param phone_number: The phone_number of this NumberToBlacklist. # noqa: E501 :type: str """ - if phone_number is None: + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 self._phone_number = phone_number @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, NumberToBlacklist): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumberToBlacklist): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/numbers_to_investigate.py b/messente_api/models/numbers_to_investigate.py index a3a9b1b..6b6fad0 100644 --- a/messente_api/models/numbers_to_investigate.py +++ b/messente_api/models/numbers_to_investigate.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class NumbersToInvestigate(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class NumbersToInvestigate(object): 'numbers': 'numbers' } - def __init__(self, numbers=None): # noqa: E501 + def __init__(self, numbers=None, local_vars_configuration=None): # noqa: E501 """NumbersToInvestigate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._numbers = None self.discriminator = None @@ -67,7 +72,7 @@ def numbers(self, numbers): :param numbers: The numbers of this NumbersToInvestigate. # noqa: E501 :type: list[str] """ - if numbers is None: + if self.local_vars_configuration.client_side_validation and numbers is None: # noqa: E501 raise ValueError("Invalid value for `numbers`, must not be `None`") # noqa: E501 self._numbers = numbers @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, NumbersToInvestigate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, NumbersToInvestigate): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/omni_message_create_success_response.py b/messente_api/models/omni_message_create_success_response.py index e759b82..73a01f7 100644 --- a/messente_api/models/omni_message_create_success_response.py +++ b/messente_api/models/omni_message_create_success_response.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class OmniMessageCreateSuccessResponse(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class OmniMessageCreateSuccessResponse(object): 'omnimessage_id': 'omnimessage_id' } - def __init__(self, messages=None, to=None, omnimessage_id=None): # noqa: E501 + def __init__(self, messages=None, to=None, omnimessage_id=None, local_vars_configuration=None): # noqa: E501 """OmniMessageCreateSuccessResponse - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._messages = None self._to = None @@ -75,7 +80,7 @@ def messages(self, messages): :param messages: The messages of this OmniMessageCreateSuccessResponse. # noqa: E501 :type: list[MessageResult] """ - if messages is None: + if self.local_vars_configuration.client_side_validation and messages is None: # noqa: E501 raise ValueError("Invalid value for `messages`, must not be `None`") # noqa: E501 self._messages = messages @@ -100,7 +105,7 @@ def to(self, to): :param to: The to of this OmniMessageCreateSuccessResponse. # noqa: E501 :type: str """ - if to is None: + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 self._to = to @@ -125,7 +130,7 @@ def omnimessage_id(self, omnimessage_id): :param omnimessage_id: The omnimessage_id of this OmniMessageCreateSuccessResponse. # noqa: E501 :type: str """ - if omnimessage_id is None: + if self.local_vars_configuration.client_side_validation and omnimessage_id is None: # noqa: E501 raise ValueError("Invalid value for `omnimessage_id`, must not be `None`") # noqa: E501 self._omnimessage_id = omnimessage_id @@ -167,8 +172,11 @@ def __eq__(self, other): if not isinstance(other, OmniMessageCreateSuccessResponse): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, OmniMessageCreateSuccessResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/omnimessage.py b/messente_api/models/omnimessage.py index 47dfe70..592a31d 100644 --- a/messente_api/models/omnimessage.py +++ b/messente_api/models/omnimessage.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class Omnimessage(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -47,8 +49,11 @@ class Omnimessage(object): 'time_to_send': 'time_to_send' } - def __init__(self, to=None, messages=None, dlr_url=None, text_store=None, time_to_send=None): # noqa: E501 + def __init__(self, to=None, messages=None, dlr_url=None, text_store=None, time_to_send=None, local_vars_configuration=None): # noqa: E501 """Omnimessage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._to = None self._messages = None @@ -86,7 +91,7 @@ def to(self, to): :param to: The to of this Omnimessage. # noqa: E501 :type: str """ - if to is None: + if self.local_vars_configuration.client_side_validation and to is None: # noqa: E501 raise ValueError("Invalid value for `to`, must not be `None`") # noqa: E501 self._to = to @@ -111,7 +116,7 @@ def messages(self, messages): :param messages: The messages of this Omnimessage. # noqa: E501 :type: list[OneOfViberSMSWhatsAppTelegram] """ - if messages is None: + if self.local_vars_configuration.client_side_validation and messages is None: # noqa: E501 raise ValueError("Invalid value for `messages`, must not be `None`") # noqa: E501 self._messages = messages @@ -220,8 +225,11 @@ def __eq__(self, other): if not isinstance(other, Omnimessage): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Omnimessage): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/sms.py b/messente_api/models/sms.py index fd2c581..3d63b88 100644 --- a/messente_api/models/sms.py +++ b/messente_api/models/sms.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class SMS(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -49,8 +51,11 @@ class SMS(object): 'channel': 'channel' } - def __init__(self, text=None, sender=None, validity=None, autoconvert=None, udh=None, channel='sms'): # noqa: E501 + def __init__(self, text=None, sender=None, validity=None, autoconvert=None, udh=None, channel='sms', local_vars_configuration=None): # noqa: E501 """SMS - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._text = None self._sender = None @@ -92,7 +97,7 @@ def text(self, text): :param text: The text of this SMS. # noqa: E501 :type: str """ - if text is None: + if self.local_vars_configuration.client_side_validation and text is None: # noqa: E501 raise ValueError("Invalid value for `text`, must not be `None`") # noqa: E501 self._text = text @@ -164,7 +169,7 @@ def autoconvert(self, autoconvert): :type: str """ allowed_values = ["full", "on", "off"] # noqa: E501 - if autoconvert not in allowed_values: + if self.local_vars_configuration.client_side_validation and autoconvert not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `autoconvert` ({0}), must be one of {1}" # noqa: E501 .format(autoconvert, allowed_values) @@ -216,7 +221,7 @@ def channel(self, channel): :type: str """ allowed_values = ["sms"] # noqa: E501 - if channel not in allowed_values: + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 .format(channel, allowed_values) @@ -261,8 +266,11 @@ def __eq__(self, other): if not isinstance(other, SMS): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SMS): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/statistics_report.py b/messente_api/models/statistics_report.py index 626dad2..d08c1c0 100644 --- a/messente_api/models/statistics_report.py +++ b/messente_api/models/statistics_report.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class StatisticsReport(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class StatisticsReport(object): 'country': 'country' } - def __init__(self, total_messages=None, total_price=None, country=None): # noqa: E501 + def __init__(self, total_messages=None, total_price=None, country=None, local_vars_configuration=None): # noqa: E501 """StatisticsReport - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._total_messages = None self._total_price = None @@ -75,7 +80,7 @@ def total_messages(self, total_messages): :param total_messages: The total_messages of this StatisticsReport. # noqa: E501 :type: int """ - if total_messages is None: + if self.local_vars_configuration.client_side_validation and total_messages is None: # noqa: E501 raise ValueError("Invalid value for `total_messages`, must not be `None`") # noqa: E501 self._total_messages = total_messages @@ -100,7 +105,7 @@ def total_price(self, total_price): :param total_price: The total_price of this StatisticsReport. # noqa: E501 :type: str """ - if total_price is None: + if self.local_vars_configuration.client_side_validation and total_price is None: # noqa: E501 raise ValueError("Invalid value for `total_price`, must not be `None`") # noqa: E501 self._total_price = total_price @@ -125,7 +130,7 @@ def country(self, country): :param country: The country of this StatisticsReport. # noqa: E501 :type: str """ - if country is None: + if self.local_vars_configuration.client_side_validation and country is None: # noqa: E501 raise ValueError("Invalid value for `country`, must not be `None`") # noqa: E501 self._country = country @@ -167,8 +172,11 @@ def __eq__(self, other): if not isinstance(other, StatisticsReport): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, StatisticsReport): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/statistics_report_settings.py b/messente_api/models/statistics_report_settings.py index e57bb5e..5ea830e 100644 --- a/messente_api/models/statistics_report_settings.py +++ b/messente_api/models/statistics_report_settings.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class StatisticsReportSettings(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -43,8 +45,11 @@ class StatisticsReportSettings(object): 'message_types': 'message_types' } - def __init__(self, start_date=None, end_date=None, message_types=None): # noqa: E501 + def __init__(self, start_date=None, end_date=None, message_types=None, local_vars_configuration=None): # noqa: E501 """StatisticsReportSettings - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._start_date = None self._end_date = None @@ -76,7 +81,7 @@ def start_date(self, start_date): :param start_date: The start_date of this StatisticsReportSettings. # noqa: E501 :type: date """ - if start_date is None: + if self.local_vars_configuration.client_side_validation and start_date is None: # noqa: E501 raise ValueError("Invalid value for `start_date`, must not be `None`") # noqa: E501 self._start_date = start_date @@ -101,7 +106,7 @@ def end_date(self, end_date): :param end_date: The end_date of this StatisticsReportSettings. # noqa: E501 :type: date """ - if end_date is None: + if self.local_vars_configuration.client_side_validation and end_date is None: # noqa: E501 raise ValueError("Invalid value for `end_date`, must not be `None`") # noqa: E501 self._end_date = end_date @@ -166,8 +171,11 @@ def __eq__(self, other): if not isinstance(other, StatisticsReportSettings): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, StatisticsReportSettings): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/statistics_report_success.py b/messente_api/models/statistics_report_success.py index e21e630..4700726 100644 --- a/messente_api/models/statistics_report_success.py +++ b/messente_api/models/statistics_report_success.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class StatisticsReportSuccess(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class StatisticsReportSuccess(object): 'reports': 'reports' } - def __init__(self, reports=None): # noqa: E501 + def __init__(self, reports=None, local_vars_configuration=None): # noqa: E501 """StatisticsReportSuccess - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._reports = None self.discriminator = None @@ -67,7 +72,7 @@ def reports(self, reports): :param reports: The reports of this StatisticsReportSuccess. # noqa: E501 :type: list[StatisticsReport] """ - if reports is None: + if self.local_vars_configuration.client_side_validation and reports is None: # noqa: E501 raise ValueError("Invalid value for `reports`, must not be `None`") # noqa: E501 self._reports = reports @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, StatisticsReportSuccess): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, StatisticsReportSuccess): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/status.py b/messente_api/models/status.py index c4ffec6..caa0057 100644 --- a/messente_api/models/status.py +++ b/messente_api/models/status.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class Status(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,6 +41,8 @@ class Status(object): NACK = "NACK" SEEN = "SEEN" + allowable_values = [ACK, DELIVRD, UNDELIV, FAILED, UNKNOWN, ACCEPTD, REJECTD, DELETED, EXPIRED, NACK, SEEN] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -52,8 +56,11 @@ class Status(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """Status - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -93,8 +100,11 @@ def __eq__(self, other): if not isinstance(other, Status): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Status): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/sync_number_lookup_result.py b/messente_api/models/sync_number_lookup_result.py index 4e090a6..c2f8b53 100644 --- a/messente_api/models/sync_number_lookup_result.py +++ b/messente_api/models/sync_number_lookup_result.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class SyncNumberLookupResult(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -55,8 +57,11 @@ class SyncNumberLookupResult(object): 'error': 'error' } - def __init__(self, number=None, roaming=None, ported=None, roaming_network=None, current_network=None, original_network=None, ported_network=None, status=None, error=None): # noqa: E501 + def __init__(self, number=None, roaming=None, ported=None, roaming_network=None, current_network=None, original_network=None, ported_network=None, status=None, error=None, local_vars_configuration=None): # noqa: E501 """SyncNumberLookupResult - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._number = None self._roaming = None @@ -101,7 +106,7 @@ def number(self, number): :param number: The number of this SyncNumberLookupResult. # noqa: E501 :type: str """ - if number is None: + if self.local_vars_configuration.client_side_validation and number is None: # noqa: E501 raise ValueError("Invalid value for `number`, must not be `None`") # noqa: E501 self._number = number @@ -257,7 +262,7 @@ def status(self, status): :type: str """ allowed_values = ["ON", "OFF", "INVALID", "UNKNOWN"] # noqa: E501 - if status not in allowed_values: + if self.local_vars_configuration.client_side_validation and status not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 .format(status, allowed_values) @@ -325,8 +330,11 @@ def __eq__(self, other): if not isinstance(other, SyncNumberLookupResult): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SyncNumberLookupResult): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/sync_number_lookup_success.py b/messente_api/models/sync_number_lookup_success.py index 5093499..a151311 100644 --- a/messente_api/models/sync_number_lookup_success.py +++ b/messente_api/models/sync_number_lookup_success.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class SyncNumberLookupSuccess(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class SyncNumberLookupSuccess(object): 'result': 'result' } - def __init__(self, request_id=None, result=None): # noqa: E501 + def __init__(self, request_id=None, result=None, local_vars_configuration=None): # noqa: E501 """SyncNumberLookupSuccess - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._request_id = None self._result = None @@ -71,7 +76,7 @@ def request_id(self, request_id): :param request_id: The request_id of this SyncNumberLookupSuccess. # noqa: E501 :type: str """ - if request_id is None: + if self.local_vars_configuration.client_side_validation and request_id is None: # noqa: E501 raise ValueError("Invalid value for `request_id`, must not be `None`") # noqa: E501 self._request_id = request_id @@ -96,7 +101,7 @@ def result(self, result): :param result: The result of this SyncNumberLookupSuccess. # noqa: E501 :type: list[SyncNumberLookupResult] """ - if result is None: + if self.local_vars_configuration.client_side_validation and result is None: # noqa: E501 raise ValueError("Invalid value for `result`, must not be `None`") # noqa: E501 self._result = result @@ -138,8 +143,11 @@ def __eq__(self, other): if not isinstance(other, SyncNumberLookupSuccess): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, SyncNumberLookupSuccess): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/telegram.py b/messente_api/models/telegram.py index f98b60c..cf85aab 100644 --- a/messente_api/models/telegram.py +++ b/messente_api/models/telegram.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class Telegram(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class Telegram(object): 'channel': 'channel' } - def __init__(self, sender=None, validity=None, text=None, image_url=None, document_url=None, audio_url=None, channel='telegram'): # noqa: E501 + def __init__(self, sender=None, validity=None, text=None, image_url=None, document_url=None, audio_url=None, channel='telegram', local_vars_configuration=None): # noqa: E501 """Telegram - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._sender = None self._validity = None @@ -237,7 +242,7 @@ def channel(self, channel): :type: str """ allowed_values = ["telegram"] # noqa: E501 - if channel not in allowed_values: + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 .format(channel, allowed_values) @@ -282,8 +287,11 @@ def __eq__(self, other): if not isinstance(other, Telegram): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Telegram): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/text_store.py b/messente_api/models/text_store.py index 8b9c099..a1cfcba 100644 --- a/messente_api/models/text_store.py +++ b/messente_api/models/text_store.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class TextStore(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -31,6 +33,8 @@ class TextStore(object): PLAINTEXT = "plaintext" SHA256 = "sha256" + allowable_values = [NOSTORE, PLAINTEXT, SHA256] # noqa: E501 + """ Attributes: openapi_types (dict): The key is attribute name @@ -44,8 +48,11 @@ class TextStore(object): attribute_map = { } - def __init__(self): # noqa: E501 + def __init__(self, local_vars_configuration=None): # noqa: E501 """TextStore - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self.discriminator = None def to_dict(self): @@ -85,8 +92,11 @@ def __eq__(self, other): if not isinstance(other, TextStore): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, TextStore): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/viber.py b/messente_api/models/viber.py index 83535de..2c24824 100644 --- a/messente_api/models/viber.py +++ b/messente_api/models/viber.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class Viber(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class Viber(object): 'channel': 'channel' } - def __init__(self, sender=None, validity=None, text=None, image_url=None, button_url=None, button_text=None, channel='viber'): # noqa: E501 + def __init__(self, sender=None, validity=None, text=None, image_url=None, button_url=None, button_text=None, channel='viber', local_vars_configuration=None): # noqa: E501 """Viber - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._sender = None self._validity = None @@ -237,7 +242,7 @@ def channel(self, channel): :type: str """ allowed_values = ["viber"] # noqa: E501 - if channel not in allowed_values: + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 .format(channel, allowed_values) @@ -282,8 +287,11 @@ def __eq__(self, other): if not isinstance(other, Viber): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, Viber): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/whats_app.py b/messente_api/models/whats_app.py index fe77a02..003171a 100644 --- a/messente_api/models/whats_app.py +++ b/messente_api/models/whats_app.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class WhatsApp(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -51,8 +53,11 @@ class WhatsApp(object): 'channel': 'channel' } - def __init__(self, sender=None, validity=None, text=None, image=None, document=None, audio=None, channel='whatsapp'): # noqa: E501 + def __init__(self, sender=None, validity=None, text=None, image=None, document=None, audio=None, channel='whatsapp', local_vars_configuration=None): # noqa: E501 """WhatsApp - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._sender = None self._validity = None @@ -229,7 +234,7 @@ def channel(self, channel): :type: str """ allowed_values = ["whatsapp"] # noqa: E501 - if channel not in allowed_values: + if self.local_vars_configuration.client_side_validation and channel not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `channel` ({0}), must be one of {1}" # noqa: E501 .format(channel, allowed_values) @@ -274,8 +279,11 @@ def __eq__(self, other): if not isinstance(other, WhatsApp): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WhatsApp): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/whats_app_audio.py b/messente_api/models/whats_app_audio.py index abd6f7f..c194423 100644 --- a/messente_api/models/whats_app_audio.py +++ b/messente_api/models/whats_app_audio.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class WhatsAppAudio(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -39,8 +41,11 @@ class WhatsAppAudio(object): 'content': 'content' } - def __init__(self, content=None): # noqa: E501 + def __init__(self, content=None, local_vars_configuration=None): # noqa: E501 """WhatsAppAudio - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._content = None self.discriminator = None @@ -67,7 +72,7 @@ def content(self, content): :param content: The content of this WhatsAppAudio. # noqa: E501 :type: str """ - if content is None: + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 self._content = content @@ -109,8 +114,11 @@ def __eq__(self, other): if not isinstance(other, WhatsAppAudio): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WhatsAppAudio): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/whats_app_document.py b/messente_api/models/whats_app_document.py index 01ee694..e7f40ec 100644 --- a/messente_api/models/whats_app_document.py +++ b/messente_api/models/whats_app_document.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class WhatsAppDocument(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class WhatsAppDocument(object): 'content': 'content' } - def __init__(self, caption=None, content=None): # noqa: E501 + def __init__(self, caption=None, content=None, local_vars_configuration=None): # noqa: E501 """WhatsAppDocument - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._caption = None self._content = None @@ -95,7 +100,7 @@ def content(self, content): :param content: The content of this WhatsAppDocument. # noqa: E501 :type: str """ - if content is None: + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 self._content = content @@ -137,8 +142,11 @@ def __eq__(self, other): if not isinstance(other, WhatsAppDocument): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WhatsAppDocument): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/whats_app_image.py b/messente_api/models/whats_app_image.py index 7004e8e..b62dae5 100644 --- a/messente_api/models/whats_app_image.py +++ b/messente_api/models/whats_app_image.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class WhatsAppImage(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class WhatsAppImage(object): 'content': 'content' } - def __init__(self, caption=None, content=None): # noqa: E501 + def __init__(self, caption=None, content=None, local_vars_configuration=None): # noqa: E501 """WhatsAppImage - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._caption = None self._content = None @@ -95,7 +100,7 @@ def content(self, content): :param content: The content of this WhatsAppImage. # noqa: E501 :type: str """ - if content is None: + if self.local_vars_configuration.client_side_validation and content is None: # noqa: E501 raise ValueError("Invalid value for `content`, must not be `None`") # noqa: E501 self._content = content @@ -137,8 +142,11 @@ def __eq__(self, other): if not isinstance(other, WhatsAppImage): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WhatsAppImage): + return True + + return self.to_dict() != other.to_dict() diff --git a/messente_api/models/whats_app_text.py b/messente_api/models/whats_app_text.py index bafaae2..cf7f1e0 100644 --- a/messente_api/models/whats_app_text.py +++ b/messente_api/models/whats_app_text.py @@ -16,6 +16,8 @@ import six +from messente_api.configuration import Configuration + class WhatsAppText(object): """NOTE: This class is auto generated by OpenAPI Generator. @@ -41,8 +43,11 @@ class WhatsAppText(object): 'body': 'body' } - def __init__(self, preview_url=True, body=None): # noqa: E501 + def __init__(self, preview_url=True, body=None, local_vars_configuration=None): # noqa: E501 """WhatsAppText - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._preview_url = None self._body = None @@ -95,7 +100,7 @@ def body(self, body): :param body: The body of this WhatsAppText. # noqa: E501 :type: str """ - if body is None: + if self.local_vars_configuration.client_side_validation and body is None: # noqa: E501 raise ValueError("Invalid value for `body`, must not be `None`") # noqa: E501 self._body = body @@ -137,8 +142,11 @@ def __eq__(self, other): if not isinstance(other, WhatsAppText): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, WhatsAppText): + return True + + return self.to_dict() != other.to_dict() diff --git a/requirements.txt b/requirements.txt index bafdc07..eb358ef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ certifi >= 14.05.14 +future; python_version<="2.7" six >= 1.10 python_dateutil >= 2.5.3 setuptools >= 21.0.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 78b72f8..b863069 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "messente-api" -VERSION = "1.2.0" +VERSION = "1.2.1" # To install the library, run the following # # python setup.py install @@ -28,12 +28,14 @@ name=NAME, version=VERSION, description="Messente API", + author="Messente", author_email="messente@messente.com", url="https://github.com/messente/messente-api-python", keywords=["viber", "sms", "whatsapp", "phonebook"], install_requires=REQUIRES, - packages=find_packages(), + packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="Apache-2.0", long_description="""\ [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. # noqa: E501 """, diff --git a/test-requirements.txt b/test-requirements.txt index 2702246..4ed3991 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,3 @@ -coverage>=4.0.3 -nose>=1.3.7 -pluggy>=0.3.1 -py>=1.4.31 -randomize>=0.13 +pytest~=4.6.7 # needed for python 2.7+3.4 +pytest-cov>=2.8.1 +pytest-randomly==1.2.3 # needed for python 2.7+3.4 diff --git a/tox.ini b/tox.ini index 3d0be61..a3a3fbd 100644 --- a/tox.ini +++ b/tox.ini @@ -6,5 +6,4 @@ deps=-r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands= - nosetests \ - [] + pytest --cov=messente_api