protected internal CoinbaseDetails(NodeWrapper node) { UserId = node.GetString("user-id"); UserEmail = node.GetString("user-email"); UserName = node.GetString("user-name"); Token = node.GetString("token"); }
protected internal MerchantAccount(NodeWrapper node) { Id = node.GetString("id"); CurrencyIsoCode = node.GetString("currency-iso-code"); Status = (MerchantAccountStatus) CollectionUtil.Find(MerchantAccountStatus.ALL, node.GetString("status"), null); NodeWrapper masterNode = node.GetNode("master-merchant-account"); if (masterNode != null) MasterMerchantAccount = new MerchantAccount(masterNode); else MasterMerchantAccount = null; NodeWrapper individualNode = node.GetNode("individual"); if (individualNode != null) IndividualDetails = new MerchantAccountIndividualDetails(individualNode); else IndividualDetails = null; NodeWrapper businessNode = node.GetNode("business"); if (businessNode != null) BusinessDetails = new MerchantAccountBusinessDetails(businessNode); else BusinessDetails = null; NodeWrapper fundingNode = node.GetNode("funding"); if (fundingNode != null) FundingDetails = new MerchantAccountFundingDetails(fundingNode); else FundingDetails = null; }
public UnknownPaymentMethod(NodeWrapper node) { Token = node.GetString("token"); IsDefault = node.GetBoolean("default"); ImageUrl = "https://assets.braintreegateway.com/payment_method_logo/unknown.png"; CustomerId = node.GetString("customer-id"); }
public Plan(NodeWrapper node) { if (node == null) return; BillingDayOfMonth = node.GetInteger("billing-day-of-month"); BillingFrequency = node.GetInteger("billing-frequency"); CurrencyIsoCode = node.GetString("currency-iso-code"); Description = node.GetString("description"); Id = node.GetString("id"); Name = node.GetString("name"); NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles"); Price = node.GetDecimal("price"); TrialPeriod = node.GetBoolean("trial-period"); TrialDuration = node.GetInteger("trial-duration"); string trialDurationUnitStr = node.GetString("trial-duration-unit"); if (trialDurationUnitStr != null) { TrialDurationUnit = (PlanDurationUnit) CollectionUtil.Find(PlanDurationUnit.ALL, trialDurationUnitStr, PlanDurationUnit.UNRECOGNIZED); } AddOns = new List<AddOn> (); foreach (var addOnResponse in node.GetList("add-ons/add-on")) { AddOns.Add(new AddOn(addOnResponse)); } Discounts = new List<Discount> (); foreach (var discountResponse in node.GetList("discounts/discount")) { Discounts.Add(new Discount(discountResponse)); } }
protected internal Descriptor(NodeWrapper node) { if (node != null) { Name = node.GetString("name"); Phone = node.GetString("phone"); } }
public CreditCardVerification(NodeWrapper node, BraintreeGateway gateway) { if (node == null) return; AvsErrorResponseCode = node.GetString("avs-error-response-code"); AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code"); AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code"); CvvResponseCode = node.GetString("cvv-response-code"); GatewayRejectionReason = (TransactionGatewayRejectionReason)CollectionUtil.Find( TransactionGatewayRejectionReason.ALL, node.GetString("gateway-rejection-reason"), null ); ProcessorResponseCode = node.GetString("processor-response-code"); ProcessorResponseText = node.GetString("processor-response-text"); MerchantAccountId = node.GetString("merchant-account-id"); Status = (VerificationStatus)CollectionUtil.Find(VerificationStatus.ALL, node.GetString("status"), VerificationStatus.UNRECOGNIZED); Id = node.GetString("id"); BillingAddress = new Address(node.GetNode("billing")); CreditCard = new CreditCard(node.GetNode("credit-card"), gateway); CreatedAt = node.GetDateTime("created-at"); var riskDataNode = node.GetNode("risk-data"); if (riskDataNode != null) { RiskData = new RiskData(riskDataNode); } }
protected internal MerchantAccountBusinessDetails(NodeWrapper node) { DbaName = node.GetString("dba-name"); LegalName = node.GetString("legal-name"); TaxId = node.GetString("tax-id"); Address = new Address(node.GetNode("address")); }
protected internal VenmoAccountDetails(NodeWrapper node) { Token = node.GetString("token"); Username = node.GetString("username"); VenmoUserId = node.GetString("venmo-user-id"); ImageUrl = node.GetString("image-url"); SourceDescription = node.GetString("source-description"); }
protected internal PartnerMerchant(NodeWrapper node) { MerchantPublicId = node.GetString("merchant-public-id"); PublicKey = node.GetString("public-key"); PrivateKey = node.GetString("private-key"); PartnerMerchantId = node.GetString("partner-merchant-id"); ClientSideEncryptionKey = node.GetString("client-side-encryption-key"); }
public RiskData(NodeWrapper node) { if (node == null) return; id = node.GetString("id"); decision = node.GetString("decision"); }
public OAuthCredentials(NodeWrapper node) { if (node == null) return; AccessToken = node.GetString("access-token"); RefreshToken = node.GetString("refresh-token"); TokenType = node.GetString("token-type"); ExpiresAt = node.GetDateTime("expires-at"); }
protected internal DisbursementDetails(NodeWrapper node) { SettlementAmount = node.GetDecimal("settlement-amount"); SettlementCurrencyIsoCode = node.GetString("settlement-currency-iso-code"); SettlementCurrencyExchangeRate = node.GetString("settlement-currency-exchange-rate"); FundsHeld = node.GetBoolean("funds-held"); Success = node.GetBoolean("success"); DisbursementDate = node.GetDateTime("disbursement-date"); }
public ThreeDSecureInfo(NodeWrapper node) { if (node == null) return; Enrolled = node.GetString("enrolled"); Status = node.GetString("status"); LiabilityShifted = node.GetBoolean("liability-shifted"); LiabilityShiftPossible = node.GetBoolean("liability-shift-possible"); }
public Dispute(NodeWrapper node) { Amount = node.GetDecimal("amount"); ReceivedDate = node.GetDateTime("received-date"); ReplyByDate = node.GetDateTime("reply-by-date"); Reason = (DisputeReason)CollectionUtil.Find(DisputeReason.ALL, node.GetString("reason"), DisputeReason.GENERAL); Status = (DisputeStatus)CollectionUtil.Find(DisputeStatus.ALL, node.GetString("status"), DisputeStatus.UNRECOGNIZED); CurrencyIsoCode = node.GetString("currency-iso-code"); Id = node.GetString("id"); }
public StatusEvent(NodeWrapper node) { if (node == null) return; Amount = node.GetDecimal("amount"); Status = (TransactionStatus)CollectionUtil.Find(TransactionStatus.ALL, node.GetString("status"), TransactionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = (TransactionSource)CollectionUtil.Find(TransactionSource.ALL, node.GetString("transaction-source"), TransactionSource.UNRECOGNIZED); User = node.GetString("user"); }
protected internal PaymentMethodNonce(NodeWrapper node, BraintreeGateway gateway) { Nonce = node.GetString("nonce"); Type = node.GetString("type"); var threeDSecureInfoNode = node.GetNode("three-d-secure-info"); if (threeDSecureInfoNode != null && !threeDSecureInfoNode.IsEmpty()){ ThreeDSecureInfo = new ThreeDSecureInfo(threeDSecureInfoNode); } }
public SubscriptionStatusEvent(NodeWrapper node) { if (node == null) return; Price = node.GetDecimal("price"); Balance = node.GetDecimal("balance"); Status = (SubscriptionStatus)CollectionUtil.Find(SubscriptionStatus.STATUSES, node.GetString("status"), SubscriptionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = (SubscriptionSource)CollectionUtil.Find(SubscriptionSource.ALL, node.GetString("subscription-source"), SubscriptionSource.UNRECOGNIZED); User = node.GetString("user"); }
protected Modification(NodeWrapper node) { Amount = node.GetDecimal("amount"); CreatedAt = node.GetDateTime("created-at"); Description = node.GetString("description"); Id = node.GetString("id"); Kind = node.GetString("kind"); MerchantId = node.GetString("merchant-id"); Name = node.GetString("name"); NeverExpires = node.GetBoolean("never-expires"); NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles"); Quantity = node.GetInteger("quantity"); UpdatedAt = node.GetDateTime("updated-at"); }
public Dispute(NodeWrapper node) { Amount = node.GetDecimal("amount"); ReceivedDate = node.GetDateTime("received-date"); ReplyByDate = node.GetDateTime("reply-by-date"); DateOpened = node.GetDateTime("date-opened"); DateWon = node.GetDateTime("date-won"); Reason = (DisputeReason)CollectionUtil.Find(DisputeReason.ALL, node.GetString("reason"), DisputeReason.GENERAL); Status = (DisputeStatus)CollectionUtil.Find(DisputeStatus.ALL, node.GetString("status"), DisputeStatus.UNRECOGNIZED); Kind = (DisputeKind)CollectionUtil.Find(DisputeKind.ALL, node.GetString("kind"), DisputeKind.UNRECOGNIZED); CurrencyIsoCode = node.GetString("currency-iso-code"); Id = node.GetString("id"); TransactionDetails = new TransactionDetails(node.GetNode("transaction")); }
internal Customer(NodeWrapper node, BraintreeService service) { if (node == null) return; Id = node.GetString("id"); FirstName = node.GetString("first-name"); LastName = node.GetString("last-name"); Company = node.GetString("company"); Email = node.GetString("email"); Phone = node.GetString("phone"); Fax = node.GetString("fax"); Website = node.GetString("website"); CreatedAt = node.GetDateTime("created-at"); UpdatedAt = node.GetDateTime("updated-at"); var creditCardXmlNodes = node.GetList("credit-cards/credit-card"); CreditCards = new CreditCard[creditCardXmlNodes.Count]; for (int i = 0; i < creditCardXmlNodes.Count; i++) { CreditCards[i] = new CreditCard(creditCardXmlNodes[i], service); } var addressXmlNodes = node.GetList("addresses/address"); Addresses = new Address[addressXmlNodes.Count]; for (int i = 0; i < addressXmlNodes.Count; i++) { Addresses[i] = new Address(addressXmlNodes[i]); } CustomFields = node.GetDictionary("custom-fields"); }
protected internal AmexExpressCheckoutDetails(NodeWrapper node) { Token = node.GetString("token"); CardType = node.GetString("card-type"); Bin = node.GetString("bin"); ExpirationMonth = node.GetString("expiration-month"); ExpirationYear = node.GetString("expiration-year"); CardMemberNumber = node.GetString("card-member-number"); CardMemberExpiryDate = node.GetString("card-member-expiry-date"); ImageUrl = node.GetString("image-url"); SourceDescription = node.GetString("source-description"); }
public ResultImpl(NodeWrapper node, IBraintreeGateway gateway) { if (node.IsSuccess()) { Target = newInstanceFromResponse(node, gateway); } else { Errors = new ValidationErrors(node); NodeWrapper verificationNode = node.GetNode("verification"); if (verificationNode != null) { CreditCardVerification = new CreditCardVerification(verificationNode, gateway); } NodeWrapper transactionNode = node.GetNode("transaction"); if (transactionNode != null) { Transaction = new Transaction(transactionNode, gateway); } NodeWrapper subscriptionNode = node.GetNode("subscription"); if (subscriptionNode != null) { Subscription = new Subscription(subscriptionNode, gateway); } Parameters = node.GetNode("params").GetFormParameters(); Message = node.GetString("message"); } }
public DisputeStatusHistory(NodeWrapper node) { EffectiveDate = node.GetDateTime("effective-date"); DisbursementDate = node.GetDateTime("disbursement-date"); Timestamp = node.GetDateTime("timestamp"); Status = (DisputeStatus)CollectionUtil.Find(DisputeStatus.ALL, node.GetString("status"), DisputeStatus.UNRECOGNIZED); }
protected internal PayPalAccount(NodeWrapper node, BraintreeGateway gateway) { Email = node.GetString("email"); Token = node.GetString("token"); IsDefault = node.GetBoolean("default"); ImageUrl = node.GetString("image-url"); CreatedAt = node.GetDateTime("created-at"); UpdatedAt = node.GetDateTime("updated-at"); var subscriptionXmlNodes = node.GetList("subscriptions/subscription"); Subscriptions = new Subscription[subscriptionXmlNodes.Count]; for (int i = 0; i < subscriptionXmlNodes.Count; i++) { Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], gateway); } }
public SubscriptionStatusEvent(NodeWrapper node) { if (node == null) { return; } Price = node.GetDecimal("price"); Balance = node.GetDecimal("balance"); Status = node.GetEnum("status", SubscriptionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = node.GetEnum("subscription-source", SubscriptionSource.UNRECOGNIZED); User = node.GetString("user"); CurrencyIsoCode = node.GetString("currency-iso-code"); PlanId = node.GetString("plan-id"); }
protected internal UsBankAccount(NodeWrapper node) { RoutingNumber = node.GetString("routing-number"); Last4 = node.GetString("last-4"); AccountType = node.GetString("account-type"); AccountDescription = node.GetString("account-description"); AccountHolderName = node.GetString("account-holder-name"); Token = node.GetString("token"); ImageUrl = node.GetString("image-url"); BankName = node.GetString("bank-name"); CustomerId = node.GetString("customer-id"); IsDefault = node.GetBoolean("default"); }
public Disbursement(NodeWrapper node, IBraintreeGateway gateway) { Id = node.GetString("id"); Amount = node.GetDecimal("amount"); ExceptionMessage = node.GetString("exception-message"); DisbursementDate = node.GetDateTime("disbursement-date"); FollowUpAction = node.GetString("follow-up-action"); MerchantAccount = new MerchantAccount(node.GetNode("merchant-account")); TransactionIds = new List <string>(); foreach (var stringNode in node.GetList("transaction-ids/item")) { TransactionIds.Add(stringNode.GetString(".")); } Success = node.GetBoolean("success"); Retry = node.GetBoolean("retry"); this.gateway = gateway; }
protected internal MerchantAccount(NodeWrapper node) { Id = node.GetString("id"); CurrencyIsoCode = node.GetString("currency-iso-code"); Status = (MerchantAccountStatus)CollectionUtil.Find(MerchantAccountStatus.ALL, node.GetString("status"), null); NodeWrapper masterNode = node.GetNode("master-merchant-account"); if (masterNode != null) { MasterMerchantAccount = new MerchantAccount(masterNode); } else { MasterMerchantAccount = null; } NodeWrapper individualNode = node.GetNode("individual"); if (individualNode != null) { IndividualDetails = new MerchantAccountIndividualDetails(individualNode); } else { IndividualDetails = null; } NodeWrapper businessNode = node.GetNode("business"); if (businessNode != null) { BusinessDetails = new MerchantAccountBusinessDetails(businessNode); } else { BusinessDetails = null; } NodeWrapper fundingNode = node.GetNode("funding"); if (fundingNode != null) { FundingDetails = new MerchantAccountFundingDetails(fundingNode); } else { FundingDetails = null; } }
internal Modification(NodeWrapper node) { Amount = node.GetDecimal("amount"); Id = node.GetString("id"); NeverExpires = node.GetBoolean("never-expires"); NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles"); Quantity = node.GetInteger("quantity"); }
public BinData(NodeWrapper node) { if (node == null) { return; } Commercial = (CreditCardCommercial)CollectionUtil.Find(CreditCardCommercial.ALL, node.GetString("commercial"), CreditCardCommercial.UNKNOWN); Debit = (CreditCardDebit)CollectionUtil.Find(CreditCardDebit.ALL, node.GetString("debit"), CreditCardDebit.UNKNOWN); DurbinRegulated = (CreditCardDurbinRegulated)CollectionUtil.Find(CreditCardDurbinRegulated.ALL, node.GetString("durbin-regulated"), CreditCardDurbinRegulated.UNKNOWN); Healthcare = (CreditCardHealthcare)CollectionUtil.Find(CreditCardHealthcare.ALL, node.GetString("healthcare"), CreditCardHealthcare.UNKNOWN); Payroll = (CreditCardPayroll)CollectionUtil.Find(CreditCardPayroll.ALL, node.GetString("payroll"), CreditCardPayroll.UNKNOWN); Prepaid = (CreditCardPrepaid)CollectionUtil.Find(CreditCardPrepaid.ALL, node.GetString("prepaid"), CreditCardPrepaid.UNKNOWN); _CountryOfIssuance = node.GetString("country-of-issuance"); _IssuingBank = node.GetString("issuing-bank"); _ProductId = node.GetString("product-id"); }
public Disbursement(NodeWrapper node, BraintreeGateway gateway) { Id = node.GetString("id"); Amount = node.GetDecimal("amount"); ExceptionMessage = node.GetString("exception-message"); DisbursementDate = node.GetDateTime("disbursement-date"); FollowUpAction = node.GetString("follow-up-action"); MerchantAccount = new MerchantAccount(node.GetNode("merchant-account")); TransactionIds = new List<string>(); foreach (var stringNode in node.GetList("transaction-ids/item")) { TransactionIds.Add(stringNode.GetString(".")); } Success = node.GetBoolean("success"); Retry = node.GetBoolean("retry"); this.gateway = gateway; }
public Merchant(NodeWrapper node) { if (node == null) { return; } NodeWrapper merchantNode = node.GetNode("merchant"); Id = merchantNode.GetString("id"); Email = merchantNode.GetString("email"); CompanyName = merchantNode.GetString("company-name"); CountryCodeAlpha3 = merchantNode.GetString("country-code-alpha3"); CountryCodeAlpha2 = merchantNode.GetString("country-code-alpha2"); CountryCodeNumeric = merchantNode.GetString("country-code-numeric"); CountryName = merchantNode.GetString("country-name"); Credentials = new OAuthCredentials(node.GetNode("credentials")); var merchantAccountXmlNodes = merchantNode.GetList("merchant-accounts/merchant-account"); MerchantAccounts = new MerchantAccount[merchantAccountXmlNodes.Count]; for (int i = 0; i < merchantAccountXmlNodes.Count; i++) { MerchantAccounts[i] = new MerchantAccount(merchantAccountXmlNodes[i]); } }
public WebhookNotification(NodeWrapper node, IBraintreeGateway gateway) { Timestamp = node.GetDateTime("timestamp"); Kind = (WebhookKind)CollectionUtil.Find(WebhookKind.ALL, node.GetString("kind"), WebhookKind.UNRECOGNIZED); NodeWrapper WrapperNode = node.GetNode("subject"); if (WrapperNode.GetNode("api-error-response") != null) { WrapperNode = WrapperNode.GetNode("api-error-response"); } if (WrapperNode.GetNode("subscription") != null) { Subscription = new Subscription(WrapperNode.GetNode("subscription"), gateway); } if (WrapperNode.GetNode("merchant-account") != null) { MerchantAccount = new MerchantAccount(WrapperNode.GetNode("merchant-account")); } if (WrapperNode.GetNode("dispute") != null) { Dispute = new Dispute(WrapperNode.GetNode("dispute")); } if (WrapperNode.GetNode("transaction") != null) { Transaction = new Transaction(WrapperNode.GetNode("transaction"), gateway); } if (WrapperNode.GetNode("disbursement") != null) { Disbursement = new Disbursement(WrapperNode.GetNode("disbursement"), gateway); } if (WrapperNode.GetNode("partner-merchant") != null) { PartnerMerchant = new PartnerMerchant(WrapperNode.GetNode("partner-merchant")); } if (WrapperNode.GetNode("account-updater-daily-report") != null) { AccountUpdaterDailyReport = new AccountUpdaterDailyReport(WrapperNode.GetNode("account-updater-daily-report")); } if (WrapperNode.GetNode("errors") != null) { Errors = new ValidationErrors(WrapperNode.GetNode("errors")); } if (WrapperNode.GetNode("message") != null) { Message = WrapperNode.GetString("message"); } }
public RiskData(NodeWrapper node) { if (node == null) { return; } id = node.GetString("id"); decision = node.GetString("decision"); fraudServiceProvider = node.GetString("fraud-service-provider"); deviceDataCaptured = node.GetBoolean("device-data-captured"); TransactionRiskScore = node.GetString("transaction-risk-score"); DecisionReasons = new List <string>(); foreach (var stringNode in node.GetList("decision-reasons/item")) { DecisionReasons.Add(stringNode.GetString(".")); } }
protected internal ApplePayDetails(NodeWrapper node) { CardType = node.GetString("card-type"); PaymentInstrumentName = node.GetString("payment-instrument-name"); SourceDescription = node.GetString("source-description"); CardholderName = node.GetString("cardholder-name"); ExpirationMonth = node.GetString("expiration-month"); ExpirationYear = node.GetString("expiration-year"); Token = node.GetString("token"); LastFour = node.GetString("last-4"); }
protected internal PayPalDetails(NodeWrapper node) { PayerEmail = node.GetString("payer-email"); PaymentId = node.GetString("payment-id"); AuthorizationId = node.GetString("authorization-id"); Token = node.GetString("token"); ImageUrl = node.GetString("image-url"); DebugId = node.GetString("debug-id"); PayeeEmail = node.GetString("payee-email"); CustomField = node.GetString("custom-field"); }
protected internal AchMandate(NodeWrapper node) { if (node == null) { return; } Text = node.GetString("text"); AcceptedAt = node.GetDateTime("accepted-at"); }
public UsBankAccountVerification(NodeWrapper node) { if (node == null) { return; } VerificationMethod = node.GetEnum("verification-method", UsBankAccountVerificationMethod.UNRECOGNIZED); VerificationDeterminedAt = node.GetDateTime("verification-determined-at"); GatewayRejectionReason = null; ProcessorResponseCode = node.GetString("processor-response-code"); ProcessorResponseText = node.GetString("processor-response-text"); MerchantAccountId = node.GetString("merchant-account-id"); Status = node.GetEnum("status", UsBankAccountVerificationStatus.UNRECOGNIZED); Id = node.GetString("id"); UsBankAccount = new UsBankAccount(node.GetNode("us-bank-account")); CreatedAt = node.GetDateTime("created-at"); }
public Dispute(NodeWrapper node) { Amount = node.GetDecimal("amount"); AmountDisputed = node.GetDecimal("amount-disputed"); AmountWon = node.GetDecimal("amount-won"); CreatedAt = node.GetDateTime("created-at"); DateOpened = node.GetDateTime("date-opened"); DateWon = node.GetDateTime("date-won"); ReceivedDate = node.GetDateTime("received-date"); ReplyByDate = node.GetDateTime("reply-by-date"); UpdatedAt = node.GetDateTime("updated-at"); Reason = node.GetEnum("reason", DisputeReason.GENERAL); Status = node.GetEnum("status", DisputeStatus.UNRECOGNIZED); Kind = node.GetEnum("kind", DisputeKind.UNRECOGNIZED); CaseNumber = node.GetString("case-number"); CurrencyIsoCode = node.GetString("currency-iso-code"); GraphQLId = node.GetString("global-id"); Id = node.GetString("id"); ProcessorComments = node.GetString("processor-comments"); MerchantAccountId = node.GetString("merchant-account-id"); OriginalDisputeId = node.GetString("original-dispute-id"); ReasonCode = node.GetString("reason-code"); ReasonDescription = node.GetString("reason-description"); ReferenceNumber = node.GetString("reference-number"); if (node.GetNode("transaction") != null) { TransactionDetails = new TransactionDetails(node.GetNode("transaction")); Transaction = new DisputeTransaction(node.GetNode("transaction")); } Evidence = new List <DisputeEvidence>(); foreach (var evidenceResponse in node.GetList("evidence/evidence")) { Evidence.Add(new DisputeEvidence(evidenceResponse)); } StatusHistory = new List <DisputeStatusHistory>(); foreach (var historyStatusResponse in node.GetList("status-history/status-history")) { StatusHistory.Add(new DisputeStatusHistory(historyStatusResponse)); } }
protected internal CoinbaseAccount(NodeWrapper node, BraintreeService service) { UserId = node.GetString("user-id"); UserEmail = node.GetString("user-email"); UserName = node.GetString("user-name"); Token = node.GetString("token"); IsDefault = node.GetBoolean("default"); ImageUrl = node.GetString("image-url"); CreatedAt = node.GetDateTime("created-at"); UpdatedAt = node.GetDateTime("updated-at"); var subscriptionXmlNodes = node.GetList("subscriptions/subscription"); Subscriptions = new Subscription[subscriptionXmlNodes.Count]; for (int i = 0; i < subscriptionXmlNodes.Count; i++) { Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], service); } }
protected internal PaymentMethodNonce(NodeWrapper node, IBraintreeGateway gateway) { IsDefault = node.GetBoolean("default"); Nonce = node.GetString("nonce"); Type = node.GetString("type"); var detailsNode = node.GetNode("details"); if (detailsNode != null && !detailsNode.IsEmpty()) { Details = new PaymentMethodNonceDetails(detailsNode); } var threeDSecureInfoNode = node.GetNode("three-d-secure-info"); if (threeDSecureInfoNode != null && !threeDSecureInfoNode.IsEmpty()) { ThreeDSecureInfo = new ThreeDSecureInfo(threeDSecureInfoNode); } }
protected internal Installment(NodeWrapper node) { Amount = node.GetDecimal("amount"); Id = node.GetString("id"); ProjectedDisbursementDate = node.GetDateTime("projected_disbursement_date"); ActualDisbursementDate = node.GetDateTime("actual_disbursement_date"); Adjustments = new List <Adjustment>(); foreach (var adjustmentNode in node.GetList("adjustments/adjustment")) { Adjustments.Add(new Adjustment(adjustmentNode)); } }
public CreditCardVerification(NodeWrapper node) { if (node == null) return; AvsErrorResponseCode = node.GetString("avs-error-response-code"); AvsPostalCodeResponseCode = node.GetString("avs-postal-code-response-code"); AvsStreetAddressResponseCode = node.GetString("avs-street-address-response-code"); CvvResponseCode = node.GetString("cvv-response-code"); GatewayRejectionReason = (TransactionGatewayRejectionReason)CollectionUtil.Find( TransactionGatewayRejectionReason.ALL, node.GetString("gateway-rejection-reason"), null ); ProcessorResponseCode = node.GetString("processor-response-code"); ProcessorResponseText = node.GetString("processor-response-text"); MerchantAccountId = node.GetString("merchant-account-id"); Status = (VerificationStatus)CollectionUtil.Find(VerificationStatus.ALL, node.GetString("status"), VerificationStatus.UNRECOGNIZED); }
public StatusEvent(NodeWrapper node) { if (node == null) { return; } Amount = node.GetDecimal("amount"); Status = (TransactionStatus)CollectionUtil.Find(TransactionStatus.ALL, node.GetString("status"), TransactionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = (TransactionSource)CollectionUtil.Find(TransactionSource.ALL, node.GetString("transaction-source"), TransactionSource.UNRECOGNIZED); User = node.GetString("user"); }
public StatusEvent(NodeWrapper node) { if (node == null) { return; } Amount = node.GetDecimal("amount"); Status = node.GetEnum("status", TransactionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = node.GetEnum("transaction-source", TransactionSource.UNRECOGNIZED); User = node.GetString("user"); }
public Subscription(NodeWrapper node, IBraintreeGateway gateway) { Balance = node.GetDecimal("balance"); BillingDayOfMonth = node.GetInteger("billing-day-of-month"); BillingPeriodEndDate = node.GetDateTime("billing-period-end-date"); BillingPeriodStartDate = node.GetDateTime("billing-period-start-date"); CurrentBillingCycle = node.GetInteger("current-billing-cycle"); DaysPastDue = node.GetInteger("days-past-due"); Descriptor = new Descriptor(node.GetNode("descriptor")); Description = node.GetString("description"); FailureCount = node.GetInteger("failure-count"); FirstBillingDate = node.GetDateTime("first-billing-date"); CreatedAt = node.GetDateTime("created-at"); UpdatedAt = node.GetDateTime("updated-at"); Id = node.GetString("id"); NextBillAmount = node.GetDecimal("next-bill-amount"); NextBillingDate = node.GetDateTime("next-billing-date"); NextBillingPeriodAmount = node.GetDecimal("next-billing-period-amount"); NeverExpires = node.GetBoolean("never-expires"); NumberOfBillingCycles = node.GetInteger("number-of-billing-cycles"); PaymentMethodToken = node.GetString("payment-method-token"); PaidThroughDate = node.GetDateTime("paid-through-date"); PlanId = node.GetString("plan-id"); Price = node.GetDecimal("price"); Status = (SubscriptionStatus)CollectionUtil.Find(SubscriptionStatus.STATUSES, node.GetString("status"), SubscriptionStatus.UNRECOGNIZED); List <NodeWrapper> statusNodes = node.GetList("status-history/status-event"); StatusHistory = new SubscriptionStatusEvent[statusNodes.Count]; for (int i = 0; i < statusNodes.Count; i++) { StatusHistory[i] = new SubscriptionStatusEvent(statusNodes[i]); } HasTrialPeriod = node.GetBoolean("trial-period"); TrialDuration = node.GetInteger("trial-duration"); var trialDurationUnitStr = node.GetString("trial-duration-unit"); if (trialDurationUnitStr != null) { TrialDurationUnit = (SubscriptionDurationUnit)CollectionUtil.Find(SubscriptionDurationUnit.ALL, trialDurationUnitStr, SubscriptionDurationUnit.UNRECOGNIZED); } MerchantAccountId = node.GetString("merchant-account-id"); AddOns = new List <AddOn> (); foreach (var addOnResponse in node.GetList("add-ons/add-on")) { AddOns.Add(new AddOn(addOnResponse)); } Discounts = new List <Discount> (); foreach (var discountResponse in node.GetList("discounts/discount")) { Discounts.Add(new Discount(discountResponse)); } Transactions = new List <Transaction> (); foreach (var transactionResponse in node.GetList("transactions/transaction")) { Transactions.Add(new Transaction(transactionResponse, gateway)); } }
public SubscriptionStatusEvent(NodeWrapper node) { if (node == null) { return; } Price = node.GetDecimal("price"); Balance = node.GetDecimal("balance"); Status = (SubscriptionStatus)CollectionUtil.Find(SubscriptionStatus.STATUSES, node.GetString("status"), SubscriptionStatus.UNRECOGNIZED); Timestamp = node.GetDateTime("timestamp"); Source = (SubscriptionSource)CollectionUtil.Find(SubscriptionSource.ALL, node.GetString("subscription-source"), SubscriptionSource.UNRECOGNIZED); User = node.GetString("user"); }
public CustomerDetails(NodeWrapper node, IBraintreeGateway gateway) { if (node == null) { return; } Id = node.GetString("id"); FirstName = node.GetString("first-name"); LastName = node.GetString("last-name"); Company = node.GetString("company"); Email = node.GetString("email"); Phone = node.GetString("phone"); Fax = node.GetString("fax"); Website = node.GetString("website"); }
protected internal IbanBankAccount(NodeWrapper node) { AccountHolderName = node.GetString("account-holder-name"); IbanAccountNumberLast4 = node.GetString("iban-account-number-last-4"); IbanCountry = node.GetString("iban-country"); Description = node.GetString("description"); MaskedIban = node.GetString("masked-iban"); Bic = node.GetString("bic"); }
protected internal PaymentMethodNonceDetails(NodeWrapper node) { Bin = node.GetString("bin"); CardType = node.GetString("card-type"); LastTwo = node.GetString("last-two"); LastFour = node.GetString("last-four"); Username = node.GetString("username"); VenmoUserId = node.GetString("venmo-user-id"); }
protected internal IdealPayment(NodeWrapper node) { Id = node.GetString("id"); IdealTransactionId = node.GetString("ideal-transaction-id"); ImageUrl = node.GetString("image-url"); Currency = node.GetString("currency"); Status = node.GetString("status"); Amount = (decimal)node.GetDecimal("amount"); OrderId = node.GetString("order-id"); Issuer = node.GetString("issuer"); ApprovalUrl = node.GetString("approval-url"); if (node.GetNode("iban-bank-account") != null) { IbanBankAccount = new IbanBankAccount(node.GetNode("iban-bank-account")); } }
protected internal AmexExpressCheckoutCard(NodeWrapper node, BraintreeGateway gateway) { Token = node.GetString("token"); CardType = node.GetString("card-type"); Bin = node.GetString("bin"); ExpirationMonth = node.GetString("expiration-month"); ExpirationYear = node.GetString("expiration-year"); CardMemberNumber = node.GetString("card-member-number"); CardMemberExpiryDate = node.GetString("card-member-expiry-date"); SourceDescription = node.GetString("source-description"); IsDefault = node.GetBoolean("default"); ImageUrl = node.GetString("image-url"); CustomerId = node.GetString("customer-id"); CreatedAt = node.GetDateTime("created-at"); UpdatedAt = node.GetDateTime("updated-at"); var subscriptionXmlNodes = node.GetList("subscriptions/subscription"); Subscriptions = new Subscription[subscriptionXmlNodes.Count]; for (int i = 0; i < subscriptionXmlNodes.Count; i++) { Subscriptions[i] = new Subscription(subscriptionXmlNodes[i], gateway); } }
protected internal MerchantAccountIndividualDetails(NodeWrapper node) { FirstName = node.GetString("first-name"); LastName = node.GetString("last-name"); Email = node.GetString("email"); Phone = node.GetString("phone"); DateOfBirth = node.GetString("date-of-birth"); SsnLastFour = node.GetString("ssn-last-4"); Address = new Address(node.GetNode("address")); }
public ThreeDSecureInfo(NodeWrapper node) { if (node == null) { return; } Enrolled = node.GetString("enrolled"); Status = node.GetString("status"); LiabilityShifted = node.GetBoolean("liability-shifted"); LiabilityShiftPossible = node.GetBoolean("liability-shift-possible"); Cavv = node.GetString("cavv"); Xid = node.GetString("xid"); DsTransactionId = node.GetString("ds-transaction-id"); EciFlag = node.GetString("eci-flag"); ThreeDSecureVersion = node.GetString("three-d-secure-version"); ThreeDSecureAuthenticationId = node.GetString("three-d-secure-authentication-id"); }
protected internal MerchantAccountFundingDetails(NodeWrapper node) { Destination = (FundingDestination)CollectionUtil.Find( FundingDestination.ALL, node.GetString("destination"), FundingDestination.UNRECOGNIZED); RoutingNumber = node.GetString("routing-number"); AccountNumberLast4 = node.GetString("account-number-last-4"); Email = node.GetString("email"); MobilePhone = node.GetString("mobile-phone"); Descriptor = node.GetString("descriptor"); }