package com.stripe.model;

import com.stripe.Stripe;
import com.stripe.exception.StripeException;
import com.stripe.net.RequestOptions;

import java.util.Map;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@EqualsAndHashCode(callSuper = true)
public class BitcoinReceiver extends ExternalAccount {
  Boolean active;
  Long amount;
  Long amountReceived;
  Long bitcoinAmount;
  Long bitcoinAmountReceived;
  String bitcoinUri;
  Long created;
  String currency;
  String description;
  String email;
  Boolean filled;
  String inboundAddress;
  Boolean livemode;
  String payment;
  String refundAddress;
  Boolean rejectTransactions;
  String status;
  BitcoinTransactionCollection transactions;
  Boolean uncapturedFunds;
  Boolean usedForPayment;
  Boolean deleted;

  @Deprecated
  public static BitcoinReceiverCollection all(Map<String, Object> params) throws StripeException {
    return list(params, null);
  }

  @Deprecated
  public static BitcoinReceiverCollection all(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    return list(params, options);
  }

  public static BitcoinReceiver create(Map<String, Object> params) throws StripeException {
    return create(params, null);
  }

  public static BitcoinReceiver create(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    return request(RequestMethod.POST, String.format("%s/%s", Stripe.getApiBase(),
        "v1/bitcoin/receivers"), params, BitcoinReceiver.class, options);
  }

  @Override
  public BitcoinReceiver delete() throws StripeException {
    return delete(null);
  }

  @Override
  public BitcoinReceiver delete(RequestOptions options) throws StripeException {
    return request(RequestMethod.DELETE, this.getInstanceUrl(), null, BitcoinReceiver.class,
        options);
  }

  public static BitcoinReceiverCollection list(Map<String, Object> params) throws StripeException {
    return list(params, null);
  }

  public static BitcoinReceiverCollection list(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    String url = String.format("%s/%s", Stripe.getApiBase(), "v1/bitcoin/receivers");
    return requestCollection(url, params, BitcoinReceiverCollection.class, options);
  }

  public static BitcoinReceiver retrieve(String id) throws StripeException {
    return retrieve(id, null);
  }

  public static BitcoinReceiver retrieve(String id, RequestOptions options) throws StripeException {
    return request(RequestMethod.GET, String.format("%s/%s/%s", Stripe.getApiBase(),
        "v1/bitcoin/receivers", id), null, BitcoinReceiver.class, options);
  }

  @Override
  public BitcoinReceiver update(Map<String, Object> params) throws StripeException {
    return update(params, null);
  }

  @Override
  public BitcoinReceiver update(Map<String, Object> params, RequestOptions options)
      throws StripeException {
    return request(RequestMethod.POST, this.getInstanceUrl(), params, BitcoinReceiver.class,
        options);
  }

  @Override
  protected String getInstanceUrl() {
    String result = super.getInstanceUrl();
    if (result == null) {
      return String.format("%s/%s/%s", Stripe.getApiBase(), "v1/bitcoin/receivers", this.getId());
    } else {
      return result;
    }
  }
}

@@ -1146,732 +1146,8 @@
  %7D%0A%0A
-  public static BitcoinReceiver create(Map%3CString, Object%3E params) throws StripeException %7B%0A    return create(params, null);%0A  %7D%0A%0A  public static BitcoinReceiver create(Map%3CString, Object%3E params, RequestOptions options)%0A      throws StripeException %7B%0A    return request(RequestMethod.POST, String.format(%22%25s/%25s%22, Stripe.getApiBase(),%0A        %22v1/bitcoin/receivers%22), params, BitcoinReceiver.class, options);%0A  %7D%0A%0A  @Override%0A  public BitcoinReceiver delete() throws StripeException %7B%0A    return delete(null);%0A  %7D%0A%0A  @Override%0A  public BitcoinReceiver delete(RequestOptions options) throws StripeException %7B%0A    return request(RequestMethod.DELETE, this.getInstanceUrl(), null, BitcoinReceiver.class,%0A        options);%0A  %7D%0A%0A
   pu
@@ -1968,386 +1968,8 @@
  %7D%0A%0A
-  @Override%0A  public BitcoinReceiver update(Map%3CString, Object%3E params) throws StripeException %7B%0A    return update(params, null);%0A  %7D%0A%0A  @Override%0A  public BitcoinReceiver update(Map%3CString, Object%3E params, RequestOptions options)%0A      throws StripeException %7B%0A    return request(RequestMethod.POST, this.getInstanceUrl(), params, BitcoinReceiver.class,%0A        options);%0A  %7D%0A%0A
   @O

Remove editable bitcoin receiver actions