Giter Club home page Giter Club logo

node-recurly's People

Contributors

blakmatrix avatar elijahparker avatar ivanguardado avatar morbidangel avatar robrighter avatar valorkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-recurly's Issues

js2xml repository missing

Hi,

My NodeJs application has a dependency on node-recurly. I can not build my app with "npm install" as js2xml seems to have disappeared from github.

9467 error Error: Command failed: Cloning into bare repository '/root/.npm/_git-remotes/git-github-com-valorkin-js2xml-9c1b9dd3'...
9467 error warning: expected SRV RR, found RR type 1
9467 error fatal: remote error:
9467 error   Repository not found.
9467 error
9467 error     at ChildProcess.exithandler (child_process.js:647:15)
9467 error     at ChildProcess.EventEmitter.emit (events.js:98:17)
9467 error     at maybeClose (child_process.js:753:16)
9467 error     at Socket.<anonymous> (child_process.js:966:11)
9467 error     at Socket.EventEmitter.emit (events.js:95:17)
9467 error     at Pipe.close (net.js:465:12)
9468 error If you need help, you may report this *entire* log,
9468 error including the npm and node versions, at:
9468 error     <http://github.com/npm/npm/issues>
9469 error System Linux 3.13.0-24-generic
9470 error command "/usr/bin/node" "/usr/bin/npm" "install"

When I visit https://github.com/valorkin/js2xml
I receive a 404.

Library does not always pass Errors to callbacks

It's a node-ism that the first parameter in a callback is an error, but it's also a nodeism that the first parameter is an instanceof Error. This allows user callback code to assume a standard API -- things like error.stack, error.message -- for actions like logging, analytics, etc.

https://github.com/robrighter/node-recurly/blob/master/lib/client.js#L86 is one instance where node-recurly does not pass Errors to the user callback for the error parameter, breaking any user code that assumes a standard Error api.

_wrap_response() can still set the .statusCode and .headers on the Error object, but it should return an instanceof Error if it's wrapping an error.

How does one form the data to create a subscription with add-ons?

For example,

I am trying to create a plan with multiple add-ons using node-recurly:

    var subscriptionData = {
           plan_code : planCode,
           account   : {
             account_code : organizationId,
             email        : accountInfo.email,
             first_name   : accountInfo.first_name,
             last_name    : accountInfo.last_name,
           },
           currency  : "USD",
           subscription_add_ons : [
             {
               subscription_add_on : {
                 add_on_code : "sfd-pack0001"
               }
             },
             {
               subscription_add_on : {
                 add_on_code : "bmi-pack0001"
               }
             }
           ]
         };

However it looks like js2xml treats the child nodes of subscription_add_ons as anonymous so the appear like so in the request:

<subscription_add_ons>
  <item>
    <subscription_add_on></subscription_add_on>
 </item>
  <item>
    <subscription_add_on></subscription_add_on>
 </item>
</subscription_add_ons>

I can make this work with one add-on only by doing a hash of hashes, but I'm not entirely sure what the correct way to do this is.

Any ideas? Are multiple add-ons not supported with this package?

Could not read from repository.

I'm trying to install this node-module by running npm install node-recurly, but I keep getting this error saying:

//
Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.

This has never happened to me before, and it doesn't make any sense, please help me.

Improve 'nil' values support

I ran into a case where I created an Account on Recurly side, and when I get its details, I have the following as response (XML format):

<account>
    ...
    <first_name></first_name>
    <last_name nil="nil"></last_name>
    ...
</account>

which is then converted into (JSON format):

account: {
    ... 
    first_name: '',
    last_name: {
        $: {
            nil: "nil"
        }
    },
    ...
}

whereas I would expect something like:

account: {
    ... 
    first_name: '',
    last_name: null,
    ...
}

It seems that there is no standard convention to convert XML > JSON. BTW, I wonder whether the problem is linked to the library you are using to do the conversion (https://www.npmjs.org/package/xml2js) or whether it is an issue on Recurly side which should not return an XML element with a nil attribute (but instead omitting the element itself could be better...)

So any idea on this problem would be highly appreciated.

Error with latest Node

Hi
I get this error on require ('node-recurly') with node v0.10.24.

Error: Cannot find module 'xml2js/lib'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at ...../node_modules/node-recurly/lib/recurly.js:3:16
at ...../node_modules/node-recurly/lib/recurly.js:151:3)

Please let me know how to fix this...

Unable to install via NPM

When trying to install v2.1.0 node-recurly via npm install it fails because js2xml is still referencing the valorkin github directory which has been moved. I believe if you version and push the new version to npm it will fix the issue since the github version is referencing another repo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.