vogogo_ruby 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/vogogo_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5964b280db292e31e07eb1c3592e58a022c42387
|
4
|
+
data.tar.gz: 370aea2d96d95ff61a0c176b61353bb6c499cecd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1d5c38c5765f29ecd63d40297eabdfb5d4cf1bda320071f6ccfec66c07888bc31182263c292b0b0000a81dad408f4dadbdedfcc245da77c306ea10f8e1f0c15
|
7
|
+
data.tar.gz: d135c31d63d06d25f285c519f2a7f29a70f34c389e20c26ad8186f76bd3cddca67264ec5a17c023ea9071d7ce48b29b2bcc7296424fc5c3249af599fc5246125
|
data/README.md
CHANGED
@@ -19,13 +19,13 @@ Or install it yourself as:
|
|
19
19
|
## Usage
|
20
20
|
1. Create a client instance by providing Vogogo's keys (API_KEY, APP_TOKEN, USER)
|
21
21
|
```ruby
|
22
|
-
vc =
|
22
|
+
vc = VogogoRuby::VogogoDirectAPI.new(API_KEY, APP_TOKEN, USER)
|
23
23
|
```
|
24
24
|
2. Consume the API methods
|
25
25
|
|
26
26
|
- Create Invoice
|
27
27
|
```ruby
|
28
|
-
vc =
|
28
|
+
vc = VogogoRuby::VogogoDirectAPI.new('7098l9kachgdfcb63a8a09acb887f5j7', '456b4dbec13abcb98a8a70acb587f5dd', 'foo@example.com')
|
29
29
|
data = {customer_ref: 'Mr. Joe Jacob Blow', customer_emails: 'joe@example.com',
|
30
30
|
customer_contact_info: '123 Fake ST\nCalgary\nAlberta\n403.987.1231', profile_name: 'Jims Snow Removal',
|
31
31
|
profile_emails: 'snow@example.com', profile_contact_info: '403.123.1234', currency: 'CAD',
|
@@ -36,21 +36,21 @@ invoice_id = vc.create_invoice data
|
|
36
36
|
|
37
37
|
- List Invoices
|
38
38
|
```ruby
|
39
|
-
vc =
|
39
|
+
vc = VogogoRuby::VogogoDirectAPI.new('7098l9kachgdfcb63a8a09acb887f5j7', '456b4dbec13abcb98a8a70acb587f5dd', 'foo@example.com')
|
40
40
|
res = vc.list_invoices
|
41
41
|
puts 'Amount is: ' + res['objects'][0]['amount'] #Amount is: 35.00
|
42
42
|
```
|
43
43
|
|
44
44
|
- Get Invoice
|
45
45
|
```ruby
|
46
|
-
vc =
|
46
|
+
vc = VogogoRuby::VogogoDirectAPI.new('7098l9kachgdfcb63a8a09acb887f5j7', '456b4dbec13abcb98a8a70acb587f5dd', 'foo@example.com')
|
47
47
|
invoice = vc.get_invoice '87695'
|
48
48
|
puts 'Currency is: ' + invoice.parsed_response['currency'] #Currency is: CAD
|
49
49
|
```
|
50
50
|
|
51
51
|
- Update Invoice
|
52
52
|
```ruby
|
53
|
-
vc =
|
53
|
+
vc = VogogoRuby::VogogoDirectAPI.new('7098l9kachgdfcb63a8a09acb887f5j7', '456b4dbec13abcb98a8a70acb587f5dd', 'foo@example.com')
|
54
54
|
data = {amount: '50.00'}
|
55
55
|
res = vc.update_invoice '87695', data
|
56
56
|
puts res #true
|
@@ -58,7 +58,7 @@ puts res #true
|
|
58
58
|
|
59
59
|
- Delete Invoice
|
60
60
|
```ruby
|
61
|
-
vc =
|
61
|
+
vc = VogogoRuby::VogogoDirectAPI.new('7098l9kachgdfcb63a8a09acb887f5j7', '456b4dbec13abcb98a8a70acb587f5dd', 'foo@example.com')
|
62
62
|
res = vc.delete_invoice '87695'
|
63
63
|
puts res #true
|
64
64
|
```
|
data/lib/vogogo_ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vogogo_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmed Youssef
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|