lib/octobat/credit_note.rb in octobat-2.0.8 vs lib/octobat/credit_note.rb in octobat-2.0.9

- old
+ new

@@ -1,9 +1,22 @@ module Octobat class CreditNote < APIResource extend Octobat::APIOperations::List include Octobat::APIOperations::Create include Octobat::APIOperations::Update + + + def self.pdf_export(params = {}, opts={}) + api_key, headers = Util.parse_opts(opts) + api_key ||= @api_key + opts[:api_key] = api_key + + instance = self.new(nil, opts) + + response, api_key = Octobat.request(:post, url + '/pdf_export', api_key, params) + return true + end + def send_by_email(email_data = {}) response, api_key = Octobat.request(:post, send_url, @api_key, email_data) refresh_from(response, api_key) end