Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maartenvanvliet/striped
Library to interface with the Stripe Api.
https://github.com/maartenvanvliet/striped
openapi stripe
Last synced: 28 days ago
JSON representation
Library to interface with the Stripe Api.
- Host: GitHub
- URL: https://github.com/maartenvanvliet/striped
- Owner: maartenvanvliet
- License: mit
- Created: 2022-09-28T15:36:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T00:38:43.000Z (11 months ago)
- Last Synced: 2024-11-17T17:50:03.462Z (about 1 month ago)
- Topics: openapi, stripe
- Language: Elixir
- Homepage: https://hexdocs.pm/striped/Stripe.html
- Size: 2.99 MB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Striped
## [![Hex pm](http://img.shields.io/hexpm/v/striped.svg?style=flat)](https://hex.pm/packages/striped) [![Hex Docs](https://img.shields.io/badge/hex-docs-9768d1.svg)](https://hexdocs.pm/striped) [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT) ![.github/workflows/test.yml](https://github.com/maartenvanvliet/striped/actions/workflows/test.yml/badge.svg)Library to interface with the Stripe Api. Most of the code is generated from the [Stripe OpenApi](https://github.com/stripe/openapi) definitions.
Inspiration was drawn from [Stripity Stripe](https://github.com/beam-community/stripity_stripe) and [openapi](https://github.com/wojtekmach/openapi).
## Installation
```elixir
def deps do
[
{:striped, "~> 0.5.0"}
]
end
```## Usage
```elixir
client = Stripe.new(api_key: "sk_test_123")
{:ok, %Stripe.Customer{}} = Stripe.Customer.retrieve(client, "cus123"){:ok, %Stripe.Customer{}} =
Stripe.Customer.create(client, %{
description: "Test description"
})```
For the exact parameters you can consult the Stripe docs.
### Errors
Stripe errors can be found in the `Stripe.ApiErrors` struct.
Network errors etc. will be found in the error term.```elixir
{:error, %Stripe.ApiErrors{}} =
Stripe.Customer.retrieve(client, "bogus")
```## Telemetry
Stripe api calls made through this library emit Telemetry events. See the
`Stripe.Telemetry` module for more information### Api Version
`Striped` uses the OpenApi definitions to build itself, so it
uses the latest Api Version. You can however override the
version by passing the `:version` option to the client.This SDK is generated for version: **__VERSION__**
See https://stripe.com/docs/upgrades#__VERSION__ for breaking changes.
### Limitations
* File Uploads currently don't work.
* Connected Accounts are not supported yet.