All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openapitools.client.model.PaymentMethodAuthorizationRequest Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/

package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.AuthorizationMandate;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * PaymentMethodAuthorizationRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PaymentMethodAuthorizationRequest {
  public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
  private String accountId;

  public static final String SERIALIZED_NAME_ACCOUNT_NUMBER = "account_number";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_NUMBER)
  private String accountNumber;

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private BigDecimal amount;

  public static final String SERIALIZED_NAME_GATEWAY_ID = "gateway_id";
  @SerializedName(SERIALIZED_NAME_GATEWAY_ID)
  private String gatewayId;

  public static final String SERIALIZED_NAME_GATEWAY_OPTIONS = "gateway_options";
  @SerializedName(SERIALIZED_NAME_GATEWAY_OPTIONS)
  private Map gatewayOptions = null;

  public static final String SERIALIZED_NAME_GATEWAY_ORDER_ID = "gateway_order_id";
  @SerializedName(SERIALIZED_NAME_GATEWAY_ORDER_ID)
  private String gatewayOrderId;

  public static final String SERIALIZED_NAME_STATEMENT_DESCRIPTOR = "statement_descriptor";
  @SerializedName(SERIALIZED_NAME_STATEMENT_DESCRIPTOR)
  private String statementDescriptor;

  public static final String SERIALIZED_NAME_STATEMENT_DESCRIPTOR_PHONE = "statement_descriptor_phone";
  @SerializedName(SERIALIZED_NAME_STATEMENT_DESCRIPTOR_PHONE)
  private String statementDescriptorPhone;

  public static final String SERIALIZED_NAME_MANDATE = "mandate";
  @SerializedName(SERIALIZED_NAME_MANDATE)
  private AuthorizationMandate mandate;

  public PaymentMethodAuthorizationRequest() { 
  }

  public PaymentMethodAuthorizationRequest accountId(String accountId) {
    
    this.accountId = accountId;
    return this;
  }

   /**
   * A customer account identifier. Either `account_id` or `account_number` is required.
   * @return accountId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "2c92c0f86a8dd422016a9e7a70116b0d", value = "A customer account identifier. Either `account_id` or `account_number` is required.")

  public String getAccountId() {
    return accountId;
  }


  public void setAccountId(String accountId) {
    this.accountId = accountId;
  }


  public PaymentMethodAuthorizationRequest accountNumber(String accountNumber) {
    
    this.accountNumber = accountNumber;
    return this;
  }

   /**
   * A Human-readable customer account identifier. Either `account_id` or `account_number` is required.
   * @return accountNumber
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "RC-00000011", value = "A Human-readable customer account identifier. Either `account_id` or `account_number` is required.")

  public String getAccountNumber() {
    return accountNumber;
  }


  public void setAccountNumber(String accountNumber) {
    this.accountNumber = accountNumber;
  }


  public PaymentMethodAuthorizationRequest amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

   /**
   * Amount to be authorized.
   * @return amount
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Amount to be authorized.")

  public BigDecimal getAmount() {
    return amount;
  }


  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }


  public PaymentMethodAuthorizationRequest gatewayId(String gatewayId) {
    
    this.gatewayId = gatewayId;
    return this;
  }

   /**
   * Identifier of the payment gateway that Zuora will use to authorize the payments that are made with this payment method. If you do not set this field, Zuora will use one of the following payment gateways instead: The default payment gateway of the customer account that owns the payment method, if the payment method is associated with a customer account or the default payment gateway of your Zuora tenant.
   * @return gatewayId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "8ad093d07ae636bb017ae97518762aa3", value = "Identifier of the payment gateway that Zuora will use to authorize the payments that are made with this payment method. If you do not set this field, Zuora will use one of the following payment gateways instead: The default payment gateway of the customer account that owns the payment method, if the payment method is associated with a customer account or the default payment gateway of your Zuora tenant.")

  public String getGatewayId() {
    return gatewayId;
  }


  public void setGatewayId(String gatewayId) {
    this.gatewayId = gatewayId;
  }


  public PaymentMethodAuthorizationRequest gatewayOptions(Map gatewayOptions) {
    
    this.gatewayOptions = gatewayOptions;
    return this;
  }

  public PaymentMethodAuthorizationRequest putGatewayOptionsItem(String key, String gatewayOptionsItem) {
    if (this.gatewayOptions == null) {
      this.gatewayOptions = new HashMap();
    }
    this.gatewayOptions.put(key, gatewayOptionsItem);
    return this;
  }

   /**
   * A hash containing gateway-specific parameters.
   * @return gatewayOptions
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "{\"key\":\"value\"}", value = "A hash containing gateway-specific parameters.")

  public Map getGatewayOptions() {
    return gatewayOptions;
  }


  public void setGatewayOptions(Map gatewayOptions) {
    this.gatewayOptions = gatewayOptions;
  }


  public PaymentMethodAuthorizationRequest gatewayOrderId(String gatewayOrderId) {
    
    this.gatewayOrderId = gatewayOrderId;
    return this;
  }

   /**
   * A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead. Gateways check duplicates on the gateway order ID to ensure that the merchant do not accidentally enter the same transaction twice. This ID can also be used to do reconciliation and tie the payment to a natural key in external systems. The source of this ID varies by merchant. Some merchants use their shopping cart order IDs, and others use something different. Merchants use this ID to track transactions in their eCommerce systems. When you create a payment for capturing the authorized funds, it is highly recommended to pass in the `gateway_order_id` that you used when authorizing the funds by using the Create authorization operation, together with the `authorization_id` field.
   * @return gatewayOrderId
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "A merchant-specified natural key value that can be passed to the electronic payment gateway when a payment is created. If not specified, the payment number will be passed in instead. Gateways check duplicates on the gateway order ID to ensure that the merchant do not accidentally enter the same transaction twice. This ID can also be used to do reconciliation and tie the payment to a natural key in external systems. The source of this ID varies by merchant. Some merchants use their shopping cart order IDs, and others use something different. Merchants use this ID to track transactions in their eCommerce systems. When you create a payment for capturing the authorized funds, it is highly recommended to pass in the `gateway_order_id` that you used when authorizing the funds by using the Create authorization operation, together with the `authorization_id` field.")

  public String getGatewayOrderId() {
    return gatewayOrderId;
  }


  public void setGatewayOrderId(String gatewayOrderId) {
    this.gatewayOrderId = gatewayOrderId;
  }


  public PaymentMethodAuthorizationRequest statementDescriptor(String statementDescriptor) {
    
    this.statementDescriptor = statementDescriptor;
    return this;
  }

   /**
   * A payment gateway-specific field used by Orbital, Vantiv and Verifi.
   * @return statementDescriptor
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A payment gateway-specific field used by Orbital, Vantiv and Verifi.")

  public String getStatementDescriptor() {
    return statementDescriptor;
  }


  public void setStatementDescriptor(String statementDescriptor) {
    this.statementDescriptor = statementDescriptor;
  }


  public PaymentMethodAuthorizationRequest statementDescriptorPhone(String statementDescriptorPhone) {
    
    this.statementDescriptorPhone = statementDescriptorPhone;
    return this;
  }

   /**
   * A payment gateway-specific field used by Orbital, Vantiv and Verifi.
   * @return statementDescriptorPhone
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A payment gateway-specific field used by Orbital, Vantiv and Verifi.")

  public String getStatementDescriptorPhone() {
    return statementDescriptorPhone;
  }


  public void setStatementDescriptorPhone(String statementDescriptorPhone) {
    this.statementDescriptorPhone = statementDescriptorPhone;
  }


  public PaymentMethodAuthorizationRequest mandate(AuthorizationMandate mandate) {
    
    this.mandate = mandate;
    return this;
  }

   /**
   * Get mandate
   * @return mandate
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public AuthorizationMandate getMandate() {
    return mandate;
  }


  public void setMandate(AuthorizationMandate mandate) {
    this.mandate = mandate;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentMethodAuthorizationRequest paymentMethodAuthorizationRequest = (PaymentMethodAuthorizationRequest) o;
    return Objects.equals(this.accountId, paymentMethodAuthorizationRequest.accountId) &&
        Objects.equals(this.accountNumber, paymentMethodAuthorizationRequest.accountNumber) &&
        Objects.equals(this.amount, paymentMethodAuthorizationRequest.amount) &&
        Objects.equals(this.gatewayId, paymentMethodAuthorizationRequest.gatewayId) &&
        Objects.equals(this.gatewayOptions, paymentMethodAuthorizationRequest.gatewayOptions) &&
        Objects.equals(this.gatewayOrderId, paymentMethodAuthorizationRequest.gatewayOrderId) &&
        Objects.equals(this.statementDescriptor, paymentMethodAuthorizationRequest.statementDescriptor) &&
        Objects.equals(this.statementDescriptorPhone, paymentMethodAuthorizationRequest.statementDescriptorPhone) &&
        Objects.equals(this.mandate, paymentMethodAuthorizationRequest.mandate);
  }

  @Override
  public int hashCode() {
    return Objects.hash(accountId, accountNumber, amount, gatewayId, gatewayOptions, gatewayOrderId, statementDescriptor, statementDescriptorPhone, mandate);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentMethodAuthorizationRequest {\n");
    sb.append("    accountId: ").append(toIndentedString(accountId)).append("\n");
    sb.append("    accountNumber: ").append(toIndentedString(accountNumber)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    gatewayId: ").append(toIndentedString(gatewayId)).append("\n");
    sb.append("    gatewayOptions: ").append(toIndentedString(gatewayOptions)).append("\n");
    sb.append("    gatewayOrderId: ").append(toIndentedString(gatewayOrderId)).append("\n");
    sb.append("    statementDescriptor: ").append(toIndentedString(statementDescriptor)).append("\n");
    sb.append("    statementDescriptorPhone: ").append(toIndentedString(statementDescriptorPhone)).append("\n");
    sb.append("    mandate: ").append(toIndentedString(mandate)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy