package payp.mard2p.api.v0.models; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.lang.Double; import java.lang.Integer; import java.lang.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; /** * Generated by API Builder - https://www.apibuilder.io * Service version: 0.0.2-dev * User agent: apibuilder app.apibuilder.io/mard/mard2p-api/0.0.2-dev/android_client * * WARNING: not all features (notably unions) and data types work with android generator yet. * Android generator is designed to be used in an android application, but should work in any java codebase as long as you import jackson and retrofit2 libraries. * If you are considering using this library, would like to request/discuss features, or would like to share how you're using it, please contact android-feedback@gilt.com * */ @JsonIgnoreProperties( ignoreUnknown = true ) public class PaymentForm { private final Long payid; private final String actorid; private final Double amount; private final Long refAccountid; private final String paymentMethod; private final String operatorid; private final Long phone; private final Integer pin; private final String currency; private final String paymentContext; @JsonCreator public PaymentForm(@JsonProperty("payid") Long payid, @JsonProperty("actorid") String actorid, @JsonProperty("amount") Double amount, @JsonProperty("ref_accountid") Long refAccountid, @JsonProperty("payment_method") String paymentMethod, @JsonProperty("operatorid") String operatorid, @JsonProperty("phone") Long phone, @JsonProperty("pin") Integer pin, @JsonProperty("currency") String currency, @JsonProperty("payment_context") String paymentContext) { this.payid = payid; this.actorid = actorid; this.amount = amount; this.refAccountid = refAccountid; this.paymentMethod = paymentMethod; this.operatorid = operatorid; this.phone = phone; this.pin = pin; this.currency = currency; this.paymentContext = paymentContext; } /** * Internal unique identifier for this payment. */ public Long getPayid() { return payid; } /** * The username registered in the application */ public String getActorid() { return actorid; } /** * The amount to send. This field allowed the processing transactions. */ public Double getAmount() { return amount; } /** * The accountid to use to send money to the specific account. */ public Long getRefAccountid() { return refAccountid; } /** * The type of payment to use [Mobile Money or Credit Card]. */ public String getPaymentMethod() { return paymentMethod; } /** * The operator specified the type of payment if Mobile Money. */ public String getOperatorid() { return operatorid; } /** * The phone identifying specific account of consumer. */ public Long getPhone() { return phone; } /** * The code used to validate the transaction. */ public Integer getPin() { return pin; } /** * The phone identifying specific account of consumer. */ public String getCurrency() { return currency; } /** * This field specify the type of transaction [Buying, Deposit, Withdraw]. */ public String getPaymentContext() { return paymentContext; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PaymentForm that = (PaymentForm) o; if (payid != null ? !payid.equals(that.payid) : that.payid != null) return false; if (actorid != null ? !actorid.equals(that.actorid) : that.actorid != null) return false; if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false; if (refAccountid != null ? !refAccountid.equals(that.refAccountid) : that.refAccountid != null) return false; if (paymentMethod != null ? !paymentMethod.equals(that.paymentMethod) : that.paymentMethod != null) return false; if (operatorid != null ? !operatorid.equals(that.operatorid) : that.operatorid != null) return false; if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false; if (pin != null ? !pin.equals(that.pin) : that.pin != null) return false; if (currency != null ? !currency.equals(that.currency) : that.currency != null) return false; if (paymentContext != null ? !paymentContext.equals(that.paymentContext) : that.paymentContext != null) return false; return true; } @Override public int hashCode() { int result = 0; result = 31 * result + (payid != null ? payid.hashCode() : 0); result = 31 * result + (actorid != null ? actorid.hashCode() : 0); result = 31 * result + (amount != null ? amount.hashCode() : 0); result = 31 * result + (refAccountid != null ? refAccountid.hashCode() : 0); result = 31 * result + (paymentMethod != null ? paymentMethod.hashCode() : 0); result = 31 * result + (operatorid != null ? operatorid.hashCode() : 0); result = 31 * result + (phone != null ? phone.hashCode() : 0); result = 31 * result + (pin != null ? pin.hashCode() : 0); result = 31 * result + (currency != null ? currency.hashCode() : 0); result = 31 * result + (paymentContext != null ? paymentContext.hashCode() : 0); return result; } public String toJsonString() throws JsonProcessingException { return payp.mard2p.api.v0.android.ApiBuilderObjectMapper.getInstance().writeValueAsString(this); } public static PaymentForm parseJson(String json) throws IOException { return payp.mard2p.api.v0.android.ApiBuilderObjectMapper.getInstance().readValue( json, PaymentForm.class); } }