Skip to content

Commit 163723d

Browse files
authored
Merge pull request #206 from CyberSource/feature/add-batch-api-support
Feature/add batch api support
2 parents 0b7fa15 + 69f01fd commit 163723d

Some content is hidden

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

63 files changed

+1235
-249
lines changed

Api/BatchesApi.cs

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -420,7 +421,13 @@ public ApiResponse< InlineResponse2007 > GetBatchReportWithHttpInfo (string batc
420421
{
421422
localVarPostBody = null;
422423
}
423-
424+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
425+
if(null!= filePostBodyAndDelimiter)
426+
{
427+
localVarPostBody = filePostBodyAndDelimiter[0];
428+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
429+
}
430+
424431
bool isMLESupportedByCybsForApi = false;
425432
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
426433
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetBatchReport,GetBatchReportAsync,GetBatchReportWithHttpInfo,GetBatchReportAsyncWithHttpInfo"))
@@ -531,6 +538,12 @@ public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2007>> GetBat
531538
{
532539
localVarPostBody = null;
533540
}
541+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
542+
if(null!= filePostBodyAndDelimiter)
543+
{
544+
localVarPostBody = filePostBodyAndDelimiter[0];
545+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
546+
}
534547

535548
bool isMLESupportedByCybsForApi = false;
536549
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
@@ -640,7 +653,13 @@ public ApiResponse< InlineResponse2006 > GetBatchStatusWithHttpInfo (string batc
640653
{
641654
localVarPostBody = null;
642655
}
643-
656+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
657+
if(null!= filePostBodyAndDelimiter)
658+
{
659+
localVarPostBody = filePostBodyAndDelimiter[0];
660+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
661+
}
662+
644663
bool isMLESupportedByCybsForApi = false;
645664
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
646665
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetBatchStatus,GetBatchStatusAsync,GetBatchStatusWithHttpInfo,GetBatchStatusAsyncWithHttpInfo"))
@@ -751,6 +770,12 @@ public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2006>> GetBat
751770
{
752771
localVarPostBody = null;
753772
}
773+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
774+
if(null!= filePostBodyAndDelimiter)
775+
{
776+
localVarPostBody = filePostBodyAndDelimiter[0];
777+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
778+
}
754779

755780
bool isMLESupportedByCybsForApi = false;
756781
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
@@ -875,7 +900,13 @@ public ApiResponse< InlineResponse2005 > GetBatchesListWithHttpInfo (long? offse
875900
{
876901
localVarPostBody = null;
877902
}
878-
903+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
904+
if(null!= filePostBodyAndDelimiter)
905+
{
906+
localVarPostBody = filePostBodyAndDelimiter[0];
907+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
908+
}
909+
879910
bool isMLESupportedByCybsForApi = false;
880911
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
881912
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetBatchesList,GetBatchesListAsync,GetBatchesListWithHttpInfo,GetBatchesListAsyncWithHttpInfo"))
@@ -1001,6 +1032,12 @@ public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2005>> GetBat
10011032
{
10021033
localVarPostBody = null;
10031034
}
1035+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
1036+
if(null!= filePostBodyAndDelimiter)
1037+
{
1038+
localVarPostBody = filePostBodyAndDelimiter[0];
1039+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
1040+
}
10041041

10051042
bool isMLESupportedByCybsForApi = false;
10061043
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
@@ -1107,8 +1144,7 @@ public ApiResponse< InlineResponse202 > PostBatchWithHttpInfo (Body body)
11071144
{
11081145
localVarPostBody = body; // byte array
11091146
}
1110-
1111-
1147+
11121148
bool isMLESupportedByCybsForApi = false;
11131149
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
11141150
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "PostBatch,PostBatchAsync,PostBatchWithHttpInfo,PostBatchAsyncWithHttpInfo"))

Api/BillingAgreementsApi.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -384,8 +385,7 @@ public ApiResponse< PtsV2ModifyBillingAgreementPost201Response > BillingAgreemen
384385
{
385386
localVarPostBody = modifyBillingAgreement; // byte array
386387
}
387-
388-
388+
389389
bool isMLESupportedByCybsForApi = true;
390390
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
391391
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "BillingAgreementsDeRegistration,BillingAgreementsDeRegistrationAsync,BillingAgreementsDeRegistrationWithHttpInfo,BillingAgreementsDeRegistrationAsyncWithHttpInfo"))
@@ -627,8 +627,7 @@ public ApiResponse< PtsV2CreditsPost201Response1 > BillingAgreementsIntimationWi
627627
{
628628
localVarPostBody = intimateBillingAgreement; // byte array
629629
}
630-
631-
630+
632631
bool isMLESupportedByCybsForApi = true;
633632
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
634633
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "BillingAgreementsIntimation,BillingAgreementsIntimationAsync,BillingAgreementsIntimationWithHttpInfo,BillingAgreementsIntimationAsyncWithHttpInfo"))
@@ -857,8 +856,7 @@ public ApiResponse< PtsV2CreateBillingAgreementPost201Response > BillingAgreemen
857856
{
858857
localVarPostBody = createBillingAgreement; // byte array
859858
}
860-
861-
859+
862860
bool isMLESupportedByCybsForApi = true;
863861
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
864862
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "BillingAgreementsRegistration,BillingAgreementsRegistrationAsync,BillingAgreementsRegistrationWithHttpInfo,BillingAgreementsRegistrationAsyncWithHttpInfo"))

Api/BinLookupApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -280,8 +281,7 @@ public ApiResponse< InlineResponse2011 > GetAccountInfoWithHttpInfo (CreateBinLo
280281
{
281282
localVarPostBody = createBinLookupRequest; // byte array
282283
}
283-
284-
284+
285285
bool isMLESupportedByCybsForApi = false;
286286
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
287287
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetAccountInfo,GetAccountInfoAsync,GetAccountInfoWithHttpInfo,GetAccountInfoAsyncWithHttpInfo"))

Api/CaptureApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -296,8 +297,7 @@ public ApiResponse< PtsV2PaymentsCapturesPost201Response > CapturePaymentWithHtt
296297
{
297298
localVarPostBody = capturePaymentRequest; // byte array
298299
}
299-
300-
300+
301301
bool isMLESupportedByCybsForApi = true;
302302
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
303303
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "CapturePayment,CapturePaymentAsync,CapturePaymentWithHttpInfo,CapturePaymentAsyncWithHttpInfo"))

Api/ChargebackDetailsApi.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -311,7 +312,13 @@ public ApiResponse< ReportingV3ChargebackDetailsGet200Response > GetChargebackDe
311312
{
312313
localVarPostBody = null;
313314
}
314-
315+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
316+
if(null!= filePostBodyAndDelimiter)
317+
{
318+
localVarPostBody = filePostBodyAndDelimiter[0];
319+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
320+
}
321+
315322
bool isMLESupportedByCybsForApi = false;
316323
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
317324
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetChargebackDetails,GetChargebackDetailsAsync,GetChargebackDetailsWithHttpInfo,GetChargebackDetailsAsyncWithHttpInfo"))
@@ -443,6 +450,12 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackDetail
443450
{
444451
localVarPostBody = null;
445452
}
453+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
454+
if(null!= filePostBodyAndDelimiter)
455+
{
456+
localVarPostBody = filePostBodyAndDelimiter[0];
457+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
458+
}
446459

447460
bool isMLESupportedByCybsForApi = false;
448461
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);

Api/ChargebackSummariesApi.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -311,7 +312,13 @@ public ApiResponse< ReportingV3ChargebackSummariesGet200Response > GetChargeback
311312
{
312313
localVarPostBody = null;
313314
}
314-
315+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
316+
if(null!= filePostBodyAndDelimiter)
317+
{
318+
localVarPostBody = filePostBodyAndDelimiter[0];
319+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
320+
}
321+
315322
bool isMLESupportedByCybsForApi = false;
316323
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
317324
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetChargebackSummaries,GetChargebackSummariesAsync,GetChargebackSummariesWithHttpInfo,GetChargebackSummariesAsyncWithHttpInfo"))
@@ -443,6 +450,12 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ChargebackSummar
443450
{
444451
localVarPostBody = null;
445452
}
453+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
454+
if(null!= filePostBodyAndDelimiter)
455+
{
456+
localVarPostBody = filePostBodyAndDelimiter[0];
457+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
458+
}
446459

447460
bool isMLESupportedByCybsForApi = false;
448461
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);

Api/ConversionDetailsApi.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -311,7 +312,13 @@ public ApiResponse< ReportingV3ConversionDetailsGet200Response > GetConversionDe
311312
{
312313
localVarPostBody = null;
313314
}
314-
315+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
316+
if(null!= filePostBodyAndDelimiter)
317+
{
318+
localVarPostBody = filePostBodyAndDelimiter[0];
319+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
320+
}
321+
315322
bool isMLESupportedByCybsForApi = false;
316323
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
317324
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "GetConversionDetail,GetConversionDetailAsync,GetConversionDetailWithHttpInfo,GetConversionDetailAsyncWithHttpInfo"))
@@ -443,6 +450,12 @@ public async System.Threading.Tasks.Task<ApiResponse<ReportingV3ConversionDetail
443450
{
444451
localVarPostBody = null;
445452
}
453+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
454+
if(null!= filePostBodyAndDelimiter)
455+
{
456+
localVarPostBody = filePostBodyAndDelimiter[0];
457+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
458+
}
446459

447460
bool isMLESupportedByCybsForApi = false;
448461
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);

Api/CreateNewWebhooksApi.cs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -378,7 +379,13 @@ public ApiResponse< List<InlineResponse2003> > FindProductsToSubscribeWithHttpIn
378379
{
379380
localVarPostBody = null;
380381
}
381-
382+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
383+
if(null!= filePostBodyAndDelimiter)
384+
{
385+
localVarPostBody = filePostBodyAndDelimiter[0];
386+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
387+
}
388+
382389
bool isMLESupportedByCybsForApi = false;
383390
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
384391
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "FindProductsToSubscribe,FindProductsToSubscribeAsync,FindProductsToSubscribeWithHttpInfo,FindProductsToSubscribeAsyncWithHttpInfo"))
@@ -489,6 +496,12 @@ public async System.Threading.Tasks.Task<ApiResponse<List<InlineResponse2003>>>
489496
{
490497
localVarPostBody = null;
491498
}
499+
String[] filePostBodyAndDelimiter = MultipartHelpers.BuildPostBodyForFiles(localVarFileParams);
500+
if(null!= filePostBodyAndDelimiter)
501+
{
502+
localVarPostBody = filePostBodyAndDelimiter[0];
503+
localVarHttpContentType = "multipart/form-data; boundary=" + filePostBodyAndDelimiter[1];
504+
}
492505

493506
bool isMLESupportedByCybsForApi = false;
494507
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
@@ -589,8 +602,7 @@ public ApiResponse< InlineResponse2014 > NotificationSubscriptionsV2WebhooksPost
589602
{
590603
localVarPostBody = createWebhook; // byte array
591604
}
592-
593-
605+
594606
bool isMLESupportedByCybsForApi = false;
595607
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
596608
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "NotificationSubscriptionsV2WebhooksPost,NotificationSubscriptionsV2WebhooksPostAsync,NotificationSubscriptionsV2WebhooksPostWithHttpInfo,NotificationSubscriptionsV2WebhooksPostAsyncWithHttpInfo"))
@@ -824,8 +836,7 @@ public ApiResponse< InlineResponse2013 > SaveSymEgressKeyWithHttpInfo (string vC
824836
{
825837
localVarPostBody = saveSymEgressKey; // byte array
826838
}
827-
828-
839+
829840
bool isMLESupportedByCybsForApi = false;
830841
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
831842
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "SaveSymEgressKey,SaveSymEgressKeyAsync,SaveSymEgressKeyWithHttpInfo,SaveSymEgressKeyAsyncWithHttpInfo"))

Api/CreditApi.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using AuthenticationSdk.util;
2020
using CyberSource.Utilities.Tracking;
2121
using AuthenticationSdk.core;
22+
using CyberSource.Utilities;
2223

2324
namespace CyberSource.Api
2425
{
@@ -279,8 +280,7 @@ public ApiResponse< PtsV2CreditsPost201Response > CreateCreditWithHttpInfo (Crea
279280
{
280281
localVarPostBody = createCreditRequest; // byte array
281282
}
282-
283-
283+
284284
bool isMLESupportedByCybsForApi = true;
285285
MerchantConfig merchantConfig = new MerchantConfig(Configuration.MerchantConfigDictionaryObj, Configuration.MapToControlMLEonAPI);
286286
if (MLEUtility.CheckIsMLEForAPI(merchantConfig, isMLESupportedByCybsForApi, "CreateCredit,CreateCreditAsync,CreateCreditWithHttpInfo,CreateCreditAsyncWithHttpInfo"))

0 commit comments

Comments
 (0)