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

com.adyen.model.management.TerminalAssignment Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Management API
 *
 * The version of the OpenAPI document: 3
 * 
 *
 * 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.management;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.management.TerminalReassignmentTarget;
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;


/**
 * TerminalAssignment
 */
@JsonPropertyOrder({
  TerminalAssignment.JSON_PROPERTY_COMPANY_ID,
  TerminalAssignment.JSON_PROPERTY_MERCHANT_ID,
  TerminalAssignment.JSON_PROPERTY_REASSIGNMENT_TARGET,
  TerminalAssignment.JSON_PROPERTY_STATUS,
  TerminalAssignment.JSON_PROPERTY_STORE_ID
})

public class TerminalAssignment {
  public static final String JSON_PROPERTY_COMPANY_ID = "companyId";
  private String companyId;

  public static final String JSON_PROPERTY_MERCHANT_ID = "merchantId";
  private String merchantId;

  public static final String JSON_PROPERTY_REASSIGNMENT_TARGET = "reassignmentTarget";
  private TerminalReassignmentTarget reassignmentTarget;

  /**
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   */
  public enum StatusEnum {
    BOARDED(String.valueOf("boarded")),
    
    DEPLOYED(String.valueOf("deployed")),
    
    INVENTORY(String.valueOf("inventory")),
    
    REASSIGNMENTINPROGRESS(String.valueOf("reassignmentInProgress"));

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    @JsonCreator
    public static StatusEnum fromValue(String value) {
      for (StatusEnum b : StatusEnum.values()) {
        if (b.value.equals(value)) {
          return b;
        }
      }
      throw new IllegalArgumentException("Unexpected value '" + value + "'");
    }
  }

  public static final String JSON_PROPERTY_STATUS = "status";
  private StatusEnum status;

  public static final String JSON_PROPERTY_STORE_ID = "storeId";
  private String storeId;

  public TerminalAssignment() { 
  }

  /**
   * The unique identifier of the company account to which terminal is assigned.
   *
   * @param companyId The unique identifier of the company account to which terminal is assigned.
   * @return the current {@code TerminalAssignment} instance, allowing for method chaining
   */
  public TerminalAssignment companyId(String companyId) {
    this.companyId = companyId;
    return this;
  }

  /**
   * The unique identifier of the company account to which terminal is assigned.
   * @return companyId The unique identifier of the company account to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_COMPANY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getCompanyId() {
    return companyId;
  }

  /**
   * The unique identifier of the company account to which terminal is assigned.
   *
   * @param companyId The unique identifier of the company account to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_COMPANY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCompanyId(String companyId) {
    this.companyId = companyId;
  }

  /**
   * The unique identifier of the merchant account to which terminal is assigned.
   *
   * @param merchantId The unique identifier of the merchant account to which terminal is assigned.
   * @return the current {@code TerminalAssignment} instance, allowing for method chaining
   */
  public TerminalAssignment merchantId(String merchantId) {
    this.merchantId = merchantId;
    return this;
  }

  /**
   * The unique identifier of the merchant account to which terminal is assigned.
   * @return merchantId The unique identifier of the merchant account to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_MERCHANT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getMerchantId() {
    return merchantId;
  }

  /**
   * The unique identifier of the merchant account to which terminal is assigned.
   *
   * @param merchantId The unique identifier of the merchant account to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_MERCHANT_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMerchantId(String merchantId) {
    this.merchantId = merchantId;
  }

  /**
   * reassignmentTarget
   *
   * @param reassignmentTarget 
   * @return the current {@code TerminalAssignment} instance, allowing for method chaining
   */
  public TerminalAssignment reassignmentTarget(TerminalReassignmentTarget reassignmentTarget) {
    this.reassignmentTarget = reassignmentTarget;
    return this;
  }

  /**
   * Get reassignmentTarget
   * @return reassignmentTarget 
   */
  @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public TerminalReassignmentTarget getReassignmentTarget() {
    return reassignmentTarget;
  }

  /**
   * reassignmentTarget
   *
   * @param reassignmentTarget 
   */
  @JsonProperty(JSON_PROPERTY_REASSIGNMENT_TARGET)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReassignmentTarget(TerminalReassignmentTarget reassignmentTarget) {
    this.reassignmentTarget = reassignmentTarget;
  }

  /**
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   *
   * @param status The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   * @return the current {@code TerminalAssignment} instance, allowing for method chaining
   */
  public TerminalAssignment status(StatusEnum status) {
    this.status = status;
    return this;
  }

  /**
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   * @return status The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   */
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public StatusEnum getStatus() {
    return status;
  }

  /**
   * The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   *
   * @param status The status of the reassignment. Possible values:   * `reassignmentInProgress`: the terminal was boarded and is now scheduled to remove the configuration. Wait for the terminal to synchronize with the Adyen platform.  * `deployed`: the terminal is deployed and reassigned.   * `inventory`: the terminal is in inventory and cannot process transactions.   * `boarded`: the terminal is boarded to a store, or a merchant account representing a store, and can process transactions.  
   */
  @JsonProperty(JSON_PROPERTY_STATUS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  /**
   * The unique identifier of the store to which terminal is assigned.
   *
   * @param storeId The unique identifier of the store to which terminal is assigned.
   * @return the current {@code TerminalAssignment} instance, allowing for method chaining
   */
  public TerminalAssignment storeId(String storeId) {
    this.storeId = storeId;
    return this;
  }

  /**
   * The unique identifier of the store to which terminal is assigned.
   * @return storeId The unique identifier of the store to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_STORE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getStoreId() {
    return storeId;
  }

  /**
   * The unique identifier of the store to which terminal is assigned.
   *
   * @param storeId The unique identifier of the store to which terminal is assigned.
   */
  @JsonProperty(JSON_PROPERTY_STORE_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStoreId(String storeId) {
    this.storeId = storeId;
  }

  /**
   * Return true if this TerminalAssignment object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    TerminalAssignment terminalAssignment = (TerminalAssignment) o;
    return Objects.equals(this.companyId, terminalAssignment.companyId) &&
        Objects.equals(this.merchantId, terminalAssignment.merchantId) &&
        Objects.equals(this.reassignmentTarget, terminalAssignment.reassignmentTarget) &&
        Objects.equals(this.status, terminalAssignment.status) &&
        Objects.equals(this.storeId, terminalAssignment.storeId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(companyId, merchantId, reassignmentTarget, status, storeId);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class TerminalAssignment {\n");
    sb.append("    companyId: ").append(toIndentedString(companyId)).append("\n");
    sb.append("    merchantId: ").append(toIndentedString(merchantId)).append("\n");
    sb.append("    reassignmentTarget: ").append(toIndentedString(reassignmentTarget)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    storeId: ").append(toIndentedString(storeId)).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 TerminalAssignment given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of TerminalAssignment
   * @throws JsonProcessingException if the JSON string is invalid with respect to TerminalAssignment
   */
  public static TerminalAssignment fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, TerminalAssignment.class);
  }
/**
  * Convert an instance of TerminalAssignment to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy