Class: Besepa::Report

Inherits:
Resource show all
Includes:
ApiCalls::Create, ApiCalls::List, ApiCalls::Search
Defined in:
lib/besepa/report.rb

Constant Summary collapse

FIELDS =
[:id, :until_at, :since_at, :kind, :created_at,
:document_file_name, :document_file_size, :status]

Constants inherited from Resource

Besepa::Resource::ALLOWED_NILS

Constants included from Utils::Request

Utils::Request::END_POINT_URL_PREFIX

Instance Attribute Summary

Attributes inherited from Resource

#activities

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ApiCalls::Search

included

Methods included from ApiCalls::Create

included

Methods included from ApiCalls::List

included

Methods inherited from Resource

#allowed_nils, api_path, #as_json, handle_errors, #initialize, #klass_name, query_params, #serializable_hash, #to_hash

Methods included from Utils::Request

#delete, #get, #post, #put

Methods included from Utils::Connection

#connection

Constructor Details

This class inherits a constructor from Besepa::Resource

Class Method Details

.klass_nameObject



16
17
18
# File 'lib/besepa/report.rb', line 16

def self.klass_name
  "report"
end

Instance Method Details

#download_urlObject



21
22
23
24
# File 'lib/besepa/report.rb', line 21

def download_url
  response = get "/#{self.class.api_path}/#{CGI.escape(id)}/download"
  response["response"]["url"]
end