com.squareup.square.models.PaymentBalanceActivityChargeDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of square Show documentation
Show all versions of square Show documentation
Java client library for the Square API
package com.squareup.square.models;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
/**
* This is a model class for PaymentBalanceActivityChargeDetail type.
*/
public class PaymentBalanceActivityChargeDetail {
private final String paymentId;
/**
* Initialization constructor.
* @param paymentId String value for paymentId.
*/
@JsonCreator
public PaymentBalanceActivityChargeDetail(
@JsonProperty("payment_id") String paymentId) {
this.paymentId = paymentId;
}
/**
* Getter for PaymentId.
* The ID of the payment associated with this activity.
* @return Returns the String
*/
@JsonGetter("payment_id")
@JsonInclude(JsonInclude.Include.NON_NULL)
public String getPaymentId() {
return paymentId;
}
@Override
public int hashCode() {
return Objects.hash(paymentId);
}
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof PaymentBalanceActivityChargeDetail)) {
return false;
}
PaymentBalanceActivityChargeDetail other = (PaymentBalanceActivityChargeDetail) obj;
return Objects.equals(paymentId, other.paymentId);
}
/**
* Converts this PaymentBalanceActivityChargeDetail into string format.
* @return String representation of this class
*/
@Override
public String toString() {
return "PaymentBalanceActivityChargeDetail [" + "paymentId=" + paymentId + "]";
}
/**
* Builds a new {@link PaymentBalanceActivityChargeDetail.Builder} object.
* Creates the instance with the state of the current model.
* @return a new {@link PaymentBalanceActivityChargeDetail.Builder} object
*/
public Builder toBuilder() {
Builder builder = new Builder()
.paymentId(getPaymentId());
return builder;
}
/**
* Class to build instances of {@link PaymentBalanceActivityChargeDetail}.
*/
public static class Builder {
private String paymentId;
/**
* Setter for paymentId.
* @param paymentId String value for paymentId.
* @return Builder
*/
public Builder paymentId(String paymentId) {
this.paymentId = paymentId;
return this;
}
/**
* Builds a new {@link PaymentBalanceActivityChargeDetail} object using the set fields.
* @return {@link PaymentBalanceActivityChargeDetail}
*/
public PaymentBalanceActivityChargeDetail build() {
return new PaymentBalanceActivityChargeDetail(paymentId);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy