EasyPost / easypost-node

EasyPost Shipping API Client Library for Node
https://easypost.com/docs/api
MIT License
139 stars 54 forks source link

[bug] Cannot determine payment method when funding/deleting #444

Closed nwithan8 closed 7 months ago

nwithan8 commented 7 months ago

Description

Newer payment method objects have pm_ prefixes for their IDs rather than card_ or bank_, meaning we can no longer rely on the prefix to determine the payment method type (to determine the endpoint needed for funding and deleting a payment method).

This now falls back to the object key ("CreditCard" or "BankAccount") to determine the payment method type.

Testing

Pull Request Type

Please select the option(s) that are relevant to this PR.