0.02
No commit activity in last 3 years
No release in over 3 years
Automatically fight disputes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.8
~> 12.3
~> 0.49
~> 2.3
 Project Readme

Chargehound Ruby bindings

Build Status Gem Version

Installation

gem install chargehound

Usage

Import chargehound and set your API key.

require 'chargehound'
Chargehound.api_key = '{ YOUR_API_KEY }'

Requests

Every resource is accessed via the Chargehound module.

Chargehound::Disputes.submit('dp_123', {
  fields: {
    customer_name: 'Susie'
  }
})

Responses

Responses from the API are automatically parsed from JSON and returned as Ruby objects.

Responses also include the HTTP status code on the response object as the status field.

dispute = Chargehound::Disputes.retrieve('dp_123')

puts dispute.state
# 'needs_response'
puts dispute.response.status
# '200'

Documentation

Disputes

Errors

Development

To build and install from the latest source:

$ git clone git@github.com:chargehound/chargehound-ruby.git
$ bundle install

Run tests:

$ bundle exec rake

Deployment

To deploy a new version of the SDK, perform the following steps:

  1. Update the CHANGELOG to describe what feature have been added.
  2. Bump the version number in /lib/chargehound/version.rb
  3. Rebuild the gem with: gem build chargehound.gemspec
  4. Deploy the new gemfile to rubygems with: gem push <name_of_generated_gem>
  5. Confirm the new gem version is available at https://rubygems.org/gems/chargehound