org.openapitools.client.model.FulfillmentPatchRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* 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.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.Revenue;
import org.openapitools.jackson.nullable.JsonNullable;
import org.threeten.bp.LocalDate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* FulfillmentPatchRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FulfillmentPatchRequest {
public static final String SERIALIZED_NAME_ORDER_LINE_ITEM_ID = "order_line_item_id";
@SerializedName(SERIALIZED_NAME_ORDER_LINE_ITEM_ID)
private String orderLineItemId;
public static final String SERIALIZED_NAME_TARGET_DATE = "target_date";
@SerializedName(SERIALIZED_NAME_TARGET_DATE)
private LocalDate targetDate;
public static final String SERIALIZED_NAME_CARRIER = "carrier";
@SerializedName(SERIALIZED_NAME_CARRIER)
private String carrier;
public static final String SERIALIZED_NAME_CUSTOM_FIELDS = "custom_fields";
@SerializedName(SERIALIZED_NAME_CUSTOM_FIELDS)
@JsonAdapter(CustomFieldAdapter.class)
private Map customFields = null;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_REVENUE = "revenue";
@SerializedName(SERIALIZED_NAME_REVENUE)
private Revenue revenue;
public static final String SERIALIZED_NAME_EXTERNAL_ID = "external_id";
@SerializedName(SERIALIZED_NAME_EXTERNAL_ID)
private String externalId;
public static final String SERIALIZED_NAME_FULFILLMENT_DATE = "fulfillment_date";
@SerializedName(SERIALIZED_NAME_FULFILLMENT_DATE)
private LocalDate fulfillmentDate;
public static final String SERIALIZED_NAME_LOCATION = "location";
@SerializedName(SERIALIZED_NAME_LOCATION)
private String location;
public static final String SERIALIZED_NAME_FULFILLMENT_SYSTEM = "fulfillment_system";
@SerializedName(SERIALIZED_NAME_FULFILLMENT_SYSTEM)
private String fulfillmentSystem;
/**
* The type of fulfillment.
*/
@JsonAdapter(TypeEnum.Adapter.class)
public enum TypeEnum {
DELIVERY("delivery"),
RETURN("return"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
TypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public TypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return TypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private TypeEnum type;
public static final String SERIALIZED_NAME_QUANTITY = "quantity";
@SerializedName(SERIALIZED_NAME_QUANTITY)
private BigDecimal quantity;
/**
* The status of the invoice.
*/
@JsonAdapter(StateEnum.Adapter.class)
public enum StateEnum {
ACCEPTED("accepted"),
BOOKED("booked"),
SENT_TO_BILLING("sent_to_billing"),
COMPLETE("complete"),
CANCELED("canceled"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
StateEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StateEnum fromValue(String value) {
for (StateEnum b : StateEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final StateEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StateEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StateEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATE = "state";
@SerializedName(SERIALIZED_NAME_STATE)
private StateEnum state;
public static final String SERIALIZED_NAME_TRACKING_NUMBER = "tracking_number";
@SerializedName(SERIALIZED_NAME_TRACKING_NUMBER)
private String trackingNumber;
public FulfillmentPatchRequest() {
}
public FulfillmentPatchRequest orderLineItemId(String orderLineItemId) {
this.orderLineItemId = orderLineItemId;
return this;
}
/**
* The unique identifier of the associated order line item.
* @return orderLineItemId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The unique identifier of the associated order line item.")
public String getOrderLineItemId() {
return orderLineItemId;
}
public void setOrderLineItemId(String orderLineItemId) {
this.orderLineItemId = orderLineItemId;
}
public FulfillmentPatchRequest targetDate(LocalDate targetDate) {
this.targetDate = targetDate;
return this;
}
/**
* All order line items associated with this fulfillment that were unbilled on or before this date are included in future bill runs.
* @return targetDate
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", value = "All order line items associated with this fulfillment that were unbilled on or before this date are included in future bill runs.")
public LocalDate getTargetDate() {
return targetDate;
}
public void setTargetDate(LocalDate targetDate) {
this.targetDate = targetDate;
}
public FulfillmentPatchRequest carrier(String carrier) {
this.carrier = carrier;
return this;
}
/**
* The name of the shipping carrier for this fulfillment.
* @return carrier
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The name of the shipping carrier for this fulfillment.")
public String getCarrier() {
return carrier;
}
public void setCarrier(String carrier) {
this.carrier = carrier;
}
public FulfillmentPatchRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public FulfillmentPatchRequest putCustomFieldsItem(String key, String customFieldsItem) {
if (this.customFields == null) {
this.customFields = new HashMap();
}
this.customFields.put(key, customFieldsItem);
return this;
}
/**
* Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.
* @return customFields
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Set of user-defined fields associated with this object. Useful for storing additional information about the object in a structured format.")
public Map getCustomFields() {
return customFields;
}
public void setCustomFields(Map customFields) {
this.customFields = customFields;
}
public FulfillmentPatchRequest description(String description) {
this.description = description;
return this;
}
/**
* An arbitrary string attached to the object. Often useful for displaying to users.
* @return description
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An arbitrary string attached to the object. Often useful for displaying to users.")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public FulfillmentPatchRequest revenue(Revenue revenue) {
this.revenue = revenue;
return this;
}
/**
* Get revenue
* @return revenue
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Revenue getRevenue() {
return revenue;
}
public void setRevenue(Revenue revenue) {
this.revenue = revenue;
}
public FulfillmentPatchRequest externalId(String externalId) {
this.externalId = externalId;
return this;
}
/**
* An external identifier for the fulfillment.
* @return externalId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "An external identifier for the fulfillment.")
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public FulfillmentPatchRequest fulfillmentDate(LocalDate fulfillmentDate) {
this.fulfillmentDate = fulfillmentDate;
return this;
}
/**
* The date of the fulfillment.
* @return fulfillmentDate
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "Sun Jan 01 00:00:00 GMT 2023", value = "The date of the fulfillment.")
public LocalDate getFulfillmentDate() {
return fulfillmentDate;
}
public void setFulfillmentDate(LocalDate fulfillmentDate) {
this.fulfillmentDate = fulfillmentDate;
}
public FulfillmentPatchRequest location(String location) {
this.location = location;
return this;
}
/**
* The fulfillment location of the fulfillment
* @return location
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The fulfillment location of the fulfillment")
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public FulfillmentPatchRequest fulfillmentSystem(String fulfillmentSystem) {
this.fulfillmentSystem = fulfillmentSystem;
return this;
}
/**
* The fulfillment system for the fulfillment
* @return fulfillmentSystem
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The fulfillment system for the fulfillment")
public String getFulfillmentSystem() {
return fulfillmentSystem;
}
public void setFulfillmentSystem(String fulfillmentSystem) {
this.fulfillmentSystem = fulfillmentSystem;
}
public FulfillmentPatchRequest type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The type of fulfillment.
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The type of fulfillment.")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public FulfillmentPatchRequest quantity(BigDecimal quantity) {
this.quantity = quantity;
return this;
}
/**
* The number of units of this item.
* @return quantity
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The number of units of this item.")
public BigDecimal getQuantity() {
return quantity;
}
public void setQuantity(BigDecimal quantity) {
this.quantity = quantity;
}
public FulfillmentPatchRequest state(StateEnum state) {
this.state = state;
return this;
}
/**
* The status of the invoice.
* @return state
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The status of the invoice.")
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
public FulfillmentPatchRequest trackingNumber(String trackingNumber) {
this.trackingNumber = trackingNumber;
return this;
}
/**
* The tracking number of the fulfillment.
* @return trackingNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The tracking number of the fulfillment.")
public String getTrackingNumber() {
return trackingNumber;
}
public void setTrackingNumber(String trackingNumber) {
this.trackingNumber = trackingNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FulfillmentPatchRequest fulfillmentPatchRequest = (FulfillmentPatchRequest) o;
return Objects.equals(this.orderLineItemId, fulfillmentPatchRequest.orderLineItemId) &&
Objects.equals(this.targetDate, fulfillmentPatchRequest.targetDate) &&
Objects.equals(this.carrier, fulfillmentPatchRequest.carrier) &&
Objects.equals(this.customFields, fulfillmentPatchRequest.customFields) &&
Objects.equals(this.description, fulfillmentPatchRequest.description) &&
Objects.equals(this.revenue, fulfillmentPatchRequest.revenue) &&
Objects.equals(this.externalId, fulfillmentPatchRequest.externalId) &&
Objects.equals(this.fulfillmentDate, fulfillmentPatchRequest.fulfillmentDate) &&
Objects.equals(this.location, fulfillmentPatchRequest.location) &&
Objects.equals(this.fulfillmentSystem, fulfillmentPatchRequest.fulfillmentSystem) &&
Objects.equals(this.type, fulfillmentPatchRequest.type) &&
Objects.equals(this.quantity, fulfillmentPatchRequest.quantity) &&
Objects.equals(this.state, fulfillmentPatchRequest.state) &&
Objects.equals(this.trackingNumber, fulfillmentPatchRequest.trackingNumber);
}
private static boolean equalsNullable(JsonNullable a, JsonNullable b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(orderLineItemId, targetDate, carrier, customFields, description, revenue, externalId, fulfillmentDate, location, fulfillmentSystem, type, quantity, state, trackingNumber);
}
private static int hashCodeNullable(JsonNullable a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FulfillmentPatchRequest {\n");
sb.append(" orderLineItemId: ").append(toIndentedString(orderLineItemId)).append("\n");
sb.append(" targetDate: ").append(toIndentedString(targetDate)).append("\n");
sb.append(" carrier: ").append(toIndentedString(carrier)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" revenue: ").append(toIndentedString(revenue)).append("\n");
sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
sb.append(" fulfillmentDate: ").append(toIndentedString(fulfillmentDate)).append("\n");
sb.append(" location: ").append(toIndentedString(location)).append("\n");
sb.append(" fulfillmentSystem: ").append(toIndentedString(fulfillmentSystem)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" trackingNumber: ").append(toIndentedString(trackingNumber)).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