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

getting all existing planAddons does not seem to work #48

Open
arupadhy opened this issue Jun 12, 2019 · 0 comments
Open

getting all existing planAddons does not seem to work #48

arupadhy opened this issue Jun 12, 2019 · 0 comments

Comments

@arupadhy
Copy link

I am trying to write some test in our code base to fix the way we do billing using recurly..started writing some tests and stumbled on the call to get all addons configured in recurly.

getting list of plans works fine.

Here is the code

const Recurly = require('recurly-js/promise');
const defaultConfig = {
API_KEY: process.env.API_KEY,
SUBDOMAIN: process.env.SUBDOMAIN,
ENVIRONMENT: 'SANDBOX',
DEBUG: true
};
const recurlyPromise = new Recurly(defaultConfig);

async function getRecurlyPlans() {
return recurlyPromise.plans.list();
}

async function getRecurlyPlanAddOns() {
return recurlyPromise.planAddons.list();
}

using recurly-js ^3.2.0 version
here is the log for getRecurlyPlanAddOns() call

{ host: 'wickr-qa.recurly.com',
port: 443,
path: '/v2/plans/function (err, value) {\n if (promise === null) return;\n if (err) {\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n promise._attachExtraTrace(wrapped);\n promise._reject(wrapped);\n } else if (!multiArgs) {\n promise._fulfill(value);\n } else {\n var $_len = arguments.length;var args = new Array(Math.max($_len - 1, 0)); for(var $_i = 1; $_i < $_len; ++$_i) {args[$_i - 1] = arguments[$_i];};\n promise._fulfill(args);\n }\n promise = null;\n }/add_ons',
method: 'GET',
headers:
{ Authorization: 'Basic NzAxMTE2Yjg0MmE5NGM3Y2E2MDdlZGRkNDQyYzNjYWI=',
Accept: 'application/xml',
'Content-Length': 0,
'Content-Type': 'application/xml; charset=utf-8',
'User-Agent': 'umayr/recurly-node/3.2.0' } }

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

1 participant