Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
219 changes: 219 additions & 0 deletions src/main/java/com/adyen/model/management/ForceRebootDetails.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
/*
* Management API
*
* The version of the OpenAPI document: 3
*
*
* 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.management;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.core.JsonProcessingException;
import java.util.*;
import java.util.Arrays;
import java.util.logging.Logger;

/** ForceRebootDetails */
@JsonPropertyOrder({ForceRebootDetails.JSON_PROPERTY_TYPE})
public class ForceRebootDetails {
/** Type of terminal action: Force Reboot. */
public enum TypeEnum {
FORCEREBOOT(String.valueOf("ForceReboot"));

private static final Logger LOG = Logger.getLogger(TypeEnum.class.getName());

private String value;

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

@JsonValue
public String getValue() {
return value;
}

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

@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
// handling unexpected value
LOG.warning(
"TypeEnum: unexpected enum value '"
+ value
+ "' - Supported values are "
+ Arrays.toString(TypeEnum.values()));
return null;
}
}

public static final String JSON_PROPERTY_TYPE = "type";
private TypeEnum type;

/** Mark when the attribute has been explicitly set. */
private boolean isSetType = false;

/**
* Sets whether attributes with null values should be explicitly included in the JSON payload.
* Default is false.
*/
@JsonIgnore private boolean includeNullValues = false;

public ForceRebootDetails() {}

/**
* Type of terminal action: Force Reboot.
*
* @param type Type of terminal action: Force Reboot.
* @return the current {@code ForceRebootDetails} instance, allowing for method chaining
*/
public ForceRebootDetails type(TypeEnum type) {
this.type = type;
isSetType = true; // mark as set
return this;
}

/**
* Type of terminal action: Force Reboot.
*
* @return type Type of terminal action: Force Reboot.
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TypeEnum getType() {
return type;
}

/**
* Type of terminal action: Force Reboot.
*
* @param type Type of terminal action: Force Reboot.
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(TypeEnum type) {
this.type = type;
isSetType = true; // mark as set
}

/**
* Configures whether null values are explicitly serialized in the JSON payload. Default is false.
*/
public ForceRebootDetails includeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
return this;
}

/** Returns whether null values are explicitly serialized in the JSON payload. */
public boolean isIncludeNullValues() {
return includeNullValues;
}

/**
* Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
*/
public void setIncludeNullValues(boolean includeNullValues) {
this.includeNullValues = includeNullValues;
}

/** Return true if this ForceRebootDetails object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ForceRebootDetails forceRebootDetails = (ForceRebootDetails) o;
return Objects.equals(this.type, forceRebootDetails.type)
&& Objects.equals(this.isSetType, forceRebootDetails.isSetType);
}

@Override
public int hashCode() {
return Objects.hash(type, isSetType);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ForceRebootDetails {\n");
sb.append(" type: ").append(toIndentedString(type)).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 ");
}

/** Returns a map of properties to be merged into the JSON payload as explicit null values. */
@JsonInclude(JsonInclude.Include.ALWAYS)
@JsonAnyGetter
public Map<String, Object> getExplicitNulls() {
if (!this.includeNullValues) {
return Collections.emptyMap();
}

Map<String, Object> nulls = new HashMap<>();

if (isSetType) {
addIfNull(nulls, JSON_PROPERTY_TYPE, this.type);
}

return nulls;
}

// add to map when value is null
private void addIfNull(Map<String, Object> map, String key, Object value) {
if (value == null) {
map.put(key, null);
}
}

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

/**
* Convert an instance of ForceRebootDetails to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
56 changes: 2 additions & 54 deletions src/main/java/com/adyen/model/management/Moto.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,14 @@
import java.util.*;

/** Moto */
@JsonPropertyOrder({
Moto.JSON_PROPERTY_ENABLE_MOTO,
Moto.JSON_PROPERTY_ENABLE_REFUNDS,
Moto.JSON_PROPERTY_MAX_AMOUNT
})
@JsonPropertyOrder({Moto.JSON_PROPERTY_ENABLE_MOTO, Moto.JSON_PROPERTY_MAX_AMOUNT})
public class Moto {
public static final String JSON_PROPERTY_ENABLE_MOTO = "enableMoto";
private Boolean enableMoto;

/** Mark when the attribute has been explicitly set. */
private boolean isSetEnableMoto = false;

public static final String JSON_PROPERTY_ENABLE_REFUNDS = "enableRefunds";
private Boolean enableRefunds;

/** Mark when the attribute has been explicitly set. */
private boolean isSetEnableRefunds = false;

public static final String JSON_PROPERTY_MAX_AMOUNT = "maxAmount";
private Integer maxAmount;

Expand Down Expand Up @@ -87,41 +77,6 @@ public void setEnableMoto(Boolean enableMoto) {
isSetEnableMoto = true; // mark as set
}

/**
* Enable MOTO refunds.
*
* @param enableRefunds Enable MOTO refunds.
* @return the current {@code Moto} instance, allowing for method chaining
*/
public Moto enableRefunds(Boolean enableRefunds) {
this.enableRefunds = enableRefunds;
isSetEnableRefunds = true; // mark as set
return this;
}

/**
* Enable MOTO refunds.
*
* @return enableRefunds Enable MOTO refunds.
*/
@JsonProperty(JSON_PROPERTY_ENABLE_REFUNDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEnableRefunds() {
return enableRefunds;
}

/**
* Enable MOTO refunds.
*
* @param enableRefunds Enable MOTO refunds.
*/
@JsonProperty(JSON_PROPERTY_ENABLE_REFUNDS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnableRefunds(Boolean enableRefunds) {
this.enableRefunds = enableRefunds;
isSetEnableRefunds = true; // mark as set
}

/**
* The maximum amount for MOTO transactions. You need to set the currency for this amount using
* the
Expand Down Expand Up @@ -207,24 +162,20 @@ public boolean equals(Object o) {
Moto moto = (Moto) o;
return Objects.equals(this.enableMoto, moto.enableMoto)
&& Objects.equals(this.isSetEnableMoto, moto.isSetEnableMoto)
&& Objects.equals(this.enableRefunds, moto.enableRefunds)
&& Objects.equals(this.isSetEnableRefunds, moto.isSetEnableRefunds)
&& Objects.equals(this.maxAmount, moto.maxAmount)
&& Objects.equals(this.isSetMaxAmount, moto.isSetMaxAmount);
}

@Override
public int hashCode() {
return Objects.hash(
enableMoto, isSetEnableMoto, enableRefunds, isSetEnableRefunds, maxAmount, isSetMaxAmount);
return Objects.hash(enableMoto, isSetEnableMoto, maxAmount, isSetMaxAmount);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Moto {\n");
sb.append(" enableMoto: ").append(toIndentedString(enableMoto)).append("\n");
sb.append(" enableRefunds: ").append(toIndentedString(enableRefunds)).append("\n");
sb.append(" maxAmount: ").append(toIndentedString(maxAmount)).append("\n");
sb.append("}");
return sb.toString();
Expand Down Expand Up @@ -253,9 +204,6 @@ public Map<String, Object> getExplicitNulls() {
if (isSetEnableMoto) {
addIfNull(nulls, JSON_PROPERTY_ENABLE_MOTO, this.enableMoto);
}
if (isSetEnableRefunds) {
addIfNull(nulls, JSON_PROPERTY_ENABLE_REFUNDS, this.enableRefunds);
}
if (isSetMaxAmount) {
addIfNull(nulls, JSON_PROPERTY_MAX_AMOUNT, this.maxAmount);
}
Expand Down
36 changes: 24 additions & 12 deletions src/main/java/com/adyen/model/management/Payment.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ public class Payment {
public Payment() {}

/**
* The default currency for contactless payments on the payment terminal, as the three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
* The default currency for contactless payments on the payment terminal, in three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you
* update this setting for the first time. To enable you to change the contactless currency, we
* first need to check if you meet the compliance requirements.
*
* @param contactlessCurrency The default currency for contactless payments on the payment
* terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency
* code.
* terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
* format. Contact Adyen before you update this setting for the first time. To enable you to
* change the contactless currency, we first need to check if you meet the compliance
* requirements.
* @return the current {@code Payment} instance, allowing for method chaining
*/
public Payment contactlessCurrency(String contactlessCurrency) {
Expand All @@ -64,12 +68,16 @@ public Payment contactlessCurrency(String contactlessCurrency) {
}

/**
* The default currency for contactless payments on the payment terminal, as the three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
* The default currency for contactless payments on the payment terminal, in three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you
* update this setting for the first time. To enable you to change the contactless currency, we
* first need to check if you meet the compliance requirements.
*
* @return contactlessCurrency The default currency for contactless payments on the payment
* terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency
* code.
* terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
* format. Contact Adyen before you update this setting for the first time. To enable you to
* change the contactless currency, we first need to check if you meet the compliance
* requirements.
*/
@JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand All @@ -78,12 +86,16 @@ public String getContactlessCurrency() {
}

/**
* The default currency for contactless payments on the payment terminal, as the three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
* The default currency for contactless payments on the payment terminal, in three-letter [ISO
* 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code format. Contact Adyen before you
* update this setting for the first time. To enable you to change the contactless currency, we
* first need to check if you meet the compliance requirements.
*
* @param contactlessCurrency The default currency for contactless payments on the payment
* terminal, as the three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency
* code.
* terminal, in three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code
* format. Contact Adyen before you update this setting for the first time. To enable you to
* change the contactless currency, we first need to check if you meet the compliance
* requirements.
*/
@JsonProperty(JSON_PROPERTY_CONTACTLESS_CURRENCY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ public enum TypesWithErrorsEnum {

BLIK(String.valueOf("blik")),

BLIK_POS(String.valueOf("blik_pos")),

BR_SCHEMES(String.valueOf("br_schemes")),

CARTEBANCAIRE(String.valueOf("cartebancaire")),
Expand Down
Loading