curdbee 0.0.2 → 0.0.3

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.2
1
+ 0.0.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{curdbee}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
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"]
@@ -44,7 +44,7 @@ begin
44
44
  puts "Added the payment."
45
45
 
46
46
  # Send the invoice
47
- if @invoice.deliver
47
+ if @invoice.deliver({'recipients' => [@client.email], 'blind_copy' => "me@example.com"})
48
48
  puts "Your invoice was successfully sent to the client."
49
49
  #reload the invoice
50
50
  @invoice = CurdBee::Invoice.show(@invoice.id)
@@ -18,8 +18,9 @@ module CurdBee
18
18
  return true if response.code.to_i == 200
19
19
  end
20
20
 
21
- def deliver
22
- response = self.class.send_request(:post, "/deliver/#{self.class.element}/#{self[:id]}")
21
+ def deliver(receivers={})
22
+ body = receivers.to_json
23
+ response = self.class.send_request(:post, "/deliver/#{self.class.element}/#{self[:id]}", :body => body)
23
24
  return true if response.code.to_i == 200
24
25
  end
25
26
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Lakshan Perera