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

org.openapitools.client.model.RefundCreditMemoRequest Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/

package org.openapitools.client.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;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.RefundCreditMemoItemRequest;

import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
 * RefundCreditMemoRequest
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class RefundCreditMemoRequest {
  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_AMOUNT = "amount";
  @SerializedName(SERIALIZED_NAME_AMOUNT)
  private BigDecimal amount;

  public static final String SERIALIZED_NAME_CREDIT_MEMO_ITEMS = "credit_memo_items";
  @SerializedName(SERIALIZED_NAME_CREDIT_MEMO_ITEMS)
  private List creditMemoItems = null;

  public static final String SERIALIZED_NAME_TAXATION_ITEMS = "taxation_items";
  @SerializedName(SERIALIZED_NAME_TAXATION_ITEMS)
  private List taxationItems = null;

  public RefundCreditMemoRequest() { 
  }

  public RefundCreditMemoRequest id(String id) {
    
    this.id = id;
    return this;
  }

   /**
   * Identifier of the credit memo taxation item
   * @return id
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Identifier of the credit memo taxation item")

  public String getId() {
    return id;
  }


  public void setId(String id) {
    this.id = id;
  }


  public RefundCreditMemoRequest amount(BigDecimal amount) {
    
    this.amount = amount;
    return this;
  }

   /**
   * Refund amount.
   * @return amount
  **/
  @javax.annotation.Nonnull
  @ApiModelProperty(required = true, value = "Refund amount.")

  public BigDecimal getAmount() {
    return amount;
  }


  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }


  public RefundCreditMemoRequest creditMemoItems(List creditMemoItems) {
    
    this.creditMemoItems = creditMemoItems;
    return this;
  }

  public RefundCreditMemoRequest addCreditMemoItemsItem(RefundCreditMemoItemRequest creditMemoItemsItem) {
    if (this.creditMemoItems == null) {
      this.creditMemoItems = new ArrayList();
    }
    this.creditMemoItems.add(creditMemoItemsItem);
    return this;
  }

   /**
   * The items to which the credit memo is applied.
   * @return creditMemoItems
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The items to which the credit memo is applied.")

  public List getCreditMemoItems() {
    return creditMemoItems;
  }


  public void setCreditMemoItems(List creditMemoItems) {
    this.creditMemoItems = creditMemoItems;
  }


  public RefundCreditMemoRequest taxationItems(List taxationItems) {
    
    this.taxationItems = taxationItems;
    return this;
  }

  public RefundCreditMemoRequest addTaxationItemsItem(RefundCreditMemoItemRequest taxationItemsItem) {
    if (this.taxationItems == null) {
      this.taxationItems = new ArrayList();
    }
    this.taxationItems.add(taxationItemsItem);
    return this;
  }

   /**
   * The items to which the credit memo is applied.
   * @return taxationItems
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The items to which the credit memo is applied.")

  public List getTaxationItems() {
    return taxationItems;
  }


  public void setTaxationItems(List taxationItems) {
    this.taxationItems = taxationItems;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RefundCreditMemoRequest refundCreditMemoRequest = (RefundCreditMemoRequest) o;
    return Objects.equals(this.id, refundCreditMemoRequest.id) &&
        Objects.equals(this.amount, refundCreditMemoRequest.amount) &&
        Objects.equals(this.creditMemoItems, refundCreditMemoRequest.creditMemoItems) &&
        Objects.equals(this.taxationItems, refundCreditMemoRequest.taxationItems);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, amount, creditMemoItems, taxationItems);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RefundCreditMemoRequest {\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    amount: ").append(toIndentedString(amount)).append("\n");
    sb.append("    creditMemoItems: ").append(toIndentedString(creditMemoItems)).append("\n");
    sb.append("    taxationItems: ").append(toIndentedString(taxationItems)).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    ");
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy