curdbee 0.0.4 → 0.0.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{curdbee}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Lakshan Perera"]
12
- s.date = %q{2010-10-04}
12
+ s.date = %q{2010-10-05}
13
13
  s.email = %q{lakshan@vesess.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
24
24
  "VERSION",
25
25
  "curdbee.gemspec",
26
26
  "examples/create_invoice_for_new_client.rb",
27
+ "examples/list_invoices.rb",
27
28
  "lib/curdbee.rb",
28
29
  "lib/curdbee/base.rb",
29
30
  "lib/curdbee/client.rb",
@@ -78,7 +79,8 @@ Gem::Specification.new do |s|
78
79
  "spec/recurring_profile_spec.rb",
79
80
  "spec/spec_helper.rb",
80
81
  "spec/support/fakeweb_stubs.rb",
81
- "examples/create_invoice_for_new_client.rb"
82
+ "examples/create_invoice_for_new_client.rb",
83
+ "examples/list_invoices.rb"
82
84
  ]
83
85
 
84
86
  if s.respond_to? :specification_version then
@@ -0,0 +1,16 @@
1
+ require 'rubygems'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+
6
+ require 'curdbee'
7
+
8
+ # set the API key and subdomain for your account.
9
+ CurdBee::Config.api_key = "Your API Key"
10
+ CurdBee::Config.subdomain = "Your Subdomain"
11
+
12
+ @invoices = CurdBee::Invoice.list
13
+
14
+ @invoices.each do |invoice|
15
+ puts "#{invoice.date} #{invoice.total_due} #{invoice.state}"
16
+ end
@@ -18,8 +18,8 @@ module CurdBee
18
18
  return true if response.code.to_i == 200
19
19
  end
20
20
 
21
- def deliver(receivers={})
22
- body = receivers.to_json
21
+ def deliver(send_list={})
22
+ body = {:delivery => send_list}.to_json
23
23
  response = self.class.send_request(:post, "/deliver/#{self.class.element}/#{self[:id]}", :body => body)
24
24
  return true if response.code.to_i == 200
25
25
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lakshan Perera
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-04 00:00:00 +05:30
17
+ date: 2010-10-05 00:00:00 +05:30
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -75,6 +75,7 @@ files:
75
75
  - VERSION
76
76
  - curdbee.gemspec
77
77
  - examples/create_invoice_for_new_client.rb
78
+ - examples/list_invoices.rb
78
79
  - lib/curdbee.rb
79
80
  - lib/curdbee/base.rb
80
81
  - lib/curdbee/client.rb
@@ -154,3 +155,4 @@ test_files:
154
155
  - spec/spec_helper.rb
155
156
  - spec/support/fakeweb_stubs.rb
156
157
  - examples/create_invoice_for_new_client.rb
158
+ - examples/list_invoices.rb