
com.stripe.model.OrderReturn Maven / Gradle / Ivy
// Generated by delombok at Wed Oct 31 12:31:58 PDT 2018
package com.stripe.model;
import com.stripe.exception.StripeException;
import com.stripe.net.ApiResource;
import com.stripe.net.RequestOptions;
import java.util.List;
import java.util.Map;
public class OrderReturn extends ApiResource implements HasId {
String id;
String object;
Long amount;
Long created;
String currency;
List items;
Boolean livemode;
ExpandableField order;
ExpandableField refund;
//
public String getOrder() {
return (this.order != null) ? this.order.getId() : null;
}
public void setOrder(String orderId) {
this.order = setExpandableFieldId(orderId, this.order);
}
public Order getOrderObject() {
return (this.order != null) ? this.order.getExpanded() : null;
}
public void setOrderObject(Order order) {
this.order = new ExpandableField(order.getId(), order);
}
//
//
public String getRefund() {
return (this.refund != null) ? this.refund.getId() : null;
}
public void setRefund(String refundId) {
this.refund = setExpandableFieldId(refundId, this.refund);
}
public Refund getRefundObject() {
return (this.refund != null) ? this.refund.getExpanded() : null;
}
public void setRefundObject(Refund refund) {
this.refund = new ExpandableField(refund.getId(), refund);
}
//
//
/**
* List all order returns.
*/
public static OrderReturnCollection list(Map params) throws StripeException {
return list(params, null);
}
/**
* List all order returns.
*/
public static OrderReturnCollection list(Map params, RequestOptions options) throws StripeException {
return requestCollection(classUrl(OrderReturn.class), params, OrderReturnCollection.class, options);
}
//
//
/**
* Retrieve an order return.
*/
public static OrderReturn retrieve(String id) throws StripeException {
return retrieve(id, null);
}
/**
* Retrieve an order return.
*/
public static OrderReturn retrieve(String id, RequestOptions options) throws StripeException {
return retrieve(id, null, options);
}
/**
* Retrieve an order return.
*/
public static OrderReturn retrieve(String id, Map params, RequestOptions options) throws StripeException {
return request(RequestMethod.GET, instanceUrl(OrderReturn.class, id), params, OrderReturn.class, options);
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getObject() {
return this.object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getAmount() {
return this.amount;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Long getCreated() {
return this.created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getCurrency() {
return this.currency;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public List getItems() {
return this.items;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Boolean getLivemode() {
return this.livemode;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setId(final String id) {
this.id = id;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setObject(final String object) {
this.object = object;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setAmount(final Long amount) {
this.amount = amount;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCreated(final Long created) {
this.created = created;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setCurrency(final String currency) {
this.currency = currency;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setItems(final List items) {
this.items = items;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
public void setLivemode(final Boolean livemode) {
this.livemode = livemode;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof OrderReturn)) return false;
final OrderReturn other = (OrderReturn) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$id = this.getId();
final java.lang.Object other$id = other.getId();
if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
final java.lang.Object this$object = this.getObject();
final java.lang.Object other$object = other.getObject();
if (this$object == null ? other$object != null : !this$object.equals(other$object)) return false;
final java.lang.Object this$amount = this.getAmount();
final java.lang.Object other$amount = other.getAmount();
if (this$amount == null ? other$amount != null : !this$amount.equals(other$amount)) return false;
final java.lang.Object this$created = this.getCreated();
final java.lang.Object other$created = other.getCreated();
if (this$created == null ? other$created != null : !this$created.equals(other$created)) return false;
final java.lang.Object this$currency = this.getCurrency();
final java.lang.Object other$currency = other.getCurrency();
if (this$currency == null ? other$currency != null : !this$currency.equals(other$currency)) return false;
final java.lang.Object this$items = this.getItems();
final java.lang.Object other$items = other.getItems();
if (this$items == null ? other$items != null : !this$items.equals(other$items)) return false;
final java.lang.Object this$livemode = this.getLivemode();
final java.lang.Object other$livemode = other.getLivemode();
if (this$livemode == null ? other$livemode != null : !this$livemode.equals(other$livemode)) return false;
final java.lang.Object this$order = this.getOrder();
final java.lang.Object other$order = other.getOrder();
if (this$order == null ? other$order != null : !this$order.equals(other$order)) return false;
final java.lang.Object this$refund = this.getRefund();
final java.lang.Object other$refund = other.getRefund();
if (this$refund == null ? other$refund != null : !this$refund.equals(other$refund)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
protected boolean canEqual(final java.lang.Object other) {
return other instanceof OrderReturn;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $id = this.getId();
result = result * PRIME + ($id == null ? 43 : $id.hashCode());
final java.lang.Object $object = this.getObject();
result = result * PRIME + ($object == null ? 43 : $object.hashCode());
final java.lang.Object $amount = this.getAmount();
result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
final java.lang.Object $created = this.getCreated();
result = result * PRIME + ($created == null ? 43 : $created.hashCode());
final java.lang.Object $currency = this.getCurrency();
result = result * PRIME + ($currency == null ? 43 : $currency.hashCode());
final java.lang.Object $items = this.getItems();
result = result * PRIME + ($items == null ? 43 : $items.hashCode());
final java.lang.Object $livemode = this.getLivemode();
result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
final java.lang.Object $order = this.getOrder();
result = result * PRIME + ($order == null ? 43 : $order.hashCode());
final java.lang.Object $refund = this.getRefund();
result = result * PRIME + ($refund == null ? 43 : $refund.hashCode());
return result;
}
@Override
@java.lang.SuppressWarnings("all")
@lombok.Generated
public String getId() {
return this.id;
}
//
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy