Skip to content

Pass in Xero configuration when creating the Client struct #19

Description

@raouldevil

Xero API libraries in other languages (specifically Ruby) allow you to pass in the Xero credentials and file location when you initialize the Xero object for use. This is very useful when you have to interact with multiple Xero organizations from a single application.

Can we change this library to take in a map which has the credentials and file location when the client struct is created and then exclusively use those rather than use values from a config file?

So calling the create function would look something like this:

EliXero.create_client(%{ private_key_path: "priv/dev_xero_za-tmp.pem", consumer_key: "LKLKJLJLKJ", consumer_secret: "98BKBJKBK", app_type: :private })

I am happy to do this change and submit a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions