/// <summary> /// Initializes a new instance of the <see cref="Transaction" /> class. /// </summary> /// <param name="userId">The user's account ID according to your systems. Note that user IDs are case sensitive..</param> /// <param name="sessionId">The user's current session ID, used to tie a user's action before and after login or account creation. Required if no user_id values is provided..</param> /// <param name="orderId">The ID for tracking this order in your system. (required).</param> /// <param name="transactionId">The ID for identifying this transaction. Important for tracking transactions, and linking different parts of the same transaction together, e.g., linking a refund to its original transaction..</param> /// <param name="deviceIp">IP address of the request made by the user. Recommended for historical backfills and customers with mobile apps..</param> /// <param name="originTimestamp">Represents the time the event occured in your system. Send as a UNIX timestamp in milliseconds in string..</param> /// <param name="userEmail">Email of the user creating this order. Note - If the user's email is also their account ID in your system, set both the userId and userEmail fields to their email address..</param> /// <param name="amount">The item unit price in numbers, in the base unit of the currency_code.e.g. \"2500\".</param> /// <param name="currencyCode">The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for the amount. e.g., USD, INR alternative currencies, like bitcoin or points systems..</param> /// <param name="transactionType">The type of transaction being recorded. e.g. _sale, _authorize, _capture, _void, _refund, _deposit, _withdrawal, _transfer.</param> /// <param name="transactionStatus">Use _transactionStatus to indicate the status of the transaction. The value can be \"_success\" (default value), \"_failure\" or \"_pending\". For instance, If the transaction was rejected by the payment gateway, set the value to \"_failure\". (required).</param> /// <param name="isFirstTimeBuyer">Is user first time buyer..</param> /// <param name="billingAddress">billingAddress.</param> /// <param name="shippingAddress">shippingAddress.</param> /// <param name="paymentMethod">paymentMethod.</param> /// <param name="customInfo">customInfo.</param> public Transaction(string userId = default(string), string sessionId = default(string), string orderId = default(string), string transactionId = default(string), string deviceIp = default(string), string originTimestamp = default(string), string userEmail = default(string), string amount = default(string), string currencyCode = default(string), string transactionType = default(string), string transactionStatus = default(string), bool?isFirstTimeBuyer = default(bool?), BillingAddress billingAddress = default(BillingAddress), ShippingAddress shippingAddress = default(ShippingAddress), PaymentMethod paymentMethod = default(PaymentMethod), CustomInfo customInfo = default(CustomInfo)) { // to ensure "orderId" is required (not null) if (orderId == null) { throw new InvalidDataException("orderId is a required property for Transaction and cannot be null"); } else { this.orderId = orderId; } // to ensure "transactionStatus" is required (not null) if (transactionStatus == null) { throw new InvalidDataException("transactionStatus is a required property for Transaction and cannot be null"); } else { this.transactionStatus = transactionStatus; } this.userId = userId; this.sessionId = sessionId; this.transactionId = transactionId; this.deviceIp = deviceIp; this.originTimestamp = originTimestamp; this.userEmail = userEmail; this.amount = amount; this.currencyCode = currencyCode; this.transactionType = transactionType; this.isFirstTimeBuyer = isFirstTimeBuyer; this.billingAddress = billingAddress; this.shippingAddress = shippingAddress; this.paymentMethod = paymentMethod; this.customInfo = customInfo; }
/// <summary> /// Initializes a new instance of the <see cref="CreateAccount" /> class. /// </summary> /// <param name="userId">The user's account ID according to your systems. Note that user IDs are case sensitive..</param> /// <param name="sessionId">The user's current session ID, used to tie a user's action before and after login or account creation. Required if no user_id values is provided..</param> /// <param name="deviceIp">IP address of the request made by the user. Recommended for historical backfills and customers with mobile apps..</param> /// <param name="originTimestamp">Represents the time the event occured in your system. Send as a UNIX timestamp in milliseconds in string..</param> /// <param name="userEmail">Email of the user creating this order. Note - If the user's email is also their account ID in your system, set both the userId and userEmail fields to their email address..</param> /// <param name="firstName">Provide the first name associated with the user here..</param> /// <param name="lastName">Provide the last name associated with the user here..</param> /// <param name="phone">The primary phone number of the user associated with this account. Provide the phone number as a string..</param> /// <param name="age">Age of the user e.g. \"25\".</param> /// <param name="gender">Gender of the user e.g. \"_male\", \"_female\" or \"_trans\".</param> /// <param name="referralCode">Code or promotion used by the user while creating account..</param> /// <param name="referrerUserId">The ID of the user that referred the current user to your business. This field is required for detecting referral fraud..</param> /// <param name="billingAddress">billingAddress.</param> /// <param name="shippingAddress">shippingAddress.</param> /// <param name="paymentMethods">The payment information associated with this account. Represented as an array of nested payment_method objects containing payment type, payment gateway, credit card bin, etc..</param> /// <param name="promotions">The list of promotions that apply to this account. You can add one or more promotions when creating or updating an order. Represented as a JSON array of promotion objects. You can also separately add promotions to the account via the addPromotion event..</param> /// <param name="socialSignOnType">If the user logged in with a social identify provider, give the name here. e.g. _google, _facebook, _twitter, _linkedin, _other.</param> /// <param name="emailConfirmedStatus">Status of email verification. e.g. _success, _failure, _pending.</param> /// <param name="phoneConfirmedStatus">Status of phone verification. e.g. _success, _failure, _pending.</param> /// <param name="isNewsletterSubscribed">Is user subscribed for newsletter. e.g. true, false.</param> /// <param name="accountStatus">Current status of account, e.g. _active, _inactive.</param> /// <param name="facebookId">Facebook user id or token of the user. This can help to varify his social identity..</param> /// <param name="googleId">Google user id or token of the user. This can help to varify his social identity..</param> /// <param name="twitterId">Twitter handle or token of the user. This can help to varify his social identity..</param> /// <param name="customInfo">customInfo.</param> public CreateAccount(string userId = default(string), string sessionId = default(string), string deviceIp = default(string), string originTimestamp = default(string), string userEmail = default(string), string firstName = default(string), string lastName = default(string), string phone = default(string), string age = default(string), string gender = default(string), string referralCode = default(string), string referrerUserId = default(string), BillingAddress billingAddress = default(BillingAddress), ShippingAddress shippingAddress = default(ShippingAddress), List <PaymentMethod> paymentMethods = default(List <PaymentMethod>), List <Promotion> promotions = default(List <Promotion>), string socialSignOnType = default(string), string emailConfirmedStatus = default(string), string phoneConfirmedStatus = default(string), bool?isNewsletterSubscribed = default(bool?), string accountStatus = default(string), string facebookId = default(string), string googleId = default(string), string twitterId = default(string), CustomInfo customInfo = default(CustomInfo)) { this.userId = userId; this.sessionId = sessionId; this.deviceIp = deviceIp; this.originTimestamp = originTimestamp; this.userEmail = userEmail; this.firstName = firstName; this.lastName = lastName; this.phone = phone; this.age = age; this.gender = gender; this.referralCode = referralCode; this.referrerUserId = referrerUserId; this.billingAddress = billingAddress; this.shippingAddress = shippingAddress; this.paymentMethods = paymentMethods; this.promotions = promotions; this.socialSignOnType = socialSignOnType; this.emailConfirmedStatus = emailConfirmedStatus; this.phoneConfirmedStatus = phoneConfirmedStatus; this.isNewsletterSubscribed = isNewsletterSubscribed; this.accountStatus = accountStatus; this.facebookId = facebookId; this.googleId = googleId; this.twitterId = twitterId; this.customInfo = customInfo; }
/// <summary> /// Initializes a new instance of the <see cref="CreateOrder" /> class. /// </summary> /// <param name="userId">The user's account ID according to your systems. Note that user IDs are case sensitive..</param> /// <param name="sessionId">The user's current session ID, used to tie a user's action before and after login or account creation. Required if no user_id values is provided..</param> /// <param name="orderId">The ID for tracking this order in your system. (required).</param> /// <param name="deviceIp">IP address of the request made by the user. Recommended for historical backfills and customers with mobile apps..</param> /// <param name="originTimestamp">Represents the time the event occured in your system. Send as a UNIX timestamp in milliseconds in string..</param> /// <param name="userEmail">Email of the user creating this order. Note - If the user's email is also their account ID in your system, set both the userId and userEmail fields to their email address..</param> /// <param name="amount">The item unit price in numbers, in the base unit of the currency_code.e.g. \"2500\".</param> /// <param name="currencyCode">The [ISO-4217](http://en.wikipedia.org/wiki/ISO_4217) currency code for the amount. e.g., USD, INR alternative currencies, like bitcoin or points systems..</param> /// <param name="hasExpeditedShipping">Whether the user requested priority/expedited shipping on their order..</param> /// <param name="shippingMethod">Indicates the method of delivery to the user. e.g. _electronic, _physical.</param> /// <param name="orderReferrer">Referer website or user name..</param> /// <param name="isPrePaid">is order is prepaid..</param> /// <param name="isGift">Is user chosen gift pack..</param> /// <param name="isReturn">Is this return order..</param> /// <param name="isFirstTimeBuyer">Is user first time buyer..</param> /// <param name="billingAddress">billingAddress.</param> /// <param name="shippingAddress">shippingAddress.</param> /// <param name="paymentMethods">The payment information associated with this order. Represented as an array of nested payment_method objects containing payment type, payment gateway, credit card bin, etc..</param> /// <param name="promotions">The list of promotions that apply to this order. You can add one or more promotions when creating or updating an order. Represented as a JSON array of promotion objects. You can also separately add promotions to the account via the addPromotion event..</param> /// <param name="items">The list of items ordered. Represented as a JSON array of item.</param> /// <param name="customInfo">customInfo.</param> public CreateOrder(string userId = default(string), string sessionId = default(string), string orderId = default(string), string deviceIp = default(string), string originTimestamp = default(string), string userEmail = default(string), string amount = default(string), string currencyCode = default(string), bool?hasExpeditedShipping = default(bool?), string shippingMethod = default(string), string orderReferrer = default(string), bool?isPrePaid = default(bool?), bool?isGift = default(bool?), bool?isReturn = default(bool?), bool?isFirstTimeBuyer = default(bool?), BillingAddress billingAddress = default(BillingAddress), ShippingAddress shippingAddress = default(ShippingAddress), List <PaymentMethod> paymentMethods = default(List <PaymentMethod>), List <Promotion> promotions = default(List <Promotion>), List <Item> items = default(List <Item>), CustomInfo customInfo = default(CustomInfo)) { // to ensure "orderId" is required (not null) if (orderId == null) { throw new InvalidDataException("orderId is a required property for CreateOrder and cannot be null"); } else { this.orderId = orderId; } this.userId = userId; this.sessionId = sessionId; this.deviceIp = deviceIp; this.originTimestamp = originTimestamp; this.userEmail = userEmail; this.amount = amount; this.currencyCode = currencyCode; this.hasExpeditedShipping = hasExpeditedShipping; this.shippingMethod = shippingMethod; this.orderReferrer = orderReferrer; this.isPrePaid = isPrePaid; this.isGift = isGift; this.isReturn = isReturn; this.isFirstTimeBuyer = isFirstTimeBuyer; this.billingAddress = billingAddress; this.shippingAddress = shippingAddress; this.paymentMethods = paymentMethods; this.promotions = promotions; this.items = items; this.customInfo = customInfo; }