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

com.adyen.model.dataprotection.SubjectErasureByPspReferenceRequest Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Adyen Data Protection API
 *
 * The version of the OpenAPI document: 1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.dataprotection;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * SubjectErasureByPspReferenceRequest
 */
@JsonPropertyOrder({
  SubjectErasureByPspReferenceRequest.JSON_PROPERTY_FORCE_ERASURE,
  SubjectErasureByPspReferenceRequest.JSON_PROPERTY_MERCHANT_ACCOUNT,
  SubjectErasureByPspReferenceRequest.JSON_PROPERTY_PSP_REFERENCE
})

public class SubjectErasureByPspReferenceRequest {
  public static final String JSON_PROPERTY_FORCE_ERASURE = "forceErasure";
  private Boolean forceErasure;

  public static final String JSON_PROPERTY_MERCHANT_ACCOUNT = "merchantAccount";
  private String merchantAccount;

  public static final String JSON_PROPERTY_PSP_REFERENCE = "pspReference";
  private String pspReference;

  public SubjectErasureByPspReferenceRequest() { 
  }

  /**
   * Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   *
   * @param forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   * @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
   */
  public SubjectErasureByPspReferenceRequest forceErasure(Boolean forceErasure) {
    this.forceErasure = forceErasure;
    return this;
  }

  /**
   * Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   * @return forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   */
  @JsonProperty(JSON_PROPERTY_FORCE_ERASURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Boolean getForceErasure() {
    return forceErasure;
  }

  /**
   * Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   *
   * @param forceErasure Set this to **true** if you want to delete shopper-related data, even if the shopper has an existing recurring transaction. This only deletes the shopper-related data for the specific payment, but does not cancel the existing recurring transaction.
   */
  @JsonProperty(JSON_PROPERTY_FORCE_ERASURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setForceErasure(Boolean forceErasure) {
    this.forceErasure = forceErasure;
  }

  /**
   * Your merchant account
   *
   * @param merchantAccount Your merchant account
   * @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
   */
  public SubjectErasureByPspReferenceRequest merchantAccount(String merchantAccount) {
    this.merchantAccount = merchantAccount;
    return this;
  }

  /**
   * Your merchant account
   * @return merchantAccount Your merchant account
   */
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getMerchantAccount() {
    return merchantAccount;
  }

  /**
   * Your merchant account
   *
   * @param merchantAccount Your merchant account
   */
  @JsonProperty(JSON_PROPERTY_MERCHANT_ACCOUNT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMerchantAccount(String merchantAccount) {
    this.merchantAccount = merchantAccount;
  }

  /**
   * The PSP reference of the payment. We will delete all shopper-related data for this payment.
   *
   * @param pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
   * @return the current {@code SubjectErasureByPspReferenceRequest} instance, allowing for method chaining
   */
  public SubjectErasureByPspReferenceRequest pspReference(String pspReference) {
    this.pspReference = pspReference;
    return this;
  }

  /**
   * The PSP reference of the payment. We will delete all shopper-related data for this payment.
   * @return pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
   */
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getPspReference() {
    return pspReference;
  }

  /**
   * The PSP reference of the payment. We will delete all shopper-related data for this payment.
   *
   * @param pspReference The PSP reference of the payment. We will delete all shopper-related data for this payment.
   */
  @JsonProperty(JSON_PROPERTY_PSP_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setPspReference(String pspReference) {
    this.pspReference = pspReference;
  }

  /**
   * Return true if this SubjectErasureByPspReferenceRequest object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SubjectErasureByPspReferenceRequest subjectErasureByPspReferenceRequest = (SubjectErasureByPspReferenceRequest) o;
    return Objects.equals(this.forceErasure, subjectErasureByPspReferenceRequest.forceErasure) &&
        Objects.equals(this.merchantAccount, subjectErasureByPspReferenceRequest.merchantAccount) &&
        Objects.equals(this.pspReference, subjectErasureByPspReferenceRequest.pspReference);
  }

  @Override
  public int hashCode() {
    return Objects.hash(forceErasure, merchantAccount, pspReference);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SubjectErasureByPspReferenceRequest {\n");
    sb.append("    forceErasure: ").append(toIndentedString(forceErasure)).append("\n");
    sb.append("    merchantAccount: ").append(toIndentedString(merchantAccount)).append("\n");
    sb.append("    pspReference: ").append(toIndentedString(pspReference)).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    ");
  }

/**
   * Create an instance of SubjectErasureByPspReferenceRequest given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of SubjectErasureByPspReferenceRequest
   * @throws JsonProcessingException if the JSON string is invalid with respect to SubjectErasureByPspReferenceRequest
   */
  public static SubjectErasureByPspReferenceRequest fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, SubjectErasureByPspReferenceRequest.class);
  }
/**
  * Convert an instance of SubjectErasureByPspReferenceRequest to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy