class DiadocApi::Client

Defined in:

diadoc_api/client.cr

Constant Summary

HOST = "https://diadoc-api.kontur.ru/"

Constructors

Instance Method Summary

Constructor Detail

def self.new(api_token : String, username : String, password : String) #

[View source]

Instance Method Detail

def acquire_counteragent(org_id : String, request : Entity::AcquireCounteragentRequest) #

[View source]
def all_counteragents(organization : Entity::Organization) : Array(Entity::Counteragent) #

[View source]
def all_documents(box : Entity::Box, index_key : String | Nil = nil, filter_category : FilterCategory = FilterCategory.default, from_document_date : Time | Nil = nil, to_document_date : Time | Nil = nil, counteragent_box : Entity::Box | Nil = nil) : Array(Entity::Document) #

[View source]
def api_token : String #

[View source]
def api_token=(api_token : String) #

[View source]
def authenticate #

[View source]
def authenticate! #

[View source]
def first_box : Entity::Box | Nil #

[View source]
def generate_print_form(box_id : String, message_id : String, document_id : String) #

[View source]
def generate_print_form(box : Entity::Box, document : Entity::Document) : String #

[View source]
def generate_title_xml(box_id : String, body : String) : String #

[View source]
def get_box(box_id : String) : Entity::Box #

[View source]
def get_box(box : Entity::Box) : Entity::Box #

[View source]
def get_content(type_name_id : String | Nil = nil, function : String | Nil = nil, version : String | Nil = nil, title_index : String | Nil = nil, content_type : String | Nil = nil) #

[View source]
def get_counteragent(organization : Entity::Organization, counteragent_org_id : String) : Entity::Counteragent #

[View source]
def get_counteragents(organization : Entity::Organization, index_key : String | Nil = nil) : Entity::CounteragentList #

[View source]
def get_docflow_events(box_id : String, request : Entity::GetDocflowEventsRequest) #

[View source]
def get_docflow_events(box : Entity::Box, request : Entity::GetDocflowEventsRequest) #

[View source]
def get_document(box : Entity::Box, message_id : String, entity_id : String) #

[View source]
def get_document_types(box : Entity::Box) #

[View source]
def get_documents(box_id : String, index_key : String | Nil = nil, filter_category : FilterCategory = FilterCategory.default, from_document_date : Time | Nil = nil, to_document_date : Time | Nil = nil, counteragent_box_id : String | Nil = nil) : Entity::DocumentList #

[View source]
def get_documents(box : Entity::Box, index_key : String | Nil = nil, filter_category : FilterCategory = FilterCategory.default, from_document_date : Time | Nil = nil, to_document_date : Time | Nil = nil, counteragent_box : Entity::Box | Nil = nil) : Entity::DocumentList #

[View source]
def get_entity_content(box : Entity::Box, message_id : String, entity_id : String) #

[View source]
def get_last_event(box_id : String) #

[View source]
def get_last_event(box : Entity::Box) #

[View source]
def get_my_organizations #

[View source]
def get_new_events(box_id : String) #

[View source]
def get_new_events(box : Entity::Box) #

[View source]
def get_organizations_by_inn_kpp(inn : String, kpp : String | Nil = nil, include_relations : Bool | Nil = nil) : Entity::OrganizationList #

[View source]
def my_box(&block : Array(Entity::Box) -> Entity::Box) : Entity::Box | Nil #

[View source]
def my_organization : Entity::Organization | Nil #

[View source]
def password : String #

[View source]
def password=(password : String) #

[View source]
def post_message(message : Entity::MessageToPost) #

[View source]
def session_token : String | Nil #

[View source]
def session_token=(session_token : String | Nil) #

[View source]
def set_my_organization(inn : String) : Entity::Organization | Nil #

[View source]
def username : String #

[View source]
def username=(username : String) #

[View source]