com.bitpay.sdk.exceptions.BitPayApiException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bitpay_sdk Show documentation
Show all versions of bitpay_sdk Show documentation
Full implementation of the BitPay Payment Gateway. This library implements BitPay's Cryptographically
Secure RESTful API.
/*
* Copyright (c) 2019 BitPay.
* All rights reserved.
*/
package com.bitpay.sdk.exceptions;
public class BitPayApiException extends BitPayException {
private static final long serialVersionUID = 8211452784073681895L;
private final String code;
public BitPayApiException(String message, String code) {
super(message);
this.code = code;
}
/**
* An error code consists of 6 digits.
* The first two digits of an error code represent the HTTP method that was used to call it.
* The next two digits refer to the resource that was impacted.
* The last two digits refer to the specific error.
* eg. 010103 - Missing parameters for Invoice POST request.
*
* @return String
*/
public String getCode() {
return this.code;
}
}