Skip to content

Commit

Permalink
add versioned files
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyn committed May 18, 2023
1 parent d418848 commit 0949acb
Show file tree
Hide file tree
Showing 2 changed files with 202 additions and 0 deletions.
149 changes: 149 additions & 0 deletions Monei/models/send_payment_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
# coding: utf-8

"""
MONEI API v1
<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
The version of the OpenAPI document: 1.4.0
Generated by: https://openapi-generator.tech
"""


import pprint
import re # noqa: F401

import six

from Monei.configuration import Configuration


class SendPaymentRequest(object):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""

"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
"""
openapi_types = {
'phone_number': 'str',
'language': 'PaymentMessageLanguage'
}

attribute_map = {
'phone_number': 'phoneNumber',
'language': 'language'
}

def __init__(self, phone_number=None, language=None, local_vars_configuration=None): # noqa: E501
"""SendPaymentRequest - 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._language = None
self.discriminator = None

self.phone_number = phone_number
if language is not None:
self.language = language

@property
def phone_number(self):
"""Gets the phone_number of this SendPaymentRequest. # noqa: E501
Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501
:return: The phone_number of this SendPaymentRequest. # noqa: E501
:rtype: str
"""
return self._phone_number

@phone_number.setter
def phone_number(self, phone_number):
"""Sets the phone_number of this SendPaymentRequest.
Phone number in E.164 format. The customer will receive payment link on this phone number. # noqa: E501
:param phone_number: The phone_number of this SendPaymentRequest. # noqa: E501
:type: str
"""
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

@property
def language(self):
"""Gets the language of this SendPaymentRequest. # noqa: E501
:return: The language of this SendPaymentRequest. # noqa: E501
:rtype: PaymentMessageLanguage
"""
return self._language

@language.setter
def language(self, language):
"""Sets the language of this SendPaymentRequest.
:param language: The language of this SendPaymentRequest. # noqa: E501
:type: PaymentMessageLanguage
"""

self._language = language

def to_dict(self):
"""Returns the model properties as a dict"""
result = {}

for attr, _ in six.iteritems(self.openapi_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value

return result

def to_str(self):
"""Returns the string representation of the model"""
return pprint.pformat(self.to_dict())

def __repr__(self):
"""For `print` and `pprint`"""
return self.to_str()

def __eq__(self, other):
"""Returns true if both objects are equal"""
if not isinstance(other, SendPaymentRequest):
return False

return self.to_dict() == other.to_dict()

def __ne__(self, other):
"""Returns true if both objects are not equal"""
if not isinstance(other, SendPaymentRequest):
return True

return self.to_dict() != other.to_dict()
53 changes: 53 additions & 0 deletions test/test_send_payment_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# coding: utf-8

"""
MONEI API v1
<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
The version of the OpenAPI document: 1.4.0
Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest
import datetime

import Monei
from Monei.models.send_payment_request import SendPaymentRequest # noqa: E501
from Monei.rest import ApiException

class TestSendPaymentRequest(unittest.TestCase):
"""SendPaymentRequest unit test stubs"""

def setUp(self):
pass

def tearDown(self):
pass

def make_instance(self, include_optional):
"""Test SendPaymentRequest
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
# model = Monei.models.send_payment_request.SendPaymentRequest() # noqa: E501
if include_optional :
return SendPaymentRequest(
phone_number = '+34500000000',
language = 'en'
)
else :
return SendPaymentRequest(
)

def testSendPaymentRequest(self):
"""Test SendPaymentRequest"""
inst_req_only = self.make_instance(include_optional=False)
inst_req_and_optional = self.make_instance(include_optional=True)


if __name__ == '__main__':
unittest.main()

0 comments on commit 0949acb

Please sign in to comment.