Releases: lithic-com/lithic-node
v0.8.0
Full Changelog: v0.7.1...v0.8.0
v0.7.1
v0.7.0
API Changes
- [breaking] Rename card enum type
DIGITAL_WALLET
->VIRTUAL
etc. - [breaking] Remove
previous_auth_rule_tokens
,state
andtoken
from theAuthRule
model. - [breaking] Make
lithic.authRules.list()
a true paginated method. - Add
shipping_method
enum toCardReissueParams
. - Updates to doc comments.
- Update test examples.
Bugfixes
Other Improvements
v0.6.0
Breaking changes
The ability to pass an API Key as a positional argument to client instantiation, which was previous deprecated, has been removed.
Where previously you could do this:
const lithic = new Lithic('my api key'); // this won't work anymore!
You must now do either this:
const lithic = new Lithic({ apiKey: 'my api key' });
Or add an environment variable called LITHIC_API_KEY
, and instantiate with no required arguments, eg;
const lithic = new Lithic();
For more, see the commit: [breaking] Remove deprecated apiKey positional argument to client instantiation
Headline changes
Add client.cards.getEmbedURL()
and client.cards.getEmbedHTML()
.
Other changes
v0.4.0
This release refactors how paginated responses work – they now return a Page
class, with getNextPage()
and hasNextPage()
methods alongside the raw attributes returned from the server, as before. This should be a backwards-compatible change.
There is now a shared PageParams
type and a generic PageResponse
type, and we also expose a subclass of Page
for each object type, such as Lithic.TransactionsPage
and Lithic.CardsPage
.
v0.2.1
Minor documentation improvements. See v0.2.0
for more notable changes.
v0.2.0
API Keys & client instantiation
This release changes the recommended way of passing your API Key to read from a LITHIC_API_KEY
environment variable:
import Lithic from 'lithic';
// old, deprecated:
const lithic = Lithic('my api key');
// new:
const lithic = Lithic(); // automatically reads LITHIC_API_KEY environment variable
// or:
const lithic = Lithic({apiKey: 'my api key'});
We recommend using dotenv to set up secret keys as environment variables.
Optional params
This release lets you pass request options without an empty params object for methods with optional params:
// before:
client.transactions.list({}, {timeout: 5 * 1000});
// now:
client.transactions.list({timeout: 5 * 1000});
Removal of deprecated methods
The deprecated autoPagingEach()
and autoPagingToArray()
methods have been removed.
Other
This release also:
- Improves the readability of doc comments, especially for enums.
- Includes several small improvements to the mapping of types to actual API behavior, and updates to reflect new API behavior.
- Makes changes to the structure of some types, such as sharing a
ShippingAddress
type across many API resources. - Fixes a bug with AuthStreamEnrollment