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

com.adyen.model.posterminalmanagement.GetStoresUnderAccountResponse Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * POS Terminal Management 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.posterminalmanagement;

import java.util.Objects;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import com.adyen.model.posterminalmanagement.Store;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * GetStoresUnderAccountResponse
 */
@JsonPropertyOrder({
  GetStoresUnderAccountResponse.JSON_PROPERTY_STORES
})

public class GetStoresUnderAccountResponse {
  public static final String JSON_PROPERTY_STORES = "stores";
  private List stores = null;

  public GetStoresUnderAccountResponse() { 
  }

  /**
   * Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.
   *
   * @param stores
   * @return the current {@code GetStoresUnderAccountResponse} instance, allowing for method chaining
   */
  public GetStoresUnderAccountResponse stores(List stores) {
    this.stores = stores;
    return this;
  }

  public GetStoresUnderAccountResponse addStoresItem(Store storesItem) {
    if (this.stores == null) {
      this.stores = new ArrayList<>();
    }
    this.stores.add(storesItem);
    return this;
  }

  /**
   * Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.
   * @return stores
   */
  @ApiModelProperty(value = "Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.")
  @JsonProperty(JSON_PROPERTY_STORES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public List getStores() {
    return stores;
  }

  /**
   * Array that returns a list of all stores for the specified merchant account, or for all merchant accounts under the company account.
   *
   * @param stores
   */ 
  @JsonProperty(JSON_PROPERTY_STORES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStores(List stores) {
    this.stores = stores;
  }

  /**
   * Return true if this GetStoresUnderAccountResponse object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GetStoresUnderAccountResponse getStoresUnderAccountResponse = (GetStoresUnderAccountResponse) o;
    return Objects.equals(this.stores, getStoresUnderAccountResponse.stores);
  }

  @Override
  public int hashCode() {
    return Objects.hash(stores);
  }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy