coinbase_commerce_client 0.1.0 → 0.2.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +9 -3
- data/badge.svg +1 -1
- data/lib/coinbase_commerce_client/api_resources/base/cancel.rb +13 -0
- data/lib/coinbase_commerce_client/api_resources/charge.rb +2 -0
- data/lib/coinbase_commerce_client/version.rb +1 -1
- data/lib/coinbase_commerce_client.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9a510d1becec57136692c56a98c2de295de90368ef7f293f8d0cc4bba601a45
|
|
4
|
+
data.tar.gz: 8e2c35f74a5414449ff9a8df15a69dc87609c94f60d93e502943f38403e2d598
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f1e618708f0b31d5016eb4635e067e64c5e28cc8dbe8aa1c81748092c18ce4e4956edc1b54ee9465adcc1dcd47ffb8303757c16b13ea0eea8cd32ac39b46071
|
|
7
|
+
data.tar.gz: d6c11deb7cb8a95030e3fe8cd1277d98bcc6b26ae44a38dcf53bde5ca7f4e505d8e2169335ed0e1d5de5a580a5f433d5e2612dbeda66e2e498233693ca32039d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
</p>
|
|
5
5
|
|
|
6
6
|
# Coinbase Commerce Client
|
|
7
|
-
> <sub>This gem is completely inspired by official Coinbase gem [coinbase-commerce-ruby](coinbase-commerce-ruby), unfortunately the oficial gem actually is deprecated, and my motivation is to continue support for this gem</sub>
|
|
7
|
+
> <sub>This gem is completely inspired by official Coinbase gem [coinbase-commerce-ruby](https://github.com/coinbase/coinbase-commerce-ruby), unfortunately the oficial gem actually is deprecated, and my motivation is to continue support for this gem</sub>
|
|
8
8
|
|
|
9
9
|
Coinbase Commerce Client Ruby Gem
|
|
10
10
|
|
|
@@ -106,7 +106,7 @@ gem install coinbase_commerce_client
|
|
|
106
106
|
|
|
107
107
|
## Usage
|
|
108
108
|
```ruby
|
|
109
|
-
require '
|
|
109
|
+
require 'coinbase_commerce_client'
|
|
110
110
|
client = CoinbaseCommerceClient::Client.new(api_key: 'your_api_key')
|
|
111
111
|
```
|
|
112
112
|
## Checkouts
|
|
@@ -198,6 +198,12 @@ charge = client.charge.create(:name=>'The Sovereign Individual',
|
|
|
198
198
|
```ruby
|
|
199
199
|
charges_list = client.charge.list
|
|
200
200
|
```
|
|
201
|
+
### Cancel
|
|
202
|
+
```ruby
|
|
203
|
+
charge = client.charge.retrieve <charge_id>
|
|
204
|
+
|
|
205
|
+
charge.cancel
|
|
206
|
+
```
|
|
201
207
|
### Paging list iterations
|
|
202
208
|
```ruby
|
|
203
209
|
client.charge.auto_paging do |charge|
|
|
@@ -259,7 +265,7 @@ end
|
|
|
259
265
|
Any and all contributions are welcome! The process is simple: fork this repo, make your changes, add tests, run the test suite, and submit a pull request. Tests are run via rspec. To run the tests, clone the repository and then:
|
|
260
266
|
|
|
261
267
|
# Install the requirements
|
|
262
|
-
gem install
|
|
268
|
+
gem install coinbase_commerce_client
|
|
263
269
|
rspec spec
|
|
264
270
|
|
|
265
271
|
# or via Bundle
|
data/badge.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="114" height="20" role="img" aria-label="coverage:
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="114" height="20" role="img" aria-label="coverage: 89.18%"><title>coverage: 89.18%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="114" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="61" height="20" fill="#555"/><rect x="61" width="53" height="20" fill="#97ca00"/><rect width="114" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="315" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="510">coverage</text><text x="315" y="140" transform="scale(.1)" fill="#fff" textLength="510">coverage</text><text aria-hidden="true" x="865" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="430">89.18%</text><text x="865" y="140" transform="scale(.1)" fill="#fff" textLength="430">89.18%</text></g></svg>
|
|
@@ -25,6 +25,7 @@ require "coinbase_commerce_client/api_resources/base/api_resource"
|
|
|
25
25
|
# api base operations
|
|
26
26
|
require "coinbase_commerce_client/api_resources/base/create"
|
|
27
27
|
require "coinbase_commerce_client/api_resources/base/update"
|
|
28
|
+
require "coinbase_commerce_client/api_resources/base/cancel"
|
|
28
29
|
require "coinbase_commerce_client/api_resources/base/save"
|
|
29
30
|
require "coinbase_commerce_client/api_resources/base/list"
|
|
30
31
|
require "coinbase_commerce_client/api_resources/base/delete"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: coinbase_commerce_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vinicius Borges
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-10-
|
|
11
|
+
date: 2022-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -107,6 +107,7 @@ files:
|
|
|
107
107
|
- lib/coinbase_commerce_client/api_errors.rb
|
|
108
108
|
- lib/coinbase_commerce_client/api_resources/base/api_object.rb
|
|
109
109
|
- lib/coinbase_commerce_client/api_resources/base/api_resource.rb
|
|
110
|
+
- lib/coinbase_commerce_client/api_resources/base/cancel.rb
|
|
110
111
|
- lib/coinbase_commerce_client/api_resources/base/create.rb
|
|
111
112
|
- lib/coinbase_commerce_client/api_resources/base/delete.rb
|
|
112
113
|
- lib/coinbase_commerce_client/api_resources/base/list.rb
|