Skip to content

Commit 378affa

Browse files
removed some validations due to incorrect regex
1 parent 6bfe1c9 commit 378affa

3 files changed

Lines changed: 36 additions & 36 deletions

CyberSource/models/boardingv1registrations_organization_information_business_information.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def name(self, name):
132132
"""
133133
if name is None:
134134
raise ValueError("Invalid value for `name`, must not be `None`")
135-
if name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', name):
136-
raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
135+
# if name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', name):
136+
# raise ValueError("Invalid value for `name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
137137

138138
self._name = name
139139

@@ -155,8 +155,8 @@ def doing_business_as(self, doing_business_as):
155155
:param doing_business_as: The doing_business_as of this Boardingv1registrationsOrganizationInformationBusinessInformation.
156156
:type: str
157157
"""
158-
if doing_business_as is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', doing_business_as):
159-
raise ValueError("Invalid value for `doing_business_as`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
158+
# if doing_business_as is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', doing_business_as):
159+
# raise ValueError("Invalid value for `doing_business_as`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
160160

161161
self._doing_business_as = doing_business_as
162162

@@ -178,8 +178,8 @@ def description(self, description):
178178
:param description: The description of this Boardingv1registrationsOrganizationInformationBusinessInformation.
179179
:type: str
180180
"""
181-
if description is not None and not re.search('[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$', description):
182-
raise ValueError("Invalid value for `description`, must be a follow pattern or equal to `/[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$/`")
181+
# if description is not None and not re.search('[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$', description):
182+
# raise ValueError("Invalid value for `description`, must be a follow pattern or equal to `/[À-ÖØ-öø-ǿÀ-ÖØ-öø-ǿ\\n\\ra-zA-Z0-9().\\-_#,;\/\\\\@$:&!?%«»€₣«»€₣ ]{1,}$/`")
183183

184184
self._description = description
185185

@@ -274,8 +274,8 @@ def website_url(self, website_url):
274274
:param website_url: The website_url of this Boardingv1registrationsOrganizationInformationBusinessInformation.
275275
:type: str
276276
"""
277-
if website_url is not None and not re.search('\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\".,<>?«»“”‘’]))', website_url):
278-
raise ValueError("Invalid value for `website_url`, must be a follow pattern or equal to `/\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))/`")
277+
# if website_url is not None and not re.search('\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\'\".,<>?«»“”‘’]))', website_url):
278+
# raise ValueError("Invalid value for `website_url`, must be a follow pattern or equal to `/\\b((?:https?:\/\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\".,<>?«»“”‘’]))/`")
279279

280280
self._website_url = website_url
281281

@@ -326,8 +326,8 @@ def tax_id(self, tax_id):
326326
:param tax_id: The tax_id of this Boardingv1registrationsOrganizationInformationBusinessInformation.
327327
:type: str
328328
"""
329-
if tax_id is not None and not re.search('\\d{9}', tax_id):
330-
raise ValueError("Invalid value for `tax_id`, must be a follow pattern or equal to `/\\d{9}/`")
329+
# if tax_id is not None and not re.search('\\d{9}', tax_id):
330+
# raise ValueError("Invalid value for `tax_id`, must be a follow pattern or equal to `/\\d{9}/`")
331331

332332
self._tax_id = tax_id
333333

@@ -349,8 +349,8 @@ def phone_number(self, phone_number):
349349
:param phone_number: The phone_number of this Boardingv1registrationsOrganizationInformationBusinessInformation.
350350
:type: str
351351
"""
352-
if phone_number is not None and not re.search('^[0-9a-zA-Z\\\\+\\\\-]+$', phone_number):
353-
raise ValueError("Invalid value for `phone_number`, must be a follow pattern or equal to `/^[0-9a-zA-Z\\\\+\\\\-]+$/`")
352+
# if phone_number is not None and not re.search('^[0-9a-zA-Z\\\\+\\\\-]+$', phone_number):
353+
# raise ValueError("Invalid value for `phone_number`, must be a follow pattern or equal to `/^[0-9a-zA-Z\\\\+\\\\-]+$/`")
354354

355355
self._phone_number = phone_number
356356

@@ -437,8 +437,8 @@ def merchant_category_code(self, merchant_category_code):
437437
:param merchant_category_code: The merchant_category_code of this Boardingv1registrationsOrganizationInformationBusinessInformation.
438438
:type: str
439439
"""
440-
if merchant_category_code is not None and not re.search('^\\d{3,4}$', merchant_category_code):
441-
raise ValueError("Invalid value for `merchant_category_code`, must be a follow pattern or equal to `/^\\d{3,4}$/`")
440+
# if merchant_category_code is not None and not re.search('^\\d{3,4}$', merchant_category_code):
441+
# raise ValueError("Invalid value for `merchant_category_code`, must be a follow pattern or equal to `/^\\d{3,4}$/`")
442442

443443
self._merchant_category_code = merchant_category_code
444444

CyberSource/models/boardingv1registrations_organization_information_business_information_address.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def country(self, country):
9090
"""
9191
if country is None:
9292
raise ValueError("Invalid value for `country`, must not be `None`")
93-
if country is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', country):
94-
raise ValueError("Invalid value for `country`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
93+
# if country is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', country):
94+
# raise ValueError("Invalid value for `country`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
9595

9696
self._country = country
9797

@@ -115,8 +115,8 @@ def address1(self, address1):
115115
"""
116116
if address1 is None:
117117
raise ValueError("Invalid value for `address1`, must not be `None`")
118-
if address1 is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', address1):
119-
raise ValueError("Invalid value for `address1`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
118+
# if address1 is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', address1):
119+
# raise ValueError("Invalid value for `address1`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
120120

121121
self._address1 = address1
122122

@@ -138,8 +138,8 @@ def address2(self, address2):
138138
:param address2: The address2 of this Boardingv1registrationsOrganizationInformationBusinessInformationAddress.
139139
:type: str
140140
"""
141-
if address2 is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', address2):
142-
raise ValueError("Invalid value for `address2`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
141+
# if address2 is not None and not re.search('^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$', address2):
142+
# raise ValueError("Invalid value for `address2`, must be a follow pattern or equal to `/^[À-ÖØ-öø-ǿa-zA-Z0-9().\\-_#,;\/@$:!% ]{1,}$/`")
143143

144144
self._address2 = address2
145145

@@ -165,8 +165,8 @@ def locality(self, locality):
165165
"""
166166
if locality is None:
167167
raise ValueError("Invalid value for `locality`, must not be `None`")
168-
if locality is not None and not re.search('^[0-9a-zA-Z _\\-¡-]+$', locality):
169-
raise ValueError("Invalid value for `locality`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-¡-]+$/`")
168+
# if locality is not None and not re.search('^[0-9a-zA-Z _\\-¡-]+$', locality):
169+
# raise ValueError("Invalid value for `locality`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-¡-]+$/`")
170170

171171
self._locality = locality
172172

@@ -190,8 +190,8 @@ def administrative_area(self, administrative_area):
190190
:param administrative_area: The administrative_area of this Boardingv1registrationsOrganizationInformationBusinessInformationAddress.
191191
:type: str
192192
"""
193-
if administrative_area is not None and not re.search('^[0-9a-zA-Z¡- ]*$', administrative_area):
194-
raise ValueError("Invalid value for `administrative_area`, must be a follow pattern or equal to `/^[0-9a-zA-Z¡- ]*$/`")
193+
# if administrative_area is not None and not re.search('^[0-9a-zA-Z¡- ]*$', administrative_area):
194+
# raise ValueError("Invalid value for `administrative_area`, must be a follow pattern or equal to `/^[0-9a-zA-Z¡- ]*$/`")
195195

196196
self._administrative_area = administrative_area
197197

@@ -215,8 +215,8 @@ def postal_code(self, postal_code):
215215
:param postal_code: The postal_code of this Boardingv1registrationsOrganizationInformationBusinessInformationAddress.
216216
:type: str
217217
"""
218-
if postal_code is not None and not re.search('^[0-9a-zA-Z ]*$', postal_code):
219-
raise ValueError("Invalid value for `postal_code`, must be a follow pattern or equal to `/^[0-9a-zA-Z ]*$/`")
218+
# if postal_code is not None and not re.search('^[0-9a-zA-Z ]*$', postal_code):
219+
# raise ValueError("Invalid value for `postal_code`, must be a follow pattern or equal to `/^[0-9a-zA-Z ]*$/`")
220220

221221
self._postal_code = postal_code
222222

CyberSource/models/boardingv1registrations_organization_information_business_information_business_contact.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ def first_name(self, first_name):
8484
"""
8585
if first_name is None:
8686
raise ValueError("Invalid value for `first_name`, must not be `None`")
87-
if first_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', first_name):
88-
raise ValueError("Invalid value for `first_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
87+
# if first_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', first_name):
88+
# raise ValueError("Invalid value for `first_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
8989

9090
self._first_name = first_name
9191

@@ -107,8 +107,8 @@ def middle_name(self, middle_name):
107107
:param middle_name: The middle_name of this Boardingv1registrationsOrganizationInformationBusinessInformationBusinessContact.
108108
:type: str
109109
"""
110-
if middle_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', middle_name):
111-
raise ValueError("Invalid value for `middle_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
110+
# if middle_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', middle_name):
111+
# raise ValueError("Invalid value for `middle_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
112112

113113
self._middle_name = middle_name
114114

@@ -132,8 +132,8 @@ def last_name(self, last_name):
132132
"""
133133
if last_name is None:
134134
raise ValueError("Invalid value for `last_name`, must not be `None`")
135-
if last_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', last_name):
136-
raise ValueError("Invalid value for `last_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
135+
# if last_name is not None and not re.search('^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/\'&\\,\\(\\)!$;:?@\\#¡-]+$', last_name):
136+
# raise ValueError("Invalid value for `last_name`, must be a follow pattern or equal to `/^[0-9a-zA-Z _\\-\\+\\.\\*\\\"\/'&\\,\\(\\)!$;:?@\\#¡-]+$/`")
137137

138138
self._last_name = last_name
139139

@@ -157,8 +157,8 @@ def phone_number(self, phone_number):
157157
"""
158158
if phone_number is None:
159159
raise ValueError("Invalid value for `phone_number`, must not be `None`")
160-
if phone_number is not None and not re.search('^[0-9a-zA-Z\\\\+\\\\-]+$', phone_number):
161-
raise ValueError("Invalid value for `phone_number`, must be a follow pattern or equal to `/^[0-9a-zA-Z\\\\+\\\\-]+$/`")
160+
# if phone_number is not None and not re.search('^[0-9a-zA-Z\\\\+\\\\-]+$', phone_number):
161+
# raise ValueError("Invalid value for `phone_number`, must be a follow pattern or equal to `/^[0-9a-zA-Z\\\\+\\\\-]+$/`")
162162

163163
self._phone_number = phone_number
164164

@@ -182,8 +182,8 @@ def email(self, email):
182182
"""
183183
if email is None:
184184
raise ValueError("Invalid value for `email`, must not be `None`")
185-
if email is not None and not re.search('^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,50}|[0-9]{1,3})(\\]?)$', email):
186-
raise ValueError("Invalid value for `email`, must be a follow pattern or equal to `/^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,50}|[0-9]{1,3})(\\]?)$/`")
185+
# if email is not None and not re.search('^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,50}|[0-9]{1,3})(\\]?)$', email):
186+
# raise ValueError("Invalid value for `email`, must be a follow pattern or equal to `/^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,50}|[0-9]{1,3})(\\]?)$/`")
187187

188188
self._email = email
189189

0 commit comments

Comments
 (0)