com.wallee.sdk.model.TokenCreate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wallee-java-sdk Show documentation
Show all versions of wallee-java-sdk Show documentation
The SDK for simplifying the integration with wallee API.
/**
* wallee SDK
*
* This library allows to interact with the wallee payment service.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.wallee.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.wallee.sdk.model.AbstractTokenUpdate;
import com.wallee.sdk.model.CreationEntityState;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.*;
import java.time.OffsetDateTime;
/**
*
*/
@ApiModel(description = "")
public class TokenCreate extends AbstractTokenUpdate {
@JsonProperty("externalId")
protected String externalId = null;
@JsonProperty("state")
protected CreationEntityState state = null;
public TokenCreate externalId(String externalId) {
this.externalId = externalId;
return this;
}
/**
* A client generated nonce which identifies the entity to be created. Subsequent creation requests with the same external ID will not create new entities but return the initially created entity instead.
* @return externalId
**/
@ApiModelProperty(required = true, value = "A client generated nonce which identifies the entity to be created. Subsequent creation requests with the same external ID will not create new entities but return the initially created entity instead.")
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public TokenCreate state(CreationEntityState state) {
this.state = state;
return this;
}
/**
* The object's current state.
* @return state
**/
@ApiModelProperty(value = "The object's current state.")
public CreationEntityState getState() {
return state;
}
public void setState(CreationEntityState state) {
this.state = state;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TokenCreate tokenCreate = (TokenCreate) o;
return Objects.equals(this.customerEmailAddress, tokenCreate.customerEmailAddress) &&
Objects.equals(this.customerId, tokenCreate.customerId) &&
Objects.equals(this.enabledForOneClickPayment, tokenCreate.enabledForOneClickPayment) &&
Objects.equals(this.language, tokenCreate.language) &&
Objects.equals(this.timeZone, tokenCreate.timeZone) &&
Objects.equals(this.tokenReference, tokenCreate.tokenReference) &&
Objects.equals(this.externalId, tokenCreate.externalId) &&
Objects.equals(this.state, tokenCreate.state) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(customerEmailAddress, customerId, enabledForOneClickPayment, language, timeZone, tokenReference, externalId, state, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TokenCreate {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" customerEmailAddress: ").append(toIndentedString(customerEmailAddress)).append("\n");
sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n");
sb.append(" enabledForOneClickPayment: ").append(toIndentedString(enabledForOneClickPayment)).append("\n");
sb.append(" language: ").append(toIndentedString(language)).append("\n");
sb.append(" timeZone: ").append(toIndentedString(timeZone)).append("\n");
sb.append(" tokenReference: ").append(toIndentedString(tokenReference)).append("\n");
sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).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 ");
}
}