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

org.openapitools.client.model.ApplePay 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 org.openapitools.client.model.GetCardList;
import org.openapitools.client.model.Mandate;
import org.openapitools.jackson.nullable.JsonNullable;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * If the `type` of the payment method is `apple_pay`, this hash contains details about the Apple Pay payment method. See [Supported payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/L_Payment_Methods/A_Supported_Payment_Methods) for payment gateways that support this type of payment method.
 */
@ApiModel(description = "If the `type` of the payment method is `apple_pay`, this hash contains details about the Apple Pay payment method. See [Supported payment methods](https://knowledgecenter.zuora.com/Billing/Billing_and_Payments/L_Payment_Methods/A_Supported_Payment_Methods) for payment gateways that support this type of payment method.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApplePay {
  public static final String SERIALIZED_NAME_CARD = "card";
  @SerializedName(SERIALIZED_NAME_CARD)
  private GetCardList card;

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

  public static final String SERIALIZED_NAME_PAYMENT_ID = "payment_id";
  @SerializedName(SERIALIZED_NAME_PAYMENT_ID)
  private String paymentId;

  public static final String SERIALIZED_NAME_TOKEN = "token";
  @SerializedName(SERIALIZED_NAME_TOKEN)
  private String token;

  public ApplePay() { 
  }

  public ApplePay card(GetCardList card) {
    
    this.card = card;
    return this;
  }

   /**
   * Credit card information. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Zuora.js instead of interacting with this API directly.
   * @return card
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Credit card information. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Zuora.js instead of interacting with this API directly.")

  public GetCardList getCard() {
    return card;
  }


  public void setCard(GetCardList card) {
    this.card = card;
  }


  public ApplePay mandate(Mandate mandate) {
    
    this.mandate = mandate;
    return this;
  }

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

  public Mandate getMandate() {
    return mandate;
  }


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


  public ApplePay paymentId(String paymentId) {
    
    this.paymentId = paymentId;
    return this;
  }

   /**
   * The ID of newly processed payment. Only available in the response of the Create Payment Method API request.
   * @return paymentId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The ID of newly processed payment. Only available in the response of the Create Payment Method API request.")

  public String getPaymentId() {
    return paymentId;
  }


  public void setPaymentId(String paymentId) {
    this.paymentId = paymentId;
  }


  public ApplePay token(String token) {
    
    this.token = token;
    return this;
  }

   /**
   * A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. When `token` is used to represent a customer profile, `second_token` is conditionally required for representing the underlying tokenized payment method.
   * @return token
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "A gateway unique identifier that replaces sensitive payment method data or represents a gateway's unique customer profile. When `token` is used to represent a customer profile, `second_token` is conditionally required for representing the underlying tokenized payment method.")

  public String getToken() {
    return token;
  }


  public void setToken(String token) {
    this.token = token;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ApplePay applePay = (ApplePay) o;
    return Objects.equals(this.card, applePay.card) &&
        Objects.equals(this.mandate, applePay.mandate) &&
        Objects.equals(this.paymentId, applePay.paymentId) &&
        Objects.equals(this.token, applePay.token);
  }

  private static  boolean equalsNullable(JsonNullable a, JsonNullable b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(card, mandate, paymentId, token);
  }

  private static  int hashCodeNullable(JsonNullable a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ApplePay {\n");
    sb.append("    card: ").append(toIndentedString(card)).append("\n");
    sb.append("    mandate: ").append(toIndentedString(mandate)).append("\n");
    sb.append("    paymentId: ").append(toIndentedString(paymentId)).append("\n");
    sb.append("    token: ").append(toIndentedString(token)).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