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

com.klarna.rest.api.order_management.model.OrderManagementCapture 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.OrderManagementAddress;
import com.klarna.rest.api.order_management.model.OrderManagementOrderLine;
import com.klarna.rest.api.order_management.model.OrderManagementShippingInfo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.threeten.bp.OffsetDateTime;

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

  @JsonProperty("klarna_reference")
  private String klarnaReference = null;

  @JsonProperty("captured_amount")
  private Long capturedAmount = null;

  @JsonProperty("captured_at")
  private OffsetDateTime capturedAt = null;

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

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

  @JsonProperty("refunded_amount")
  private Long refundedAmount = null;

  @JsonProperty("billing_address")
  private OrderManagementAddress billingAddress = null;

  @JsonProperty("shipping_address")
  private OrderManagementAddress shippingAddress = null;

  @JsonProperty("shipping_info")
  private List shippingInfo = null;

  public OrderManagementCapture captureId(String captureId) {
    this.captureId = captureId;
    return this;
  }

   /**
   * The capture id. Generated when the capture is created.
   * @return captureId
  **/
  @ApiModelProperty(example = "4ba29b50-be7b-44f5-a492-113e6a865e22", value = "The capture id. Generated when the capture is created.")
  public String getCaptureId() {
    return captureId;
  }

  public void setCaptureId(String captureId) {
    this.captureId = captureId;
  }

  public OrderManagementCapture klarnaReference(String klarnaReference) {
    this.klarnaReference = klarnaReference;
    return this;
  }

   /**
   * Customer friendly reference id, used as a reference when communicating with the customer.
   * @return klarnaReference
  **/
  @ApiModelProperty(example = "K4MADNY-1", value = "Customer friendly reference id, used as a reference when communicating with the customer.")
  public String getKlarnaReference() {
    return klarnaReference;
  }

  public void setKlarnaReference(String klarnaReference) {
    this.klarnaReference = klarnaReference;
  }

  public OrderManagementCapture capturedAmount(Long capturedAmount) {
    this.capturedAmount = capturedAmount;
    return this;
  }

   /**
   * The captured amount in minor units.
   * minimum: 1
   * @return capturedAmount
  **/
  @ApiModelProperty(value = "The captured amount in minor units.")
  public Long getCapturedAmount() {
    return capturedAmount;
  }

  public void setCapturedAmount(Long capturedAmount) {
    this.capturedAmount = capturedAmount;
  }

  public OrderManagementCapture capturedAt(OffsetDateTime capturedAt) {
    this.capturedAt = capturedAt;
    return this;
  }

   /**
   * The time of the capture. Specified in ISO 8601.
   * @return capturedAt
  **/
  @ApiModelProperty(example = "2015-11-19T01:51:17.000Z", value = "The time of the capture. Specified in ISO 8601.")
  public OffsetDateTime getCapturedAt() {
    return capturedAt;
  }

  public void setCapturedAt(OffsetDateTime capturedAt) {
    this.capturedAt = capturedAt;
  }

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

   /**
   * Description of the capture shown to the customer.
   * @return description
  **/
  @ApiModelProperty(example = "Order has been shipped", value = "Description of the capture shown to the customer.")
  public String getDescription() {
    return description;
  }

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

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

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

   /**
   * List of order lines for the capture shown to the customer.
   * @return orderLines
  **/
  @ApiModelProperty(value = "List of order lines for the capture shown to the customer.")
  public List getOrderLines() {
    return orderLines;
  }

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

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

   /**
   * Refunded amount for this capture in minor units.
   * @return refundedAmount
  **/
  @ApiModelProperty(example = "0", value = "Refunded amount for this capture in minor units.")
  public Long getRefundedAmount() {
    return refundedAmount;
  }

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

  public OrderManagementCapture billingAddress(OrderManagementAddress billingAddress) {
    this.billingAddress = billingAddress;
    return this;
  }

   /**
   * Billing address for the capture.
   * @return billingAddress
  **/
  @ApiModelProperty(value = "Billing address for the capture.")
  public OrderManagementAddress getBillingAddress() {
    return billingAddress;
  }

  public void setBillingAddress(OrderManagementAddress billingAddress) {
    this.billingAddress = billingAddress;
  }

  public OrderManagementCapture shippingAddress(OrderManagementAddress shippingAddress) {
    this.shippingAddress = shippingAddress;
    return this;
  }

   /**
   * Shipping address for the capture
   * @return shippingAddress
  **/
  @ApiModelProperty(value = "Shipping address for the capture")
  public OrderManagementAddress getShippingAddress() {
    return shippingAddress;
  }

  public void setShippingAddress(OrderManagementAddress shippingAddress) {
    this.shippingAddress = shippingAddress;
  }

  public OrderManagementCapture shippingInfo(List shippingInfo) {
    this.shippingInfo = shippingInfo;
    return this;
  }

  public OrderManagementCapture addShippingInfoItem(OrderManagementShippingInfo shippingInfoItem) {
    if (this.shippingInfo == null) {
      this.shippingInfo = new ArrayList();
    }
    this.shippingInfo.add(shippingInfoItem);
    return this;
  }

   /**
   * Shipping information for this capture.
   * @return shippingInfo
  **/
  @ApiModelProperty(value = "Shipping information for this capture.")
  public List getShippingInfo() {
    return shippingInfo;
  }

  public void setShippingInfo(List shippingInfo) {
    this.shippingInfo = shippingInfo;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    OrderManagementCapture capture = (OrderManagementCapture) o;
    return Objects.equals(this.captureId, capture.captureId) &&
        Objects.equals(this.klarnaReference, capture.klarnaReference) &&
        Objects.equals(this.capturedAmount, capture.capturedAmount) &&
        Objects.equals(this.capturedAt, capture.capturedAt) &&
        Objects.equals(this.description, capture.description) &&
        Objects.equals(this.orderLines, capture.orderLines) &&
        Objects.equals(this.refundedAmount, capture.refundedAmount) &&
        Objects.equals(this.billingAddress, capture.billingAddress) &&
        Objects.equals(this.shippingAddress, capture.shippingAddress) &&
        Objects.equals(this.shippingInfo, capture.shippingInfo);
  }

  @Override
  public int hashCode() {
    return Objects.hash(captureId, klarnaReference, capturedAmount, capturedAt, description, orderLines, refundedAmount, billingAddress, shippingAddress, shippingInfo);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class OrderManagementCapture {\n");
    
    sb.append("    captureId: ").append(toIndentedString(captureId)).append("\n");
    sb.append("    klarnaReference: ").append(toIndentedString(klarnaReference)).append("\n");
    sb.append("    capturedAmount: ").append(toIndentedString(capturedAmount)).append("\n");
    sb.append("    capturedAt: ").append(toIndentedString(capturedAt)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    orderLines: ").append(toIndentedString(orderLines)).append("\n");
    sb.append("    refundedAmount: ").append(toIndentedString(refundedAmount)).append("\n");
    sb.append("    billingAddress: ").append(toIndentedString(billingAddress)).append("\n");
    sb.append("    shippingAddress: ").append(toIndentedString(shippingAddress)).append("\n");
    sb.append("    shippingInfo: ").append(toIndentedString(shippingInfo)).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