class Octobat::SelfBillingInvoice
Public Instance Methods
cancel(params = {}, opts = {})
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 41 def cancel(params = {}, opts = {}) response, api_key = Octobat.request(:patch, cancel_url, @api_key, params, opts) refresh_from(response, api_key) end
confirm(params = {}, opts = {})
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 36 def confirm(params = {}, opts = {}) response, api_key = Octobat.request(:patch, confirm_url, @api_key, params, opts) refresh_from(response, api_key) end
delete(params = {}, opts = {})
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 46 def delete(params = {}, opts = {}) response, api_key = Octobat.request(:delete, url, @api_key, params, opts) refresh_from(response, api_key) end
purchase_items(params = {}, opts = {})
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 51 def purchase_items(params = {}, opts = {}) PurchaseItem.list(params.merge({ :self_billing_invoice => id }), {api_key: @api_key}.merge(opts)) end
send_by_email(params = {}, opts = {})
click to toggle source
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, opts) return true
end
def self.csv_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 + '/csv_export', api_key, params, opts) return true
end
# File lib/octobat/self_billing_invoice.rb, line 31 def send_by_email(params = {}, opts = {}) response, api_key = Octobat.request(:post, send_url, @api_key, params, opts) refresh_from(response, api_key) end
Private Instance Methods
cancel_url()
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 70 def cancel_url url + '/cancel' end
confirm_url()
click to toggle source
# File lib/octobat/self_billing_invoice.rb, line 66 def confirm_url url + '/confirm' end
send_url()
click to toggle source
def transactions(params = {}, opts = {})
Transaction.list(params.merge(invoice: id), {api_key: @api_key}.merge(opts))
end
# File lib/octobat/self_billing_invoice.rb, line 62 def send_url url + '/send' end