net.accelbyte.sdk.api.platform.models.PaymentProviderConfigInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of module-platform Show documentation
Show all versions of module-platform Show documentation
AccelByte Gaming Services Java Extend SDK generated from OpenAPI specs
/*
* Copyright (c) 2024 AccelByte Inc. All Rights Reserved
* This is licensed software from AccelByte Inc, for limitations
* and restrictions contact your company contract manager.
*
* Code generated. DO NOT EDIT.
*/
package net.accelbyte.sdk.api.platform.models;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.*;
import lombok.*;
import net.accelbyte.sdk.core.Model;
@JsonIgnoreProperties(ignoreUnknown = true)
@Builder
@Getter
@Setter
// @deprecated 2022-08-29 - All args constructor may cause problems. Use builder instead.
@AllArgsConstructor(onConstructor = @__(@Deprecated))
@NoArgsConstructor
public class PaymentProviderConfigInfo extends Model {
@JsonProperty("aggregate")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String aggregate;
@JsonProperty("id")
private String id;
@JsonProperty("namespace")
private String namespace;
@JsonProperty("paymentMerchantConfigId")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String paymentMerchantConfigId;
@JsonProperty("region")
private String region;
@JsonProperty("sandboxTaxJarApiToken")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String sandboxTaxJarApiToken;
@JsonProperty("specials")
@JsonInclude(JsonInclude.Include.NON_NULL)
private List specials;
@JsonProperty("taxJarApiToken")
@JsonInclude(JsonInclude.Include.NON_NULL)
private String taxJarApiToken;
@JsonProperty("taxJarEnabled")
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean taxJarEnabled;
@JsonProperty("useGlobalTaxJarApiToken")
@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean useGlobalTaxJarApiToken;
@JsonIgnore
public String getAggregate() {
return this.aggregate;
}
@JsonIgnore
public Aggregate getAggregateAsEnum() {
return Aggregate.valueOf(this.aggregate);
}
@JsonIgnore
public void setAggregate(final String aggregate) {
this.aggregate = aggregate;
}
@JsonIgnore
public void setAggregateFromEnum(final Aggregate aggregate) {
this.aggregate = aggregate.toString();
}
@JsonIgnore
public List getSpecials() {
return this.specials;
}
@JsonIgnore
public List getSpecialsAsEnum() {
ArrayList en = new ArrayList();
for (String e : this.specials) en.add(Specials.valueOf(e));
return en;
}
@JsonIgnore
public void setSpecials(final List specials) {
this.specials = specials;
}
@JsonIgnore
public void setSpecialsFromEnum(final List specials) {
ArrayList en = new ArrayList();
for (Specials e : specials) en.add(e.toString());
this.specials = en;
}
@JsonIgnore
public PaymentProviderConfigInfo createFromJson(String json) throws JsonProcessingException {
return new ObjectMapper().readValue(json, this.getClass());
}
@JsonIgnore
public List createFromJsonList(String json)
throws JsonProcessingException {
return new ObjectMapper()
.readValue(json, new TypeReference>() {});
}
public enum Aggregate {
ADYEN("ADYEN"),
CHECKOUT("CHECKOUT"),
NEONPAY("NEONPAY"),
STRIPE("STRIPE"),
XSOLLA("XSOLLA");
private String value;
Aggregate(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
}
public enum Specials {
ADYEN("ADYEN"),
ALIPAY("ALIPAY"),
CHECKOUT("CHECKOUT"),
NEONPAY("NEONPAY"),
PAYPAL("PAYPAL"),
STRIPE("STRIPE"),
WALLET("WALLET"),
WXPAY("WXPAY"),
XSOLLA("XSOLLA");
private String value;
Specials(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
}
public static class PaymentProviderConfigInfoBuilder {
private String aggregate;
private List specials;
public PaymentProviderConfigInfoBuilder aggregate(final String aggregate) {
this.aggregate = aggregate;
return this;
}
public PaymentProviderConfigInfoBuilder aggregateFromEnum(final Aggregate aggregate) {
this.aggregate = aggregate.toString();
return this;
}
public PaymentProviderConfigInfoBuilder specials(final List specials) {
this.specials = specials;
return this;
}
public PaymentProviderConfigInfoBuilder specialsFromEnum(final List specials) {
ArrayList en = new ArrayList();
for (Specials e : specials) en.add(e.toString());
this.specials = en;
return this;
}
}
}