com.textmagic.sdk.model.UserStatement Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of textmagic-java-sdk Show documentation
Show all versions of textmagic-java-sdk Show documentation
Java wrapper library for Textmagic services
/*
* TextMagic API
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 2
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.textmagic.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.threeten.bp.OffsetDateTime;
/**
* UserStatement
*/
public class UserStatement {
@SerializedName("id")
private Integer id = null;
@SerializedName("userId")
private Integer userId = null;
@SerializedName("date")
private OffsetDateTime date = null;
@SerializedName("balance")
private Double balance = null;
@SerializedName("delta")
private Float delta = null;
@SerializedName("type")
private String type = null;
@SerializedName("value")
private String value = null;
@SerializedName("comment")
private String comment = null;
public UserStatement id(Integer id) {
this.id = id;
return this;
}
/**
* User statement ID.
* @return id
**/
@ApiModelProperty(example = "305", required = true, value = "User statement ID.")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public UserStatement userId(Integer userId) {
this.userId = userId;
return this;
}
/**
* User ID.
* @return userId
**/
@ApiModelProperty(example = "4627", required = true, value = "User ID.")
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public UserStatement date(OffsetDateTime date) {
this.date = date;
return this;
}
/**
* User statement date.
* @return date
**/
@ApiModelProperty(example = "2014-09-19T00:00:00+0000", required = true, value = "User statement date.")
public OffsetDateTime getDate() {
return date;
}
public void setDate(OffsetDateTime date) {
this.date = date;
}
public UserStatement balance(Double balance) {
this.balance = balance;
return this;
}
/**
* Get balance
* @return balance
**/
@ApiModelProperty(example = "101.05", required = true, value = "")
public Double getBalance() {
return balance;
}
public void setBalance(Double balance) {
this.balance = balance;
}
public UserStatement delta(Float delta) {
this.delta = delta;
return this;
}
/**
* Balance change amount.
* @return delta
**/
@ApiModelProperty(example = "-0.15", required = true, value = "Balance change amount.")
public Float getDelta() {
return delta;
}
public void setDelta(Float delta) {
this.delta = delta;
}
public UserStatement type(String type) {
this.type = type;
return this;
}
/**
* Type of statement (what you have been charged for): * **sms** - for sending SMS * **number** - for renewing a dedicated number; * **schedule** - for scheduling text messages; * **topup** - for adding credits to your account.
* @return type
**/
@ApiModelProperty(example = "sms", required = true, value = "Type of statement (what you have been charged for): * **sms** - for sending SMS * **number** - for renewing a dedicated number; * **schedule** - for scheduling text messages; * **topup** - for adding credits to your account. ")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public UserStatement value(String value) {
this.value = value;
return this;
}
/**
* Value differs by **type**: * for **sms**, it is the sent messages amount; * for **number**, it is a dedicated phone number; * for **schedule**, it is a scheduled messages amount; * for **top-up**, it is an invoice ID.
* @return value
**/
@ApiModelProperty(example = "350", required = true, value = "Value differs by **type**: * for **sms**, it is the sent messages amount; * for **number**, it is a dedicated phone number; * for **schedule**, it is a scheduled messages amount; * for **top-up**, it is an invoice ID. ")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public UserStatement comment(String comment) {
this.comment = comment;
return this;
}
/**
* Optional comment.
* @return comment
**/
@ApiModelProperty(example = "This is a test comment", required = true, value = "Optional comment.")
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserStatement userStatement = (UserStatement) o;
return Objects.equals(this.id, userStatement.id) &&
Objects.equals(this.userId, userStatement.userId) &&
Objects.equals(this.date, userStatement.date) &&
Objects.equals(this.balance, userStatement.balance) &&
Objects.equals(this.delta, userStatement.delta) &&
Objects.equals(this.type, userStatement.type) &&
Objects.equals(this.value, userStatement.value) &&
Objects.equals(this.comment, userStatement.comment);
}
@Override
public int hashCode() {
return Objects.hash(id, userId, date, balance, delta, type, value, comment);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserStatement {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
sb.append(" delta: ").append(toIndentedString(delta)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).append("\n");
sb.append(" comment: ").append(toIndentedString(comment)).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 ");
}
}