Ruby partner-api.1c.ru

Usage

Quitstart

require 'portal_1c'

portal1c = Portal1C::Client.new('login', 'password')

Examples

subscription-rest-controller

Check contract by regnum

regnums = [801895194, 202680616, 8029772]
result = porta1c.check_its_by_reg_num(regnums)

Check contract by subscriber code

codes = %w[CL-12382 CL-898382 CL-932992]
result = porta1c.check_its_by_subscriber_code(codes)

Check contract by login

logins = ['[email protected]', '[email protected]', '[email protected]']
result = porta1c.check_its_by_login(logins)

subscriber-rest-controller

Get subscribers list

result = porta1c.subscriber(page: 0, size: 1)

option-rest-controller

Billing report

codes = %w[CL-12382 CL-898382 CL-932992]
billing_report = porta1c.billing_report(type: 'CLOUD_BACKUP', subscriber_code_list: codes)
report_id = billing_report['reportUeid']
result = portal1c.get_billing_report(report_id)

industry-rest-controller

Check industry by subscriber code

codes = %w[CL-12382 CL-898382 CL-932992]
result = portal1c.check_industry_by_subscriber_code(codes)

Check industry by regnum

regnums = [801895194, 202680616, 8029772]
result = portal1c.check_industry_by_reg_num(regnums)

Check industry by login

logins = ['[email protected]', '[email protected]', '[email protected]']
result = portal1c.check_industry_by_login(logins)

program-version-rest-controller

Programs

result = portal1c.programs

Program versions

result = portal1c.program_versions(cursor: 0, nick: 'CRM')

nomenclature-rest-controller

regnums = [801895194, 202680616, 8029772]
result = portal1c.get_nomencluture_by_reg_numbers(regnums)

client-program-access-controller

Client program access by regnum

regnums = [801895194, 202680616, 8029772]
result = portal1c.client_program_access_by_reg_number(regnums)

Client program access by login

regnums = [801895194, 202680616, 8029772]
result = portal1c.client_program_access_by_login(login: 'login')