@@ -548,7 +548,7 @@ def post_instrument_identifier(self, post_instrument_identifier_request, **kwarg
548
548
549
549
:param callback function: The callback function
550
550
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)
552
552
:param str profile_id: The id of a profile containing user specific TMS configuration.
553
553
:return: Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier
554
554
If the method is called asynchronously,
@@ -574,7 +574,7 @@ def post_instrument_identifier_with_http_info(self, post_instrument_identifier_r
574
574
575
575
:param callback function: The callback function
576
576
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)
578
578
:param str profile_id: The id of a profile containing user specific TMS configuration.
579
579
:return: Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifier
580
580
If the method is called asynchronously,
@@ -646,3 +646,126 @@ def post_instrument_identifier_with_http_info(self, post_instrument_identifier_r
646
646
_preload_content = params .get ('_preload_content' , True ),
647
647
_request_timeout = params .get ('_request_timeout' ),
648
648
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 )
0 commit comments