octobat 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b6c2364a6929e46205e82c43de5a48c2286441f
4
- data.tar.gz: 9ab26798dbcad4b0f67b5b95abbf708bdc4ab39f
3
+ metadata.gz: 3540368c45078ce6d9d41e65d90289d476ffc9fb
4
+ data.tar.gz: 244bbcf3ee8cd8f6a36b21abb8837bce64522c97
5
5
  SHA512:
6
- metadata.gz: ce790cb7b5e21b93937bc3d68f87ab7440c21f62917b76ef37e13c06125e111b3afa2bcbaa8ac60b75abf948b2cfcf0941a35dc319dddda7f4866d011eb523b6
7
- data.tar.gz: a497143be4dc7945ed316c9296eb5beb715ac87ccdb956d14359e5082730410e25c81d865351a0ec4704832c50cd4742f9dfaec12f44339c2063792ff77f10be
6
+ metadata.gz: b0f0aad1834f2956b3f2a992514130c0976f54f41b93221f2ca8d86571ba73eb91851c69ec2dc5f3ef2b821a5b3e07c681daa2bf7e57e542e0d6dcce5a089950
7
+ data.tar.gz: ca2c2171122fe5d22417dfcdb8412fc6ee634fe8a454fead9eeb56ead89789e0e5ae18037d3e5711c8e6d8d07bdec61ab92fe0b577ffec389fe5e34cd63d670c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- octobat (0.0.1)
4
+ octobat (0.0.4)
5
5
  json (~> 1.8.1)
6
6
  mime-types (>= 1.25, < 3.0)
7
7
  rest-client (~> 1.4)
@@ -10,7 +10,7 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  json (1.8.2)
13
- mime-types (2.4.3)
13
+ mime-types (2.5)
14
14
  netrc (0.10.2)
15
15
  rest-client (1.7.2)
16
16
  mime-types (>= 1.16, < 3.0)
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.4 2015-07-21
2
+ * 1 minor enhancement:
3
+ * Add invoices#all customer filter and Customer.invoices method
4
+
1
5
  === 0.0.1 2015-02-06
2
6
 
3
7
  * 1 major enhancement:
data/README.rdoc CHANGED
@@ -23,6 +23,14 @@ If you want to build the gem from source:
23
23
 
24
24
  * rest-client, json
25
25
 
26
+ == Examples
27
+
28
+ * Get a customer with its invoices
29
+
30
+ ```ruby
31
+ customer = Octobat::Customer.retrieve({id: "oc_cus_0123456789abcdef", "include[]" => "invoices"})
32
+ ```
33
+
26
34
  == Mirrors
27
35
 
28
36
  The octobat gem is mirrored on Rubygems, so you should be able to
@@ -38,4 +46,4 @@ compromised in transit and alter the code of gems fetched securely over https:
38
46
  gem 'octobat'
39
47
 
40
48
  == Development
41
- Test cases are currently being written.
49
+ Test cases are currently being written.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/bin/octobat-console CHANGED
@@ -1,7 +1,16 @@
1
1
  #!/usr/bin/env ruby
2
- irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
3
2
 
4
- libs = " -r irb/completion"
5
- libs << " -r #{File.dirname(__FILE__) + '/../lib/octobat'}"
3
+ begin
4
+ require "pry"
5
+ repl = "pry"
6
+ rescue LoadError
7
+ repl = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
8
+ end
9
+
10
+
11
+ lib_path = File.dirname(__FILE__) + '/../lib'
12
+ libs = " -r irb/completion"
13
+ libs << " -r #{lib_path}/octobat"
6
14
  puts "Loading Octobat gem"
7
- exec "#{irb} #{libs} --simple-prompt"
15
+
16
+ exec "#{repl} -I#{lib_path} #{libs} --simple-prompt"
data/lib/octobat.rb CHANGED
@@ -40,8 +40,8 @@ require 'octobat/errors/authentication_error'
40
40
 
41
41
  module Octobat
42
42
  #DEFAULT_CA_BUNDLE_PATH = File.dirname(__FILE__) + '/data/ca-certificates.crt'
43
- @api_base = 'https://api.octobat.com'
44
- #@api_base = 'http://api.octobat.local:3040'
43
+ #@api_base = 'https://api.octobat.com'
44
+ @api_base = 'http://api.octobat.local:3040'
45
45
 
46
46
  #@ssl_bundle_path = DEFAULT_CA_BUNDLE_PATH
47
47
  #@verify_ssl_certs = true
@@ -3,5 +3,10 @@ module Octobat
3
3
  include Octobat::APIOperations::List
4
4
  include Octobat::APIOperations::Create
5
5
  include Octobat::APIOperations::Update
6
+
7
+ def invoices(params = {})
8
+ Invoice.all(params.merge({ :customer => id }), @api_key)
9
+ end
10
+
6
11
  end
7
12
  end
@@ -1,3 +1,3 @@
1
1
  module Octobat
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octobat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaultier Laperche
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client