/// <param name="paymentAmount"> /// The amount and currency of the payment. /// </param> /// <param name="idempotencyKey"> /// A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. /// </param> /// <param name="billingAddress"> /// The billing address for the payment. /// </param> /// <param name="vaultId"> /// The ID returned by Shopify's Card Vault. /// </param> /// <param name="test"> /// Executes the payment in test mode if possible. Defaults to `false`. /// </param> public CreditCardPaymentInputV2(MoneyInput paymentAmount, string idempotencyKey, MailingAddressInput billingAddress, string vaultId, bool?test = null) { Set(paymentAmountFieldKey, paymentAmount); Set(idempotencyKeyFieldKey, idempotencyKey); Set(billingAddressFieldKey, billingAddress); Set(vaultIdFieldKey, vaultId); if (test != null) { Set(testFieldKey, test); } }
/// <param name="paymentAmount"> /// The amount and currency of the payment. /// </param> /// <param name="idempotencyKey"> /// A unique client generated key used to avoid duplicate charges. When a duplicate payment is found, the original is returned instead of creating a new one. /// </param> /// <param name="billingAddress"> /// The billing address for the payment. /// </param> /// <param name="type"> /// The type of payment token. /// </param> /// <param name="paymentData"> /// A simple string or JSON containing the required payment data for the tokenized payment. /// </param> /// <param name="test"> /// Executes the payment in test mode if possible. Defaults to `false`. /// </param> /// <param name="identifier"> /// Public Hash Key used for AndroidPay payments only. /// </param> public TokenizedPaymentInputV2(MoneyInput paymentAmount, string idempotencyKey, MailingAddressInput billingAddress, string type, string paymentData, bool?test = null, string identifier = null) { Set(paymentAmountFieldKey, paymentAmount); Set(idempotencyKeyFieldKey, idempotencyKey); Set(billingAddressFieldKey, billingAddress); Set(typeFieldKey, type); Set(paymentDataFieldKey, paymentData); if (test != null) { Set(testFieldKey, test); } if (identifier != null) { Set(identifierFieldKey, identifier); } }