com.klarna.rest.api.order_management.model.OrderManagementCaptureObject 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 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;
/**
* OrderManagementCaptureObject
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2020-01-20T09:41:31.881Z")
public class OrderManagementCaptureObject {
@JsonProperty("captured_amount")
private Long capturedAmount = null;
@JsonProperty("description")
private String description = null;
@JsonProperty("reference")
private String reference = null;
@JsonProperty("order_lines")
private List orderLines = null;
@JsonProperty("shipping_info")
private List shippingInfo = null;
@JsonProperty("shipping_delay")
private Long shippingDelay = null;
public OrderManagementCaptureObject capturedAmount(Long capturedAmount) {
this.capturedAmount = capturedAmount;
return this;
}
/**
* The captured amount in minor units.
* minimum: 0
* maximum: 100000000
* @return capturedAmount
**/
@ApiModelProperty(required = true, value = "The captured amount in minor units.")
public Long getCapturedAmount() {
return capturedAmount;
}
public void setCapturedAmount(Long capturedAmount) {
this.capturedAmount = capturedAmount;
}
public OrderManagementCaptureObject description(String description) {
this.description = description;
return this;
}
/**
* Description of the capture shown to the customer. Maximum 255 characters.
* @return description
**/
@ApiModelProperty(value = "Description of the capture shown to the customer. Maximum 255 characters.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public OrderManagementCaptureObject reference(String reference) {
this.reference = reference;
return this;
}
/**
* Internal reference to the capture. This will be included in the settlement files. Max length is 255 characters.
* @return reference
**/
@ApiModelProperty(value = "Internal reference to the capture. 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 OrderManagementCaptureObject orderLines(List orderLines) {
this.orderLines = orderLines;
return this;
}
public OrderManagementCaptureObject addOrderLinesItem(OrderManagementOrderLine orderLinesItem) {
if (this.orderLines == null) {
this.orderLines = new ArrayList();
}
this.orderLines.add(orderLinesItem);
return this;
}
/**
* Order lines for this capture. Maximum 1000 items.
* @return orderLines
**/
@ApiModelProperty(value = "Order lines for this capture. Maximum 1000 items.")
public List getOrderLines() {
return orderLines;
}
public void setOrderLines(List orderLines) {
this.orderLines = orderLines;
}
public OrderManagementCaptureObject shippingInfo(List shippingInfo) {
this.shippingInfo = shippingInfo;
return this;
}
public OrderManagementCaptureObject addShippingInfoItem(OrderManagementShippingInfo shippingInfoItem) {
if (this.shippingInfo == null) {
this.shippingInfo = new ArrayList();
}
this.shippingInfo.add(shippingInfoItem);
return this;
}
/**
* Shipping information for this capture. Maximum 500 items.
* @return shippingInfo
**/
@ApiModelProperty(value = "Shipping information for this capture. Maximum 500 items.")
public List getShippingInfo() {
return shippingInfo;
}
public void setShippingInfo(List shippingInfo) {
this.shippingInfo = shippingInfo;
}
public OrderManagementCaptureObject shippingDelay(Long shippingDelay) {
this.shippingDelay = shippingDelay;
return this;
}
/**
* Delay before the order will be shipped. Use for improving the customer experience regarding payments. This field is currently not returned when reading the order. Minimum: 0. Please note: to be able to submit values larger than 0, this has to be enabled in your merchant account. Please contact Klarna for further information.
* minimum: 0
* @return shippingDelay
**/
@ApiModelProperty(value = "Delay before the order will be shipped. Use for improving the customer experience regarding payments. This field is currently not returned when reading the order. Minimum: 0. Please note: to be able to submit values larger than 0, this has to be enabled in your merchant account. Please contact Klarna for further information.")
public Long getShippingDelay() {
return shippingDelay;
}
public void setShippingDelay(Long shippingDelay) {
this.shippingDelay = shippingDelay;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrderManagementCaptureObject captureObject = (OrderManagementCaptureObject) o;
return Objects.equals(this.capturedAmount, captureObject.capturedAmount) &&
Objects.equals(this.description, captureObject.description) &&
Objects.equals(this.reference, captureObject.reference) &&
Objects.equals(this.orderLines, captureObject.orderLines) &&
Objects.equals(this.shippingInfo, captureObject.shippingInfo) &&
Objects.equals(this.shippingDelay, captureObject.shippingDelay);
}
@Override
public int hashCode() {
return Objects.hash(capturedAmount, description, reference, orderLines, shippingInfo, shippingDelay);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrderManagementCaptureObject {\n");
sb.append(" capturedAmount: ").append(toIndentedString(capturedAmount)).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(" shippingInfo: ").append(toIndentedString(shippingInfo)).append("\n");
sb.append(" shippingDelay: ").append(toIndentedString(shippingDelay)).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 ");
}
}