public virtual Customer Find(string Id) { if (Id == null || Id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode customerXML = service.Get(service.MerchantPath() + "/customers/" + Id); return(new Customer(new NodeWrapper(customerXML), gateway)); }
public virtual CreditCard Find(string token) { if (token == null || token.Trim().Equals("")) { throw new NotFoundException(); } XmlNode creditCardXML = service.Get(service.MerchantPath() + "/payment_methods/credit_card/" + token); return(new CreditCard(new NodeWrapper(creditCardXML), gateway)); }
public virtual MerchantAccount Find(string id) { if (id == null || id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode merchantAccountXML = service.Get(service.MerchantPath() + "/merchant_accounts/" + id); return(new MerchantAccount(new NodeWrapper(merchantAccountXML))); }
public virtual CreditCard Find(String token) { if (token == null || token.Trim().Equals("")) { throw new NotFoundException(); } XmlNode creditCardXML = Service.Get("/payment_methods/credit_card/" + token); return(new CreditCard(new NodeWrapper(creditCardXML), Service)); }
public PaymentMethod Find(string token) { if (token == null || token.Trim().Equals("")) { throw new NotFoundException(); } var response = new NodeWrapper(service.Get(service.MerchantPath() + "/payment_methods/any/" + token)); if (response.GetName() == "paypal-account") { return(new PayPalAccount(response, gateway)); } else if (response.GetName() == "credit-card") { return(new CreditCard(response, gateway)); } else if (response.GetName() == "apple-pay-card") { return(new ApplePayCard(response, gateway)); } else if (response.GetName() == "android-pay-card") { return(new AndroidPayCard(response, gateway)); } else if (response.GetName() == "coinbase-account") { return(new CoinbaseAccount(response, gateway)); } else { return(new UnknownPaymentMethod(response)); } }
public virtual Transaction Find(String id) { if(id == null || id.Trim().Equals("")) throw new NotFoundException(); XmlNode response = Service.Get("/transactions/" + id); return new Transaction(new NodeWrapper(response), Service); }
public virtual Customer Find(String Id) { if (Id == null || Id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode customerXML = Service.Get("/customers/" + Id); return(new Customer(new NodeWrapper(customerXML), Service)); }
public virtual Subscription Find(String id) { if (id == null || id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode subscriptionXML = Service.Get("/subscriptions/" + id); return(new Subscription(new NodeWrapper(subscriptionXML), Service)); }
public virtual Transaction Find(string id) { if (id == null || id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode response = service.Get(service.MerchantPath() + "/transactions/" + id); return(new Transaction(new NodeWrapper(response), gateway)); }
public virtual Subscription Find(string id) { if (id == null || id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode subscriptionXML = service.Get(service.MerchantPath() + "/subscriptions/" + id); return(new Subscription(new NodeWrapper(subscriptionXML), gateway)); }
public virtual UsBankAccountVerification Find(string Id) { if (Id == null || Id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode verificationXML = service.Get(service.MerchantPath() + "/us_bank_account_verifications/" + Id); return(new UsBankAccountVerification(new NodeWrapper(verificationXML))); }
public virtual CreditCardVerification Find(String Id) { if (Id == null || Id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode creditCardVerificationXML = Service.Get("/verifications/" + Id); return(new CreditCardVerification(new NodeWrapper(creditCardVerificationXML), Service)); }
public virtual CreditCardVerification Find(string Id) { if (Id == null || Id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode creditCardVerificationXML = service.Get(service.MerchantPath() + "/verifications/" + Id); return(new CreditCardVerification(new NodeWrapper(creditCardVerificationXML), gateway)); }
public PaymentMethod Find(string token) { if (token == null || token.Trim().Equals("")) { throw new NotFoundException(); } var response = new NodeWrapper(service.Get(service.MerchantPath() + "/payment_methods/any/" + token)); return(ExtractPaymentMethodFromResponse(response)); }
public virtual Address Find(string customerId, string id) { if (customerId == null || customerId.Trim().Equals("") || id == null || id.Trim().Equals("")) { throw new NotFoundException(); } XmlNode addressXML = Service.Get(Service.MerchantPath() + "/customers/" + customerId + "/addresses/" + id); return(new Address(new NodeWrapper(addressXML))); }
public virtual List <Discount> All() { var response = new NodeWrapper(service.Get(service.MerchantPath() + "/discounts")); var discounts = new List <Discount>(); foreach (var node in response.GetList("discount")) { discounts.Add(new Discount(node)); } return(discounts); }
public virtual List <Plan> All() { NodeWrapper response = new NodeWrapper(Service.Get("/plans")); List <Plan> plans = new List <Plan>(); foreach (NodeWrapper node in response.GetList("plan")) { plans.Add(new Plan(node)); } return(plans); }
public virtual List <AddOn> All() { var response = new NodeWrapper(Service.Get(Service.MerchantPath() + "/add_ons")); var addOns = new List <AddOn>(); foreach (var node in response.GetList("add-on")) { addOns.Add(new AddOn(node)); } return(addOns); }
public virtual List <Plan> All() { var response = new NodeWrapper(service.Get(service.MerchantPath() + "/plans")); var plans = new List <Plan>(); foreach (var node in response.GetList("plan")) { plans.Add(new Plan(node)); } return(plans); }
public virtual List <Discount> All() { NodeWrapper response = new NodeWrapper(Service.Get("/discounts")); List <Discount> discounts = new List <Discount>(); foreach (NodeWrapper node in response.GetList("discount")) { discounts.Add(new Discount(node)); } return(discounts); }
public virtual List <AddOn> All() { NodeWrapper response = new NodeWrapper(Service.Get("/add_ons")); List <AddOn> addOns = new List <AddOn>(); foreach (NodeWrapper node in response.GetList("add-on")) { addOns.Add(new AddOn(node)); } return(addOns); }
public virtual Result <Dispute> Find(string disputeId) { NotFoundException notFoundException = new NotFoundException(String.Format("dispute with id '{0}' not found", disputeId)); if (disputeId == null || disputeId.Trim().Equals("")) { throw notFoundException; } try { XmlNode disputeXML = Service.Get(Service.MerchantPath() + "/disputes/" + disputeId); return(new ResultImpl <Dispute>(new NodeWrapper(disputeXML), Gateway)); } catch (NotFoundException) { throw notFoundException; } }
public virtual List <TransactionLineItem> FindAll(string id) { if (id == null || id.Trim().Equals("")) { throw new NotFoundException(); } var response = new NodeWrapper(service.Get(service.MerchantPath() + "/transactions/" + id + "/line_items")); if (response.GetName() == "line-items") { var transactionLineItems = new List <TransactionLineItem>(); foreach (var node in response.GetList("line-item")) { transactionLineItems.Add(new TransactionLineItem(node)); } return(transactionLineItems); } else { throw new UnexpectedException(); } }
public virtual PaymentMethodNonce Find(String nonce) { NodeWrapper response = new NodeWrapper(service.Get("/payment_method_nonces/" + nonce)); return(new PaymentMethodNonce(response, service)); }
public IdealPayment Find(string idealPaymentId) { XmlNode xml = service.Get(service.MerchantPath() + "/ideal_payments/" + idealPaymentId); return(new IdealPayment(new NodeWrapper(xml))); }
public virtual PaymentMethodNonce Find(string nonce) { var response = new NodeWrapper(service.Get(service.MerchantPath() + "/payment_method_nonces/" + nonce)); return(new PaymentMethodNonce(response, gateway)); }
public PayPalAccount Find(String token) { XmlNode xml = Service.Get("/payment_methods/paypal_account/" + token); return(new PayPalAccount(new NodeWrapper(xml), Service)); }
public PayPalAccount Find(string token) { XmlNode xml = service.Get(service.MerchantPath() + "/payment_methods/paypal_account/" + token); return(new PayPalAccount(new NodeWrapper(xml), gateway)); }
public UsBankAccount Find(string token) { XmlNode xml = service.Get(service.MerchantPath() + "/payment_methods/us_bank_account/" + token); return(new UsBankAccount(new NodeWrapper(xml))); }