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

com.adyen.model.balanceplatform.PaymentInstrumentGroup Maven / Gradle / Ivy

There is a newer version: 38.1.0
Show newest version
/*
 * Configuration API
 *
 * The version of the OpenAPI document: 2
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.adyen.model.balanceplatform;

import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;


/**
 * PaymentInstrumentGroup
 */
@JsonPropertyOrder({
  PaymentInstrumentGroup.JSON_PROPERTY_BALANCE_PLATFORM,
  PaymentInstrumentGroup.JSON_PROPERTY_DESCRIPTION,
  PaymentInstrumentGroup.JSON_PROPERTY_ID,
  PaymentInstrumentGroup.JSON_PROPERTY_PROPERTIES,
  PaymentInstrumentGroup.JSON_PROPERTY_REFERENCE,
  PaymentInstrumentGroup.JSON_PROPERTY_TX_VARIANT
})

public class PaymentInstrumentGroup {
  public static final String JSON_PROPERTY_BALANCE_PLATFORM = "balancePlatform";
  private String balancePlatform;

  public static final String JSON_PROPERTY_DESCRIPTION = "description";
  private String description;

  public static final String JSON_PROPERTY_ID = "id";
  private String id;

  public static final String JSON_PROPERTY_PROPERTIES = "properties";
  private Map properties;

  public static final String JSON_PROPERTY_REFERENCE = "reference";
  private String reference;

  public static final String JSON_PROPERTY_TX_VARIANT = "txVariant";
  private String txVariant;

  public PaymentInstrumentGroup() { 
  }

  /**
   * The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   *
   * @param balancePlatform The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup balancePlatform(String balancePlatform) {
    this.balancePlatform = balancePlatform;
    return this;
  }

  /**
   * The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   * @return balancePlatform The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   */
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getBalancePlatform() {
    return balancePlatform;
  }

  /**
   * The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   *
   * @param balancePlatform The unique identifier of the [balance platform](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/get/balancePlatforms/{id}__queryParam_id) to which the payment instrument group belongs.
   */
  @JsonProperty(JSON_PROPERTY_BALANCE_PLATFORM)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setBalancePlatform(String balancePlatform) {
    this.balancePlatform = balancePlatform;
  }

  /**
   * Your description for the payment instrument group.
   *
   * @param description Your description for the payment instrument group.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Your description for the payment instrument group.
   * @return description Your description for the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getDescription() {
    return description;
  }

  /**
   * Your description for the payment instrument group.
   *
   * @param description Your description for the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_DESCRIPTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDescription(String description) {
    this.description = description;
  }

  /**
   * The unique identifier of the payment instrument group.
   *
   * @param id The unique identifier of the payment instrument group.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup id(String id) {
    this.id = id;
    return this;
  }

  /**
   * The unique identifier of the payment instrument group.
   * @return id The unique identifier of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getId() {
    return id;
  }

  /**
   * The unique identifier of the payment instrument group.
   *
   * @param id The unique identifier of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_ID)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setId(String id) {
    this.id = id;
  }

  /**
   * Properties of the payment instrument group.
   *
   * @param properties Properties of the payment instrument group.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup properties(Map properties) {
    this.properties = properties;
    return this;
  }

  public PaymentInstrumentGroup putPropertiesItem(String key, String propertiesItem) {
    if (this.properties == null) {
      this.properties = new HashMap<>();
    }
    this.properties.put(key, propertiesItem);
    return this;
  }

  /**
   * Properties of the payment instrument group.
   * @return properties Properties of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_PROPERTIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public Map getProperties() {
    return properties;
  }

  /**
   * Properties of the payment instrument group.
   *
   * @param properties Properties of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_PROPERTIES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setProperties(Map properties) {
    this.properties = properties;
  }

  /**
   * Your reference for the payment instrument group.
   *
   * @param reference Your reference for the payment instrument group.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup reference(String reference) {
    this.reference = reference;
    return this;
  }

  /**
   * Your reference for the payment instrument group.
   * @return reference Your reference for the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getReference() {
    return reference;
  }

  /**
   * Your reference for the payment instrument group.
   *
   * @param reference Your reference for the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_REFERENCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setReference(String reference) {
    this.reference = reference;
  }

  /**
   * The tx variant of the payment instrument group.
   *
   * @param txVariant The tx variant of the payment instrument group.
   * @return the current {@code PaymentInstrumentGroup} instance, allowing for method chaining
   */
  public PaymentInstrumentGroup txVariant(String txVariant) {
    this.txVariant = txVariant;
    return this;
  }

  /**
   * The tx variant of the payment instrument group.
   * @return txVariant The tx variant of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_TX_VARIANT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public String getTxVariant() {
    return txVariant;
  }

  /**
   * The tx variant of the payment instrument group.
   *
   * @param txVariant The tx variant of the payment instrument group.
   */
  @JsonProperty(JSON_PROPERTY_TX_VARIANT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTxVariant(String txVariant) {
    this.txVariant = txVariant;
  }

  /**
   * Return true if this PaymentInstrumentGroup object is equal to o.
   */
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PaymentInstrumentGroup paymentInstrumentGroup = (PaymentInstrumentGroup) o;
    return Objects.equals(this.balancePlatform, paymentInstrumentGroup.balancePlatform) &&
        Objects.equals(this.description, paymentInstrumentGroup.description) &&
        Objects.equals(this.id, paymentInstrumentGroup.id) &&
        Objects.equals(this.properties, paymentInstrumentGroup.properties) &&
        Objects.equals(this.reference, paymentInstrumentGroup.reference) &&
        Objects.equals(this.txVariant, paymentInstrumentGroup.txVariant);
  }

  @Override
  public int hashCode() {
    return Objects.hash(balancePlatform, description, id, properties, reference, txVariant);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PaymentInstrumentGroup {\n");
    sb.append("    balancePlatform: ").append(toIndentedString(balancePlatform)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    properties: ").append(toIndentedString(properties)).append("\n");
    sb.append("    reference: ").append(toIndentedString(reference)).append("\n");
    sb.append("    txVariant: ").append(toIndentedString(txVariant)).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    ");
  }

/**
   * Create an instance of PaymentInstrumentGroup given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of PaymentInstrumentGroup
   * @throws JsonProcessingException if the JSON string is invalid with respect to PaymentInstrumentGroup
   */
  public static PaymentInstrumentGroup fromJson(String jsonString) throws JsonProcessingException {
    return JSON.getMapper().readValue(jsonString, PaymentInstrumentGroup.class);
  }
/**
  * Convert an instance of PaymentInstrumentGroup to an JSON string
  *
  * @return JSON string
  */
  public String toJson() throws JsonProcessingException {
    return JSON.getMapper().writeValueAsString(this);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy