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

io.swagger.client.model.RequestSepaDirectDebitParams Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
/*
 * finAPI RESTful Services
 * finAPI RESTful Services
 *
 * OpenAPI spec version: v1.64.0
 * 
 *
 * 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 io.swagger.client.model.SingleDirectDebitData;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * Parameters for a single or collective SEPA direct debit order request
 */
@ApiModel(description = "Parameters for a single or collective SEPA direct debit order request")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-02-05T12:19:21.458Z")
public class RequestSepaDirectDebitParams {
  @SerializedName("accountId")
  private Long accountId = null;

  @SerializedName("bankingPin")
  private String bankingPin = null;

  @SerializedName("storePin")
  private Boolean storePin = false;

  @SerializedName("twoStepProcedureId")
  private String twoStepProcedureId = null;

  /**
   * Type of the direct debit; either <code>BASIC</code> or <code>B2B</code> (Business-To-Business). Please note that an account which supports the basic type must not necessarily support B2B (or vice versa). Check the source account's 'supportedOrders' field to find out which types of direct debit it supports.<br/><br/>
   */
  @JsonAdapter(DirectDebitTypeEnum.Adapter.class)
  public enum DirectDebitTypeEnum {
    B2B("B2B"),
    
    BASIC("BASIC");

    private String value;

    DirectDebitTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static DirectDebitTypeEnum fromValue(String text) {
      for (DirectDebitTypeEnum b : DirectDebitTypeEnum.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 DirectDebitTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public DirectDebitTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return DirectDebitTypeEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("directDebitType")
  private DirectDebitTypeEnum directDebitType = null;

  /**
   * Sequence type of the direct debit. Possible values:<br/><br/>&bull; <code>OOFF</code> - means that this is a one-time direct debit order<br/>&bull; <code>FRST</code> - means that this is the first in a row of multiple direct debit orders<br/>&bull; <code>RCUR</code> - means that this is one (but not the first or final) within a row of multiple direct debit orders<br/>&bull; <code>FNAL</code> - means that this is the final in a row of multiple direct debit orders<br/><br/>
   */
  @JsonAdapter(SequenceTypeEnum.Adapter.class)
  public enum SequenceTypeEnum {
    OOFF("OOFF"),
    
    FRST("FRST"),
    
    RCUR("RCUR"),
    
    FNAL("FNAL");

    private String value;

    SequenceTypeEnum(String value) {
      this.value = value;
    }

    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }

    public static SequenceTypeEnum fromValue(String text) {
      for (SequenceTypeEnum b : SequenceTypeEnum.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 SequenceTypeEnum enumeration) throws IOException {
        jsonWriter.value(enumeration.getValue());
      }

      @Override
      public SequenceTypeEnum read(final JsonReader jsonReader) throws IOException {
        String value = jsonReader.nextString();
        return SequenceTypeEnum.fromValue(String.valueOf(value));
      }
    }
  }

  @SerializedName("sequenceType")
  private SequenceTypeEnum sequenceType = null;

  @SerializedName("executionDate")
  private String executionDate = null;

  @SerializedName("singleBooking")
  private Boolean singleBooking = false;

  @SerializedName("directDebits")
  private List directDebits = new ArrayList();

  public RequestSepaDirectDebitParams accountId(Long accountId) {
    this.accountId = accountId;
    return this;
  }

   /**
   * Identifier of the bank account to which you want to transfer the money.
   * @return accountId
  **/
  @ApiModelProperty(example = "1", required = true, value = "Identifier of the bank account to which you want to transfer the money.")
  public Long getAccountId() {
    return accountId;
  }

  public void setAccountId(Long accountId) {
    this.accountId = accountId;
  }

  public RequestSepaDirectDebitParams bankingPin(String bankingPin) {
    this.bankingPin = bankingPin;
    return this;
  }

   /**
   * Online banking PIN. Any symbols are allowed. Max length: 170. If a PIN is stored in the bank connection, then this field may remain unset. If finAPI's web form is not required and the field is set though then it will always be used (even if there is some other PIN stored in the bank connection). If you want the user to enter a PIN in finAPI's web form even when a PIN is stored, then just set the field to any value, so that the service recognizes that you wish to use the web form flow.
   * @return bankingPin
  **/
  @ApiModelProperty(example = "123456", value = "Online banking PIN. Any symbols are allowed. Max length: 170. If a PIN is stored in the bank connection, then this field may remain unset. If finAPI's web form is not required and the field is set though then it will always be used (even if there is some other PIN stored in the bank connection). If you want the user to enter a PIN in finAPI's web form even when a PIN is stored, then just set the field to any value, so that the service recognizes that you wish to use the web form flow.")
  public String getBankingPin() {
    return bankingPin;
  }

  public void setBankingPin(String bankingPin) {
    this.bankingPin = bankingPin;
  }

  public RequestSepaDirectDebitParams storePin(Boolean storePin) {
    this.storePin = storePin;
    return this;
  }

   /**
   * Whether to store the PIN. If the PIN is stored, it is not required to pass the PIN again when executing SEPA orders. Default value is 'false'. <br/><br/>NOTES:<br/> - before you set this field to true, please regard the 'pinsAreVolatile' flag of the bank connection that the account belongs to;<br/> - this field is ignored in case when the user will need to use finAPI's web form. The user will be able to decide whether to store the PIN or not in the web form, depending on the 'pinStorageAvailableInWebForm' setting (see Client Configuration).
   * @return storePin
  **/
  @ApiModelProperty(example = "true", value = "Whether to store the PIN. If the PIN is stored, it is not required to pass the PIN again when executing SEPA orders. Default value is 'false'. 

NOTES:
- before you set this field to true, please regard the 'pinsAreVolatile' flag of the bank connection that the account belongs to;
- this field is ignored in case when the user will need to use finAPI's web form. The user will be able to decide whether to store the PIN or not in the web form, depending on the 'pinStorageAvailableInWebForm' setting (see Client Configuration).") public Boolean isStorePin() { return storePin; } public void setStorePin(Boolean storePin) { this.storePin = storePin; } public RequestSepaDirectDebitParams twoStepProcedureId(String twoStepProcedureId) { this.twoStepProcedureId = twoStepProcedureId; return this; } /** * The bank-given ID of the two-step-procedure that should be used for the order. For a list of available two-step-procedures, see the corresponding bank connection (GET /bankConnections). If this field is not set, then the bank connection's default two-step-procedure will be used. Note that in this case, when the bank connection has no default two-step-procedure set, then the response of the service depends on whether you need to use finAPI's web form or not. If you need to use the web form, the user will be prompted to select the two-step-procedure within the web form. If you don't need to use the web form, then the service will return an error (passing a value for this field is required in this case). * @return twoStepProcedureId **/ @ApiModelProperty(example = "955", value = "The bank-given ID of the two-step-procedure that should be used for the order. For a list of available two-step-procedures, see the corresponding bank connection (GET /bankConnections). If this field is not set, then the bank connection's default two-step-procedure will be used. Note that in this case, when the bank connection has no default two-step-procedure set, then the response of the service depends on whether you need to use finAPI's web form or not. If you need to use the web form, the user will be prompted to select the two-step-procedure within the web form. If you don't need to use the web form, then the service will return an error (passing a value for this field is required in this case).") public String getTwoStepProcedureId() { return twoStepProcedureId; } public void setTwoStepProcedureId(String twoStepProcedureId) { this.twoStepProcedureId = twoStepProcedureId; } public RequestSepaDirectDebitParams directDebitType(DirectDebitTypeEnum directDebitType) { this.directDebitType = directDebitType; return this; } /** * Type of the direct debit; either <code>BASIC</code> or <code>B2B</code> (Business-To-Business). Please note that an account which supports the basic type must not necessarily support B2B (or vice versa). Check the source account's 'supportedOrders' field to find out which types of direct debit it supports.<br/><br/> * @return directDebitType **/ @ApiModelProperty(example = "B2B", required = true, value = "Type of the direct debit; either BASIC or B2B (Business-To-Business). Please note that an account which supports the basic type must not necessarily support B2B (or vice versa). Check the source account's 'supportedOrders' field to find out which types of direct debit it supports.

") public DirectDebitTypeEnum getDirectDebitType() { return directDebitType; } public void setDirectDebitType(DirectDebitTypeEnum directDebitType) { this.directDebitType = directDebitType; } public RequestSepaDirectDebitParams sequenceType(SequenceTypeEnum sequenceType) { this.sequenceType = sequenceType; return this; } /** * Sequence type of the direct debit. Possible values:<br/><br/>&bull; <code>OOFF</code> - means that this is a one-time direct debit order<br/>&bull; <code>FRST</code> - means that this is the first in a row of multiple direct debit orders<br/>&bull; <code>RCUR</code> - means that this is one (but not the first or final) within a row of multiple direct debit orders<br/>&bull; <code>FNAL</code> - means that this is the final in a row of multiple direct debit orders<br/><br/> * @return sequenceType **/ @ApiModelProperty(example = "OOFF", required = true, value = "Sequence type of the direct debit. Possible values:

OOFF - means that this is a one-time direct debit order
FRST - means that this is the first in a row of multiple direct debit orders
RCUR - means that this is one (but not the first or final) within a row of multiple direct debit orders
FNAL - means that this is the final in a row of multiple direct debit orders

") public SequenceTypeEnum getSequenceType() { return sequenceType; } public void setSequenceType(SequenceTypeEnum sequenceType) { this.sequenceType = sequenceType; } public RequestSepaDirectDebitParams executionDate(String executionDate) { this.executionDate = executionDate; return this; } /** * Execution date for the direct debit(s), in the format 'YYYY-MM-DD'. * @return executionDate **/ @ApiModelProperty(example = "2018-01-01", required = true, value = "Execution date for the direct debit(s), in the format 'YYYY-MM-DD'.") public String getExecutionDate() { return executionDate; } public void setExecutionDate(String executionDate) { this.executionDate = executionDate; } public RequestSepaDirectDebitParams singleBooking(Boolean singleBooking) { this.singleBooking = singleBooking; return this; } /** * This field is only regarded when you pass multiple orders. It determines whether the orders should be processed by the bank as one collective booking (in case of 'false'), or as single bookings (in case of 'true'). Default value is 'false'. * @return singleBooking **/ @ApiModelProperty(example = "false", value = "This field is only regarded when you pass multiple orders. It determines whether the orders should be processed by the bank as one collective booking (in case of 'false'), or as single bookings (in case of 'true'). Default value is 'false'.") public Boolean isSingleBooking() { return singleBooking; } public void setSingleBooking(Boolean singleBooking) { this.singleBooking = singleBooking; } public RequestSepaDirectDebitParams directDebits(List directDebits) { this.directDebits = directDebits; return this; } public RequestSepaDirectDebitParams addDirectDebitsItem(SingleDirectDebitData directDebitsItem) { this.directDebits.add(directDebitsItem); return this; } /** * List of the direct debits that you want to execute (may contain at most 15000 items). Please check the account's 'supportedOrders' field to find out whether you can pass multiple direct debits or just one. * @return directDebits **/ @ApiModelProperty(required = true, value = "List of the direct debits that you want to execute (may contain at most 15000 items). Please check the account's 'supportedOrders' field to find out whether you can pass multiple direct debits or just one.") public List getDirectDebits() { return directDebits; } public void setDirectDebits(List directDebits) { this.directDebits = directDebits; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RequestSepaDirectDebitParams requestSepaDirectDebitParams = (RequestSepaDirectDebitParams) o; return Objects.equals(this.accountId, requestSepaDirectDebitParams.accountId) && Objects.equals(this.bankingPin, requestSepaDirectDebitParams.bankingPin) && Objects.equals(this.storePin, requestSepaDirectDebitParams.storePin) && Objects.equals(this.twoStepProcedureId, requestSepaDirectDebitParams.twoStepProcedureId) && Objects.equals(this.directDebitType, requestSepaDirectDebitParams.directDebitType) && Objects.equals(this.sequenceType, requestSepaDirectDebitParams.sequenceType) && Objects.equals(this.executionDate, requestSepaDirectDebitParams.executionDate) && Objects.equals(this.singleBooking, requestSepaDirectDebitParams.singleBooking) && Objects.equals(this.directDebits, requestSepaDirectDebitParams.directDebits); } @Override public int hashCode() { return Objects.hash(accountId, bankingPin, storePin, twoStepProcedureId, directDebitType, sequenceType, executionDate, singleBooking, directDebits); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RequestSepaDirectDebitParams {\n"); sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" bankingPin: ").append(toIndentedString(bankingPin)).append("\n"); sb.append(" storePin: ").append(toIndentedString(storePin)).append("\n"); sb.append(" twoStepProcedureId: ").append(toIndentedString(twoStepProcedureId)).append("\n"); sb.append(" directDebitType: ").append(toIndentedString(directDebitType)).append("\n"); sb.append(" sequenceType: ").append(toIndentedString(sequenceType)).append("\n"); sb.append(" executionDate: ").append(toIndentedString(executionDate)).append("\n"); sb.append(" singleBooking: ").append(toIndentedString(singleBooking)).append("\n"); sb.append(" directDebits: ").append(toIndentedString(directDebits)).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