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

com.klarna.rest.api.order_management.model.OrderManagementRefundObject Maven / Gradle / Ivy

The newest version!
/*
 * Klarna Order Managment API
 * API to handle order lifecycle
 *
 * OpenAPI spec version: 1.0
 * Contact: [email protected]
 *
 * 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.klarna.rest.api.order_management.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.klarna.rest.api.order_management.model.OrderManagementOrderLine;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;

/**
 * OrderManagementRefundObject
 */
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T09:41:31.881Z")
public class OrderManagementRefundObject {
  @JsonProperty("refunded_amount")
  private Long refundedAmount = null;

  @JsonProperty("description")
  private String description = null;

  @JsonProperty("reference")
  private String reference = null;

  @JsonProperty("order_lines")
  private List orderLines = null;

  public OrderManagementRefundObject refundedAmount(Long refundedAmount) {
    this.refundedAmount = refundedAmount;
    return this;
  }

   /**
   * Refunded amount in minor units.
   * minimum: 0
   * maximum: 100000000
   * @return refundedAmount
  **/
  @ApiModelProperty(required = true, value = "Refunded amount in minor units.")
  public Long getRefundedAmount() {
    return refundedAmount;
  }

  public void setRefundedAmount(Long refundedAmount) {
    this.refundedAmount = refundedAmount;
  }

  public OrderManagementRefundObject description(String description) {
    this.description = description;
    return this;
  }

   /**
   * Description of the refund shown to the customer. Max length is 255 characters.
   * @return description
  **/
  @ApiModelProperty(value = "Description of the refund shown to the customer. Max length is 255 characters.")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public OrderManagementRefundObject reference(String reference) {
    this.reference = reference;
    return this;
  }

   /**
   * Internal reference to the refund. This will be included in the settlement files. Max length is 255 characters.
   * @return reference
  **/
  @ApiModelProperty(value = "Internal reference to the refund. This will be included in the settlement files. Max length is 255 characters.")
  public String getReference() {
    return reference;
  }

  public void setReference(String reference) {
    this.reference = reference;
  }

  public OrderManagementRefundObject orderLines(List orderLines) {
    this.orderLines = orderLines;
    return this;
  }

  public OrderManagementRefundObject addOrderLinesItem(OrderManagementOrderLine orderLinesItem) {
    if (this.orderLines == null) {
      this.orderLines = new ArrayList();
    }
    this.orderLines.add(orderLinesItem);
    return this;
  }

   /**
   * Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines.
   * @return orderLines
  **/
  @ApiModelProperty(value = "Order lines for the refund shown to the customer. Optional but increases the customer experience. Maximum 1000 order lines.")
  public List getOrderLines() {
    return orderLines;
  }

  public void setOrderLines(List orderLines) {
    this.orderLines = orderLines;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OrderManagementRefundObject refundObject = (OrderManagementRefundObject) o;
    return Objects.equals(this.refundedAmount, refundObject.refundedAmount) &&
        Objects.equals(this.description, refundObject.description) &&
        Objects.equals(this.reference, refundObject.reference) &&
        Objects.equals(this.orderLines, refundObject.orderLines);
  }

  @Override
  public int hashCode() {
    return Objects.hash(refundedAmount, description, reference, orderLines);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OrderManagementRefundObject {\n");
    
    sb.append("    refundedAmount: ").append(toIndentedString(refundedAmount)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    orderLines: ").append(toIndentedString(orderLines)).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 - 2024 Weber Informatics LLC | Privacy Policy