All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.stripe.model.Balance Maven / Gradle / Ivy

// Generated by delombok at Thu Nov 08 14:01:03 PST 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 Balance extends ApiResource {
  String object;
  List available;
  Boolean livemode;
  List pending;

  // 
  /**
   * Retrieve balance.
   */
  public static Balance retrieve() throws StripeException {
    return retrieve((RequestOptions) null);
  }

  /**
   * Retrieve balance.
   */
  public static Balance retrieve(RequestOptions options) throws StripeException {
    return retrieve(null, options);
  }

  /**
   * Retrieve balance.
   */
  public static Balance retrieve(Map params, RequestOptions options) throws StripeException {
    return request(RequestMethod.GET, singleClassUrl(Balance.class), params, Balance.class, options);
  }

  // 
  public static class Money extends StripeObject {
    Long amount;
    String currency;
    SourceTypes sourceTypes;


    public static class SourceTypes extends StripeObject {
      Long alipayAccount;
      Long bankAccount;
      Long bitcoinReceiver;
      Long card;

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public Long getAlipayAccount() {
        return this.alipayAccount;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public Long getBankAccount() {
        return this.bankAccount;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public Long getBitcoinReceiver() {
        return this.bitcoinReceiver;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public Long getCard() {
        return this.card;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public void setAlipayAccount(final Long alipayAccount) {
        this.alipayAccount = alipayAccount;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public void setBankAccount(final Long bankAccount) {
        this.bankAccount = bankAccount;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public void setBitcoinReceiver(final Long bitcoinReceiver) {
        this.bitcoinReceiver = bitcoinReceiver;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public void setCard(final Long card) {
        this.card = card;
      }

      @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 Balance.Money.SourceTypes)) return false;
        final Balance.Money.SourceTypes other = (Balance.Money.SourceTypes) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$alipayAccount = this.getAlipayAccount();
        final java.lang.Object other$alipayAccount = other.getAlipayAccount();
        if (this$alipayAccount == null ? other$alipayAccount != null : !this$alipayAccount.equals(other$alipayAccount)) return false;
        final java.lang.Object this$bankAccount = this.getBankAccount();
        final java.lang.Object other$bankAccount = other.getBankAccount();
        if (this$bankAccount == null ? other$bankAccount != null : !this$bankAccount.equals(other$bankAccount)) return false;
        final java.lang.Object this$bitcoinReceiver = this.getBitcoinReceiver();
        final java.lang.Object other$bitcoinReceiver = other.getBitcoinReceiver();
        if (this$bitcoinReceiver == null ? other$bitcoinReceiver != null : !this$bitcoinReceiver.equals(other$bitcoinReceiver)) return false;
        final java.lang.Object this$card = this.getCard();
        final java.lang.Object other$card = other.getCard();
        if (this$card == null ? other$card != null : !this$card.equals(other$card)) return false;
        return true;
      }

      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      protected boolean canEqual(final java.lang.Object other) {
        return other instanceof Balance.Money.SourceTypes;
      }

      @java.lang.Override
      @java.lang.SuppressWarnings("all")
      @lombok.Generated
      public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $alipayAccount = this.getAlipayAccount();
        result = result * PRIME + ($alipayAccount == null ? 43 : $alipayAccount.hashCode());
        final java.lang.Object $bankAccount = this.getBankAccount();
        result = result * PRIME + ($bankAccount == null ? 43 : $bankAccount.hashCode());
        final java.lang.Object $bitcoinReceiver = this.getBitcoinReceiver();
        result = result * PRIME + ($bitcoinReceiver == null ? 43 : $bitcoinReceiver.hashCode());
        final java.lang.Object $card = this.getCard();
        result = result * PRIME + ($card == null ? 43 : $card.hashCode());
        return result;
      }
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Long getAmount() {
      return this.amount;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getCurrency() {
      return this.currency;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public SourceTypes getSourceTypes() {
      return this.sourceTypes;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setAmount(final Long amount) {
      this.amount = amount;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setCurrency(final String currency) {
      this.currency = currency;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setSourceTypes(final SourceTypes sourceTypes) {
      this.sourceTypes = sourceTypes;
    }

    @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 Balance.Money)) return false;
      final Balance.Money other = (Balance.Money) o;
      if (!other.canEqual((java.lang.Object) this)) 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$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$sourceTypes = this.getSourceTypes();
      final java.lang.Object other$sourceTypes = other.getSourceTypes();
      if (this$sourceTypes == null ? other$sourceTypes != null : !this$sourceTypes.equals(other$sourceTypes)) return false;
      return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
      return other instanceof Balance.Money;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
      final int PRIME = 59;
      int result = 1;
      final java.lang.Object $amount = this.getAmount();
      result = result * PRIME + ($amount == null ? 43 : $amount.hashCode());
      final java.lang.Object $currency = this.getCurrency();
      result = result * PRIME + ($currency == null ? 43 : $currency.hashCode());
      final java.lang.Object $sourceTypes = this.getSourceTypes();
      result = result * PRIME + ($sourceTypes == null ? 43 : $sourceTypes.hashCode());
      return result;
    }
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public String getObject() {
    return this.object;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public List getAvailable() {
    return this.available;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public Boolean getLivemode() {
    return this.livemode;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public List getPending() {
    return this.pending;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setObject(final String object) {
    this.object = object;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setAvailable(final List available) {
    this.available = available;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setLivemode(final Boolean livemode) {
    this.livemode = livemode;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public void setPending(final List pending) {
    this.pending = pending;
  }

  @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 Balance)) return false;
    final Balance other = (Balance) o;
    if (!other.canEqual((java.lang.Object) this)) 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$available = this.getAvailable();
    final java.lang.Object other$available = other.getAvailable();
    if (this$available == null ? other$available != null : !this$available.equals(other$available)) 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$pending = this.getPending();
    final java.lang.Object other$pending = other.getPending();
    if (this$pending == null ? other$pending != null : !this$pending.equals(other$pending)) return false;
    return true;
  }

  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  protected boolean canEqual(final java.lang.Object other) {
    return other instanceof Balance;
  }

  @java.lang.Override
  @java.lang.SuppressWarnings("all")
  @lombok.Generated
  public int hashCode() {
    final int PRIME = 59;
    int result = 1;
    final java.lang.Object $object = this.getObject();
    result = result * PRIME + ($object == null ? 43 : $object.hashCode());
    final java.lang.Object $available = this.getAvailable();
    result = result * PRIME + ($available == null ? 43 : $available.hashCode());
    final java.lang.Object $livemode = this.getLivemode();
    result = result * PRIME + ($livemode == null ? 43 : $livemode.hashCode());
    final java.lang.Object $pending = this.getPending();
    result = result * PRIME + ($pending == null ? 43 : $pending.hashCode());
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy