Skip to content

Releases: bitpay/java-bitpay-client

v9.0.0-beta1

13 Feb 19:58
Compare
Choose a tag to compare
v9.0.0-beta1 Pre-release
Pre-release

Overview

We were nearing a release of our next major version of the Java SDK - version 9.0.0. This is the first beta, and includes all the major changes, with subsequent betas addressing bug fixes.

Highlights

Client Class Breakdown

The Client class was very large, at over 2,000 lines. To make this easier to work on and more testable, we have:

  • Implemented a facade for the client
  • Create a class to handle generic REST GET, PUT, POST, and DELETE
  • Created separate classes for each resource, providing a better representation of the API
  • Updated BitPaySetup class so that configuration and keys can be generated
  • Add unit and integration tests for new client classes

Implement POS Facade

Prior to version 9.0.0, we had two separate SDKs, the "Light" SDK, which could only use the POS facade, and the "Full" SDK, which used the merchant and payout facades. This created the need for additional effort both in maintaining and implementing the SDK.

As of version 9.0.0, the SDK supports both methods. You can use just the POS facade, which is limited in feature set but does not require signed requests (no private key to manage) or with the merchant/payout facade, which has more functionality but is more complex to implement.

This provides an easier upgrade path and reduces the duplicate work of maintaining two separate SDKs regarding dependency upgrades, bug fixes, etc.

Functional Test Suite

A functional test suite has been added to the codebase that will run against the test API. Due to there being so many outside variables from external resources, this does not run in the GitHub Actions pipeline.

Bug Fixes

  • SP-369 Add "Request a webhook to be resent" to Java
  • SP-371 Add "Retrieve an event token" to Java SDK
  • SP-372 Add "Retrieve all the rates for a given cryptocurrency" to Java SDK
  • SP-373 Add "Retrieve the rates for a cryptocurrency / fiat pair" to Java SDK

Full Changelist

  • SP-311 Break down Client class
  • SP-322 Create unit tests for all clients
  • SP-323 Create integration tests for all clients
  • SP-328 Implement POS facade in Java SDK
  • SP-349 Java - Updates for POST /refunds
  • SP-350 Java - GET /refunds/guid/:guid
  • SP-351 Java - PUT /refunds/guid/:guid
  • SP-352 Java - DELETE /refunds/guid/:guid
  • SP-367 Ledger Fix - Java
  • SP-369 Add "Request a webhook to be resent" to Java
  • SP-371 Add "Retrieve an event token" to Java SDK
  • SP-372 Add "Retrieve all the rates for a given cryptocurrency" to Java SDK
  • SP-373 Add "Retrieve the rates for a cryptocurrency / fiat pair" to Java SDK
  • SP-401 Java SDK 9.x: DELETE /invoices/guid/:guid
  • SP-418 Java 9.0.0 Functional test suite

v8.8.0

23 Jan 22:06
e8b5a72
Compare
Choose a tag to compare

Overview

This release adds the ability to cancel an invoice by GUID and addresses a few bugs.

Changes

  • Added Dependabot!
  • Added getRates() to retrieve the exchange rate table maintained by BitPay by baseCurrency
  • Added getRate() to retrieve the rates for a cryptocurrency / fiat pair
  • Added ability to retrieve an event token
  • Added the ability to cancel an invoice by GUID
  • Bumped version to 8.8.0

Bug fixes

  • Invoices now respect a custom GUID passed to them

Details

Dependabot

Now that we have a more robust test suite, we have installed and configured Dependabot to contribute pull requests for package updates.

Get Rates (new)

public Rates getRates() throws RateQueryException {}

Get Rate (new)

public Rate getRate(String baseCurrency, String currency) throws RateQueryException {}

Retrieve an Event Token (new)

public InvoiceEventToken getInvoiceEventToken(String invoiceId) throws BitPayException {}

Cancel Invoice by GUID (new)

Default call, will set forceCancel false.

public Invoice cancelInvoiceByGuid(String guid) throws BitPayException {

Cancel Invoice by GUID

Allow for forceCancel to be set explicitly.

public Invoice cancelInvoiceByGuid(String guid, Boolean forceCancel) throws BitPayException {}

Invoices now respect a custom GUID passed to them (bug fix)

  • If the Invoice object sent to createInvoice() has setGuid() set, that GUID will be used for the invoice
  • If the Invoice object sent to createInvoice() does not have setGuid() set, a UUIDv4 will be generated for you

v8.7.0

02 Dec 19:26
c812c87
Compare
Choose a tag to compare

Overview

This release adds the ability to create, get, update, and cancel refunds by GUID, which is:

A variable provided by the merchant and designed to be used by the merchant to correlate the refund with a refund ID in their system.

Changes

  • Added ability to create refund with a GUID in the method params
  • Added ability to create a refund from a refund object
  • Added ability to get refund by GUID
  • Added ability to update refund by GUID
  • Added ability to cancel refund by GUID

Details

Create Refund (Original, no change)

public Refund createRefund(String invoiceId, Double amount, Boolean preview, Boolean immediate, Boolean buyerPaysRefundFee, String reference) throws RefundCreationException, BitPayException {}

Create Refund with GUID (New)

public Refund createRefund(
        String invoiceId,
        Double amount,
        Boolean preview,
        Boolean immediate,
        Boolean buyerPaysRefundFee,
        String reference,
        String guid
    ) throws RefundCreationException, BitPayException {}

Create Refund by passing a Refund object (New)

We added this method to the Client to better align with other methods.

public Refund createRefund(Refund refund) throws
        RefundCreationException, BitPayException {}

Get Refund by GUID

public Refund getRefundByGuid(String guid) throws RefundQueryException, BitPayException {}

Update Refund by GUID

public Refund updateRefundByGuid(String guid, String status) throws RefundUpdateException, BitPayException {}

Cancel Refund by GUID

public Refund cancelRefundByGuid(String guid) throws RefundCancellationException, BitPayException {}

v8.6.2

22 Nov 01:50
Compare
Choose a tag to compare

Patch Release

This release moves the refundRequestEid field from com.bitpay.sdk.model.Invoice.RefundInfo to com.bitpay.sdk.model.Settlement.RefundInfo

v8.6.1

18 Nov 16:50
Compare
Choose a tag to compare

Patch Release

This release upgrades jackson-databind to version 2.14.0. Version 2.13.4.1 does not have a corresponding jackson-bom version.

v8.6.0

18 Nov 02:29
c55b687
Compare
Choose a tag to compare

Overview

This release adds unit tests, new GitHub checks, upgrades jackson-databind, adds a new field, and many other minor updates.

Changed

  • Added JUnit for unit tests
  • Added code coverage for unit tests
  • Added initial JavaDoc, with more detail coming in the next few minor releases
  • JUnit now runs checks on branches (not `master) and pull requests (one check for each supported version of Java: 8, 11, and 17)
  • Upgraded jackson-bind to 12.13.4.1
  • Added the refundRequestEid field to the RefundInfo object
  • Moved /apidocs to /docs to make the JavaDoc available via GitHub Pages
  • Moved /docs to /guides
  • Fixed a mapper with a duplicate JsonProperty in src/main/java/com/bitpay/sdk/model/Settlement/PayoutInfo.java and src/main/java/com/bitpay/sdk/model/Settlement/WithHoldings.java

v8.5.2208

05 Aug 18:01
1b31940
Compare
Choose a tag to compare

v8.5.2207

01 Jul 17:13
db14865
Compare
Choose a tag to compare

v8.5.2206

24 Jun 21:18
3abac5d
Compare
Choose a tag to compare

What's New (⚠️= breaking changes):

Changed
Added

v8.5.2205

25 May 14:08
2f40bc6
Compare
Choose a tag to compare

Added forcedBuyerSelectedTransactionCurrency to CreateInvoice.

Field Name: forcedBuyerSelectedTransactionCurrency
Description: Enables merchant to pre-select crypto currency on behalf of buyer
Type: String
Optional: Yes

To retrieve a list of supported currencies please see: https://bitpay.com/api/#rest-api-resources-currencies-retrieve-the-supported-currencies