Skip to content

Commit 9bf1bee

Browse files
Merge pull request #110 from CyberSource/feb-2024-release
Feb 2024 release
2 parents ffa9b4d + 2754322 commit 9bf1bee

34 files changed

Lines changed: 964 additions & 375 deletions

CyberSource/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@
393393
from .models.post_customer_shipping_address_request import PostCustomerShippingAddressRequest
394394
from .models.post_instrument_identifier_enrollment_request import PostInstrumentIdentifierEnrollmentRequest
395395
from .models.post_instrument_identifier_request import PostInstrumentIdentifierRequest
396+
from .models.post_payment_credentials_request import PostPaymentCredentialsRequest
396397
from .models.post_payment_instrument_request import PostPaymentInstrumentRequest
397398
from .models.post_registration_body import PostRegistrationBody
398399
from .models.predefined_subscription_request_bean import PredefinedSubscriptionRequestBean
@@ -909,7 +910,6 @@
909910
from .models.riskv1authenticationresults_device_information import Riskv1authenticationresultsDeviceInformation
910911
from .models.riskv1authenticationresults_order_information import Riskv1authenticationresultsOrderInformation
911912
from .models.riskv1authenticationresults_order_information_amount_details import Riskv1authenticationresultsOrderInformationAmountDetails
912-
from .models.riskv1authenticationresults_order_information_line_items import Riskv1authenticationresultsOrderInformationLineItems
913913
from .models.riskv1authenticationresults_payment_information import Riskv1authenticationresultsPaymentInformation
914914
from .models.riskv1authenticationresults_payment_information_card import Riskv1authenticationresultsPaymentInformationCard
915915
from .models.riskv1authenticationresults_payment_information_fluid_data import Riskv1authenticationresultsPaymentInformationFluidData
@@ -932,6 +932,7 @@
932932
from .models.riskv1authenticationsetups_payment_information_tokenized_card import Riskv1authenticationsetupsPaymentInformationTokenizedCard
933933
from .models.riskv1authenticationsetups_processing_information import Riskv1authenticationsetupsProcessingInformation
934934
from .models.riskv1authenticationsetups_token_information import Riskv1authenticationsetupsTokenInformation
935+
from .models.riskv1decisions_acquirer_information import Riskv1decisionsAcquirerInformation
935936
from .models.riskv1decisions_buyer_information import Riskv1decisionsBuyerInformation
936937
from .models.riskv1decisions_client_reference_information import Riskv1decisionsClientReferenceInformation
937938
from .models.riskv1decisions_client_reference_information_partner import Riskv1decisionsClientReferenceInformationPartner

CyberSource/api/batches_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def get_batch_report_with_http_info(self, batch_id, **kwargs):
116116
self.logger.error("InvalidArgumentException : Missing the required parameter `batch_id` when calling `get_batch_report`")
117117
raise ValueError("Missing the required parameter `batch_id` when calling `get_batch_report`")
118118

119+
if 'batch_id' in params and not re.search('^[0-9]*$', params['batch_id']):
120+
if self.api_client.mconfig.log_config.enable_log:
121+
self.logger.error("InvalidArgumentException : Invalid value for parameter `batch_id` when calling `get_batch_report`, must conform to the pattern `/^[0-9]*$/`")
122+
raise ValueError("Invalid value for parameter `batch_id` when calling `get_batch_report`, must conform to the pattern `/^[0-9]*$/`")
119123

120124
collection_formats = {}
121125

@@ -229,6 +233,10 @@ def get_batch_status_with_http_info(self, batch_id, **kwargs):
229233
self.logger.error("InvalidArgumentException : Missing the required parameter `batch_id` when calling `get_batch_status`")
230234
raise ValueError("Missing the required parameter `batch_id` when calling `get_batch_status`")
231235

236+
if 'batch_id' in params and not re.search('^[0-9]*$', params['batch_id']):
237+
if self.api_client.mconfig.log_config.enable_log:
238+
self.logger.error("InvalidArgumentException : Invalid value for parameter `batch_id` when calling `get_batch_status`, must conform to the pattern `/^[0-9]*$/`")
239+
raise ValueError("Invalid value for parameter `batch_id` when calling `get_batch_status`, must conform to the pattern `/^[0-9]*$/`")
232240

233241
collection_formats = {}
234242

CyberSource/api/token_api.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, merchant_config, api_client=None):
4545

4646

4747

48-
def post_token_payment_credentials(self, token_id, **kwargs):
48+
def post_token_payment_credentials(self, token_id, post_payment_credentials_request, **kwargs):
4949
"""
5050
Generate Payment Credentials for a TMS Token
5151
| | | | | --- | --- | --- | |**Token**<br>A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument or Instrument Identifier.
@@ -55,11 +55,12 @@ def post_token_payment_credentials(self, token_id, **kwargs):
5555
>>> def callback_function(response):
5656
>>> pprint(response)
5757
>>>
58-
>>> thread = api.post_token_payment_credentials(token_id, callback=callback_function)
58+
>>> thread = api.post_token_payment_credentials(token_id, post_payment_credentials_request, callback=callback_function)
5959
6060
:param callback function: The callback function
6161
for asynchronous request. (optional)
6262
:param str token_id: The Id of a token representing a Customer, Payment Instrument or Instrument Identifier. (required)
63+
:param PostPaymentCredentialsRequest post_payment_credentials_request: (required)
6364
:param str profile_id: The Id of a profile containing user specific TMS configuration.
6465
:return: str
6566
If the method is called asynchronously,
@@ -71,12 +72,12 @@ def post_token_payment_credentials(self, token_id, **kwargs):
7172

7273
kwargs['_return_http_data_only'] = True
7374
if kwargs.get('callback'):
74-
return self.post_token_payment_credentials_with_http_info(token_id, **kwargs)
75+
return self.post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, **kwargs)
7576
else:
76-
(data) = self.post_token_payment_credentials_with_http_info(token_id, **kwargs)
77+
(data) = self.post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, **kwargs)
7778
return data
7879

79-
def post_token_payment_credentials_with_http_info(self, token_id, **kwargs):
80+
def post_token_payment_credentials_with_http_info(self, token_id, post_payment_credentials_request, **kwargs):
8081
"""
8182
Generate Payment Credentials for a TMS Token
8283
| | | | | --- | --- | --- | |**Token**<br>A Token can represent your tokenized Customer, Payment Instrument or Instrument Identifier information.|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|**Payment Credentials**<br>Contains payment information such as the network token, generated cryptogram for Visa & MasterCard or dynamic CVV for Amex in a JSON Web Encryption (JWE) response.<br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument or Instrument Identifier.
@@ -86,18 +87,19 @@ def post_token_payment_credentials_with_http_info(self, token_id, **kwargs):
8687
>>> def callback_function(response):
8788
>>> pprint(response)
8889
>>>
89-
>>> thread = api.post_token_payment_credentials_with_http_info(token_id, callback=callback_function)
90+
>>> thread = api.post_token_payment_credentials_with_http_info(token_id, post_payment_credentials_request, callback=callback_function)
9091
9192
:param callback function: The callback function
9293
for asynchronous request. (optional)
9394
:param str token_id: The Id of a token representing a Customer, Payment Instrument or Instrument Identifier. (required)
95+
:param PostPaymentCredentialsRequest post_payment_credentials_request: (required)
9496
:param str profile_id: The Id of a profile containing user specific TMS configuration.
9597
:return: str
9698
If the method is called asynchronously,
9799
returns the request thread.
98100
"""
99101

100-
all_params = ['token_id', 'profile_id']
102+
all_params = ['token_id', 'post_payment_credentials_request', 'profile_id']
101103
all_params.append('callback')
102104
all_params.append('_return_http_data_only')
103105
all_params.append('_preload_content')
@@ -117,6 +119,11 @@ def post_token_payment_credentials_with_http_info(self, token_id, **kwargs):
117119
if self.api_client.mconfig.log_config.enable_log:
118120
self.logger.error("InvalidArgumentException : Missing the required parameter `token_id` when calling `post_token_payment_credentials`")
119121
raise ValueError("Missing the required parameter `token_id` when calling `post_token_payment_credentials`")
122+
# verify the required parameter 'post_payment_credentials_request' is set
123+
if ('post_payment_credentials_request' not in params) or (params['post_payment_credentials_request'] is None):
124+
if self.api_client.mconfig.log_config.enable_log:
125+
self.logger.error("InvalidArgumentException : Missing the required parameter `post_payment_credentials_request` when calling `post_token_payment_credentials`")
126+
raise ValueError("Missing the required parameter `post_payment_credentials_request` when calling `post_token_payment_credentials`")
120127

121128

122129
collection_formats = {}
@@ -136,8 +143,11 @@ def post_token_payment_credentials_with_http_info(self, token_id, **kwargs):
136143
local_var_files = {}
137144

138145
body_params = None
139-
if 'POST' in ('POST'):
140-
body_params = '{}'
146+
if 'post_payment_credentials_request' in params:
147+
body_params = params['post_payment_credentials_request']
148+
149+
sdkTracker = SdkTracker()
150+
body_params = sdkTracker.insert_developer_id_tracker(body_params, 'post_payment_credentials_request', self.api_client.mconfig.run_environment)
141151
# HTTP header `Accept`
142152
header_params['Accept'] = self.api_client.select_header_accept(['application/jose;charset=utf-8'])
143153

CyberSource/models/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@
393393
from .post_customer_shipping_address_request import PostCustomerShippingAddressRequest
394394
from .post_instrument_identifier_enrollment_request import PostInstrumentIdentifierEnrollmentRequest
395395
from .post_instrument_identifier_request import PostInstrumentIdentifierRequest
396+
from .post_payment_credentials_request import PostPaymentCredentialsRequest
396397
from .post_payment_instrument_request import PostPaymentInstrumentRequest
397398
from .post_registration_body import PostRegistrationBody
398399
from .predefined_subscription_request_bean import PredefinedSubscriptionRequestBean
@@ -909,7 +910,6 @@
909910
from .riskv1authenticationresults_device_information import Riskv1authenticationresultsDeviceInformation
910911
from .riskv1authenticationresults_order_information import Riskv1authenticationresultsOrderInformation
911912
from .riskv1authenticationresults_order_information_amount_details import Riskv1authenticationresultsOrderInformationAmountDetails
912-
from .riskv1authenticationresults_order_information_line_items import Riskv1authenticationresultsOrderInformationLineItems
913913
from .riskv1authenticationresults_payment_information import Riskv1authenticationresultsPaymentInformation
914914
from .riskv1authenticationresults_payment_information_card import Riskv1authenticationresultsPaymentInformationCard
915915
from .riskv1authenticationresults_payment_information_fluid_data import Riskv1authenticationresultsPaymentInformationFluidData
@@ -932,6 +932,7 @@
932932
from .riskv1authenticationsetups_payment_information_tokenized_card import Riskv1authenticationsetupsPaymentInformationTokenizedCard
933933
from .riskv1authenticationsetups_processing_information import Riskv1authenticationsetupsProcessingInformation
934934
from .riskv1authenticationsetups_token_information import Riskv1authenticationsetupsTokenInformation
935+
from .riskv1decisions_acquirer_information import Riskv1decisionsAcquirerInformation
935936
from .riskv1decisions_buyer_information import Riskv1decisionsBuyerInformation
936937
from .riskv1decisions_client_reference_information import Riskv1decisionsClientReferenceInformation
937938
from .riskv1decisions_client_reference_information_partner import Riskv1decisionsClientReferenceInformationPartner

CyberSource/models/check_payer_auth_enrollment_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class CheckPayerAuthEnrollmentRequest(object):
3939
'buyer_information': 'Riskv1authenticationsBuyerInformation',
4040
'device_information': 'Riskv1authenticationsDeviceInformation',
4141
'merchant_information': 'Riskv1decisionsMerchantInformation',
42-
'acquirer_information': 'Ptsv2paymentsAcquirerInformation',
42+
'acquirer_information': 'Riskv1decisionsAcquirerInformation',
4343
'recurring_payment_information': 'Ptsv2paymentsRecurringPaymentInformation',
4444
'consumer_authentication_information': 'Riskv1decisionsConsumerAuthenticationInformation',
4545
'risk_information': 'Riskv1authenticationsRiskInformation',
@@ -287,7 +287,7 @@ def acquirer_information(self):
287287
Gets the acquirer_information of this CheckPayerAuthEnrollmentRequest.
288288
289289
:return: The acquirer_information of this CheckPayerAuthEnrollmentRequest.
290-
:rtype: Ptsv2paymentsAcquirerInformation
290+
:rtype: Riskv1decisionsAcquirerInformation
291291
"""
292292
return self._acquirer_information
293293

@@ -297,7 +297,7 @@ def acquirer_information(self, acquirer_information):
297297
Sets the acquirer_information of this CheckPayerAuthEnrollmentRequest.
298298
299299
:param acquirer_information: The acquirer_information of this CheckPayerAuthEnrollmentRequest.
300-
:type: Ptsv2paymentsAcquirerInformation
300+
:type: Riskv1decisionsAcquirerInformation
301301
"""
302302

303303
self._acquirer_information = acquirer_information

CyberSource/models/create_bundled_decision_manager_case_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CreateBundledDecisionManagerCaseRequest(object):
4242
'travel_information': 'Riskv1decisionsTravelInformation',
4343
'merchant_defined_information': 'list[Riskv1decisionsMerchantDefinedInformation]',
4444
'merchant_information': 'Riskv1decisionsMerchantInformation',
45-
'acquirer_information': 'Ptsv2paymentsAcquirerInformation',
45+
'acquirer_information': 'Riskv1decisionsAcquirerInformation',
4646
'recurring_payment_information': 'Ptsv2paymentsRecurringPaymentInformation',
4747
'consumer_authentication_information': 'Riskv1decisionsConsumerAuthenticationInformation',
4848
'watchlist_screening_information': 'Ptsv2paymentsWatchlistScreeningInformation',
@@ -361,7 +361,7 @@ def acquirer_information(self):
361361
Gets the acquirer_information of this CreateBundledDecisionManagerCaseRequest.
362362
363363
:return: The acquirer_information of this CreateBundledDecisionManagerCaseRequest.
364-
:rtype: Ptsv2paymentsAcquirerInformation
364+
:rtype: Riskv1decisionsAcquirerInformation
365365
"""
366366
return self._acquirer_information
367367

@@ -371,7 +371,7 @@ def acquirer_information(self, acquirer_information):
371371
Sets the acquirer_information of this CreateBundledDecisionManagerCaseRequest.
372372
373373
:param acquirer_information: The acquirer_information of this CreateBundledDecisionManagerCaseRequest.
374-
:type: Ptsv2paymentsAcquirerInformation
374+
:type: Riskv1decisionsAcquirerInformation
375375
"""
376376

377377
self._acquirer_information = acquirer_information

CyberSource/models/invoicing_v2_invoices_all_get404_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def submit_time_utc(self, submit_time_utc):
9595
def status(self):
9696
"""
9797
Gets the status of this InvoicingV2InvoicesAllGet404Response.
98-
The status of the invoice. Possible values: - NOTFOUND
98+
The status of the invoice. Possible values: - NOTFOUND
9999
100100
:return: The status of this InvoicingV2InvoicesAllGet404Response.
101101
:rtype: str
@@ -106,7 +106,7 @@ def status(self):
106106
def status(self, status):
107107
"""
108108
Sets the status of this InvoicingV2InvoicesAllGet404Response.
109-
The status of the invoice. Possible values: - NOTFOUND
109+
The status of the invoice. Possible values: - NOTFOUND
110110
111111
:param status: The status of this InvoicingV2InvoicesAllGet404Response.
112112
:type: str

0 commit comments

Comments
 (0)