Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Adyen Checkout API
*
* The version of the OpenAPI document: 71
*
*
* 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.checkout;
import java.util.Objects;
import java.util.Arrays;
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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* Address
*/
@JsonPropertyOrder({
Address.JSON_PROPERTY_CITY,
Address.JSON_PROPERTY_COUNTRY,
Address.JSON_PROPERTY_HOUSE_NUMBER_OR_NAME,
Address.JSON_PROPERTY_POSTAL_CODE,
Address.JSON_PROPERTY_STATE_OR_PROVINCE,
Address.JSON_PROPERTY_STREET
})
public class Address {
public static final String JSON_PROPERTY_CITY = "city";
private String city;
public static final String JSON_PROPERTY_COUNTRY = "country";
private String country;
public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME = "houseNumberOrName";
private String houseNumberOrName;
public static final String JSON_PROPERTY_POSTAL_CODE = "postalCode";
private String postalCode;
public static final String JSON_PROPERTY_STATE_OR_PROVINCE = "stateOrProvince";
private String stateOrProvince;
public static final String JSON_PROPERTY_STREET = "street";
private String street;
public Address() {
}
public Address city(String city) {
this.city = city;
return this;
}
/**
* The name of the city. Maximum length: 3000 characters.
* @return city
**/
@ApiModelProperty(required = true, value = "The name of the city. Maximum length: 3000 characters.")
@JsonProperty(JSON_PROPERTY_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCity() {
return city;
}
/**
* The name of the city. Maximum length: 3000 characters.
*
* @param city
*/
@JsonProperty(JSON_PROPERTY_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCity(String city) {
this.city = city;
}
public Address country(String country) {
this.country = country;
return this;
}
/**
* The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
* @return country
**/
@ApiModelProperty(required = true, value = "The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.")
@JsonProperty(JSON_PROPERTY_COUNTRY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCountry() {
return country;
}
/**
* The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
*
* @param country
*/
@JsonProperty(JSON_PROPERTY_COUNTRY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountry(String country) {
this.country = country;
}
public Address houseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
return this;
}
/**
* The number or name of the house. Maximum length: 3000 characters.
* @return houseNumberOrName
**/
@ApiModelProperty(required = true, value = "The number or name of the house. Maximum length: 3000 characters.")
@JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getHouseNumberOrName() {
return houseNumberOrName;
}
/**
* The number or name of the house. Maximum length: 3000 characters.
*
* @param houseNumberOrName
*/
@JsonProperty(JSON_PROPERTY_HOUSE_NUMBER_OR_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setHouseNumberOrName(String houseNumberOrName) {
this.houseNumberOrName = houseNumberOrName;
}
public Address postalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/**
* A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
* @return postalCode
**/
@ApiModelProperty(required = true, value = "A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.")
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPostalCode() {
return postalCode;
}
/**
* A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
*
* @param postalCode
*/
@JsonProperty(JSON_PROPERTY_POSTAL_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}
public Address stateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
return this;
}
/**
* The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
* @return stateOrProvince
**/
@ApiModelProperty(value = "The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.")
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStateOrProvince() {
return stateOrProvince;
}
/**
* The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
*
* @param stateOrProvince
*/
@JsonProperty(JSON_PROPERTY_STATE_OR_PROVINCE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStateOrProvince(String stateOrProvince) {
this.stateOrProvince = stateOrProvince;
}
public Address street(String street) {
this.street = street;
return this;
}
/**
* The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
* @return street
**/
@ApiModelProperty(required = true, value = "The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.")
@JsonProperty(JSON_PROPERTY_STREET)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStreet() {
return street;
}
/**
* The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
*
* @param street
*/
@JsonProperty(JSON_PROPERTY_STREET)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStreet(String street) {
this.street = street;
}
/**
* Return true if this Address object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Address address = (Address) o;
return Objects.equals(this.city, address.city) &&
Objects.equals(this.country, address.country) &&
Objects.equals(this.houseNumberOrName, address.houseNumberOrName) &&
Objects.equals(this.postalCode, address.postalCode) &&
Objects.equals(this.stateOrProvince, address.stateOrProvince) &&
Objects.equals(this.street, address.street);
}
@Override
public int hashCode() {
return Objects.hash(city, country, houseNumberOrName, postalCode, stateOrProvince, street);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Address {\n");
sb.append(" city: ").append(toIndentedString(city)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" houseNumberOrName: ").append(toIndentedString(houseNumberOrName)).append("\n");
sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n");
sb.append(" stateOrProvince: ").append(toIndentedString(stateOrProvince)).append("\n");
sb.append(" street: ").append(toIndentedString(street)).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 Address given an JSON string
*
* @param jsonString JSON string
* @return An instance of Address
* @throws JsonProcessingException if the JSON string is invalid with respect to Address
*/
public static Address fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, Address.class);
}
/**
* Convert an instance of Address to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}