lib/fastbill-automatic/services/complete.rb in fastbill-automatic-0.0.3 vs lib/fastbill-automatic/services/complete.rb in fastbill-automatic-0.0.4
- old
+ new
@@ -7,11 +7,12 @@
def complete(id)
id_attribute = "#{self.name.split("::").last.downcase}_id".to_sym
attributes = {}
attributes[id_attribute] = id
response = Fastbill::Automatic.request("#{self.name.split("::").last.downcase}.complete", attributes)
- true
+ response['RESPONSE']['INVOICE_NUMBER']
end
+
end
def self.included(base)
base.extend(ClassMethods)
end