billingrails 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -19
  3. data/lib/billingrails/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 533de1c2ddd178a3ce99a071fb42338e66ccd8b0d17ea93c3166ed89d56412b5
4
- data.tar.gz: 64ebd4646a1309903e4ebb263a7477d72fd50fb0340504e2bb2cbab574c24e8a
3
+ metadata.gz: 51e32909ce012de12e828bc182f1d551c6fdec8f495ce7bd86990174e29ae2bd
4
+ data.tar.gz: fe67a0677ae3ac21c849c05a95d7c979ad50fa714cc1f5657421908293eb4e18
5
5
  SHA512:
6
- metadata.gz: e1efb59f2b63b4474cb7e2f75e95017dddfbf7ce6970352327c2dd6e44a9e5026eb8833e095010f5d9898c3ee4629f642282dd78a4a8fc7ca3aa0b2fd836a431
7
- data.tar.gz: d3b5487d232aa5d22c8415fe21c365b6bfc79997bfef9f594f86eef8a37c47b3b31a7ea7c0626cae8802ac9e781d13966182116aa17e91edde5320be8716e55e
6
+ metadata.gz: 7d0200556471c793462be1bd2151aba7aa413cb2ef09908f613ed14b4b6d4c8f18920b31671fa2a33a396f9cfcac2c9b467069325b5ec3b288261a1352667a56
7
+ data.tar.gz: 5abc2ecbc45b64538e8cb26629305a8a42471e5667960204ee9b081f563fd8ad910a9864660bf85533f9e34f57da528b50d62a8730cf31e65ca859ee0450a7d4
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Billingrails Ruby SDK
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/billingrails.svg)](https://rubygems.org/gems/billingrails)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
3
6
  Official Ruby SDK for the Billingrails API - Flexible, composable, and intuitive API-first commerce platform.
4
7
 
5
8
  ## Installation
@@ -33,34 +36,34 @@ client = Billingrails::Client.new(
33
36
  base_url: 'https://api.billingrails.com/v1' # optional
34
37
  )
35
38
 
36
- # Access top-level resources
37
- accounts = client.accounts.list
38
- account = client.accounts.get('account_id')
39
-
40
- # Access nested biller resources
41
- events = client.biller.events.list
42
- meters = client.biller.meters.list
43
- plans = client.biller.plans.list
44
- subscriptions = client.biller.subscriptions.list
45
-
46
- # Access nested seller resources
47
- products = client.seller.products.list
48
- orders = client.seller.orders.list
39
+ accounts_response = client.accounts.list
40
+ puts accounts_response['accounts']
49
41
 
50
- # Create resources
51
- new_account = client.accounts.create(
42
+ # Create account
43
+ create_response = client.accounts.create(
52
44
  name: 'Acme Corp',
53
45
  email: 'billing@acme.com'
54
46
  )
47
+ puts create_response['account']
55
48
 
56
- # Update resources
57
- updated_account = client.accounts.update(
49
+ # Get account
50
+ retrieve_response = client.accounts.get('account_id')
51
+ puts retrieve_response['account']
52
+
53
+ # Update account
54
+ update_response = client.accounts.update(
58
55
  'account_id',
59
56
  name: 'Acme Corporation'
60
57
  )
58
+ puts update_response['account']
59
+
60
+ # Get account balances
61
+ balances_response = client.accounts.get_balances('account_id')
62
+ puts balances_response['balances']
61
63
 
62
- # Delete resources
63
- client.accounts.delete('account_id')
64
+ # Debit an account
65
+ debit_response = client.accounts.debit('account_id', amount: 1000, currency: 'USD')
66
+ puts debit_response['balances']
64
67
  ```
65
68
 
66
69
  ## Error Handling
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Billingrails
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billingrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Billingrails