Skip to content

Commit 3b6f3a9

Browse files
authored
Merge pull request #90 from CyberSource/oct-22-release
oct release updates
2 parents 3d5fdd6 + 8c63d10 commit 3b6f3a9

File tree

83 files changed

+7881
-171
lines changed

Some content is hidden

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

83 files changed

+7881
-171
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ target/
6262

6363
#Ipython Notebook
6464
.ipynb_checkpoints
65+
66+
.swagger-codegen-ignore
67+
.travis.yml
68+
.swagger-codegen
69+
git_push.sh

.travis.yml

-14
This file was deleted.

CyberSource/__init__.py

+21
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .models.unauthorized_client_error import UnauthorizedClientError
2222
from .models.add_negative_list_request import AddNegativeListRequest
2323
from .models.auth_reversal_request import AuthReversalRequest
24+
from .models.body import Body
2425
from .models.capture_payment_request import CapturePaymentRequest
2526
from .models.check_payer_auth_enrollment_request import CheckPayerAuthEnrollmentRequest
2627
from .models.create_adhoc_report_request import CreateAdhocReportRequest
@@ -42,11 +43,14 @@
4243
from .models.flexv1tokens_card_info import Flexv1tokensCardInfo
4344
from .models.fraud_marking_action_request import FraudMarkingActionRequest
4445
from .models.generate_public_key_request import GeneratePublicKeyRequest
46+
from .models.generate_unified_checkout_capture_context_request import GenerateUnifiedCheckoutCaptureContextRequest
4547
from .models.increment_auth_request import IncrementAuthRequest
4648
from .models.inline_response_400 import InlineResponse400
4749
from .models.inline_response_400_1 import InlineResponse4001
4850
from .models.inline_response_400_1_fields import InlineResponse4001Fields
4951
from .models.inline_response_400_2 import InlineResponse4002
52+
from .models.inline_response_400_3 import InlineResponse4003
53+
from .models.inline_response_400_3_details import InlineResponse4003Details
5054
from .models.inline_response_400_details import InlineResponse400Details
5155
from .models.inline_response_400_errors import InlineResponse400Errors
5256
from .models.inline_response_502 import InlineResponse502
@@ -246,6 +250,7 @@
246250
from .models.pts_v2_payments_voids_post400_response import PtsV2PaymentsVoidsPost400Response
247251
from .models.pts_v2_payouts_post201_response import PtsV2PayoutsPost201Response
248252
from .models.pts_v2_payouts_post201_response_error_information import PtsV2PayoutsPost201ResponseErrorInformation
253+
from .models.pts_v2_payouts_post201_response_issuer_information import PtsV2PayoutsPost201ResponseIssuerInformation
249254
from .models.pts_v2_payouts_post201_response_merchant_information import PtsV2PayoutsPost201ResponseMerchantInformation
250255
from .models.pts_v2_payouts_post201_response_merchant_information_merchant_descriptor import PtsV2PayoutsPost201ResponseMerchantInformationMerchantDescriptor
251256
from .models.pts_v2_payouts_post201_response_order_information import PtsV2PayoutsPost201ResponseOrderInformation
@@ -632,6 +637,11 @@
632637
from .models.tmsv2customers_metadata import Tmsv2customersMetadata
633638
from .models.tmsv2customers_object_information import Tmsv2customersObjectInformation
634639
from .models.tokenize_request import TokenizeRequest
640+
from .models.tss_v2_get_emv_tags200_response import TssV2GetEmvTags200Response
641+
from .models.tss_v2_get_emv_tags200_response_emv_tag_breakdown_list import TssV2GetEmvTags200ResponseEmvTagBreakdownList
642+
from .models.tss_v2_post_emv_tags200_response import TssV2PostEmvTags200Response
643+
from .models.tss_v2_post_emv_tags200_response_emv_tag_breakdown_list import TssV2PostEmvTags200ResponseEmvTagBreakdownList
644+
from .models.tss_v2_post_emv_tags200_response_parsed_emv_tags_list import TssV2PostEmvTags200ResponseParsedEMVTagsList
635645
from .models.tss_v2_transactions_get200_response import TssV2TransactionsGet200Response
636646
from .models.tss_v2_transactions_get200_response_application_information import TssV2TransactionsGet200ResponseApplicationInformation
637647
from .models.tss_v2_transactions_get200_response_application_information_applications import TssV2TransactionsGet200ResponseApplicationInformationApplications
@@ -709,12 +719,20 @@
709719
from .models.tss_v2_transactions_post201_response__embedded_risk_information_providers_fingerprint import TssV2TransactionsPost201ResponseEmbeddedRiskInformationProvidersFingerprint
710720
from .models.tss_v2_transactions_post201_response__embedded_transaction_summaries import TssV2TransactionsPost201ResponseEmbeddedTransactionSummaries
711721
from .models.tss_v2_transactions_post400_response import TssV2TransactionsPost400Response
722+
from .models.tssv2transactionsemv_tag_details_emv_details_list import Tssv2transactionsemvTagDetailsEmvDetailsList
712723
from .models.ums_v1_users_get200_response import UmsV1UsersGet200Response
713724
from .models.ums_v1_users_get200_response_account_information import UmsV1UsersGet200ResponseAccountInformation
714725
from .models.ums_v1_users_get200_response_contact_information import UmsV1UsersGet200ResponseContactInformation
715726
from .models.ums_v1_users_get200_response_organization_information import UmsV1UsersGet200ResponseOrganizationInformation
716727
from .models.ums_v1_users_get200_response_users import UmsV1UsersGet200ResponseUsers
717728
from .models.update_invoice_request import UpdateInvoiceRequest
729+
from .models.upv1capturecontexts_capture_mandate import Upv1capturecontextsCaptureMandate
730+
from .models.upv1capturecontexts_checkout_api_initialization import Upv1capturecontextsCheckoutApiInitialization
731+
from .models.upv1capturecontexts_order_information import Upv1capturecontextsOrderInformation
732+
from .models.upv1capturecontexts_order_information_amount_details import Upv1capturecontextsOrderInformationAmountDetails
733+
from .models.upv1capturecontexts_order_information_bill_to import Upv1capturecontextsOrderInformationBillTo
734+
from .models.upv1capturecontexts_order_information_bill_to_company import Upv1capturecontextsOrderInformationBillToCompany
735+
from .models.upv1capturecontexts_order_information_ship_to import Upv1capturecontextsOrderInformationShipTo
718736
from .models.v1_file_details_get200_response import V1FileDetailsGet200Response
719737
from .models.v1_file_details_get200_response_file_details import V1FileDetailsGet200ResponseFileDetails
720738
from .models.v1_file_details_get200_response__links import V1FileDetailsGet200ResponseLinks
@@ -768,6 +786,7 @@
768786
from .apis.decision_manager_api import DecisionManagerApi
769787
from .apis.download_dtd_api import DownloadDTDApi
770788
from .apis.download_xsd_api import DownloadXSDApi
789+
from .apis.emv_tag_details_api import EMVTagDetailsApi
771790
from .apis.instrument_identifier_api import InstrumentIdentifierApi
772791
from .apis.interchange_clearing_level_details_api import InterchangeClearingLevelDetailsApi
773792
from .apis.invoice_settings_api import InvoiceSettingsApi
@@ -796,6 +815,8 @@
796815
from .apis.tokenization_api import TokenizationApi
797816
from .apis.transaction_batches_api import TransactionBatchesApi
798817
from .apis.transaction_details_api import TransactionDetailsApi
818+
from .apis.transient_token_data_api import TransientTokenDataApi
819+
from .apis.unified_checkout_capture_context_api import UnifiedCheckoutCaptureContextApi
799820
from .apis.user_management_api import UserManagementApi
800821
from .apis.user_management_search_api import UserManagementSearchApi
801822
from .apis.verification_api import VerificationApi

CyberSource/apis/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from .decision_manager_api import DecisionManagerApi
1515
from .download_dtd_api import DownloadDTDApi
1616
from .download_xsd_api import DownloadXSDApi
17+
from .emv_tag_details_api import EMVTagDetailsApi
1718
from .instrument_identifier_api import InstrumentIdentifierApi
1819
from .interchange_clearing_level_details_api import InterchangeClearingLevelDetailsApi
1920
from .invoice_settings_api import InvoiceSettingsApi
@@ -42,6 +43,8 @@
4243
from .tokenization_api import TokenizationApi
4344
from .transaction_batches_api import TransactionBatchesApi
4445
from .transaction_details_api import TransactionDetailsApi
46+
from .transient_token_data_api import TransientTokenDataApi
47+
from .unified_checkout_capture_context_api import UnifiedCheckoutCaptureContextApi
4548
from .user_management_api import UserManagementApi
4649
from .user_management_search_api import UserManagementSearchApi
4750
from .verification_api import VerificationApi
+262
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
# coding: utf-8
2+
3+
"""
4+
CyberSource Merged Spec
5+
6+
All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
7+
8+
OpenAPI spec version: 0.0.1
9+
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import sys
17+
import os
18+
import re
19+
20+
# python 2 and python 3 compatibility library
21+
from six import iteritems
22+
23+
from ..configuration import Configuration
24+
from ..api_client import ApiClient
25+
import CyberSource.logging.log_factory as LogFactory
26+
27+
28+
class EMVTagDetailsApi(object):
29+
"""
30+
NOTE: This class is auto generated by the swagger code generator program.
31+
Do not edit the class manually.
32+
Ref: https://github.com/swagger-api/swagger-codegen
33+
"""
34+
35+
def __init__(self, merchant_config, api_client=None):
36+
config = Configuration()
37+
if api_client:
38+
self.api_client = api_client
39+
else:
40+
if not config.api_client:
41+
config.api_client = ApiClient()
42+
self.api_client = config.api_client
43+
self.api_client.set_configuration(merchant_config)
44+
self.logger = LogFactory.setup_logger(self.__class__.__name__, self.api_client.mconfig.log_config)
45+
46+
47+
48+
def get_emv_tags(self, **kwargs):
49+
"""
50+
Retrieve the EMV Dictionary
51+
Returns the entire EMV tag dictionary
52+
This method makes a synchronous HTTP request by default. To make an
53+
asynchronous HTTP request, please define a `callback` function
54+
to be invoked when receiving the response.
55+
>>> def callback_function(response):
56+
>>> pprint(response)
57+
>>>
58+
>>> thread = api.get_emv_tags(callback=callback_function)
59+
60+
:param callback function: The callback function
61+
for asynchronous request. (optional)
62+
:return: TssV2GetEmvTags200Response
63+
If the method is called asynchronously,
64+
returns the request thread.
65+
"""
66+
67+
if self.api_client.mconfig.log_config.enable_log:
68+
self.logger.info("CALL TO METHOD `get_emv_tags` STARTED")
69+
70+
kwargs['_return_http_data_only'] = True
71+
if kwargs.get('callback'):
72+
return self.get_emv_tags_with_http_info(**kwargs)
73+
else:
74+
(data) = self.get_emv_tags_with_http_info(**kwargs)
75+
return data
76+
77+
def get_emv_tags_with_http_info(self, **kwargs):
78+
"""
79+
Retrieve the EMV Dictionary
80+
Returns the entire EMV tag dictionary
81+
This method makes a synchronous HTTP request by default. To make an
82+
asynchronous HTTP request, please define a `callback` function
83+
to be invoked when receiving the response.
84+
>>> def callback_function(response):
85+
>>> pprint(response)
86+
>>>
87+
>>> thread = api.get_emv_tags_with_http_info(callback=callback_function)
88+
89+
:param callback function: The callback function
90+
for asynchronous request. (optional)
91+
:return: TssV2GetEmvTags200Response
92+
If the method is called asynchronously,
93+
returns the request thread.
94+
"""
95+
96+
all_params = []
97+
all_params.append('callback')
98+
all_params.append('_return_http_data_only')
99+
all_params.append('_preload_content')
100+
all_params.append('_request_timeout')
101+
102+
params = locals()
103+
for key, val in iteritems(params['kwargs']):
104+
if key not in all_params:
105+
raise TypeError(
106+
"Got an unexpected keyword argument '%s'"
107+
" to method get_emv_tags" % key
108+
)
109+
params[key] = val
110+
del params['kwargs']
111+
112+
collection_formats = {}
113+
114+
path_params = {}
115+
116+
query_params = []
117+
118+
header_params = {}
119+
120+
form_params = []
121+
local_var_files = {}
122+
123+
body_params = None
124+
if 'GET' in ('POST'):
125+
body_params = '{}'
126+
# HTTP header `Accept`
127+
header_params['Accept'] = self.api_client.\
128+
select_header_accept(['application/json;charset=utf-8'])
129+
130+
# HTTP header `Content-Type`
131+
header_params['Content-Type'] = self.api_client.\
132+
select_header_content_type(['application/json;charset=utf-8'])
133+
134+
# Authentication setting
135+
auth_settings = []
136+
137+
return self.api_client.call_api(f'/tss/v2/transactions/emvTagDetails', 'GET',
138+
path_params,
139+
query_params,
140+
header_params,
141+
body=body_params,
142+
post_params=form_params,
143+
files=local_var_files,
144+
response_type='TssV2GetEmvTags200Response',
145+
auth_settings=auth_settings,
146+
callback=params.get('callback'),
147+
_return_http_data_only=params.get('_return_http_data_only'),
148+
_preload_content=params.get('_preload_content', True),
149+
_request_timeout=params.get('_request_timeout'),
150+
collection_formats=collection_formats)
151+
152+
def parse_emv_tags(self, body, **kwargs):
153+
"""
154+
Parse an EMV String
155+
Pass an EMV Tag-Length-Value (TLV) string for parsing.
156+
This method makes a synchronous HTTP request by default. To make an
157+
asynchronous HTTP request, please define a `callback` function
158+
to be invoked when receiving the response.
159+
>>> def callback_function(response):
160+
>>> pprint(response)
161+
>>>
162+
>>> thread = api.parse_emv_tags(body, callback=callback_function)
163+
164+
:param callback function: The callback function
165+
for asynchronous request. (optional)
166+
:param Body body: (required)
167+
:return: TssV2PostEmvTags200Response
168+
If the method is called asynchronously,
169+
returns the request thread.
170+
"""
171+
172+
if self.api_client.mconfig.log_config.enable_log:
173+
self.logger.info("CALL TO METHOD `parse_emv_tags` STARTED")
174+
175+
kwargs['_return_http_data_only'] = True
176+
if kwargs.get('callback'):
177+
return self.parse_emv_tags_with_http_info(body, **kwargs)
178+
else:
179+
(data) = self.parse_emv_tags_with_http_info(body, **kwargs)
180+
return data
181+
182+
def parse_emv_tags_with_http_info(self, body, **kwargs):
183+
"""
184+
Parse an EMV String
185+
Pass an EMV Tag-Length-Value (TLV) string for parsing.
186+
This method makes a synchronous HTTP request by default. To make an
187+
asynchronous HTTP request, please define a `callback` function
188+
to be invoked when receiving the response.
189+
>>> def callback_function(response):
190+
>>> pprint(response)
191+
>>>
192+
>>> thread = api.parse_emv_tags_with_http_info(body, callback=callback_function)
193+
194+
:param callback function: The callback function
195+
for asynchronous request. (optional)
196+
:param Body body: (required)
197+
:return: TssV2PostEmvTags200Response
198+
If the method is called asynchronously,
199+
returns the request thread.
200+
"""
201+
202+
all_params = ['body']
203+
all_params.append('callback')
204+
all_params.append('_return_http_data_only')
205+
all_params.append('_preload_content')
206+
all_params.append('_request_timeout')
207+
208+
params = locals()
209+
for key, val in iteritems(params['kwargs']):
210+
if key not in all_params:
211+
raise TypeError(
212+
"Got an unexpected keyword argument '%s'"
213+
" to method parse_emv_tags" % key
214+
)
215+
params[key] = val
216+
del params['kwargs']
217+
# verify the required parameter 'body' is set
218+
if ('body' not in params) or (params['body'] is None):
219+
if self.api_client.mconfig.log_config.enable_log:
220+
self.logger.error("InvalidArgumentException : Missing the required parameter `body` when calling `parse_emv_tags`")
221+
raise ValueError("Missing the required parameter `body` when calling `parse_emv_tags`")
222+
223+
224+
collection_formats = {}
225+
226+
path_params = {}
227+
228+
query_params = []
229+
230+
header_params = {}
231+
232+
form_params = []
233+
local_var_files = {}
234+
235+
body_params = None
236+
if 'body' in params:
237+
body_params = params['body']
238+
# HTTP header `Accept`
239+
header_params['Accept'] = self.api_client.\
240+
select_header_accept(['application/hal+json;charset=utf-8'])
241+
242+
# HTTP header `Content-Type`
243+
header_params['Content-Type'] = self.api_client.\
244+
select_header_content_type(['application/json;charset=utf-8'])
245+
246+
# Authentication setting
247+
auth_settings = []
248+
249+
return self.api_client.call_api(f'/tss/v2/transactions/emvTagDetails', 'POST',
250+
path_params,
251+
query_params,
252+
header_params,
253+
body=body_params,
254+
post_params=form_params,
255+
files=local_var_files,
256+
response_type='TssV2PostEmvTags200Response',
257+
auth_settings=auth_settings,
258+
callback=params.get('callback'),
259+
_return_http_data_only=params.get('_return_http_data_only'),
260+
_preload_content=params.get('_preload_content', True),
261+
_request_timeout=params.get('_request_timeout'),
262+
collection_formats=collection_formats)

0 commit comments

Comments
 (0)