|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + MONEI API v1 |
| 5 | +
|
| 6 | + <p>The MONEI API is organized around <a href=\"https://en.wikipedia.org/wiki/Representational_State_Transfer\">REST</a>. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.</p> <h4 id=\"base-url\">Base URL:</h4> <p><a href=\"https://api.monei.com/v1\">https://api.monei.com/v1</a></p> <h4 id=\"client-libraries\">Client libraries:</h4> <ul> <li><a href=\"https://github.com/MONEI/monei-php-sdk\">PHP SDK</a></li> <li><a href=\"https://github.com/MONEI/monei-python-sdk\">Python SDK</a></li> <li><a href=\"https://github.com/MONEI/monei-node-sdk\">Node.js SDK</a></li> <li><a href=\"https://postman.monei.com/\">Postman</a></li> </ul> <h4 id=\"important\">Important:</h4> <p><strong>If you are not using our official SDKs, you need to provide a valid <code>User-Agent</code> header in each request, otherwise your requests will be rejected.</strong></p> # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: 1.4.0 |
| 9 | + Generated by: https://openapi-generator.tech |
| 10 | +""" |
| 11 | + |
| 12 | + |
| 13 | +import pprint |
| 14 | +import re # noqa: F401 |
| 15 | + |
| 16 | +import six |
| 17 | + |
| 18 | +from Monei.configuration import Configuration |
| 19 | + |
| 20 | + |
| 21 | +class SendPaymentRequest(object): |
| 22 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 23 | + Ref: https://openapi-generator.tech |
| 24 | +
|
| 25 | + Do not edit the class manually. |
| 26 | + """ |
| 27 | + |
| 28 | + """ |
| 29 | + Attributes: |
| 30 | + openapi_types (dict): The key is attribute name |
| 31 | + and the value is attribute type. |
| 32 | + attribute_map (dict): The key is attribute name |
| 33 | + and the value is json key in definition. |
| 34 | + """ |
| 35 | + openapi_types = { |
| 36 | + 'phone_number': 'str', |
| 37 | + 'language': 'PaymentMessageLanguage' |
| 38 | + } |
| 39 | + |
| 40 | + attribute_map = { |
| 41 | + 'phone_number': 'phoneNumber', |
| 42 | + 'language': 'language' |
| 43 | + } |
| 44 | + |
| 45 | + def __init__(self, phone_number=None, language=None, local_vars_configuration=None): # noqa: E501 |
| 46 | + """SendPaymentRequest - a model defined in OpenAPI""" # noqa: E501 |
| 47 | + if local_vars_configuration is None: |
| 48 | + local_vars_configuration = Configuration() |
| 49 | + self.local_vars_configuration = local_vars_configuration |
| 50 | + |
| 51 | + self._phone_number = None |
| 52 | + self._language = None |
| 53 | + self.discriminator = None |
| 54 | + |
| 55 | + self.phone_number = phone_number |
| 56 | + if language is not None: |
| 57 | + self.language = language |
| 58 | + |
| 59 | + @property |
| 60 | + def phone_number(self): |
| 61 | + """Gets the phone_number of this SendPaymentRequest. # noqa: E501 |
| 62 | +
|
| 63 | + Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 |
| 64 | +
|
| 65 | + :return: The phone_number of this SendPaymentRequest. # noqa: E501 |
| 66 | + :rtype: str |
| 67 | + """ |
| 68 | + return self._phone_number |
| 69 | + |
| 70 | + @phone_number.setter |
| 71 | + def phone_number(self, phone_number): |
| 72 | + """Sets the phone_number of this SendPaymentRequest. |
| 73 | +
|
| 74 | + Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501 |
| 75 | +
|
| 76 | + :param phone_number: The phone_number of this SendPaymentRequest. # noqa: E501 |
| 77 | + :type: str |
| 78 | + """ |
| 79 | + if self.local_vars_configuration.client_side_validation and phone_number is None: # noqa: E501 |
| 80 | + raise ValueError("Invalid value for `phone_number`, must not be `None`") # noqa: E501 |
| 81 | + |
| 82 | + self._phone_number = phone_number |
| 83 | + |
| 84 | + @property |
| 85 | + def language(self): |
| 86 | + """Gets the language of this SendPaymentRequest. # noqa: E501 |
| 87 | +
|
| 88 | +
|
| 89 | + :return: The language of this SendPaymentRequest. # noqa: E501 |
| 90 | + :rtype: PaymentMessageLanguage |
| 91 | + """ |
| 92 | + return self._language |
| 93 | + |
| 94 | + @language.setter |
| 95 | + def language(self, language): |
| 96 | + """Sets the language of this SendPaymentRequest. |
| 97 | +
|
| 98 | +
|
| 99 | + :param language: The language of this SendPaymentRequest. # noqa: E501 |
| 100 | + :type: PaymentMessageLanguage |
| 101 | + """ |
| 102 | + |
| 103 | + self._language = language |
| 104 | + |
| 105 | + def to_dict(self): |
| 106 | + """Returns the model properties as a dict""" |
| 107 | + result = {} |
| 108 | + |
| 109 | + for attr, _ in six.iteritems(self.openapi_types): |
| 110 | + value = getattr(self, attr) |
| 111 | + if isinstance(value, list): |
| 112 | + result[attr] = list(map( |
| 113 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 114 | + value |
| 115 | + )) |
| 116 | + elif hasattr(value, "to_dict"): |
| 117 | + result[attr] = value.to_dict() |
| 118 | + elif isinstance(value, dict): |
| 119 | + result[attr] = dict(map( |
| 120 | + lambda item: (item[0], item[1].to_dict()) |
| 121 | + if hasattr(item[1], "to_dict") else item, |
| 122 | + value.items() |
| 123 | + )) |
| 124 | + else: |
| 125 | + result[attr] = value |
| 126 | + |
| 127 | + return result |
| 128 | + |
| 129 | + def to_str(self): |
| 130 | + """Returns the string representation of the model""" |
| 131 | + return pprint.pformat(self.to_dict()) |
| 132 | + |
| 133 | + def __repr__(self): |
| 134 | + """For `print` and `pprint`""" |
| 135 | + return self.to_str() |
| 136 | + |
| 137 | + def __eq__(self, other): |
| 138 | + """Returns true if both objects are equal""" |
| 139 | + if not isinstance(other, SendPaymentRequest): |
| 140 | + return False |
| 141 | + |
| 142 | + return self.to_dict() == other.to_dict() |
| 143 | + |
| 144 | + def __ne__(self, other): |
| 145 | + """Returns true if both objects are not equal""" |
| 146 | + if not isinstance(other, SendPaymentRequest): |
| 147 | + return True |
| 148 | + |
| 149 | + return self.to_dict() != other.to_dict() |
0 commit comments