Skip to content

Pass in Xero configuration when creating the Client struct #19

@raouldevil

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.

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