
io.swagger.client.model.AddRecurringPlanRequest Maven / Gradle / Ivy
/*
* Qualpay Platform API
* This document describes the Qualpay Platform API.
*
* OpenAPI spec version: 1.1.9
*
*
* 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 io.swagger.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;
/**
* AddRecurringPlanRequest
*/
public class AddRecurringPlanRequest {
@SerializedName("plan_code")
private String planCode = null;
@SerializedName("plan_name")
private String planName = null;
@SerializedName("plan_desc")
private String planDesc = null;
/**
* <strong>Format: </strong>Fixed length 1 N<br><strong>Description: </strong> The billing frequency. Use one of the following codes for frequency. <ul> <li>0 - Weekly</li> <li>1 - Bi-weekly</li> <li>3 - Monthly</li> <li>4 - Quarterly</li> <li>5 - Bi-annually</li> <li>6 - Annually</li> <li>7 - Daily</li> </ul>
*/
@JsonAdapter(PlanFrequencyEnum.Adapter.class)
public enum PlanFrequencyEnum {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_3(3),
NUMBER_4(4),
NUMBER_5(5),
NUMBER_6(6),
NUMBER_7(7);
private Integer value;
PlanFrequencyEnum(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static PlanFrequencyEnum fromValue(String text) {
for (PlanFrequencyEnum b : PlanFrequencyEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final PlanFrequencyEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public PlanFrequencyEnum read(final JsonReader jsonReader) throws IOException {
Integer value = jsonReader.nextInt();
return PlanFrequencyEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("plan_frequency")
private PlanFrequencyEnum planFrequency = null;
@SerializedName("interval")
private Integer interval = null;
@SerializedName("plan_duration")
private Integer planDuration = null;
@SerializedName("trial_duration")
private Integer trialDuration = null;
@SerializedName("amt_trial")
private Double amtTrial = null;
@SerializedName("amt_setup")
private Double amtSetup = null;
@SerializedName("amt_tran")
private Double amtTran = null;
@SerializedName("tran_currency")
private String tranCurrency = null;
@SerializedName("profile_id")
private String profileId = null;
@SerializedName("bill_specific_day")
private Boolean billSpecificDay = null;
@SerializedName("day_of_week")
private Integer dayOfWeek = null;
@SerializedName("day_of_month")
private Integer dayOfMonth = null;
@SerializedName("month")
private Integer month = null;
@SerializedName("prorate_first_pmt")
private Boolean prorateFirstPmt = null;
@SerializedName("amt_prorate")
private Double amtProrate = null;
@SerializedName("merchant_id")
private Long merchantId = null;
public AddRecurringPlanRequest planCode(String planCode) {
this.planCode = planCode;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>A unique alphanumeric code provided by the merchant to identify the plan.
* @return planCode
**/
@ApiModelProperty(example = "1234", required = true, value = "Format: Variable length, up to 16 AN
Description: A unique alphanumeric code provided by the merchant to identify the plan.")
public String getPlanCode() {
return planCode;
}
public void setPlanCode(String planCode) {
this.planCode = planCode;
}
public AddRecurringPlanRequest planName(String planName) {
this.planName = planName;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 64 AN<br><strong>Description: </strong>A unique name assigned to the plan.
* @return planName
**/
@ApiModelProperty(example = "Qualpay Plan", required = true, value = "Format: Variable length, up to 64 AN
Description: A unique name assigned to the plan. ")
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public AddRecurringPlanRequest planDesc(String planDesc) {
this.planDesc = planDesc;
return this;
}
/**
* <strong>Format: </strong>Variable length AN<br><strong>Description: </strong>A short description of the plan.
* @return planDesc
**/
@ApiModelProperty(example = "ABC Monthly Billing Plan", required = true, value = "Format: Variable length AN
Description: A short description of the plan.")
public String getPlanDesc() {
return planDesc;
}
public void setPlanDesc(String planDesc) {
this.planDesc = planDesc;
}
public AddRecurringPlanRequest planFrequency(PlanFrequencyEnum planFrequency) {
this.planFrequency = planFrequency;
return this;
}
/**
* <strong>Format: </strong>Fixed length 1 N<br><strong>Description: </strong> The billing frequency. Use one of the following codes for frequency. <ul> <li>0 - Weekly</li> <li>1 - Bi-weekly</li> <li>3 - Monthly</li> <li>4 - Quarterly</li> <li>5 - Bi-annually</li> <li>6 - Annually</li> <li>7 - Daily</li> </ul>
* @return planFrequency
**/
@ApiModelProperty(example = "0", required = true, value = "Format: Fixed length 1 N
Description: The billing frequency. Use one of the following codes for frequency. - 0 - Weekly
- 1 - Bi-weekly
- 3 - Monthly
- 4 - Quarterly
- 5 - Bi-annually
- 6 - Annually
- 7 - Daily
")
public PlanFrequencyEnum getPlanFrequency() {
return planFrequency;
}
public void setPlanFrequency(PlanFrequencyEnum planFrequency) {
this.planFrequency = planFrequency;
}
public AddRecurringPlanRequest interval(Integer interval) {
this.interval = interval;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 2 N<br><strong>Description: </strong>Number of months or weeks in a subscription cycle. For example if plan_frequency is 3 (Monthly) and interval is 2, a customer using this plan will be billed every 2 months till the subscription is complete or cancelled. Applicable only for monthly or weekly plan_frequency. <br><strong>Default: </strong>1
* @return interval
**/
@ApiModelProperty(example = "3", value = "Format: Variable length, up to 2 N
Description: Number of months or weeks in a subscription cycle. For example if plan_frequency is 3 (Monthly) and interval is 2, a customer using this plan will be billed every 2 months till the subscription is complete or cancelled. Applicable only for monthly or weekly plan_frequency.
Default: 1")
public Integer getInterval() {
return interval;
}
public void setInterval(Integer interval) {
this.interval = interval;
}
public AddRecurringPlanRequest planDuration(Integer planDuration) {
this.planDuration = planDuration;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 4 N<br><strong>Description: </strong> Number of billing cycles in the recurring transaction, -1 indicates bill until cancelled. For example if plan_frequency is 3 (Monthly) and plan_duration is 6, the customer will be billed every month for 6 months.
* @return planDuration
**/
@ApiModelProperty(example = "10", required = true, value = "Format: Variable length, up to 4 N
Description: Number of billing cycles in the recurring transaction, -1 indicates bill until cancelled. For example if plan_frequency is 3 (Monthly) and plan_duration is 6, the customer will be billed every month for 6 months.")
public Integer getPlanDuration() {
return planDuration;
}
public void setPlanDuration(Integer planDuration) {
this.planDuration = planDuration;
}
public AddRecurringPlanRequest trialDuration(Integer trialDuration) {
this.trialDuration = trialDuration;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 2 N<br><strong>Description: </strong>Number of billing cycles in a trial period.
* @return trialDuration
**/
@ApiModelProperty(example = "1", value = "Format: Variable length, up to 2 N
Description: Number of billing cycles in a trial period.")
public Integer getTrialDuration() {
return trialDuration;
}
public void setTrialDuration(Integer trialDuration) {
this.trialDuration = trialDuration;
}
public AddRecurringPlanRequest amtTrial(Double amtTrial) {
this.amtTrial = amtTrial;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Amount to be billed during the trial period.
* @return amtTrial
**/
@ApiModelProperty(example = "9.99", value = "Format: Variable length, up to 12,2 N
Description: Amount to be billed during the trial period.")
public Double getAmtTrial() {
return amtTrial;
}
public void setAmtTrial(Double amtTrial) {
this.amtTrial = amtTrial;
}
public AddRecurringPlanRequest amtSetup(Double amtSetup) {
this.amtSetup = amtSetup;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>One-time fee amount. When adding a subscription with this plan, a payment gateway sale transaction will be initiated to charge the customer the one time fee.
* @return amtSetup
**/
@ApiModelProperty(example = "50.0", value = "Format: Variable length, up to 12,2 N
Description: One-time fee amount. When adding a subscription with this plan, a payment gateway sale transaction will be initiated to charge the customer the one time fee.")
public Double getAmtSetup() {
return amtSetup;
}
public void setAmtSetup(Double amtSetup) {
this.amtSetup = amtSetup;
}
public AddRecurringPlanRequest amtTran(Double amtTran) {
this.amtTran = amtTran;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Plan transaction amount. Amount that will be billed each cycle.
* @return amtTran
**/
@ApiModelProperty(example = "19.99", required = true, value = "Format: Variable length, up to 12,2 N
Description: Plan transaction amount. Amount that will be billed each cycle. ")
public Double getAmtTran() {
return amtTran;
}
public void setAmtTran(Double amtTran) {
this.amtTran = amtTran;
}
public AddRecurringPlanRequest tranCurrency(String tranCurrency) {
this.tranCurrency = tranCurrency;
return this;
}
/**
* <strong>Format: </strong>Fixed length, 3 AN<br><strong>Description: </strong>Numeric Currency Code. If profile_id is provided, the currency is determined from profile. Refer to <a href=\"/developer/api/reference#country-codes\"target=\"_blank\">Country Codes</a> for a list of currency codes.<br><strong>Default: </strong>840
* @return tranCurrency
**/
@ApiModelProperty(example = "840", value = "Format: Fixed length, 3 AN
Description: Numeric Currency Code. If profile_id is provided, the currency is determined from profile. Refer to Country Codes for a list of currency codes.
Default: 840")
public String getTranCurrency() {
return tranCurrency;
}
public void setTranCurrency(String tranCurrency) {
this.tranCurrency = tranCurrency;
}
public AddRecurringPlanRequest profileId(String profileId) {
this.profileId = profileId;
return this;
}
/**
* <strong>Format: </strong>Fixed length, 20 N<br><strong>Description: </strong>Payment gateway profile id that will be used for subscriptions that use this plan. tran_currency will be used if profile_id is not provided. If both tran_currency and profile_id are not provided, default USD profile is used.
* @return profileId
**/
@ApiModelProperty(example = "21200000000100000840", value = "Format: Fixed length, 20 N
Description: Payment gateway profile id that will be used for subscriptions that use this plan. tran_currency will be used if profile_id is not provided. If both tran_currency and profile_id are not provided, default USD profile is used. ")
public String getProfileId() {
return profileId;
}
public void setProfileId(String profileId) {
this.profileId = profileId;
}
public AddRecurringPlanRequest billSpecificDay(Boolean billSpecificDay) {
this.billSpecificDay = billSpecificDay;
return this;
}
/**
* <br><strong>Description: </strong>If set to true, the customer will be billed on a specific start date.<br><strong>Default: </strong>false
* @return billSpecificDay
**/
@ApiModelProperty(example = "true", value = "
Description: If set to true, the customer will be billed on a specific start date.
Default: false")
public Boolean isBillSpecificDay() {
return billSpecificDay;
}
public void setBillSpecificDay(Boolean billSpecificDay) {
this.billSpecificDay = billSpecificDay;
}
public AddRecurringPlanRequest dayOfWeek(Integer dayOfWeek) {
this.dayOfWeek = dayOfWeek;
return this;
}
/**
* <strong>Format: </strong>Fixed length, 1 N<br><strong>Description: </strong>This field represents the day of the week on which the system will be billed for weekly or biweekly plans.<ul><li>1 - Sunday</li><li>2 - Monday</li><li>3 - Tuesday</li><li>4 - Wednesday</li><li>5 - Thursday</li><li>6 - Friday</li><li>7 - Saturday</li></ul><br><strong>Conditional Requirement: </strong>Applicable only when billing is on specific day, i.e., bill_specific_day flag is set to true.
* @return dayOfWeek
**/
@ApiModelProperty(example = "1", value = "Format: Fixed length, 1 N
Description: This field represents the day of the week on which the system will be billed for weekly or biweekly plans.- 1 - Sunday
- 2 - Monday
- 3 - Tuesday
- 4 - Wednesday
- 5 - Thursday
- 6 - Friday
- 7 - Saturday
Conditional Requirement: Applicable only when billing is on specific day, i.e., bill_specific_day flag is set to true.")
public Integer getDayOfWeek() {
return dayOfWeek;
}
public void setDayOfWeek(Integer dayOfWeek) {
this.dayOfWeek = dayOfWeek;
}
public AddRecurringPlanRequest dayOfMonth(Integer dayOfMonth) {
this.dayOfMonth = dayOfMonth;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 2 N<br><strong>Description: </strong>Day of the month on which the system will be billed for month or year based plans. Use 1-31 to represent the day of month when the customer will be billed or 32 if billing should be on the last day of month. <br><strong>Conditional Requirement: </strong>Applicable only when billing is on specific day, i.e., bill_specific_day flag is set to true.
* @return dayOfMonth
**/
@ApiModelProperty(example = "1", value = "Format: Variable length, up to 2 N
Description: Day of the month on which the system will be billed for month or year based plans. Use 1-31 to represent the day of month when the customer will be billed or 32 if billing should be on the last day of month.
Conditional Requirement: Applicable only when billing is on specific day, i.e., bill_specific_day flag is set to true.")
public Integer getDayOfMonth() {
return dayOfMonth;
}
public void setDayOfMonth(Integer dayOfMonth) {
this.dayOfMonth = dayOfMonth;
}
public AddRecurringPlanRequest month(Integer month) {
this.month = month;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 2 N<br><strong>Description: </strong>Month on which the system will be billed for month or year based plans. <ul><li>1 - January</li><li>2 - February</li><li>3 - March</li><li>4 - April</li><li>5 - May</li><li>6 - June</li><li>7 - July</li><li>8 - August</li><li>9 - September</li><li>10 - October</li><li>11 - November</li><li>12 - December</li></ul><br><strong>Conditional Requirement: </strong>Applicable only when billing is on specific day , i.e., bill_specific_day flag is set to true.
* @return month
**/
@ApiModelProperty(example = "0", value = "Format: Variable length, up to 2 N
Description: Month on which the system will be billed for month or year based plans. - 1 - January
- 2 - February
- 3 - March
- 4 - April
- 5 - May
- 6 - June
- 7 - July
- 8 - August
- 9 - September
- 10 - October
- 11 - November
- 12 - December
Conditional Requirement: Applicable only when billing is on specific day , i.e., bill_specific_day flag is set to true.")
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public AddRecurringPlanRequest prorateFirstPmt(Boolean prorateFirstPmt) {
this.prorateFirstPmt = prorateFirstPmt;
return this;
}
/**
* <br><strong>Description: </strong>Set this flag to true if the first payment should be prorated. <br><strong>Conditional Requirement: </strong>Applicable only when billing is on specific day , i.e., bill_specific_day flag is set to true.
* @return prorateFirstPmt
**/
@ApiModelProperty(example = "true", value = "
Description: Set this flag to true if the first payment should be prorated.
Conditional Requirement: Applicable only when billing is on specific day , i.e., bill_specific_day flag is set to true.")
public Boolean isProrateFirstPmt() {
return prorateFirstPmt;
}
public void setProrateFirstPmt(Boolean prorateFirstPmt) {
this.prorateFirstPmt = prorateFirstPmt;
}
public AddRecurringPlanRequest amtProrate(Double amtProrate) {
this.amtProrate = amtProrate;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 12,2 N<br><strong>Description: </strong>Fixed prorate amount for first payment. If set to zero or undefined, the system will calculate the prorate amount based on the number of days remaining in the first cycle. <br><strong>Conditional Requirement: </strong>This field is applicable only if prorate_first_pmt is set to true.
* @return amtProrate
**/
@ApiModelProperty(example = "10.0", value = "Format: Variable length, up to 12,2 N
Description: Fixed prorate amount for first payment. If set to zero or undefined, the system will calculate the prorate amount based on the number of days remaining in the first cycle.
Conditional Requirement: This field is applicable only if prorate_first_pmt is set to true. ")
public Double getAmtProrate() {
return amtProrate;
}
public void setAmtProrate(Double amtProrate) {
this.amtProrate = amtProrate;
}
public AddRecurringPlanRequest merchantId(Long merchantId) {
this.merchantId = merchantId;
return this;
}
/**
* <strong>Format: </strong>Variable length, up to 16 AN<br><strong>Description: </strong>Identifies the merchant to whom this request applies. Optional field, applicable only if the request is sent on behalf of another merchant.<br><strong>Conditional Requirement: </strong>Required if this request is on behalf of another merchant.
* @return merchantId
**/
@ApiModelProperty(example = "210000000289", value = "Format: Variable length, up to 16 AN
Description: Identifies the merchant to whom this request applies. Optional field, applicable only if the request is sent on behalf of another merchant.
Conditional Requirement: Required if this request is on behalf of another merchant.")
public Long getMerchantId() {
return merchantId;
}
public void setMerchantId(Long merchantId) {
this.merchantId = merchantId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AddRecurringPlanRequest addRecurringPlanRequest = (AddRecurringPlanRequest) o;
return Objects.equals(this.planCode, addRecurringPlanRequest.planCode) &&
Objects.equals(this.planName, addRecurringPlanRequest.planName) &&
Objects.equals(this.planDesc, addRecurringPlanRequest.planDesc) &&
Objects.equals(this.planFrequency, addRecurringPlanRequest.planFrequency) &&
Objects.equals(this.interval, addRecurringPlanRequest.interval) &&
Objects.equals(this.planDuration, addRecurringPlanRequest.planDuration) &&
Objects.equals(this.trialDuration, addRecurringPlanRequest.trialDuration) &&
Objects.equals(this.amtTrial, addRecurringPlanRequest.amtTrial) &&
Objects.equals(this.amtSetup, addRecurringPlanRequest.amtSetup) &&
Objects.equals(this.amtTran, addRecurringPlanRequest.amtTran) &&
Objects.equals(this.tranCurrency, addRecurringPlanRequest.tranCurrency) &&
Objects.equals(this.profileId, addRecurringPlanRequest.profileId) &&
Objects.equals(this.billSpecificDay, addRecurringPlanRequest.billSpecificDay) &&
Objects.equals(this.dayOfWeek, addRecurringPlanRequest.dayOfWeek) &&
Objects.equals(this.dayOfMonth, addRecurringPlanRequest.dayOfMonth) &&
Objects.equals(this.month, addRecurringPlanRequest.month) &&
Objects.equals(this.prorateFirstPmt, addRecurringPlanRequest.prorateFirstPmt) &&
Objects.equals(this.amtProrate, addRecurringPlanRequest.amtProrate) &&
Objects.equals(this.merchantId, addRecurringPlanRequest.merchantId);
}
@Override
public int hashCode() {
return Objects.hash(planCode, planName, planDesc, planFrequency, interval, planDuration, trialDuration, amtTrial, amtSetup, amtTran, tranCurrency, profileId, billSpecificDay, dayOfWeek, dayOfMonth, month, prorateFirstPmt, amtProrate, merchantId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AddRecurringPlanRequest {\n");
sb.append(" planCode: ").append(toIndentedString(planCode)).append("\n");
sb.append(" planName: ").append(toIndentedString(planName)).append("\n");
sb.append(" planDesc: ").append(toIndentedString(planDesc)).append("\n");
sb.append(" planFrequency: ").append(toIndentedString(planFrequency)).append("\n");
sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
sb.append(" planDuration: ").append(toIndentedString(planDuration)).append("\n");
sb.append(" trialDuration: ").append(toIndentedString(trialDuration)).append("\n");
sb.append(" amtTrial: ").append(toIndentedString(amtTrial)).append("\n");
sb.append(" amtSetup: ").append(toIndentedString(amtSetup)).append("\n");
sb.append(" amtTran: ").append(toIndentedString(amtTran)).append("\n");
sb.append(" tranCurrency: ").append(toIndentedString(tranCurrency)).append("\n");
sb.append(" profileId: ").append(toIndentedString(profileId)).append("\n");
sb.append(" billSpecificDay: ").append(toIndentedString(billSpecificDay)).append("\n");
sb.append(" dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n");
sb.append(" dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n");
sb.append(" month: ").append(toIndentedString(month)).append("\n");
sb.append(" prorateFirstPmt: ").append(toIndentedString(prorateFirstPmt)).append("\n");
sb.append(" amtProrate: ").append(toIndentedString(amtProrate)).append("\n");
sb.append(" merchantId: ").append(toIndentedString(merchantId)).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 - 2025 Weber Informatics LLC | Privacy Policy