Socket
Book a DemoInstallSign in
Socket

snapcard

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snapcard

1.0.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

SNAPCARD

Ruby client library for the Snapcard API.

Install

gem install snapcard

Usage

require 'snapcard'

snapcard = Snapcard::Client.new api_key: "A0gQfloO731hkLG", secret_key: "A7zjaklHkODeFiO"

response = snapcard.get path: "rates"
puts response.body

response = snapcard.get path: "transactions", limit: 1, offset: 1
puts response.body

response = snapcard.post path: "transfers", sourceAmount: "0.01", sourceCurrency: "BTC", dest: "email:test@snapcard.io"
puts response.body

At the moment this client is synchronous only.

Optional arguments on client initialization:

:read_timeout # default = 20

Errors

Any status codes other than 2xx will result in an error.

Example error response:

{
  "language":"en",
  "subType":"INVALID_VALUE",
  "problematicField":"dest",
  "problematicValue":"asdf",
  "exceptionId":"CvjMPW",
  "compositeType":"ValidationException.INVALID_VALUE",
  "message":"asdf is not a valid value for dest",
  "type":"ValidationException",
  "transient":false
}

FAQs

Package last updated on 23 Mar 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.