Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Samples/AccountUpdater/ListBatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void Run()
var apiInstance = new BatchesApi(clientConfig);
string fromDate = "20230101T123000Z";
string toDate = "20230410T123000Z";
InlineResponse20010 result = apiInstance.GetBatchesList(0, 10, fromDate, toDate);
InlineResponse20011 result = apiInstance.GetBatchesList(0, 10, fromDate, toDate);
Console.WriteLine(result);
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion Source/Samples/AccountUpdater/RetrieveBatchReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void Run()
var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);

var apiInstance = new BatchesApi(clientConfig);
InlineResponse20012 result = apiInstance.GetBatchReport(batchId);
InlineResponse20013 result = apiInstance.GetBatchReport(batchId);
Console.WriteLine(result);
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion Source/Samples/AccountUpdater/RetrieveBatchStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void Run()
var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);

var apiInstance = new BatchesApi(clientConfig);
InlineResponse20011 result = apiInstance.GetBatchStatus(batchId);
InlineResponse20012 result = apiInstance.GetBatchStatus(batchId);
Console.WriteLine(result);
}
catch (Exception e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CyberSource.Api;
using CyberSource.Model;
using CyberSource.Utilities.CaptureContext;

namespace Cybersource_rest_samples_dotnet.Samples.FlexMicroform
{
Expand Down Expand Up @@ -58,7 +58,7 @@ public static String Run()

var apiInstance = new MicroformIntegrationApi(clientConfig);
String result = apiInstance.GenerateCaptureContext(requestObj);
Console.WriteLine(result);
Console.WriteLine(CaptureContextParsingUtility.parseCaptureContextResponse(result, clientConfig, true));
WriteLogAudit(apiInstance.GetStatusCode());
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using System.Threading.Tasks;
using CyberSource.Api;
using CyberSource.Model;
using CyberSource.Utilities.CaptureContext;
using Newtonsoft.Json.Linq;

namespace Cybersource_rest_samples_dotnet.Samples.FlexMicroform
{
Expand Down Expand Up @@ -38,7 +40,7 @@ public static String Run()

var apiInstance = new MicroformIntegrationApi(clientConfig);
String result = apiInstance.GenerateCaptureContext(requestObj);
Console.WriteLine(result);
Console.WriteLine(CaptureContextParsingUtility.parseCaptureContextResponse(result, clientConfig, true));
WriteLogAudit(apiInstance.GetStatusCode());
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public static CreateSubscriptionResponse Run()
string clientReferenceInformationCode = "TC501713";
string clientReferenceInformationPartnerDeveloperId = "ABCD1234";
string clientReferenceInformationPartnerSolutionId = "GEF1234";
Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(
DeveloperId: clientReferenceInformationPartnerDeveloperId,
SolutionId: clientReferenceInformationPartnerSolutionId
);
//Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(
// DeveloperId: clientReferenceInformationPartnerDeveloperId,
// SolutionId: clientReferenceInformationPartnerSolutionId
//);

string clientReferenceInformationApplicationName = "CYBS-SDK";
string clientReferenceInformationApplicationVersion = "v1";
Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(
Code: clientReferenceInformationCode,
Partner: clientReferenceInformationPartner,
ApplicationName: clientReferenceInformationApplicationName,
ApplicationVersion: clientReferenceInformationApplicationVersion
);
//Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(
// Code: clientReferenceInformationCode,
// Partner: clientReferenceInformationPartner,
// ApplicationName: clientReferenceInformationApplicationName,
// ApplicationVersion: clientReferenceInformationApplicationVersion
//);

string processingInformationCommerceIndicator = "recurring";
string processingInformationAuthorizationOptionsInitiatorType = "merchant";
Expand Down Expand Up @@ -62,7 +62,7 @@ public static CreateSubscriptionResponse Run()
);

var requestObj = new CreateSubscriptionRequest(
ClientReferenceInformation: clientReferenceInformation,
//ClientReferenceInformation: clientReferenceInformation,
ProcessingInformation: processingInformation,
SubscriptionInformation: subscriptionInformation,
PaymentInformation: paymentInformation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ public static void Run()
string clientReferenceInformationCode = "APGHU";
string clientReferenceInformationPartnerDeveloperId = "ABCD1234";
string clientReferenceInformationPartnerSolutionId = "GEF1234";
Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(
DeveloperId: clientReferenceInformationPartnerDeveloperId,
SolutionId: clientReferenceInformationPartnerSolutionId
);
//Rbsv1subscriptionsClientReferenceInformationPartner clientReferenceInformationPartner = new Rbsv1subscriptionsClientReferenceInformationPartner(
// DeveloperId: clientReferenceInformationPartnerDeveloperId,
// SolutionId: clientReferenceInformationPartnerSolutionId
//);

Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(
Code: clientReferenceInformationCode,
Partner: clientReferenceInformationPartner
);
//Rbsv1subscriptionsClientReferenceInformation clientReferenceInformation = new Rbsv1subscriptionsClientReferenceInformation(
// Code: clientReferenceInformationCode,
// Partner: clientReferenceInformationPartner
//);

string processingInformationAuthorizationOptionsInitiatorType = "merchant";
Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator processingInformationAuthorizationOptionsInitiator = new Rbsv1subscriptionsProcessingInformationAuthorizationOptionsInitiator(
Expand Down Expand Up @@ -58,7 +58,7 @@ public static void Run()
);

var requestObj = new CyberSource.Model.UpdateSubscription(
ClientReferenceInformation: clientReferenceInformation,
//ClientReferenceInformation: clientReferenceInformation,
ProcessingInformation: processingInformation,
SubscriptionInformation: subscriptionInformation,
OrderInformation: orderInformation
Expand Down
8 changes: 4 additions & 4 deletions Source/Samples/TokenManagement/Customer/CreateCustomer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ public static PostCustomerRequest Run()
{
string buyerInformationMerchantCustomerID = "Your customer identifier";
string buyerInformationEmail = "[email protected]";
Tmsv2customersBuyerInformation buyerInformation = new Tmsv2customersBuyerInformation(
Tmsv2tokenizeTokenInformationCustomerBuyerInformation buyerInformation = new Tmsv2tokenizeTokenInformationCustomerBuyerInformation(
MerchantCustomerID: buyerInformationMerchantCustomerID,
Email: buyerInformationEmail
);

string clientReferenceInformationCode = "TC50171_3";
Tmsv2customersClientReferenceInformation clientReferenceInformation = new Tmsv2customersClientReferenceInformation(
Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation clientReferenceInformation = new Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation(
Code: clientReferenceInformationCode
);


List<Tmsv2customersMerchantDefinedInformation> merchantDefinedInformation = new List<Tmsv2customersMerchantDefinedInformation>();
List<Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation> merchantDefinedInformation = new List<Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation>();
string merchantDefinedInformationName1 = "data1";
string merchantDefinedInformationValue1 = "Your customer data";
merchantDefinedInformation.Add(new Tmsv2customersMerchantDefinedInformation(
merchantDefinedInformation.Add(new Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation(
Name: merchantDefinedInformationName1,
Value: merchantDefinedInformationValue1
));
Expand Down
8 changes: 4 additions & 4 deletions Source/Samples/TokenManagement/Customer/UpdateCustomer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ public static PatchCustomerRequest Run()
string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC";
string buyerInformationMerchantCustomerID = "Your customer identifier";
string buyerInformationEmail = "[email protected]";
Tmsv2customersBuyerInformation buyerInformation = new Tmsv2customersBuyerInformation(
Tmsv2tokenizeTokenInformationCustomerBuyerInformation buyerInformation = new Tmsv2tokenizeTokenInformationCustomerBuyerInformation(
MerchantCustomerID: buyerInformationMerchantCustomerID,
Email: buyerInformationEmail
);

string clientReferenceInformationCode = "TC50171_3";
Tmsv2customersClientReferenceInformation clientReferenceInformation = new Tmsv2customersClientReferenceInformation(
Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation clientReferenceInformation = new Tmsv2tokenizeTokenInformationCustomerClientReferenceInformation(
Code: clientReferenceInformationCode
);


List<Tmsv2customersMerchantDefinedInformation> merchantDefinedInformation = new List<Tmsv2customersMerchantDefinedInformation>();
List<Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation> merchantDefinedInformation = new List<Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation>();
string merchantDefinedInformationName1 = "data1";
string merchantDefinedInformationValue1 = "Your customer data";
merchantDefinedInformation.Add(new Tmsv2customersMerchantDefinedInformation(
merchantDefinedInformation.Add(new Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation(
Name: merchantDefinedInformationName1,
Value: merchantDefinedInformationValue1
));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static PatchCustomerRequest Run()
{
string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC";
string defaultPaymentInstrumentId = "AB6A54B982A6FCB6E05341588E0A3935";
Tmsv2customersDefaultPaymentInstrument defaultPaymentInstrument = new Tmsv2customersDefaultPaymentInstrument(
Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument defaultPaymentInstrument = new Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument(
Id: defaultPaymentInstrumentId
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static PatchCustomerRequest Run()
{
string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC";
string defaultShippingAddressId = "AB6A54B97C00FCB6E05341588E0A3935";
Tmsv2customersDefaultShippingAddress defaultShippingAddress = new Tmsv2customersDefaultShippingAddress(
Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress defaultShippingAddress = new Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress(
Id: defaultShippingAddressId
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
string cardExpirationMonth = "12";
string cardExpirationYear = "2031";
string cardType = "001";
Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard(
ExpirationMonth: cardExpirationMonth,
ExpirationYear: cardExpirationYear,
Type: cardType
Expand All @@ -40,7 +40,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
string billToCountry = "US";
string billToEmail = "[email protected]";
string billToPhoneNumber = "4158880000";
Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo(
FirstName: billToFirstName,
LastName: billToLastName,
Company: billToCompany,
Expand All @@ -54,7 +54,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
);

string instrumentIdentifierId = "7010000000016241111";
Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Id: instrumentIdentifierId
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
string cardExpirationMonth = "12";
string cardExpirationYear = "2031";
string cardType = "001";
Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard(
ExpirationMonth: cardExpirationMonth,
ExpirationYear: cardExpirationYear,
Type: cardType
Expand All @@ -40,7 +40,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
string billToCountry = "US";
string billToEmail = "[email protected]";
string billToPhoneNumber = "4158880000";
Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo(
FirstName: billToFirstName,
LastName: billToLastName,
Company: billToCompany,
Expand All @@ -54,7 +54,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
);

string instrumentIdentifierId = "7010000000016241111";
Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Id: instrumentIdentifierId
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ public static PostCustomerPaymentInstrumentRequest Run()
{
string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC";
string bankAccountType = "savings";
Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount(
Type: bankAccountType
);

string buyerInformationCompanyTaxID = "12345";
string buyerInformationCurrency = "USD";
DateTime buyerInformationDateOfBirth = Convert.ToDateTime("2000-12-13");

List<Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification> buyerInformationPersonalIdentification = new List<Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification>();
List<Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification> buyerInformationPersonalIdentification = new List<Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification>();
string buyerInformationPersonalIdentificationId1 = "57684432111321";
string buyerInformationPersonalIdentificationType1 = "driver license";
string buyerInformationPersonalIdentificationIssuedByAdministrativeArea1 = "CA";
Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy buyerInformationPersonalIdentificationIssuedBy1 = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy buyerInformationPersonalIdentificationIssuedBy1 = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformationIssuedBy(
AdministrativeArea: buyerInformationPersonalIdentificationIssuedByAdministrativeArea1
);

buyerInformationPersonalIdentification.Add(new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification(
buyerInformationPersonalIdentification.Add(new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformationPersonalIdentification(
Id: buyerInformationPersonalIdentificationId1,
Type: buyerInformationPersonalIdentificationType1,
IssuedBy: buyerInformationPersonalIdentificationIssuedBy1
));

Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation buyerInformation = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBuyerInformation(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformation buyerInformation = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBuyerInformation(
CompanyTaxID: buyerInformationCompanyTaxID,
Currency: buyerInformationCurrency,
DateOfBirth: buyerInformationDateOfBirth,
Expand All @@ -60,7 +60,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
string billToCountry = "US";
string billToEmail = "[email protected]";
string billToPhoneNumber = "4158880000";
Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo(
FirstName: billToFirstName,
LastName: billToLastName,
Company: billToCompany,
Expand All @@ -83,7 +83,7 @@ public static PostCustomerPaymentInstrumentRequest Run()
);

string instrumentIdentifierId = "A7A91A2CA872B272E05340588D0A0699";
Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier(
Id: instrumentIdentifierId
);

Expand Down
Loading