Class: Chargify::Statement
- Defined in:
- lib/chargify_api_ares/resources/statement.rb
Class Method Summary collapse
-
.find_pdf(scope, options = {}) ⇒ Object
Returns raw PDF data.
Methods inherited from Base
Class Method Details
.find_pdf(scope, options = {}) ⇒ Object
Returns raw PDF data. Usage example: File.open(file_path, ‘wb+’){ |f| f.write Chargify::Statement.find_pdf(statement.id) }
6 7 8 9 10 |
# File 'lib/chargify_api_ares/resources/statement.rb', line 6 def self.find_pdf(scope, = {}) , = ([:params]) path = element_path(scope, , ).gsub(/\.\w+$/, ".pdf") connection.get(path, headers).body end |