Skip to content

Commit abdb3a2

Browse files
authored
Merge pull request #63 from CyberSource/dec2020
December 2020 Release
2 parents dae5383 + 1454085 commit abdb3a2

File tree

403 files changed

+1951
-3290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+1951
-3290
lines changed

CyberSource/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
from .models.post_customer_payment_instrument_request import PostCustomerPaymentInstrumentRequest
119119
from .models.post_customer_request import PostCustomerRequest
120120
from .models.post_customer_shipping_address_request import PostCustomerShippingAddressRequest
121+
from .models.post_instrument_identifier_enrollment_request import PostInstrumentIdentifierEnrollmentRequest
121122
from .models.post_instrument_identifier_request import PostInstrumentIdentifierRequest
122123
from .models.post_payment_instrument_request import PostPaymentInstrumentRequest
123124
from .models.predefined_subscription_request_bean import PredefinedSubscriptionRequestBean

CyberSource/apis/instrument_identifier_api.py

+125-2
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def post_instrument_identifier(self, post_instrument_identifier_request, **kwarg
548548
549549
:param callback function: The callback function
550550
for asynchronous request. (optional)
551-
:param PostInstrumentIdentifierRequest post_instrument_identifier_request: Please specify either a Card, Bank Account or Enrollable Card (required)
551+
:param PostInstrumentIdentifierRequest post_instrument_identifier_request: Specify either a Card, Bank Account or Enrollable Card (required)
552552
:param str profile_id: The id of a profile containing user specific TMS configuration.
553553
:return: Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier
554554
If the method is called asynchronously,
@@ -574,7 +574,7 @@ def post_instrument_identifier_with_http_info(self, post_instrument_identifier_r
574574
575575
:param callback function: The callback function
576576
for asynchronous request. (optional)
577-
:param PostInstrumentIdentifierRequest post_instrument_identifier_request: Please specify either a Card, Bank Account or Enrollable Card (required)
577+
:param PostInstrumentIdentifierRequest post_instrument_identifier_request: Specify either a Card, Bank Account or Enrollable Card (required)
578578
:param str profile_id: The id of a profile containing user specific TMS configuration.
579579
:return: Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier
580580
If the method is called asynchronously,
@@ -646,3 +646,126 @@ def post_instrument_identifier_with_http_info(self, post_instrument_identifier_r
646646
_preload_content=params.get('_preload_content', True),
647647
_request_timeout=params.get('_request_timeout'),
648648
collection_formats=collection_formats)
649+
650+
def post_instrument_identifier_enrollment(self, instrument_identifier_token_id, post_instrument_identifier_enrollment_request, **kwargs):
651+
"""
652+
Enroll an Instrument Identifier for Network Tokenization
653+
This method makes a synchronous HTTP request by default. To make an
654+
asynchronous HTTP request, please define a `callback` function
655+
to be invoked when receiving the response.
656+
>>> def callback_function(response):
657+
>>> pprint(response)
658+
>>>
659+
>>> thread = api.post_instrument_identifier_enrollment(instrument_identifier_token_id, post_instrument_identifier_enrollment_request, callback=callback_function)
660+
661+
:param callback function: The callback function
662+
for asynchronous request. (optional)
663+
:param str instrument_identifier_token_id: The TokenId of a Instrument Identifier. (required)
664+
:param PostInstrumentIdentifierEnrollmentRequest post_instrument_identifier_enrollment_request: Specify Enrollable Card details (required)
665+
:param str profile_id: The id of a profile containing user specific TMS configuration.
666+
:return: None
667+
If the method is called asynchronously,
668+
returns the request thread.
669+
"""
670+
kwargs['_return_http_data_only'] = True
671+
if kwargs.get('callback'):
672+
return self.post_instrument_identifier_enrollment_with_http_info(instrument_identifier_token_id, post_instrument_identifier_enrollment_request, **kwargs)
673+
else:
674+
(data) = self.post_instrument_identifier_enrollment_with_http_info(instrument_identifier_token_id, post_instrument_identifier_enrollment_request, **kwargs)
675+
return data
676+
677+
def post_instrument_identifier_enrollment_with_http_info(self, instrument_identifier_token_id, post_instrument_identifier_enrollment_request, **kwargs):
678+
"""
679+
Enroll an Instrument Identifier for Network Tokenization
680+
This method makes a synchronous HTTP request by default. To make an
681+
asynchronous HTTP request, please define a `callback` function
682+
to be invoked when receiving the response.
683+
>>> def callback_function(response):
684+
>>> pprint(response)
685+
>>>
686+
>>> thread = api.post_instrument_identifier_enrollment_with_http_info(instrument_identifier_token_id, post_instrument_identifier_enrollment_request, callback=callback_function)
687+
688+
:param callback function: The callback function
689+
for asynchronous request. (optional)
690+
:param str instrument_identifier_token_id: The TokenId of a Instrument Identifier. (required)
691+
:param PostInstrumentIdentifierEnrollmentRequest post_instrument_identifier_enrollment_request: Specify Enrollable Card details (required)
692+
:param str profile_id: The id of a profile containing user specific TMS configuration.
693+
:return: None
694+
If the method is called asynchronously,
695+
returns the request thread.
696+
"""
697+
698+
all_params = ['instrument_identifier_token_id', 'post_instrument_identifier_enrollment_request', 'profile_id']
699+
all_params.append('callback')
700+
all_params.append('_return_http_data_only')
701+
all_params.append('_preload_content')
702+
all_params.append('_request_timeout')
703+
704+
params = locals()
705+
for key, val in iteritems(params['kwargs']):
706+
if key not in all_params:
707+
raise TypeError(
708+
"Got an unexpected keyword argument '%s'"
709+
" to method post_instrument_identifier_enrollment" % key
710+
)
711+
params[key] = val
712+
del params['kwargs']
713+
# verify the required parameter 'instrument_identifier_token_id' is set
714+
if ('instrument_identifier_token_id' not in params) or (params['instrument_identifier_token_id'] is None):
715+
raise ValueError("Missing the required parameter `instrument_identifier_token_id` when calling `post_instrument_identifier_enrollment`")
716+
# verify the required parameter 'post_instrument_identifier_enrollment_request' is set
717+
if ('post_instrument_identifier_enrollment_request' not in params) or (params['post_instrument_identifier_enrollment_request'] is None):
718+
raise ValueError("Missing the required parameter `post_instrument_identifier_enrollment_request` when calling `post_instrument_identifier_enrollment`")
719+
720+
if 'instrument_identifier_token_id' in params and len(params['instrument_identifier_token_id']) > 32:
721+
raise ValueError("Invalid value for parameter `instrument_identifier_token_id` when calling `post_instrument_identifier_enrollment`, length must be less than or equal to `32`")
722+
if 'instrument_identifier_token_id' in params and len(params['instrument_identifier_token_id']) < 12:
723+
raise ValueError("Invalid value for parameter `instrument_identifier_token_id` when calling `post_instrument_identifier_enrollment`, length must be greater than or equal to `12`")
724+
if 'profile_id' in params and len(params['profile_id']) > 36:
725+
raise ValueError("Invalid value for parameter `profile_id` when calling `post_instrument_identifier_enrollment`, length must be less than or equal to `36`")
726+
if 'profile_id' in params and len(params['profile_id']) < 36:
727+
raise ValueError("Invalid value for parameter `profile_id` when calling `post_instrument_identifier_enrollment`, length must be greater than or equal to `36`")
728+
729+
collection_formats = {}
730+
731+
path_params = {}
732+
if 'instrument_identifier_token_id' in params:
733+
path_params['instrumentIdentifierTokenId'] = params['instrument_identifier_token_id']
734+
735+
query_params = []
736+
737+
header_params = {}
738+
if 'profile_id' in params:
739+
header_params['profile-id'] = params['profile_id']
740+
741+
form_params = []
742+
local_var_files = {}
743+
744+
body_params = None
745+
if 'post_instrument_identifier_enrollment_request' in params:
746+
body_params = params['post_instrument_identifier_enrollment_request']
747+
# HTTP header `Accept`
748+
header_params['Accept'] = self.api_client.\
749+
select_header_accept(['application/json;charset=utf-8'])
750+
751+
# HTTP header `Content-Type`
752+
header_params['Content-Type'] = self.api_client.\
753+
select_header_content_type(['application/json;charset=utf-8'])
754+
755+
# Authentication setting
756+
auth_settings = []
757+
758+
return self.api_client.call_api(f'/tms/v1/instrumentidentifiers/{instrument_identifier_token_id}/enrollment', 'POST',
759+
path_params,
760+
query_params,
761+
header_params,
762+
body=body_params,
763+
post_params=form_params,
764+
files=local_var_files,
765+
response_type=None,
766+
auth_settings=auth_settings,
767+
callback=params.get('callback'),
768+
_return_http_data_only=params.get('_return_http_data_only'),
769+
_preload_content=params.get('_preload_content', True),
770+
_request_timeout=params.get('_request_timeout'),
771+
collection_formats=collection_formats)

CyberSource/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
from .post_customer_payment_instrument_request import PostCustomerPaymentInstrumentRequest
119119
from .post_customer_request import PostCustomerRequest
120120
from .post_customer_shipping_address_request import PostCustomerShippingAddressRequest
121+
from .post_instrument_identifier_enrollment_request import PostInstrumentIdentifierEnrollmentRequest
121122
from .post_instrument_identifier_request import PostInstrumentIdentifierRequest
122123
from .post_payment_instrument_request import PostPaymentInstrumentRequest
123124
from .predefined_subscription_request_bean import PredefinedSubscriptionRequestBean

CyberSource/models/create_adhoc_report_request.py

-8
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ def report_definition_name(self, report_definition_name):
141141
:param report_definition_name: The report_definition_name of this CreateAdhocReportRequest.
142142
:type: str
143143
"""
144-
if report_definition_name is not None and len(report_definition_name) > 80:
145-
raise ValueError("Invalid value for `report_definition_name`, length must be less than or equal to `80`")
146-
if report_definition_name is not None and len(report_definition_name) < 1:
147-
raise ValueError("Invalid value for `report_definition_name`, length must be greater than or equal to `1`")
148144
if report_definition_name is not None and not re.search('[a-zA-Z0-9-]+', report_definition_name):
149145
raise ValueError("Invalid value for `report_definition_name`, must be a follow pattern or equal to `/[a-zA-Z0-9-]+/`")
150146

@@ -216,10 +212,6 @@ def report_name(self, report_name):
216212
:param report_name: The report_name of this CreateAdhocReportRequest.
217213
:type: str
218214
"""
219-
if report_name is not None and len(report_name) > 128:
220-
raise ValueError("Invalid value for `report_name`, length must be less than or equal to `128`")
221-
if report_name is not None and len(report_name) < 1:
222-
raise ValueError("Invalid value for `report_name`, length must be greater than or equal to `1`")
223215
if report_name is not None and not re.search('[a-zA-Z0-9-_ ]+', report_name):
224216
raise ValueError("Invalid value for `report_name`, must be a follow pattern or equal to `/[a-zA-Z0-9-_ ]+/`")
225217

CyberSource/models/create_report_subscription_request.py

-8
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,6 @@ def report_definition_name(self, report_definition_name):
148148
"""
149149
if report_definition_name is None:
150150
raise ValueError("Invalid value for `report_definition_name`, must not be `None`")
151-
if report_definition_name is not None and len(report_definition_name) > 80:
152-
raise ValueError("Invalid value for `report_definition_name`, length must be less than or equal to `80`")
153-
if report_definition_name is not None and len(report_definition_name) < 1:
154-
raise ValueError("Invalid value for `report_definition_name`, length must be greater than or equal to `1`")
155151
if report_definition_name is not None and not re.search('[a-zA-Z0-9-]+', report_definition_name):
156152
raise ValueError("Invalid value for `report_definition_name`, must be a follow pattern or equal to `/[a-zA-Z0-9-]+/`")
157153

@@ -275,10 +271,6 @@ def report_name(self, report_name):
275271
"""
276272
if report_name is None:
277273
raise ValueError("Invalid value for `report_name`, must not be `None`")
278-
if report_name is not None and len(report_name) > 128:
279-
raise ValueError("Invalid value for `report_name`, length must be less than or equal to `128`")
280-
if report_name is not None and len(report_name) < 1:
281-
raise ValueError("Invalid value for `report_name`, length must be greater than or equal to `1`")
282274
if report_name is not None and not re.search('[a-zA-Z0-9-_ ]+', report_name):
283275
raise ValueError("Invalid value for `report_name`, must be a follow pattern or equal to `/[a-zA-Z0-9-_ ]+/`")
284276

CyberSource/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information.py

-12
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ def merchant_logo(self, merchant_logo):
103103
:param merchant_logo: The merchant_logo of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
104104
:type: str
105105
"""
106-
if merchant_logo is not None and len(merchant_logo) > 10000000:
107-
raise ValueError("Invalid value for `merchant_logo`, length must be less than or equal to `10000000`")
108106

109107
self._merchant_logo = merchant_logo
110108

@@ -128,8 +126,6 @@ def merchant_display_name(self, merchant_display_name):
128126
:param merchant_display_name: The merchant_display_name of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
129127
:type: str
130128
"""
131-
if merchant_display_name is not None and len(merchant_display_name) > 100:
132-
raise ValueError("Invalid value for `merchant_display_name`, length must be less than or equal to `100`")
133129

134130
self._merchant_display_name = merchant_display_name
135131

@@ -153,8 +149,6 @@ def custom_email_message(self, custom_email_message):
153149
:param custom_email_message: The custom_email_message of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
154150
:type: str
155151
"""
156-
if custom_email_message is not None and len(custom_email_message) > 2000:
157-
raise ValueError("Invalid value for `custom_email_message`, length must be less than or equal to `2000`")
158152

159153
self._custom_email_message = custom_email_message
160154

@@ -222,8 +216,6 @@ def delivery_language(self, delivery_language):
222216
:param delivery_language: The delivery_language of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
223217
:type: str
224218
"""
225-
if delivery_language is not None and len(delivery_language) > 6:
226-
raise ValueError("Invalid value for `delivery_language`, length must be less than or equal to `6`")
227219

228220
self._delivery_language = delivery_language
229221

@@ -247,8 +239,6 @@ def default_currency_code(self, default_currency_code):
247239
:param default_currency_code: The default_currency_code of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
248240
:type: str
249241
"""
250-
if default_currency_code is not None and len(default_currency_code) > 3:
251-
raise ValueError("Invalid value for `default_currency_code`, length must be less than or equal to `3`")
252242

253243
self._default_currency_code = default_currency_code
254244

@@ -272,8 +262,6 @@ def payer_authentication3_ds_version(self, payer_authentication3_ds_version):
272262
:param payer_authentication3_ds_version: The payer_authentication3_ds_version of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformation.
273263
:type: str
274264
"""
275-
if payer_authentication3_ds_version is not None and len(payer_authentication3_ds_version) > 8:
276-
raise ValueError("Invalid value for `payer_authentication3_ds_version`, length must be less than or equal to `8`")
277265

278266
self._payer_authentication3_ds_version = payer_authentication3_ds_version
279267

CyberSource/models/invoicing_v2_invoice_settings_get200_response_invoice_settings_information_header_style.py

-4
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def font_color(self, font_color):
7373
:param font_color: The font_color of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle.
7474
:type: str
7575
"""
76-
if font_color is not None and len(font_color) > 7:
77-
raise ValueError("Invalid value for `font_color`, length must be less than or equal to `7`")
7876
if font_color is not None and not re.search('^#(?:[0-9a-fA-F]{3}){1,2}$', font_color):
7977
raise ValueError("Invalid value for `font_color`, must be a follow pattern or equal to `/^#(?:[0-9a-fA-F]{3}){1,2}$/`")
8078

@@ -100,8 +98,6 @@ def background_color(self, background_color):
10098
:param background_color: The background_color of this InvoicingV2InvoiceSettingsGet200ResponseInvoiceSettingsInformationHeaderStyle.
10199
:type: str
102100
"""
103-
if background_color is not None and len(background_color) > 7:
104-
raise ValueError("Invalid value for `background_color`, length must be less than or equal to `7`")
105101
if background_color is not None and not re.search('^#(?:[0-9a-fA-F]{3}){1,2}$', background_color):
106102
raise ValueError("Invalid value for `background_color`, must be a follow pattern or equal to `/^#(?:[0-9a-fA-F]{3}){1,2}$/`")
107103

CyberSource/models/invoicing_v2_invoices_all_get200_response_customer_information.py

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ def name(self, name):
6868
:param name: The name of this InvoicingV2InvoicesAllGet200ResponseCustomerInformation.
6969
:type: str
7070
"""
71-
if name is not None and len(name) > 100:
72-
raise ValueError("Invalid value for `name`, length must be less than or equal to `100`")
7371

7472
self._name = name
7573

CyberSource/models/invoicing_v2_invoices_all_get200_response_invoices.py

-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ def id(self, id):
114114
:param id: The id of this InvoicingV2InvoicesAllGet200ResponseInvoices.
115115
:type: str
116116
"""
117-
if id is not None and len(id) > 26:
118-
raise ValueError("Invalid value for `id`, length must be less than or equal to `26`")
119117

120118
self._id = id
121119

CyberSource/models/invoicing_v2_invoices_all_get200_response_order_information_amount_details.py

-4
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ def total_amount(self, total_amount):
7373
:param total_amount: The total_amount of this InvoicingV2InvoicesAllGet200ResponseOrderInformationAmountDetails.
7474
:type: str
7575
"""
76-
if total_amount is not None and len(total_amount) > 19:
77-
raise ValueError("Invalid value for `total_amount`, length must be less than or equal to `19`")
7876

7977
self._total_amount = total_amount
8078

@@ -98,8 +96,6 @@ def currency(self, currency):
9896
:param currency: The currency of this InvoicingV2InvoicesAllGet200ResponseOrderInformationAmountDetails.
9997
:type: str
10098
"""
101-
if currency is not None and len(currency) > 3:
102-
raise ValueError("Invalid value for `currency`, length must be less than or equal to `3`")
10399

104100
self._currency = currency
105101

CyberSource/models/invoicing_v2_invoices_get200_response.py

-2
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ def id(self, id):
124124
:param id: The id of this InvoicingV2InvoicesGet200Response.
125125
:type: str
126126
"""
127-
if id is not None and len(id) > 26:
128-
raise ValueError("Invalid value for `id`, length must be less than or equal to `26`")
129127

130128
self._id = id
131129

0 commit comments

Comments
 (0)