public static void Run() { var profileId = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; var tokenId = CreatePaymentInstrument.Run().Id; var requestObj = new Body3(); var cardObj = new Tmsv1paymentinstrumentsCard { ExpirationMonth = "09", ExpirationYear = "2022", Type = Tmsv1paymentinstrumentsCard.TypeEnum.Visa }; requestObj.Card = cardObj; var billToObj = new Tmsv1paymentinstrumentsBillTo { FirstName = "John", LastName = "Smith", Company = "CyberSource", Address1 = "12 Main Street", Address2 = "20 My Street", Locality = "San Francisco", AdministrativeArea = "CA", PostalCode = "90200", Country = "US", Email = "*****@*****.**", PhoneNumber = "555123456" }; requestObj.BillTo = billToObj; var instrumentIdentifierObj = new Tmsv1paymentinstrumentsInstrumentIdentifier(); var cardObj2 = new Tmsv1instrumentidentifiersCard { Number = "4111111111111111" }; instrumentIdentifierObj.Card = cardObj2; requestObj.InstrumentIdentifier = instrumentIdentifierObj; try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PaymentInstrumentsApi(clientConfig); var result = apiInstance.TmsV1PaymentinstrumentsTokenIdPatch(profileId, tokenId, requestObj); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Exception on calling the API: " + e.Message); } }
public static void Run() { var profileId = "93B32398-AD51-4CC2-A682-EA3E93614EB1"; var tokenId = CreatePaymentInstrument.Run().Id; try { var configDictionary = new Configuration().GetConfiguration(); var clientConfig = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary); var apiInstance = new PaymentInstrumentsApi(clientConfig); apiInstance.TmsV1PaymentinstrumentsTokenIdDelete(profileId, tokenId); } catch (Exception e) { Console.WriteLine("Exception on calling the API: " + e.Message); } }
public void Init() { instance = new PaymentInstrumentsApi(); }