diff --git a/Source/Samples/AccountUpdater/ListBatches.cs b/Source/Samples/AccountUpdater/ListBatches.cs index f59f59b..b5a45e8 100644 --- a/Source/Samples/AccountUpdater/ListBatches.cs +++ b/Source/Samples/AccountUpdater/ListBatches.cs @@ -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) diff --git a/Source/Samples/AccountUpdater/RetrieveBatchReport.cs b/Source/Samples/AccountUpdater/RetrieveBatchReport.cs index 1d0ffcc..d674f38 100644 --- a/Source/Samples/AccountUpdater/RetrieveBatchReport.cs +++ b/Source/Samples/AccountUpdater/RetrieveBatchReport.cs @@ -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) diff --git a/Source/Samples/AccountUpdater/RetrieveBatchStatus.cs b/Source/Samples/AccountUpdater/RetrieveBatchStatus.cs index 983a181..0606267 100644 --- a/Source/Samples/AccountUpdater/RetrieveBatchStatus.cs +++ b/Source/Samples/AccountUpdater/RetrieveBatchStatus.cs @@ -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) diff --git a/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCard.cs b/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCard.cs index a4af991..03865ec 100644 --- a/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCard.cs +++ b/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCard.cs @@ -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 { @@ -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; } diff --git a/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCheck.cs b/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCheck.cs index b982b88..0f8bbd2 100644 --- a/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCheck.cs +++ b/Source/Samples/FlexMicroform/GenerateCaptureContextAcceptCheck.cs @@ -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 { @@ -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; } diff --git a/Source/Samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.cs b/Source/Samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.cs index 9a9a1e7..c4dda9b 100644 --- a/Source/Samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.cs +++ b/Source/Samples/RecurringBillingSubscriptions/Subscriptions/CreateSubscription.cs @@ -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"; @@ -62,7 +62,7 @@ public static CreateSubscriptionResponse Run() ); var requestObj = new CreateSubscriptionRequest( - ClientReferenceInformation: clientReferenceInformation, + //ClientReferenceInformation: clientReferenceInformation, ProcessingInformation: processingInformation, SubscriptionInformation: subscriptionInformation, PaymentInformation: paymentInformation diff --git a/Source/Samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.cs b/Source/Samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.cs index 5fa36e2..43e9914 100644 --- a/Source/Samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.cs +++ b/Source/Samples/RecurringBillingSubscriptions/Subscriptions/UpdateSubscription.cs @@ -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( @@ -58,7 +58,7 @@ public static void Run() ); var requestObj = new CyberSource.Model.UpdateSubscription( - ClientReferenceInformation: clientReferenceInformation, + //ClientReferenceInformation: clientReferenceInformation, ProcessingInformation: processingInformation, SubscriptionInformation: subscriptionInformation, OrderInformation: orderInformation diff --git a/Source/Samples/TokenManagement/Customer/CreateCustomer.cs b/Source/Samples/TokenManagement/Customer/CreateCustomer.cs index 387522d..b165320 100644 --- a/Source/Samples/TokenManagement/Customer/CreateCustomer.cs +++ b/Source/Samples/TokenManagement/Customer/CreateCustomer.cs @@ -21,21 +21,21 @@ public static PostCustomerRequest Run() { string buyerInformationMerchantCustomerID = "Your customer identifier"; string buyerInformationEmail = "test@cybs.com"; - 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 merchantDefinedInformation = new List(); + List merchantDefinedInformation = new List(); string merchantDefinedInformationName1 = "data1"; string merchantDefinedInformationValue1 = "Your customer data"; - merchantDefinedInformation.Add(new Tmsv2customersMerchantDefinedInformation( + merchantDefinedInformation.Add(new Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation( Name: merchantDefinedInformationName1, Value: merchantDefinedInformationValue1 )); diff --git a/Source/Samples/TokenManagement/Customer/UpdateCustomer.cs b/Source/Samples/TokenManagement/Customer/UpdateCustomer.cs index ca01d9a..23bd1c3 100644 --- a/Source/Samples/TokenManagement/Customer/UpdateCustomer.cs +++ b/Source/Samples/TokenManagement/Customer/UpdateCustomer.cs @@ -22,21 +22,21 @@ public static PatchCustomerRequest Run() string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; string buyerInformationMerchantCustomerID = "Your customer identifier"; string buyerInformationEmail = "test@cybs.com"; - 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 merchantDefinedInformation = new List(); + List merchantDefinedInformation = new List(); string merchantDefinedInformationName1 = "data1"; string merchantDefinedInformationValue1 = "Your customer data"; - merchantDefinedInformation.Add(new Tmsv2customersMerchantDefinedInformation( + merchantDefinedInformation.Add(new Tmsv2tokenizeTokenInformationCustomerMerchantDefinedInformation( Name: merchantDefinedInformationName1, Value: merchantDefinedInformationValue1 )); diff --git a/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.cs b/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.cs index 686f0d7..7d2267f 100644 --- a/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.cs +++ b/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultPaymentInstrument.cs @@ -21,7 +21,7 @@ public static PatchCustomerRequest Run() { string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; string defaultPaymentInstrumentId = "AB6A54B982A6FCB6E05341588E0A3935"; - Tmsv2customersDefaultPaymentInstrument defaultPaymentInstrument = new Tmsv2customersDefaultPaymentInstrument( + Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument defaultPaymentInstrument = new Tmsv2tokenizeTokenInformationCustomerDefaultPaymentInstrument( Id: defaultPaymentInstrumentId ); diff --git a/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.cs b/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.cs index 24224ea..c443fab 100644 --- a/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.cs +++ b/Source/Samples/TokenManagement/Customer/UpdateCustomersDefaultShippingAddress.cs @@ -21,7 +21,7 @@ public static PatchCustomerRequest Run() { string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; string defaultShippingAddressId = "AB6A54B97C00FCB6E05341588E0A3935"; - Tmsv2customersDefaultShippingAddress defaultShippingAddress = new Tmsv2customersDefaultShippingAddress( + Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress defaultShippingAddress = new Tmsv2tokenizeTokenInformationCustomerDefaultShippingAddress( Id: defaultShippingAddressId ); diff --git a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.cs b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.cs index 9d74880..40e07ea 100644 --- a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.cs +++ b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerDefaultPaymentInstrumentCard.cs @@ -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 @@ -40,7 +40,7 @@ public static PostCustomerPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -54,7 +54,7 @@ public static PostCustomerPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.cs b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.cs index 0940593..331513b 100644 --- a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.cs +++ b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerNonDefaultPaymentInstrumentCard.cs @@ -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 @@ -40,7 +40,7 @@ public static PostCustomerPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -54,7 +54,7 @@ public static PostCustomerPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.cs b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.cs index e1bb4e9..281c2c7 100644 --- a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.cs +++ b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentBankAccount.cs @@ -21,7 +21,7 @@ public static PostCustomerPaymentInstrumentRequest Run() { string customerTokenId = "AB695DA801DD1BB6E05341588E0A3BDC"; string bankAccountType = "savings"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount( Type: bankAccountType ); @@ -29,21 +29,21 @@ public static PostCustomerPaymentInstrumentRequest Run() string buyerInformationCurrency = "USD"; DateTime buyerInformationDateOfBirth = Convert.ToDateTime("2000-12-13"); - List buyerInformationPersonalIdentification = new List(); + List buyerInformationPersonalIdentification = new List(); 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, @@ -60,7 +60,7 @@ public static PostCustomerPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -83,7 +83,7 @@ public static PostCustomerPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "A7A91A2CA872B272E05340588D0A0699"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.cs b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.cs index a96d8c2..d984421 100644 --- a/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.cs +++ b/Source/Samples/TokenManagement/CustomerPaymentInstrument/CreateCustomerPaymentInstrumentPinlessDebit.cs @@ -27,7 +27,7 @@ public static PostCustomerPaymentInstrumentRequest Run() string cardStartMonth = "01"; string cardStartYear = "2020"; string cardUseAs = "pinless debit"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard( ExpirationMonth: cardExpirationMonth, ExpirationYear: cardExpirationYear, Type: cardType, @@ -47,7 +47,7 @@ public static PostCustomerPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -61,7 +61,7 @@ public static PostCustomerPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.cs b/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.cs index 1033dd9..12f8a31 100644 --- a/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.cs +++ b/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerDefaultShippingAddress.cs @@ -31,7 +31,7 @@ public static PostCustomerShippingAddressRequest Run() string shipToCountry = "US"; string shipToEmail = "test@cybs.com"; string shipToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2customersEmbeddedDefaultShippingAddressShipTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultShippingAddressShipTo( FirstName: shipToFirstName, LastName: shipToLastName, Company: shipToCompany, diff --git a/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.cs b/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.cs index e180f3c..38f19c5 100644 --- a/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.cs +++ b/Source/Samples/TokenManagement/CustomerShippingAddress/CreateCustomerNonDefaultShippingAddress.cs @@ -31,7 +31,7 @@ public static PostCustomerShippingAddressRequest Run() string shipToCountry = "US"; string shipToEmail = "test@cybs.com"; string shipToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2customersEmbeddedDefaultShippingAddressShipTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultShippingAddressShipTo shipTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultShippingAddressShipTo( FirstName: shipToFirstName, LastName: shipToLastName, Company: shipToCompany, diff --git a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.cs b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.cs index 09ab3d4..55910d6 100644 --- a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.cs +++ b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentBankAccount.cs @@ -22,7 +22,7 @@ public static PostPaymentInstrumentRequest Run() var profileid = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; string bankAccountType = "savings"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBankAccount( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount bankAccount = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBankAccount( Type: bankAccountType ); @@ -30,21 +30,21 @@ public static PostPaymentInstrumentRequest Run() string buyerInformationCurrency = "USD"; DateTime buyerInformationDateOfBirth = Convert.ToDateTime("2000-12-13"); - List buyerInformationPersonalIdentification = new List(); + List buyerInformationPersonalIdentification = new List(); 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, @@ -61,7 +61,7 @@ public static PostPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -84,7 +84,7 @@ public static PostPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "A7A91A2CA872B272E05340588D0A0699"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.cs b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.cs index 2491042..e2b90ef 100644 --- a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.cs +++ b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentCard.cs @@ -24,7 +24,7 @@ public static PostPaymentInstrumentRequest Run() string cardExpirationMonth = "12"; string cardExpirationYear = "2031"; string cardType = "visa"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard( ExpirationMonth: cardExpirationMonth, ExpirationYear: cardExpirationYear, Type: cardType @@ -40,7 +40,7 @@ public static PostPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -55,7 +55,7 @@ public static PostPaymentInstrumentRequest Run() string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.cs b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.cs index d4be4f5..f0f1da7 100644 --- a/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.cs +++ b/Source/Samples/TokenManagement/PaymentInstrument/CreatePaymentInstrumentPinlessDebit.cs @@ -28,7 +28,7 @@ public static PostPaymentInstrumentRequest Run() string cardStartMonth = "01"; string cardStartYear = "2020"; string cardUseAs = "pinless debit"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard( ExpirationMonth: cardExpirationMonth, ExpirationYear: cardExpirationYear, Type: cardType, @@ -48,7 +48,7 @@ public static PostPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "test@cybs.com"; string billToPhoneNumber = "4158880000"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -63,7 +63,7 @@ public static PostPaymentInstrumentRequest Run() string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.cs b/Source/Samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.cs index 5cd1136..69dc807 100644 --- a/Source/Samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.cs +++ b/Source/Samples/TokenManagement/PaymentInstrument/UpdatePaymentInstrument.cs @@ -24,7 +24,7 @@ public static PatchPaymentInstrumentRequest Run() string cardExpirationMonth = "12"; string cardExpirationYear = "2031"; string cardType = "visa"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2customersEmbeddedDefaultPaymentInstrumentCard( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard card = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentCard( ExpirationMonth: cardExpirationMonth, ExpirationYear: cardExpirationYear, Type: cardType @@ -40,7 +40,7 @@ public static PatchPaymentInstrumentRequest Run() string billToCountry = "US"; string billToEmail = "updatedemail@cybs.com"; string billToPhoneNumber = "4158888674"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2customersEmbeddedDefaultPaymentInstrumentBillTo( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo billTo = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentBillTo( FirstName: billToFirstName, LastName: billToLastName, Company: billToCompany, @@ -54,7 +54,7 @@ public static PatchPaymentInstrumentRequest Run() ); string instrumentIdentifierId = "7010000000016241111"; - Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2customersEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( + Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier instrumentIdentifier = new Tmsv2tokenizeTokenInformationCustomerEmbeddedDefaultPaymentInstrumentInstrumentIdentifier( Id: instrumentIdentifierId ); diff --git a/Source/Samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.cs b/Source/Samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.cs index b6058c8..94db0da 100644 --- a/Source/Samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.cs +++ b/Source/Samples/UnifiedCheckout/GenerateCaptureContextForClickToPayDropInUI.cs @@ -4,6 +4,7 @@ using CyberSource.Api; using CyberSource.Model; +using CyberSource.Utilities.CaptureContext; namespace Cybersource_rest_samples_dotnet.Samples.UnifiedCheckout { @@ -100,7 +101,7 @@ public static String Run() var apiInstance = new UnifiedCheckoutCaptureContextApi(clientConfig); String result = apiInstance.GenerateUnifiedCheckoutCaptureContext(requestObj); - Console.WriteLine(result); + Console.WriteLine(CaptureContextParsingUtility.parseCaptureContextResponse(result, clientConfig, true)); WriteLogAudit(apiInstance.GetStatusCode()); return result; } diff --git a/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckout.cs b/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckout.cs index e165a16..5856df8 100644 --- a/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckout.cs +++ b/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckout.cs @@ -4,6 +4,7 @@ using CyberSource.Api; using CyberSource.Model; +using CyberSource.Utilities.CaptureContext; namespace Cybersource_rest_samples_dotnet.Samples.UnifiedCheckout { @@ -103,7 +104,7 @@ public static String Run() var apiInstance = new UnifiedCheckoutCaptureContextApi(clientConfig); String result = apiInstance.GenerateUnifiedCheckoutCaptureContext(requestObj); - Console.WriteLine(result); + Console.WriteLine(CaptureContextParsingUtility.parseCaptureContextResponse(result, clientConfig, true)); WriteLogAudit(apiInstance.GetStatusCode()); return result; } diff --git a/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.cs b/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.cs index f10bd3d..d19bbaa 100644 --- a/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.cs +++ b/Source/Samples/UnifiedCheckout/GenerateUnifiedCheckoutCaptureContextPassingBillingShipping.cs @@ -4,6 +4,7 @@ using CyberSource.Api; using CyberSource.Model; +using CyberSource.Utilities.CaptureContext; namespace Cybersource_rest_samples_dotnet.Samples.UnifiedCheckout { @@ -199,7 +200,7 @@ public static String Run() var apiInstance = new UnifiedCheckoutCaptureContextApi(clientConfig); String result = apiInstance.GenerateUnifiedCheckoutCaptureContext(requestObj); - Console.WriteLine(result); + Console.WriteLine(CaptureContextParsingUtility.parseCaptureContextResponse(result, clientConfig, true)); WriteLogAudit(apiInstance.GetStatusCode()); return result; } diff --git a/Source/Samples/VisaBankAccountValidation/BankAccountValidationValidated.cs b/Source/Samples/VisaBankAccountValidation/BankAccountValidationValidated.cs index 020e23d..1ec5376 100644 --- a/Source/Samples/VisaBankAccountValidation/BankAccountValidationValidated.cs +++ b/Source/Samples/VisaBankAccountValidation/BankAccountValidationValidated.cs @@ -22,7 +22,7 @@ public static void WriteLogAudit(int status) Console.WriteLine($"[Sample Code Testing] [{filename}] {status}"); } - public static InlineResponse20013 Run() + public static InlineResponse20014 Run() { string clientReferenceInformationCode = "TC50171_100"; Bavsv1accountvalidationsClientReferenceInformation clientReferenceInformation = new Bavsv1accountvalidationsClientReferenceInformation( @@ -63,7 +63,7 @@ public static InlineResponse20013 Run() var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new BankAccountValidationApi(clientConfig); - InlineResponse20013 result = apiInstance.BankAccountValidationRequest(requestObj); + InlineResponse20014 result = apiInstance.BankAccountValidationRequest(requestObj); Console.WriteLine(result); WriteLogAudit(apiInstance.GetStatusCode()); return result; diff --git a/cybersource-rest-samples-csharp.csproj b/cybersource-rest-samples-csharp.csproj index 8ddbd90..b8356c1 100644 --- a/cybersource-rest-samples-csharp.csproj +++ b/cybersource-rest-samples-csharp.csproj @@ -38,13 +38,13 @@ Source\lib\net461\ApiSdk.dll - packages\CyberSource.Authentication.0.0.0.25\lib\AuthenticationSdk.dll + packages\CyberSource.Authentication.0.0.0.26\lib\AuthenticationSdk.dll packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll - packages\CyberSource.Rest.Client.0.0.1.58\lib\cybersource-rest-client-dotnet.dll + packages\CyberSource.Rest.Client.0.0.1.59\lib\cybersource-rest-client-dotnet.dll packages\jose-jwt.4.1.0\lib\net461\jose-jwt.dll diff --git a/cybersource-rest-samples-netcore.csproj b/cybersource-rest-samples-netcore.csproj index 1327f05..1ea354d 100644 --- a/cybersource-rest-samples-netcore.csproj +++ b/cybersource-rest-samples-netcore.csproj @@ -39,8 +39,8 @@ - - + + diff --git a/packages.config b/packages.config index f9b12c6..c524efc 100644 --- a/packages.config +++ b/packages.config @@ -1,7 +1,7 @@  - - + +