Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

moneykit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moneykit

  • 0.1.15
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

MoneyKit

MoneyKit is the next generation connection for the world's money.

This is an autogenerated python SDK for OpenFGA. It provides a wrapper around the MoneyKit API definition.

Installation

Bundler

Use bundle add

bundle add moneykit.gemspec

or add the following to your Gemfile

gem 'moneykit', '~> 0.1.15'

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'moneykit'

# Setup authorization
MoneyKit.configure do |config|
  # Defaults to MoneyKit-Version: 2023-02-18
  # Configure Bearer authorization
  config.host = ENV['MONEYKIT_URL'] || 'https://api.moneykit.com'
end

begin
  #/auth/token
  access_token_api = MoneyKit::AccessTokenApi.new
  response = access_token_api.generate_access_token(
      {
        grant_type: 'client_credentials',
        client_id: ENV['MONEYKIT_CLIENT_ID'],
        client_secret: ENV['MONEYKIT_CLIENT_SECRET']
      }
    )

  MoneyKit.configure do |config|
    config.access_token = response.access_token
  end
rescue MoneyKit::ApiError => e
  puts "Exception when calling AccessTokenApi->generate_access_token: #{e}"
end

Examples

See our Examples repository for more complete example projects.

require 'moneykit'

link_session_api = MoneyKit::LinkSessionApi.new
response = link_session_api.create_link_session(
  MoneyKit::CreateLinkSessionRequest.new(
    {
      customer_user: { id: user.uuid },
      redirect_uri: 'http://localhost:3000',
    }
  )
)

link_session_token = response.link_session_token
require 'moneykit'

exchangeable_token = 'TOKEN'

link_session_api = MoneyKit::LinkSessionApi.new
response = link_session_api.exchange_token(
  MoneyKit::ExchangeTokenRequest.new({ exchangeable_token: exchangeable_token })
)

link_id = response.link_id
institution_id = response.link.institution_id
require 'moneykit'

link_id = 'LINK_ID'

links_api = MoneyKit::LinksApi.new
links_api.disconnect(link_id)

Fetch accounts

require 'moneykit'

link_id = 'LINK_ID'

accounts_api = MoneyKit::AccountsApi.new
response = accounts_api.get_accounts(link_id)

accounts = response.accounts

FAQs

Package last updated on 09 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc