-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
false[adyen-sdk-automation] automated change (#1261)
- Loading branch information
1 parent
1b01bcd
commit 8431014
Showing
43 changed files
with
1,173 additions
and
859 deletions.
There are no files selected for viewing
311 changes: 311 additions & 0 deletions
311
src/main/java/com/adyen/model/checkout/DeliveryMethod.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,311 @@ | ||
/* | ||
* Adyen Checkout API | ||
* | ||
* The version of the OpenAPI document: 71 | ||
* | ||
* | ||
* 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.checkout; | ||
|
||
import java.util.Objects; | ||
import java.util.Arrays; | ||
import java.util.Map; | ||
import java.util.HashMap; | ||
import com.adyen.model.checkout.Amount; | ||
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 io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
|
||
|
||
/** | ||
* DeliveryMethod | ||
*/ | ||
@JsonPropertyOrder({ | ||
DeliveryMethod.JSON_PROPERTY_AMOUNT, | ||
DeliveryMethod.JSON_PROPERTY_DESCRIPTION, | ||
DeliveryMethod.JSON_PROPERTY_REFERENCE, | ||
DeliveryMethod.JSON_PROPERTY_SELECTED, | ||
DeliveryMethod.JSON_PROPERTY_TYPE | ||
}) | ||
|
||
public class DeliveryMethod { | ||
public static final String JSON_PROPERTY_AMOUNT = "amount"; | ||
private Amount amount; | ||
|
||
public static final String JSON_PROPERTY_DESCRIPTION = "description"; | ||
private String description; | ||
|
||
public static final String JSON_PROPERTY_REFERENCE = "reference"; | ||
private String reference; | ||
|
||
public static final String JSON_PROPERTY_SELECTED = "selected"; | ||
private Boolean selected; | ||
|
||
/** | ||
* The type of the delivery method. | ||
*/ | ||
public enum TypeEnum { | ||
SHIPPING("Shipping"); | ||
|
||
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; | ||
} | ||
} | ||
throw new IllegalArgumentException("Unexpected value '" + value + "'"); | ||
} | ||
} | ||
|
||
public static final String JSON_PROPERTY_TYPE = "type"; | ||
private TypeEnum type; | ||
|
||
public DeliveryMethod() { | ||
} | ||
|
||
public DeliveryMethod amount(Amount amount) { | ||
this.amount = amount; | ||
return this; | ||
} | ||
|
||
/** | ||
* Get amount | ||
* @return amount | ||
**/ | ||
@ApiModelProperty(value = "") | ||
@JsonProperty(JSON_PROPERTY_AMOUNT) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
|
||
public Amount getAmount() { | ||
return amount; | ||
} | ||
|
||
|
||
/** | ||
* amount | ||
* | ||
* @param amount | ||
*/ | ||
@JsonProperty(JSON_PROPERTY_AMOUNT) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
public void setAmount(Amount amount) { | ||
this.amount = amount; | ||
} | ||
|
||
|
||
public DeliveryMethod description(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
|
||
/** | ||
* The name of the delivery method as shown to the shopper. | ||
* @return description | ||
**/ | ||
@ApiModelProperty(value = "The name of the delivery method as shown to the shopper.") | ||
@JsonProperty(JSON_PROPERTY_DESCRIPTION) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
|
||
/** | ||
* The name of the delivery method as shown to the shopper. | ||
* | ||
* @param description | ||
*/ | ||
@JsonProperty(JSON_PROPERTY_DESCRIPTION) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
|
||
public DeliveryMethod reference(String reference) { | ||
this.reference = reference; | ||
return this; | ||
} | ||
|
||
/** | ||
* The reference of the delivery method. | ||
* @return reference | ||
**/ | ||
@ApiModelProperty(value = "The reference of the delivery method.") | ||
@JsonProperty(JSON_PROPERTY_REFERENCE) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
|
||
public String getReference() { | ||
return reference; | ||
} | ||
|
||
|
||
/** | ||
* The reference of the delivery method. | ||
* | ||
* @param reference | ||
*/ | ||
@JsonProperty(JSON_PROPERTY_REFERENCE) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
public void setReference(String reference) { | ||
this.reference = reference; | ||
} | ||
|
||
|
||
public DeliveryMethod selected(Boolean selected) { | ||
this.selected = selected; | ||
return this; | ||
} | ||
|
||
/** | ||
* If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time. | ||
* @return selected | ||
**/ | ||
@ApiModelProperty(value = "If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time.") | ||
@JsonProperty(JSON_PROPERTY_SELECTED) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
|
||
public Boolean getSelected() { | ||
return selected; | ||
} | ||
|
||
|
||
/** | ||
* If you display the PayPal lightbox with delivery methods, set to **true** for the delivery method that is selected. Only one delivery method can be selected at a time. | ||
* | ||
* @param selected | ||
*/ | ||
@JsonProperty(JSON_PROPERTY_SELECTED) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
public void setSelected(Boolean selected) { | ||
this.selected = selected; | ||
} | ||
|
||
|
||
public DeliveryMethod type(TypeEnum type) { | ||
this.type = type; | ||
return this; | ||
} | ||
|
||
/** | ||
* The type of the delivery method. | ||
* @return type | ||
**/ | ||
@ApiModelProperty(value = "The type of the delivery method.") | ||
@JsonProperty(JSON_PROPERTY_TYPE) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
|
||
public TypeEnum getType() { | ||
return type; | ||
} | ||
|
||
|
||
/** | ||
* The type of the delivery method. | ||
* | ||
* @param type | ||
*/ | ||
@JsonProperty(JSON_PROPERTY_TYPE) | ||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) | ||
public void setType(TypeEnum type) { | ||
this.type = type; | ||
} | ||
|
||
|
||
/** | ||
* Return true if this DeliveryMethod object is equal to o. | ||
*/ | ||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
DeliveryMethod deliveryMethod = (DeliveryMethod) o; | ||
return Objects.equals(this.amount, deliveryMethod.amount) && | ||
Objects.equals(this.description, deliveryMethod.description) && | ||
Objects.equals(this.reference, deliveryMethod.reference) && | ||
Objects.equals(this.selected, deliveryMethod.selected) && | ||
Objects.equals(this.type, deliveryMethod.type); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(amount, description, reference, selected, type); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class DeliveryMethod {\n"); | ||
sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); | ||
sb.append(" description: ").append(toIndentedString(description)).append("\n"); | ||
sb.append(" reference: ").append(toIndentedString(reference)).append("\n"); | ||
sb.append(" selected: ").append(toIndentedString(selected)).append("\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 "); | ||
} | ||
|
||
/** | ||
* Create an instance of DeliveryMethod given an JSON string | ||
* | ||
* @param jsonString JSON string | ||
* @return An instance of DeliveryMethod | ||
* @throws JsonProcessingException if the JSON string is invalid with respect to DeliveryMethod | ||
*/ | ||
public static DeliveryMethod fromJson(String jsonString) throws JsonProcessingException { | ||
return JSON.getMapper().readValue(jsonString, DeliveryMethod.class); | ||
} | ||
/** | ||
* Convert an instance of DeliveryMethod to an JSON string | ||
* | ||
* @return JSON string | ||
*/ | ||
public String toJson() throws JsonProcessingException { | ||
return JSON.getMapper().writeValueAsString(this); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.