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

com.cardpay.sdk.model.BillingAddress Maven / Gradle / Ivy

There is a newer version: 3.82.1
Show newest version
/*
 * CardPay REST API
 * Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.
 *
 * OpenAPI spec version: 3.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package com.cardpay.sdk.model;

import com.google.gson.annotations.SerializedName;
import lombok.Data;

@Data

public class BillingAddress {
  @SerializedName("addr_line_1")
  private String addrLine1 = null;
  @SerializedName("addr_line_2")
  private String addrLine2 = null;
  @SerializedName("city")
  private String city = null;
  @SerializedName("country")
  private String country = null;
  @SerializedName("state")
  private String state = null;
  @SerializedName("zip")
  private String zip = null;
  
  public void setAddrLine1(String addrLine1) {
      this.addrLine1 = addrLine1;
  }

  /**
   * @param addrLine1 First line of the street address or equivalent local portion of the Cardholder billing address associated with the card used for this purchase. Should include street and house number. May include whitespaces, hyphens, apostrophes, commas, quotes, dots, slashes and semicolons. Required (if available) unless market or regional mandate restricts sending this information. For recurring: field will be ignored if 'filing.id' is presented in request (continue one-click scenario) *Length: 0 - 50*
   * @return bean instance
   **/
  public BillingAddress addrLine1(String addrLine1) {
      this.addrLine1 = addrLine1;
      return this;
  }

  
  public void setAddrLine2(String addrLine2) {
      this.addrLine2 = addrLine2;
  }

  /**
   * @param addrLine2 Second line of the street address or equivalent local portion of the Cardholder billing address associated with the card used for this purchase. Required (if available) unless market or regional mandate restricts sending this information. For recurring: field will be ignored if 'filing.id' is presented in request (continue one-click scenario) *Length: 0 - 50*
   * @return bean instance
   **/
  public BillingAddress addrLine2(String addrLine2) {
      this.addrLine2 = addrLine2;
      return this;
  }

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

  /**
   * @param city Billing city. May include whitespaces, hyphens, apostrophes, commas and dots
   * @return bean instance
   **/
  public BillingAddress city(String city) {
      this.city = city;
      return this;
  }

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

  /**
   * @param country [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) code of billing country: 2 or 3 latin letters or numeric code 
   * @return bean instance
   **/
  public BillingAddress country(String country) {
      this.country = country;
      return this;
  }

  
  public void setState(String state) {
      this.state = state;
  }

  /**
   * @param state The state or province of the billing address associated with the card being used for this purchase. It's recommended to send in following format: the country subdivision code defined in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). May include whitespaces, hyphens, apostrophes, commas and dots
   * @return bean instance
   **/
  public BillingAddress state(String state) {
      this.state = state;
      return this;
  }

  
  public void setZip(String zip) {
      this.zip = zip;
  }

  /**
   * @param zip Billing postal code
   * @return bean instance
   **/
  public BillingAddress zip(String zip) {
      this.zip = zip;
      return this;
  }


  @Override
  public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append("BillingAddress( ");
     
     if (addrLine1 != null) sb.append("addrLine1=").append(addrLine1.toString()).append("; ");
     if (addrLine2 != null) sb.append("addrLine2=").append(addrLine2.toString()).append("; ");
     if (city != null) sb.append("city=").append(city.toString()).append("; ");
     if (country != null) sb.append("country=").append(country.toString()).append("; ");
     if (state != null) sb.append("state=").append(state.toString()).append("; ");
     if (zip != null) sb.append("zip=").append(zip.toString()).append("; ");
     sb.append(")");
     return sb.toString();
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy