Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marketplace Fee argument type #2

Closed
bathos opened this issue Oct 15, 2014 · 1 comment
Closed

Marketplace Fee argument type #2

bathos opened this issue Oct 15, 2014 · 1 comment

Comments

@bathos
Copy link

bathos commented Oct 15, 2014

The annotation for this method defines the price argument as

@param {Float} price - The price as a float

However this will only work if the value has significant digits to the penny. It does work with a string, however. To fix this, a numerical price argument could be cast as a string with .toFixed(2) before submission.

discogs.marketplace().fee(10.00, log);
> { [DiscogsError: The requested resource was not found.] (...etc)

discogs.marketplace().fee('10.00', log);
> { currency: 'USD', value: 0.8 }
@bartve bartve closed this as completed in fc9f4e1 Oct 16, 2014
@bartve
Copy link
Owner

bartve commented Oct 16, 2014

Thanks for the suggestion 👍

lionralfs referenced this issue in lionralfs/discogs-client Jan 8, 2022
lionralfs referenced this issue in lionralfs/discogs-client Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants