0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Wealthsimple rubygem placeholder.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.15
~> 10.0
~> 3.0
 Project Readme

wealthsimple CircleCI

A Ruby client for the Wealthsimple API.

Installation

Add the following to your Gemfile and run bundle install:

# TODO: Publish to rubygems.org once code is finalized
gem 'wealthsimple', git: 'https://github.com/wealthsimple/wealthsimple-ruby.git'

Example usage

See samples directory for a wide range of samples, or see the basic example below:

Wealthsimple.configure do |config|
  config.env = :sandbox
  config.api_version = :v1
  config.client_id = "<oauth_client_id>"

  # Optional: Depending on grant_type may or may not be needed:
  config.client_secret = "<oauth_client_secret>"

  # Optional: If available, you can optionally specify a previous auth response
  # so that the user does not have to login again:
  config.auth = { ...prior server response... }
end

health = Wealthsimple.get("/healthcheck")
pp health.resource

auth = Wealthsimple.authenticate({
  grant_type: "password",
  scope: "read write",
  username: "peter@example.com",
  password: "abc123$",
})
pp auth.resource

user = Wealthsimple.get("/users/#{auth.resource.resource_owner_id}")
pp user.resource