org.openapitools.client.model.PaymentScheduleItemCreateRequest 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.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.openapitools.client.model.PaymentScheduleItemPaymentOption;
import org.threeten.bp.LocalDate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* PaymentScheduleItemCreateRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PaymentScheduleItemCreateRequest {
public static final String SERIALIZED_NAME_PAYMENT_SCHEDULE_ID = "payment_schedule_id";
@SerializedName(SERIALIZED_NAME_PAYMENT_SCHEDULE_ID)
private String paymentScheduleId;
public static final String SERIALIZED_NAME_PAYMENT_SCHEDULE_NUMBER = "payment_schedule_number";
@SerializedName(SERIALIZED_NAME_PAYMENT_SCHEDULE_NUMBER)
private String paymentScheduleNumber;
public static final String SERIALIZED_NAME_ACCOUNT_ID = "account_id";
@SerializedName(SERIALIZED_NAME_ACCOUNT_ID)
private String accountId;
public static final String SERIALIZED_NAME_AMOUNT = "amount";
@SerializedName(SERIALIZED_NAME_AMOUNT)
private BigDecimal amount;
public static final String SERIALIZED_NAME_CURRENCY = "currency";
@SerializedName(SERIALIZED_NAME_CURRENCY)
private String currency;
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
private String description;
public static final String SERIALIZED_NAME_PAYMENT_GATEWAY_ID = "payment_gateway_id";
@SerializedName(SERIALIZED_NAME_PAYMENT_GATEWAY_ID)
private String paymentGatewayId;
public static final String SERIALIZED_NAME_PAYMENT_METHOD_ID = "payment_method_id";
@SerializedName(SERIALIZED_NAME_PAYMENT_METHOD_ID)
private String paymentMethodId;
public static final String SERIALIZED_NAME_SCHEDULED_DATE = "scheduled_date";
@SerializedName(SERIALIZED_NAME_SCHEDULED_DATE)
private LocalDate scheduledDate;
public static final String SERIALIZED_NAME_RUN_HOUR = "run_hour";
@SerializedName(SERIALIZED_NAME_RUN_HOUR)
private Integer runHour;
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_PAYMENT_OPTIONS = "payment_options";
@SerializedName(SERIALIZED_NAME_PAYMENT_OPTIONS)
private List paymentOptions = null;
public PaymentScheduleItemCreateRequest() {
}
public PaymentScheduleItemCreateRequest paymentScheduleId(String paymentScheduleId) {
this.paymentScheduleId = paymentScheduleId;
return this;
}
/**
* ID of a payment schedule.
* @return paymentScheduleId
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "ID of a payment schedule.")
public String getPaymentScheduleId() {
return paymentScheduleId;
}
public void setPaymentScheduleId(String paymentScheduleId) {
this.paymentScheduleId = paymentScheduleId;
}
public PaymentScheduleItemCreateRequest paymentScheduleNumber(String paymentScheduleNumber) {
this.paymentScheduleNumber = paymentScheduleNumber;
return this;
}
/**
* Number of the payment schedule.
* @return paymentScheduleNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Number of the payment schedule.")
public String getPaymentScheduleNumber() {
return paymentScheduleNumber;
}
public void setPaymentScheduleNumber(String paymentScheduleNumber) {
this.paymentScheduleNumber = paymentScheduleNumber;
}
public PaymentScheduleItemCreateRequest accountId(String accountId) {
this.accountId = accountId;
return this;
}
/**
* Unique identifier of the customer account the payment schedule belongs to.
* @return accountId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "8ad093f27d6eee80017d6effd7a66759", value = "Unique identifier of the customer account the payment schedule belongs to.")
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public PaymentScheduleItemCreateRequest amount(BigDecimal amount) {
this.amount = amount;
return this;
}
/**
* The amount to be collected by this payment schedule item.
* @return amount
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The amount to be collected by this payment schedule item.")
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public PaymentScheduleItemCreateRequest currency(String currency) {
this.currency = currency;
return this;
}
/**
* Currency of the payment schedule. The default value is the account's default currency. This field will be ignored when items is specified.
* @return currency
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "USD", value = "Currency of the payment schedule. The default value is the account's default currency. This field will be ignored when items is specified.")
public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public PaymentScheduleItemCreateRequest 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(example = "description of payment schedule item", 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 PaymentScheduleItemCreateRequest paymentGatewayId(String paymentGatewayId) {
this.paymentGatewayId = paymentGatewayId;
return this;
}
/**
* ID of the payment gateway used to collect payments. The default value is the account's default payment gateway ID. If no payment gateway ID is found on the customer account level, the default value will be the tenant's default payment gateway ID. This field will be ignored when `items` is specified.
* @return paymentGatewayId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "8ad093f27d6eee80017d6effd7a66759", value = "ID of the payment gateway used to collect payments. The default value is the account's default payment gateway ID. If no payment gateway ID is found on the customer account level, the default value will be the tenant's default payment gateway ID. This field will be ignored when `items` is specified.")
public String getPaymentGatewayId() {
return paymentGatewayId;
}
public void setPaymentGatewayId(String paymentGatewayId) {
this.paymentGatewayId = paymentGatewayId;
}
public PaymentScheduleItemCreateRequest paymentMethodId(String paymentMethodId) {
this.paymentMethodId = paymentMethodId;
return this;
}
/**
* ID of the payment method. The default value is the account's default payment method ID. This field will be ignored when `items` is specified.
* @return paymentMethodId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "8a95b1946b6aeac8718c32aab8c395f", value = "ID of the payment method. The default value is the account's default payment method ID. This field will be ignored when `items` is specified.")
public String getPaymentMethodId() {
return paymentMethodId;
}
public void setPaymentMethodId(String paymentMethodId) {
this.paymentMethodId = paymentMethodId;
}
public PaymentScheduleItemCreateRequest scheduledDate(LocalDate scheduledDate) {
this.scheduledDate = scheduledDate;
return this;
}
/**
* The scheduled date of collection.
* @return scheduledDate
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "Sat Jan 01 00:00:00 GMT 2022", value = "The scheduled date of collection.")
public LocalDate getScheduledDate() {
return scheduledDate;
}
public void setScheduledDate(LocalDate scheduledDate) {
this.scheduledDate = scheduledDate;
}
public PaymentScheduleItemCreateRequest runHour(Integer runHour) {
this.runHour = runHour;
return this;
}
/**
* At which hour in the day in the tenant's timezone this payment will be collected. Available values:[0,1,2,~,22,23]. If the time difference between your tenant’s timezone and the timezone where Zuora servers are located is not in full hours, for example, 2.5 hours, the payment schedule items will be triggered half an hour later than your scheduled time. The default value is 0. If the payment run_hour and scheduled_date are backdated, the system will collect the payment when the next run_hour occurs.
* minimum: 0
* maximum: 23
* @return runHour
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "At which hour in the day in the tenant's timezone this payment will be collected. Available values:[0,1,2,~,22,23]. If the time difference between your tenant’s timezone and the timezone where Zuora servers are located is not in full hours, for example, 2.5 hours, the payment schedule items will be triggered half an hour later than your scheduled time. The default value is 0. If the payment run_hour and scheduled_date are backdated, the system will collect the payment when the next run_hour occurs.")
public Integer getRunHour() {
return runHour;
}
public void setRunHour(Integer runHour) {
this.runHour = runHour;
}
public PaymentScheduleItemCreateRequest customFields(Map customFields) {
this.customFields = customFields;
return this;
}
public PaymentScheduleItemCreateRequest 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 PaymentScheduleItemCreateRequest paymentOptions(List paymentOptions) {
this.paymentOptions = paymentOptions;
return this;
}
public PaymentScheduleItemCreateRequest addPaymentOptionsItem(PaymentScheduleItemPaymentOption paymentOptionsItem) {
if (this.paymentOptions == null) {
this.paymentOptions = new ArrayList();
}
this.paymentOptions.add(paymentOptionsItem);
return this;
}
/**
* Container for the payment options, which describe the transactional level rules for processing payments. Currently, only the `gateway_options` type is supported. Payment schedule `payment_options` take precedence over payment schedule item `payment_options`.
* @return paymentOptions
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Container for the payment options, which describe the transactional level rules for processing payments. Currently, only the `gateway_options` type is supported. Payment schedule `payment_options` take precedence over payment schedule item `payment_options`.")
public List getPaymentOptions() {
return paymentOptions;
}
public void setPaymentOptions(List paymentOptions) {
this.paymentOptions = paymentOptions;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PaymentScheduleItemCreateRequest paymentScheduleItemCreateRequest = (PaymentScheduleItemCreateRequest) o;
return Objects.equals(this.paymentScheduleId, paymentScheduleItemCreateRequest.paymentScheduleId) &&
Objects.equals(this.paymentScheduleNumber, paymentScheduleItemCreateRequest.paymentScheduleNumber) &&
Objects.equals(this.accountId, paymentScheduleItemCreateRequest.accountId) &&
Objects.equals(this.amount, paymentScheduleItemCreateRequest.amount) &&
Objects.equals(this.currency, paymentScheduleItemCreateRequest.currency) &&
Objects.equals(this.description, paymentScheduleItemCreateRequest.description) &&
Objects.equals(this.paymentGatewayId, paymentScheduleItemCreateRequest.paymentGatewayId) &&
Objects.equals(this.paymentMethodId, paymentScheduleItemCreateRequest.paymentMethodId) &&
Objects.equals(this.scheduledDate, paymentScheduleItemCreateRequest.scheduledDate) &&
Objects.equals(this.runHour, paymentScheduleItemCreateRequest.runHour) &&
Objects.equals(this.customFields, paymentScheduleItemCreateRequest.customFields) &&
Objects.equals(this.paymentOptions, paymentScheduleItemCreateRequest.paymentOptions);
}
@Override
public int hashCode() {
return Objects.hash(paymentScheduleId, paymentScheduleNumber, accountId, amount, currency, description, paymentGatewayId, paymentMethodId, scheduledDate, runHour, customFields, paymentOptions);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PaymentScheduleItemCreateRequest {\n");
sb.append(" paymentScheduleId: ").append(toIndentedString(paymentScheduleId)).append("\n");
sb.append(" paymentScheduleNumber: ").append(toIndentedString(paymentScheduleNumber)).append("\n");
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" paymentGatewayId: ").append(toIndentedString(paymentGatewayId)).append("\n");
sb.append(" paymentMethodId: ").append(toIndentedString(paymentMethodId)).append("\n");
sb.append(" scheduledDate: ").append(toIndentedString(scheduledDate)).append("\n");
sb.append(" runHour: ").append(toIndentedString(runHour)).append("\n");
sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n");
sb.append(" paymentOptions: ").append(toIndentedString(paymentOptions)).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