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 +1 -1
- data/curdbee.gemspec +1 -1
- data/examples/create_invoice_for_new_client.rb +1 -1
- data/lib/curdbee/invoiceable.rb +3 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/curdbee.gemspec
CHANGED
@@ -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)
|
data/lib/curdbee/invoiceable.rb
CHANGED
@@ -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
|
-
|
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
|
|