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

com.github.GBSEcom.model.Address Maven / Gradle / Ivy

Go to download

Java SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.

There is a newer version: 1.15.0
Show newest version
/*
 * Payment Gateway API Specification.
 * The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
 *
 * The version of the OpenAPI document: 21.2.0.20210406.001
 * 
 *
 * 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.github.GBSEcom.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;

/**
 * Model for address information.
 */
@ApiModel(description = "Model for address information.")

public class Address {
  public static final String SERIALIZED_NAME_COMPANY = "company";
  @SerializedName(SERIALIZED_NAME_COMPANY)
  private String company;

  public static final String SERIALIZED_NAME_ADDRESS1 = "address1";
  @SerializedName(SERIALIZED_NAME_ADDRESS1)
  private String address1;

  public static final String SERIALIZED_NAME_ADDRESS2 = "address2";
  @SerializedName(SERIALIZED_NAME_ADDRESS2)
  private String address2;

  public static final String SERIALIZED_NAME_CITY = "city";
  @SerializedName(SERIALIZED_NAME_CITY)
  private String city;

  public static final String SERIALIZED_NAME_REGION = "region";
  @SerializedName(SERIALIZED_NAME_REGION)
  private String region;

  public static final String SERIALIZED_NAME_POSTAL_CODE = "postalCode";
  @SerializedName(SERIALIZED_NAME_POSTAL_CODE)
  private String postalCode;

  public static final String SERIALIZED_NAME_COUNTRY = "country";
  @SerializedName(SERIALIZED_NAME_COUNTRY)
  private String country;


  public Address company(String company) {
    
    this.company = company;
    return this;
  }

   /**
   * Company name associated with the address.
   * @return company
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Test Company", value = "Company name associated with the address.")

  public String getCompany() {
    return company;
  }



  public void setCompany(String company) {
    this.company = company;
  }


  public Address address1(String address1) {
    
    this.address1 = address1;
    return this;
  }

   /**
   * First line of the street address.
   * @return address1
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "123 Main St.", value = "First line of the street address.")

  public String getAddress1() {
    return address1;
  }



  public void setAddress1(String address1) {
    this.address1 = address1;
  }


  public Address address2(String address2) {
    
    this.address2 = address2;
    return this;
  }

   /**
   * Second line of the street address.
   * @return address2
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Suite 123", value = "Second line of the street address.")

  public String getAddress2() {
    return address2;
  }



  public void setAddress2(String address2) {
    this.address2 = address2;
  }


  public Address city(String city) {
    
    this.city = city;
    return this;
  }

   /**
   * City or locality.
   * @return city
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Sandy Springs", value = "City or locality.")

  public String getCity() {
    return city;
  }



  public void setCity(String city) {
    this.city = city;
  }


  public Address region(String region) {
    
    this.region = region;
    return this;
  }

   /**
   * State or province.
   * @return region
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "Georgia", value = "State or province.")

  public String getRegion() {
    return region;
  }



  public void setRegion(String region) {
    this.region = region;
  }


  public Address postalCode(String postalCode) {
    
    this.postalCode = postalCode;
    return this;
  }

   /**
   * ZIP code or postal code.
   * @return postalCode
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "30303", value = "ZIP code or postal code.")

  public String getPostalCode() {
    return postalCode;
  }



  public void setPostalCode(String postalCode) {
    this.postalCode = postalCode;
  }


  public Address country(String country) {
    
    this.country = country;
    return this;
  }

   /**
   * ISO-3166-1  ALPHA-2, ALPHA-3, numeric or full country name. In the case of PaySecure endpoints, pass the country code in an ISO format.
   * @return country
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(example = "USA", value = "ISO-3166-1  ALPHA-2, ALPHA-3, numeric or full country name. In the case of PaySecure endpoints, pass the country code in an ISO format.")

  public String getCountry() {
    return country;
  }



  public void setCountry(String country) {
    this.country = country;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Address address = (Address) o;
    return Objects.equals(this.company, address.company) &&
        Objects.equals(this.address1, address.address1) &&
        Objects.equals(this.address2, address.address2) &&
        Objects.equals(this.city, address.city) &&
        Objects.equals(this.region, address.region) &&
        Objects.equals(this.postalCode, address.postalCode) &&
        Objects.equals(this.country, address.country);
  }

  @Override
  public int hashCode() {
    return Objects.hash(company, address1, address2, city, region, postalCode, country);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Address {\n");
    sb.append("    company: ").append(toIndentedString(company)).append("\n");
    sb.append("    address1: ").append(toIndentedString(address1)).append("\n");
    sb.append("    address2: ").append(toIndentedString(address2)).append("\n");
    sb.append("    city: ").append(toIndentedString(city)).append("\n");
    sb.append("    region: ").append(toIndentedString(region)).append("\n");
    sb.append("    postalCode: ").append(toIndentedString(postalCode)).append("\n");
    sb.append("    country: ").append(toIndentedString(country)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy