Coder Social home page Coder Social logo

go-chargify's Introduction

Chargify SDK

Go Report Card GitHub license Maintenance

This library is a small wrapper around a subset of the Chargify API.

This library is actively used in production, however not all end points are used regularly. We do our best to keep up to date with changes, but focus primarily on our own needs. However, pull requests are always welcome!

Update as of 10/14/22

Chargify has rebranded as "Maxio", but all references for the time being will remain to the name "Chargify".

Usage

Usage is fairly straight-forward. See Configuration for more information about setting up and configuring the SDK.

Environment Variables

  • CHARGIFY_ENV set to production to actually make calls
  • CHARGIFY_API_KEY Your secret API key
  • CHARGIFY_SUBDOMAIN The subdomain for your account at Chargify

Testing

Testing requires an actual account (nothing is mocked, but that could be a good addition!). Make sure your subdomain, api key, etc are properly set.

IMPORTANT If you run all of the tests, there isn't currently a way to delete the following entities. As such, you will need to handle that in the GUI until a solution is provided in the official REST API:

  • Product Family

Moving CLI

A recent PR included a CLI. We will be moving it out into a separate repository. Do not rely on using it in this repo.

Future Improvements

The following are improvements we would like to make, or would like PRs to address (reach out to us first to make sure no one else has started working on it though!):

  • Migrate all makeCall and makeEventsCall invocations to the new makeAPICall function. This includes modifying the INTERNAL allocation to the options struct.

  • Update calls to take options structs with pointers; add new functions where deprecation would occur so we can maintain backwards compatibility.

Implemented Endpoints

Note that Chargify changes their API doc URLs regularly, so we have stopped providing links directly to the end points.

Customers

  • Create Customer
  • Delete Customer
  • Get Customers
  • Search for Customers

Events

  • List Events
  • List Events for Subscription
  • Total Event Count
  • Event Ingestion
  • Bulk Event Ingestion

Payment Profiles

  • Create Payment Profile
  • Delete Payment Profile

Product Families

  • Create Product Family
  • Get Product Family
  • Read Component By ID
  • Read Component By Handle
  • List Comonents for Product Family
  • List Product Familiy via Site

Products

  • Create a Product
  • Archive a Product
  • Update a Product
  • Get a Product By ID
  • Get a Product By Handle
  • Get a Product In Family

Subscriptions

  • Create Subscription
  • Update Subscription
  • Cancel Subscription - Immediately
  • Cancel Subscription - Delayed
  • Remove Delayed Cancellation
  • List Subscriptions
  • Purge a Subscription (only works in test mode!)

Coupons

  • Create a Coupon
  • Find a Coupon
  • Archive a Coupon
  • List Coupons

Hiring

Want to join an awesome team building cool products to improve the lives of pets and their owners? Send an email to [email protected] and let's find out if we're a good match! We are a remote-first company based in New Hampshire.

Contributing

Pull Requests are welcome! See our CONTRIBUTING.md file for more information.

go-chargify's People

Contributors

aesherman avatar dangarthwaite avatar dependabot[bot] avatar ghstahl avatar kevineaton avatar liz86 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.