Class: Teamlab::Crm
- Inherits:
-
Object
- Object
- Teamlab::Crm
- Defined in:
- lib/teamlab/Modules/Crm.rb
Instance Method Summary collapse
- #add_case_contact(case_id, contact_id) ⇒ Object
- #add_contact_address(contact_id, category, address, options = {}) ⇒ Object
- #add_contact_info(contact_id, infotype, data, category, options = {}) ⇒ Object
- #add_contact_tag_to_group(entity_type, entity_id, tag) ⇒ Object
- #add_deal_to_contact(contact_id, opportunity_id) ⇒ Object
- #add_opportunity_contact(opportunity_id, contact_id) ⇒ Object
- #add_persons_to_company(company_id, person_id) ⇒ Object
- #add_tag(entity_type, entity_id, tag_name) ⇒ Object
-
#add_tag_group_to_entity(entity_type, entity_id, tag_name) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #add_tag_to_batch_contacts(tags, options = {}) ⇒ Object
-
#add_tag_to_case_group_by_filter(tag_name, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
-
#add_tag_to_opportunity_group(tag_name, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #associate_file_with_entity(entity_type, entity_id, *fileids) ⇒ Object
-
#change_contact_photo(contact_id, photo) ⇒ Object
TODO: MULTIPART-FORM DATA =====================================================.
- #change_contact_photo_by_url(contact_id, photo_url) ⇒ Object
- #close_case(case_id) ⇒ Object
- #close_task(task_id) ⇒ Object
- #create_case(title, options = {}) ⇒ Object
- #create_company(company_name, managers, options = {}) ⇒ Object
- #create_contact_status(title, color, options = {}) ⇒ Object
- #create_contact_type(title, options = {}) ⇒ Object
- #create_event(contact_id, content, category_id, options = {}) ⇒ Object
- #create_history_category(title, image_name, options = {}) ⇒ Object
-
#create_invoice(options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #create_invoice_item(title, description, price, stock_keeping_unit, options = {}) ⇒ Object
-
#create_invoice_line(invoice_id, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #create_invoice_tax(name, description, options = {}) ⇒ Object
-
#create_opportunity(stage_id, title, responsible_id, options = {}) ⇒ Object
есть тест.
-
#create_opportunity_stage(title, color, options = {}) ⇒ Object
есть тест.
- #create_person(first_name, last_name, options = {}) ⇒ Object
- #create_tag(entity_type, tag_name) ⇒ Object
- #create_task(title, deadline, responsible_id, category_id, options = {}) ⇒ Object
- #create_task_category(title, image_name, options = {}) ⇒ Object
- #create_task_group(title, options = {}) ⇒ Object
-
#create_task_template(container_id, title, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #create_task_template_container(entity_type, title) ⇒ Object
- #create_txt(entity_type, entity_id, title, content) ⇒ Object
- #create_user_field(entity_type, label, field_type, options = {}) ⇒ Object
- #delete_batch_contacts_by_filter(options = {}) ⇒ Object
- #delete_batch_invoices(*invoice_ids) ⇒ Object
- #delete_batch_items(*ids) ⇒ Object
- #delete_case(case_id) ⇒ Object
- #delete_case_contact(case_id, contact_id) ⇒ Object
- #delete_case_group(*case_ids) ⇒ Object
- #delete_case_group_by_filter(options = {}) ⇒ Object
- #delete_contact(id) ⇒ Object
- #delete_contact_address(contact_id, information_id) ⇒ Object
- #delete_contact_group(*contact_ids) ⇒ Object
- #delete_contact_info(contact_id, info_id) ⇒ Object
- #delete_contact_status(contact_status_id) ⇒ Object
- #delete_contact_type(contact_type_id) ⇒ Object
- #delete_deal_from_contact(contact_id, opportunity_id) ⇒ Object
- #delete_event_and_related_files(id) ⇒ Object
- #delete_file(id) ⇒ Object
- #delete_history_category(id) ⇒ Object
- #delete_invoice(id) ⇒ Object
- #delete_invoice_item(id) ⇒ Object
- #delete_invoice_line(id) ⇒ Object
- #delete_invoice_tax(id) ⇒ Object
- #delete_opportunity(opportunity_id) ⇒ Object
- #delete_opportunity_contact(opportunity_id, contact_id) ⇒ Object
- #delete_opportunity_group(*opportunity_ids) ⇒ Object
- #delete_opportunity_group_by_filter(options = {}) ⇒ Object
- #delete_opportunity_stage(stage_id) ⇒ Object
- #delete_person_from_company(company_id, person_id) ⇒ Object
- #delete_tag(entity_type, tag_name) ⇒ Object
- #delete_task(id) ⇒ Object
- #delete_task_category(category_id) ⇒ Object
- #delete_task_template(id) ⇒ Object
- #delete_task_template_container(container_id) ⇒ Object
- #delete_unused_tags(entity_type) ⇒ Object
- #delete_user_field(entity_type, field_id) ⇒ Object
- #get_all_case_contacts(case_id) ⇒ Object
- #get_all_categories(info_type) ⇒ Object
- #get_all_contact_info_types ⇒ Object
- #get_all_contact_tags(contact_id) ⇒ Object
- #get_all_contact_types ⇒ Object
- #get_all_history_categories ⇒ Object
- #get_all_opportunity_contacts(opportunity_id) ⇒ Object
-
#get_all_opportunity_stages ⇒ Object
region Opportunity.
- #get_all_task_categories ⇒ Object
- #get_case_by_id(id) ⇒ Object
- #get_case_list(options = {}) ⇒ Object
- #get_cases_by_prefix(contact_id, prefix) ⇒ Object
- #get_company_linked_persons_list(company_id) ⇒ Object
- #get_contact_by_id(id) ⇒ Object
- #get_contact_info(contact_id, contact_info_id) ⇒ Object
- #get_contact_information_by_type(contact_id, info_type) ⇒ Object
- #get_contact_status_by_id(contact_status_id) ⇒ Object
- #get_contact_statuses ⇒ Object
- #get_contact_type(id) ⇒ Object
- #get_contact_upcoming_tasks(*contact_ids) ⇒ Object
- #get_contacts_by_filter(options = {}) ⇒ Object
- #get_contacts_by_project_id(id) ⇒ Object
- #get_contacts_for_mail(*contact_ids) ⇒ Object
- #get_currency_list ⇒ Object
- #get_entity_invoices(entity_type, entity_id) ⇒ Object
- #get_entity_tags(entity_type, entity_id) ⇒ Object
- #get_event_list_by_filter(options = {}) ⇒ Object
- #get_file_list(entity_type, entity_id) ⇒ Object
- #get_invoice_by_id(id) ⇒ Object
- #get_invoice_items_by_filter(options = {}) ⇒ Object
- #get_invoice_sample ⇒ Object
-
#get_invoice_taxes ⇒ Object
region General.
- #get_invoices_by_filter(options = {}) ⇒ Object
- #get_opportunity_by_id(id) ⇒ Object
- #get_opportunity_list(options = {}) ⇒ Object
- #get_opportunity_stage(stage_id) ⇒ Object
- #get_result_of_convertation(options = {}) ⇒ Object
-
#get_root_folder_id ⇒ Object
region Files.
- #get_settings ⇒ Object
- #get_simple_contacts(options = {}) ⇒ Object
- #get_summary_table(currency) ⇒ Object
- #get_tags_for_entity_type(entity_type) ⇒ Object
- #get_task_by_id(task_id) ⇒ Object
- #get_task_category(category_id) ⇒ Object
- #get_task_list_by_filter(options = {}) ⇒ Object
- #get_task_template(id) ⇒ Object
- #get_task_template_container(id) ⇒ Object
- #get_task_template_container_list(entity_type) ⇒ Object
- #get_task_template_list_by_container_id(id) ⇒ Object
- #get_user_field_list(entity_type) ⇒ Object
- #get_user_field_values(entity_type, entity_id) ⇒ Object
- #group_contact_info(*items) ⇒ Object
- #group_contact_info_update(*items) ⇒ Object
-
#initialize ⇒ Crm
constructor
A new instance of Crm.
- #link_contact_list_with_project(project_id, *contact_ids) ⇒ Object
- #link_contact_with_project(contact_id, project_id) ⇒ Object
- #merge_contacts(from_contact_id, to_contact_id) ⇒ Object
- #quick_company_list_creation(*names) ⇒ Object
- #quick_person_list_creation(data) ⇒ Object
- #remove_contact_from_project(contact_id, project_id) ⇒ Object
- #remove_tag(entity_type, entity_id, tag_name) ⇒ Object
- #resume_case(case_id) ⇒ Object
- #resume_task(task_id) ⇒ Object
- #save_number_settings(options = {}) ⇒ Object
- #save_terms_settings(options = {}) ⇒ Object
- #set_access_to_batch_contact(options = {}) ⇒ Object
- #set_case_access_rights(case_ids, options = {}) ⇒ Object
- #set_case_access_rights_by_filter(options = {}) ⇒ Object
- #set_contact_access_rights(contact_id, options = {}) ⇒ Object
- #set_contacts_access_rights(contact_ids, options = {}) ⇒ Object
- #set_is_portal_configured(options = {}) ⇒ Object
- #set_opportunity_access_rights(opportunity_ids, is_private, *users) ⇒ Object
- #set_opportunity_access_rights_for_users(options = {}) ⇒ Object
- #set_rights_to_case(case_id, options = {}) ⇒ Object
- #set_rights_to_opportunity(opportunity_id, is_private, access_list) ⇒ Object
- #set_user_field_value(entity_type, entity_id, field_id, field_value) ⇒ Object
- #update_case(case_id, title, options = {}) ⇒ Object
- #update_company(company_id, company_name, options = {}) ⇒ Object
- #update_company_and_participants_status(company_id, contact_status_id) ⇒ Object
- #update_contact_address(contact_id, information_id, address, options = {}) ⇒ Object
- #update_contact_info(information_id, contact_id, data, options = {}) ⇒ Object
- #update_contact_status(id, title, options = {}) ⇒ Object
- #update_contact_status_by_id(contact_id, contact_status_id) ⇒ Object
- #update_contact_status_color(status_id, color) ⇒ Object
- #update_contact_type(id, title, options = {}) ⇒ Object
- #update_contact_types_order(*titles) ⇒ Object
- #update_crm_contact_status_settings(options = {}) ⇒ Object
- #update_crm_contact_tag_setting(options = {}) ⇒ Object
- #update_history_categories_order(*titles) ⇒ Object
- #update_history_category(id, title, options = {}) ⇒ Object
- #update_history_category_icon(id, icon_name) ⇒ Object
-
#update_invoice(id, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #update_invoice_item(id, title, description, price, stock_keeping_unit, options = {}) ⇒ Object
- #update_invoice_line(invoice_line_id, invoice_id, options = {}) ⇒ Object
- #update_invoice_patch_status(status, invoice_ids) ⇒ Object
- #update_invoice_tax(id, name, options = {}) ⇒ Object
- #update_opportunity(opportunity_id, contact_id, title, responsible_id, stage_id, options = {}) ⇒ Object
- #update_opportunity_stage(id, title, color, options = {}) ⇒ Object
- #update_opportunity_stage_color(stage_id, color) ⇒ Object
- #update_opportunity_stages_order(options = {}) ⇒ Object
- #update_opportunity_to_stage(opportunity_id, stage_id) ⇒ Object
- #update_person(id, first_name, last_name, options = {}) ⇒ Object
- #update_person_and_its_company_status(person_id, contact_status_id) ⇒ Object
- #update_selected_user_field(entity_type, user_field_id, label, field_type, options = {}) ⇒ Object
- #update_statuses_contact_order(options = {}) ⇒ Object
- #update_task(task_id, title, deadline, category_id, options = {}) ⇒ Object
- #update_task_categories_order(*titles) ⇒ Object
- #update_task_category(category_id, title, options = {}) ⇒ Object
- #update_task_category_icon(id, image_name) ⇒ Object
-
#update_task_template(container_id, task_template_id, title, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================.
- #update_task_template_container(container_id, title) ⇒ Object
- #update_user_fields_order(entity_type, *field_ids) ⇒ Object
- #upload_file(entity_type, entity_id, file) ⇒ Object
Constructor Details
#initialize ⇒ Crm
Returns a new instance of Crm.
4 5 6 |
# File 'lib/teamlab/Modules/Crm.rb', line 4 def initialize @request = Teamlab::Request.new('crm') end |
Instance Method Details
#add_case_contact(case_id, contact_id) ⇒ Object
698 699 700 |
# File 'lib/teamlab/Modules/Crm.rb', line 698 def add_case_contact(case_id, contact_id) @request.post(['case', case_id.to_s, 'contact'], contactId: contact_id) end |
#add_contact_address(contact_id, category, address, options = {}) ⇒ Object
494 495 496 |
# File 'lib/teamlab/Modules/Crm.rb', line 494 def add_contact_address(contact_id, category, address, = {}) @request.post(['contact', contact_id.to_s, 'data', 'address', category.to_s], {address: address.to_s}.merge()) end |
#add_contact_info(contact_id, infotype, data, category, options = {}) ⇒ Object
478 479 480 |
# File 'lib/teamlab/Modules/Crm.rb', line 478 def add_contact_info(contact_id, infotype, data, category, = {}) @request.post(['contact', contact_id.to_s, 'data'], { infoType: infotype, data: data, category: category }.merge()) end |
#add_contact_tag_to_group(entity_type, entity_id, tag) ⇒ Object
210 211 212 |
# File 'lib/teamlab/Modules/Crm.rb', line 210 def add_contact_tag_to_group(entity_type, entity_id, tag) @request.post([entity_type.to_s, entity_id.to_s, 'tag', 'group'], {tagName: tag}) end |
#add_deal_to_contact(contact_id, opportunity_id) ⇒ Object
214 215 216 |
# File 'lib/teamlab/Modules/Crm.rb', line 214 def add_deal_to_contact(contact_id, opportunity_id) @request.post(['contact', contact_id.to_s, 'opportunity', opportunity_id.to_s]) end |
#add_opportunity_contact(opportunity_id, contact_id) ⇒ Object
49 50 51 |
# File 'lib/teamlab/Modules/Crm.rb', line 49 def add_opportunity_contact(opportunity_id, contact_id) @request.post(['opportunity', opportunity_id.to_s, 'contact', contact_id.to_s]) end |
#add_persons_to_company(company_id, person_id) ⇒ Object
486 487 488 |
# File 'lib/teamlab/Modules/Crm.rb', line 486 def add_persons_to_company(company_id, person_id) @request.post(['contact', 'company', company_id.to_s, 'person'], personId: person_id) end |
#add_tag(entity_type, entity_id, tag_name) ⇒ Object
622 623 624 |
# File 'lib/teamlab/Modules/Crm.rb', line 622 def add_tag(entity_type, entity_id, tag_name) @request.post([entity_type.to_s, entity_id.to_s, 'tag'], tagName: tag_name) end |
#add_tag_group_to_entity(entity_type, entity_id, tag_name) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
612 613 614 |
# File 'lib/teamlab/Modules/Crm.rb', line 612 def add_tag_group_to_entity(entity_type, entity_id, tag_name) @request.post([entity_type.to_s, 'taglist'], entityId: entity_id, tagName: tag_name) end |
#add_tag_to_batch_contacts(tags, options = {}) ⇒ Object
206 207 208 |
# File 'lib/teamlab/Modules/Crm.rb', line 206 def add_tag_to_batch_contacts(, = {}) @request.post(%w(contact filter taglist), {tags: }.merge()) end |
#add_tag_to_case_group_by_filter(tag_name, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
606 607 608 |
# File 'lib/teamlab/Modules/Crm.rb', line 606 def add_tag_to_case_group_by_filter(tag_name, = {}) @request.post(%w(case filter taglist), {tagName: tag_name}.merge()) end |
#add_tag_to_opportunity_group(tag_name, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
618 619 620 |
# File 'lib/teamlab/Modules/Crm.rb', line 618 def add_tag_to_opportunity_group(tag_name, = {}) @request.post(%w(opportunity filter taglist), {tagName: tag_name}.merge()) end |
#associate_file_with_entity(entity_type, entity_id, *fileids) ⇒ Object
572 573 574 |
# File 'lib/teamlab/Modules/Crm.rb', line 572 def associate_file_with_entity(entity_type, entity_id, *fileids) @request.post([entity_type, entity_id, 'files'], files: fileids.flatten) end |
#change_contact_photo(contact_id, photo) ⇒ Object
TODO: MULTIPART-FORM DATA =====================================================
294 295 296 |
# File 'lib/teamlab/Modules/Crm.rb', line 294 def change_contact_photo(contact_id, photo) @request.put(['contact', contact_id.to_s, 'changephoto'], {photo: photo}) end |
#change_contact_photo_by_url(contact_id, photo_url) ⇒ Object
530 531 532 |
# File 'lib/teamlab/Modules/Crm.rb', line 530 def change_contact_photo_by_url(contact_id, photo_url) @request.put(['contact', contact_id.to_s, 'changephotobyurl'], photourl: photo_url) end |
#close_case(case_id) ⇒ Object
718 719 720 |
# File 'lib/teamlab/Modules/Crm.rb', line 718 def close_case(case_id) @request.put(['case', case_id.to_s, 'close']) end |
#close_task(task_id) ⇒ Object
406 407 408 |
# File 'lib/teamlab/Modules/Crm.rb', line 406 def close_task(task_id) @request.put(['task', task_id.to_s, 'close']) end |
#create_case(title, options = {}) ⇒ Object
694 695 696 |
# File 'lib/teamlab/Modules/Crm.rb', line 694 def create_case(title, = {}) @request.post(%w(case), {title: title}.merge()) end |
#create_company(company_name, managers, options = {}) ⇒ Object
198 199 200 |
# File 'lib/teamlab/Modules/Crm.rb', line 198 def create_company(company_name, managers, = {}) @request.post(%w(contact company), {companyName: company_name, managerList: managers}.merge()) end |
#create_contact_status(title, color, options = {}) ⇒ Object
190 191 192 |
# File 'lib/teamlab/Modules/Crm.rb', line 190 def create_contact_status(title, color, = {}) @request.post(%w(contact status), {title: title, color: color}.merge()) end |
#create_contact_type(title, options = {}) ⇒ Object
186 187 188 |
# File 'lib/teamlab/Modules/Crm.rb', line 186 def create_contact_type(title, = {}) @request.post(%w(contact type), {title: title}.merge()) end |
#create_event(contact_id, content, category_id, options = {}) ⇒ Object
350 351 352 |
# File 'lib/teamlab/Modules/Crm.rb', line 350 def create_event(contact_id, content, category_id, = {}) @request.post(%w(history), {contactId: contact_id, content: content, categoryId: category_id}.merge()) end |
#create_history_category(title, image_name, options = {}) ⇒ Object
354 355 356 |
# File 'lib/teamlab/Modules/Crm.rb', line 354 def create_history_category(title, image_name, = {}) @request.post(%w(history category), {title: title.to_s, imageName: image_name.to_s}.merge()) end |
#create_invoice(options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
168 169 170 |
# File 'lib/teamlab/Modules/Crm.rb', line 168 def create_invoice( = {}) @request.post(%w(invoice), ) end |
#create_invoice_item(title, description, price, stock_keeping_unit, options = {}) ⇒ Object
178 179 180 |
# File 'lib/teamlab/Modules/Crm.rb', line 178 def create_invoice_item(title, description, price, stock_keeping_unit, = {}) @request.post(%w(invoiceitem), {title: title, description: description, price: price, sku: stock_keeping_unit.to_s}.merge()) end |
#create_invoice_line(invoice_id, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
174 175 176 |
# File 'lib/teamlab/Modules/Crm.rb', line 174 def create_invoice_line(invoice_id, = {}) @request.post(%w(invoiceline), {invoiceId: invoice_id}.merge()) end |
#create_invoice_tax(name, description, options = {}) ⇒ Object
182 183 184 |
# File 'lib/teamlab/Modules/Crm.rb', line 182 def create_invoice_tax(name, description, = {}) @request.post(%w(invoice tax), {name: name, description: description}.merge()) end |
#create_opportunity(stage_id, title, responsible_id, options = {}) ⇒ Object
есть тест
41 42 43 |
# File 'lib/teamlab/Modules/Crm.rb', line 41 def create_opportunity(stage_id, title, responsible_id, = {}) #есть тест @request.post(%w(opportunity), {stageId: stage_id, title: title, responsibleid: responsible_id}.merge()) end |
#create_opportunity_stage(title, color, options = {}) ⇒ Object
есть тест
45 46 47 |
# File 'lib/teamlab/Modules/Crm.rb', line 45 def create_opportunity_stage(title, color, = {}) #есть тест @request.post(%w(opportunity stage), { title: title, color: color }.merge()) end |
#create_person(first_name, last_name, options = {}) ⇒ Object
194 195 196 |
# File 'lib/teamlab/Modules/Crm.rb', line 194 def create_person(first_name, last_name, = {}) @request.post(%w(contact person), {firstName: first_name, lastName: last_name}.merge()) end |
#create_tag(entity_type, tag_name) ⇒ Object
600 601 602 |
# File 'lib/teamlab/Modules/Crm.rb', line 600 def create_tag(entity_type, tag_name) @request.post([entity_type.to_s, 'tag'], tagName: tag_name) end |
#create_task(title, deadline, responsible_id, category_id, options = {}) ⇒ Object
162 163 164 |
# File 'lib/teamlab/Modules/Crm.rb', line 162 def create_task(title, deadline, responsible_id, category_id, = {}) @request.post(%w(task), {title: title, deadline: deadline, responsibleId: responsible_id, categoryId: category_id}.merge()) end |
#create_task_category(title, image_name, options = {}) ⇒ Object
394 395 396 |
# File 'lib/teamlab/Modules/Crm.rb', line 394 def create_task_category(title, image_name, = {}) @request.post(%w(task category), {title: title.to_s, imageName: image_name.to_s}.merge()) end |
#create_task_group(title, options = {}) ⇒ Object
202 203 204 |
# File 'lib/teamlab/Modules/Crm.rb', line 202 def create_task_group(title, = {}) @request.post(%w(contact task group), {title: title}.merge()) end |
#create_task_template(container_id, title, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
660 661 662 |
# File 'lib/teamlab/Modules/Crm.rb', line 660 def create_task_template(container_id, title, = {}) @request.post(['tasktemplatecontainer', container_id.to_s, 'tasktemplate'], {title: title}.merge()) end |
#create_task_template_container(entity_type, title) ⇒ Object
654 655 656 |
# File 'lib/teamlab/Modules/Crm.rb', line 654 def create_task_template_container(entity_type, title) @request.post([entity_type.to_s, 'tasktemplatecontainer'], title: title) end |
#create_txt(entity_type, entity_id, title, content) ⇒ Object
576 577 578 |
# File 'lib/teamlab/Modules/Crm.rb', line 576 def create_txt(entity_type, entity_id, title, content) @request.post([entity_type.to_s, entity_id.to_s, 'files', 'text'], title: title, content: content) end |
#create_user_field(entity_type, label, field_type, options = {}) ⇒ Object
750 751 752 |
# File 'lib/teamlab/Modules/Crm.rb', line 750 def create_user_field(entity_type, label, field_type, = {}) @request.post([entity_type.to_s, 'customfield'], {fieldType: field_type, label: label}.merge()) end |
#delete_batch_contacts_by_filter(options = {}) ⇒ Object
314 315 316 |
# File 'lib/teamlab/Modules/Crm.rb', line 314 def delete_batch_contacts_by_filter( = {}) @request.delete(%w(contact filter), ) end |
#delete_batch_invoices(*invoice_ids) ⇒ Object
306 307 308 |
# File 'lib/teamlab/Modules/Crm.rb', line 306 def delete_batch_invoices(*invoice_ids) @request.delete(%w(invoice), [invoiceids: invoice_ids.flatten]) end |
#delete_batch_items(*ids) ⇒ Object
310 311 312 |
# File 'lib/teamlab/Modules/Crm.rb', line 310 def delete_batch_items(*ids) @request.delete(%w(invoiceitem), ids: ids.flatten) end |
#delete_case(case_id) ⇒ Object
734 735 736 |
# File 'lib/teamlab/Modules/Crm.rb', line 734 def delete_case(case_id) @request.delete(['case', case_id.to_s]) end |
#delete_case_contact(case_id, contact_id) ⇒ Object
738 739 740 |
# File 'lib/teamlab/Modules/Crm.rb', line 738 def delete_case_contact(case_id, contact_id) @request.delete(['case', case_id.to_s, 'contact', contact_id.to_s]) end |
#delete_case_group(*case_ids) ⇒ Object
726 727 728 |
# File 'lib/teamlab/Modules/Crm.rb', line 726 def delete_case_group(*case_ids) @request.delete(%w(case), caseIds: case_ids.flatten) end |
#delete_case_group_by_filter(options = {}) ⇒ Object
730 731 732 |
# File 'lib/teamlab/Modules/Crm.rb', line 730 def delete_case_group_by_filter( = {}) @request.delete(%w(case filter), ) end |
#delete_contact(id) ⇒ Object
538 539 540 |
# File 'lib/teamlab/Modules/Crm.rb', line 538 def delete_contact(id) @request.delete(['contact', id.to_s]) end |
#delete_contact_address(contact_id, information_id) ⇒ Object
554 555 556 |
# File 'lib/teamlab/Modules/Crm.rb', line 554 def delete_contact_address(contact_id, information_id) @request.delete(['contact', contact_id.to_s, 'data', 'address', information_id.to_s]) end |
#delete_contact_group(*contact_ids) ⇒ Object
498 499 500 |
# File 'lib/teamlab/Modules/Crm.rb', line 498 def delete_contact_group(*contact_ids) @request.put(%w(contact), contactids: contact_ids.flatten) end |
#delete_contact_info(contact_id, info_id) ⇒ Object
546 547 548 |
# File 'lib/teamlab/Modules/Crm.rb', line 546 def delete_contact_info(contact_id, info_id) @request.delete(['contact', contact_id.to_s, 'data', info_id.to_s]) end |
#delete_contact_status(contact_status_id) ⇒ Object
334 335 336 |
# File 'lib/teamlab/Modules/Crm.rb', line 334 def delete_contact_status(contact_status_id) @request.delete('contact', 'status', contact_status_id) end |
#delete_contact_type(contact_type_id) ⇒ Object
542 543 544 |
# File 'lib/teamlab/Modules/Crm.rb', line 542 def delete_contact_type(contact_type_id) @request.delete(['contact', 'type', contact_type_id.to_s]) end |
#delete_deal_from_contact(contact_id, opportunity_id) ⇒ Object
338 339 340 |
# File 'lib/teamlab/Modules/Crm.rb', line 338 def delete_deal_from_contact(contact_id, opportunity_id) @request.delete(['contact', contact_id.to_s, 'opportunity', opportunity_id.to_s]) end |
#delete_event_and_related_files(id) ⇒ Object
370 371 372 |
# File 'lib/teamlab/Modules/Crm.rb', line 370 def (id) @request.delete(['history', id.to_s]) end |
#delete_file(id) ⇒ Object
584 585 586 |
# File 'lib/teamlab/Modules/Crm.rb', line 584 def delete_file(id) @request.post(['files', id.to_s]) end |
#delete_history_category(id) ⇒ Object
374 375 376 |
# File 'lib/teamlab/Modules/Crm.rb', line 374 def delete_history_category(id) @request.delete(['history', 'category', id.to_s]) end |
#delete_invoice(id) ⇒ Object
326 327 328 |
# File 'lib/teamlab/Modules/Crm.rb', line 326 def delete_invoice(id) @request.delete(['invoice', id.to_s]) end |
#delete_invoice_item(id) ⇒ Object
318 319 320 |
# File 'lib/teamlab/Modules/Crm.rb', line 318 def delete_invoice_item(id) @request.delete(['invoiceitem', id.to_s]) end |
#delete_invoice_line(id) ⇒ Object
330 331 332 |
# File 'lib/teamlab/Modules/Crm.rb', line 330 def delete_invoice_line(id) @request.delete(['invoiceline', id.to_s]) end |
#delete_invoice_tax(id) ⇒ Object
322 323 324 |
# File 'lib/teamlab/Modules/Crm.rb', line 322 def delete_invoice_tax(id) @request.delete(['invoice', 'tax', id.to_s]) end |
#delete_opportunity(opportunity_id) ⇒ Object
98 99 100 |
# File 'lib/teamlab/Modules/Crm.rb', line 98 def delete_opportunity(opportunity_id) @request.delete(['opportunity', opportunity_id.to_s]) end |
#delete_opportunity_contact(opportunity_id, contact_id) ⇒ Object
102 103 104 |
# File 'lib/teamlab/Modules/Crm.rb', line 102 def delete_opportunity_contact(opportunity_id, contact_id) @request.delete(['opportunity', opportunity_id.to_s, 'contact', contact_id.to_s]) end |
#delete_opportunity_group(*opportunity_ids) ⇒ Object
86 87 88 |
# File 'lib/teamlab/Modules/Crm.rb', line 86 def delete_opportunity_group(*opportunity_ids) @request.delete(%w(opportunity), opportunityids: opportunity_ids.flatten) end |
#delete_opportunity_group_by_filter(options = {}) ⇒ Object
90 91 92 |
# File 'lib/teamlab/Modules/Crm.rb', line 90 def delete_opportunity_group_by_filter( = {}) @request.delete(%w(opportunity filter), ) end |
#delete_opportunity_stage(stage_id) ⇒ Object
94 95 96 |
# File 'lib/teamlab/Modules/Crm.rb', line 94 def delete_opportunity_stage(stage_id) @request.delete(['opportunity', 'stage', stage_id.to_s]) end |
#delete_person_from_company(company_id, person_id) ⇒ Object
550 551 552 |
# File 'lib/teamlab/Modules/Crm.rb', line 550 def delete_person_from_company(company_id, person_id) @request.delete(['contact', 'company', company_id.to_s, 'person'], {personId: person_id}) end |
#delete_tag(entity_type, tag_name) ⇒ Object
626 627 628 |
# File 'lib/teamlab/Modules/Crm.rb', line 626 def delete_tag(entity_type, tag_name) @request.delete([entity_type.to_s, 'tag'], tagName: tag_name) end |
#delete_task(id) ⇒ Object
422 423 424 |
# File 'lib/teamlab/Modules/Crm.rb', line 422 def delete_task(id) @request.delete(['task', id.to_s]) end |
#delete_task_category(category_id) ⇒ Object
426 427 428 |
# File 'lib/teamlab/Modules/Crm.rb', line 426 def delete_task_category(category_id) @request.delete(['task', 'category', category_id.to_s]) end |
#delete_task_template(id) ⇒ Object
678 679 680 |
# File 'lib/teamlab/Modules/Crm.rb', line 678 def delete_task_template(id) @request.delete(['tasktemplatecontainer', 'tasktemplate', id.to_s]) end |
#delete_task_template_container(container_id) ⇒ Object
674 675 676 |
# File 'lib/teamlab/Modules/Crm.rb', line 674 def delete_task_template_container(container_id) @request.delete(['tasktemplatecontainer', container_id.to_s]) end |
#delete_unused_tags(entity_type) ⇒ Object
630 631 632 |
# File 'lib/teamlab/Modules/Crm.rb', line 630 def (entity_type) @request.delete([entity_type.to_s, 'tag', 'unused']) end |
#delete_user_field(entity_type, field_id) ⇒ Object
766 767 768 |
# File 'lib/teamlab/Modules/Crm.rb', line 766 def delete_user_field(entity_type, field_id) @request.delete([entity_type.to_s, 'customfield', field_id.to_s]) end |
#get_all_case_contacts(case_id) ⇒ Object
690 691 692 |
# File 'lib/teamlab/Modules/Crm.rb', line 690 def get_all_case_contacts(case_id) @request.get(['case', case_id.to_s, 'contact']) end |
#get_all_categories(info_type) ⇒ Object
454 455 456 |
# File 'lib/teamlab/Modules/Crm.rb', line 454 def get_all_categories(info_type) @request.get(['contact', 'data', info_type.to_s, 'category']) end |
#get_all_contact_info_types ⇒ Object
438 439 440 |
# File 'lib/teamlab/Modules/Crm.rb', line 438 def get_all_contact_info_types @request.get(%w(contact data infotype)) end |
#get_all_contact_tags(contact_id) ⇒ Object
592 593 594 |
# File 'lib/teamlab/Modules/Crm.rb', line 592 def (contact_id) @request.get(['contact', contact_id.to_s, 'tag']) end |
#get_all_contact_types ⇒ Object
430 431 432 |
# File 'lib/teamlab/Modules/Crm.rb', line 430 def get_all_contact_types @request.get(%w(contact type)) end |
#get_all_history_categories ⇒ Object
346 347 348 |
# File 'lib/teamlab/Modules/Crm.rb', line 346 def get_all_history_categories @request.get(%w(history category)) end |
#get_all_opportunity_contacts(opportunity_id) ⇒ Object
33 34 35 |
# File 'lib/teamlab/Modules/Crm.rb', line 33 def get_all_opportunity_contacts(opportunity_id) @request.get(['opportunity', opportunity_id.to_s, 'contact']) end |
#get_all_opportunity_stages ⇒ Object
region Opportunity
9 10 11 |
# File 'lib/teamlab/Modules/Crm.rb', line 9 def get_all_opportunity_stages @request.get(%w(opportunity stage)) end |
#get_all_task_categories ⇒ Object
382 383 384 |
# File 'lib/teamlab/Modules/Crm.rb', line 382 def get_all_task_categories @request.get(%w(task category)) end |
#get_case_by_id(id) ⇒ Object
686 687 688 |
# File 'lib/teamlab/Modules/Crm.rb', line 686 def get_case_by_id(id) @request.get(['case', id.to_s]) end |
#get_case_list(options = {}) ⇒ Object
682 683 684 |
# File 'lib/teamlab/Modules/Crm.rb', line 682 def get_case_list( = {}) @request.get(%w(case filter), ) end |
#get_cases_by_prefix(contact_id, prefix) ⇒ Object
118 119 120 |
# File 'lib/teamlab/Modules/Crm.rb', line 118 def get_cases_by_prefix(contact_id, prefix) @request.get(%w(case byprefix), contactId: contact_id, prefix: prefix) end |
#get_company_linked_persons_list(company_id) ⇒ Object
458 459 460 |
# File 'lib/teamlab/Modules/Crm.rb', line 458 def get_company_linked_persons_list(company_id) @request.get(['contact', 'company', company_id.to_s, 'person']) end |
#get_contact_by_id(id) ⇒ Object
434 435 436 |
# File 'lib/teamlab/Modules/Crm.rb', line 434 def get_contact_by_id(id) @request.get(['contact', id.to_s]) end |
#get_contact_info(contact_id, contact_info_id) ⇒ Object
450 451 452 |
# File 'lib/teamlab/Modules/Crm.rb', line 450 def get_contact_info(contact_id, contact_info_id) @request.get(['contact', contact_id.to_s, 'data', contact_info_id.to_s]) end |
#get_contact_information_by_type(contact_id, info_type) ⇒ Object
462 463 464 |
# File 'lib/teamlab/Modules/Crm.rb', line 462 def get_contact_information_by_type(contact_id, info_type) @request.get(['contact', contact_id.to_s, 'data', info_type.to_s]) end |
#get_contact_status_by_id(contact_status_id) ⇒ Object
154 155 156 |
# File 'lib/teamlab/Modules/Crm.rb', line 154 def get_contact_status_by_id(contact_status_id) @request.get(['contact', 'status', contact_status_id.to_s]) end |
#get_contact_statuses ⇒ Object
122 123 124 |
# File 'lib/teamlab/Modules/Crm.rb', line 122 def get_contact_statuses @request.get(%w(contact status)) end |
#get_contact_type(id) ⇒ Object
446 447 448 |
# File 'lib/teamlab/Modules/Crm.rb', line 446 def get_contact_type(id) @request.get(['contact', 'type', id.to_s]) end |
#get_contact_upcoming_tasks(*contact_ids) ⇒ Object
398 399 400 |
# File 'lib/teamlab/Modules/Crm.rb', line 398 def get_contact_upcoming_tasks(*contact_ids) @request.post(%w(contact task near), contactid: contact_ids.flatten) end |
#get_contacts_by_filter(options = {}) ⇒ Object
134 135 136 |
# File 'lib/teamlab/Modules/Crm.rb', line 134 def get_contacts_by_filter( = {}) @request.get(%w(contact filter), ) end |
#get_contacts_by_project_id(id) ⇒ Object
442 443 444 |
# File 'lib/teamlab/Modules/Crm.rb', line 442 def get_contacts_by_project_id(id) @request.get(['contact', 'project', id.to_s]) end |
#get_contacts_for_mail(*contact_ids) ⇒ Object
114 115 116 |
# File 'lib/teamlab/Modules/Crm.rb', line 114 def get_contacts_for_mail(*contact_ids) @request.get(%w(contact mail), contactids: contact_ids.flatten) end |
#get_currency_list ⇒ Object
13 14 15 |
# File 'lib/teamlab/Modules/Crm.rb', line 13 def get_currency_list @request.get(%w(settings currency)) end |
#get_entity_invoices(entity_type, entity_id) ⇒ Object
158 159 160 |
# File 'lib/teamlab/Modules/Crm.rb', line 158 def get_entity_invoices(entity_type, entity_id) @request.get([entity_type.to_s, 'invoicelist', entity_id.to_s]) end |
#get_entity_tags(entity_type, entity_id) ⇒ Object
596 597 598 |
# File 'lib/teamlab/Modules/Crm.rb', line 596 def (entity_type, entity_id) @request.get([entity_type.to_s, 'tag', entity_id.to_s]) end |
#get_event_list_by_filter(options = {}) ⇒ Object
342 343 344 |
# File 'lib/teamlab/Modules/Crm.rb', line 342 def get_event_list_by_filter( = {}) @request.get(%w(history filter), ) end |
#get_file_list(entity_type, entity_id) ⇒ Object
568 569 570 |
# File 'lib/teamlab/Modules/Crm.rb', line 568 def get_file_list(entity_type, entity_id) @request.get([entity_type.to_s, entity_id.to_s, 'files']) end |
#get_invoice_by_id(id) ⇒ Object
146 147 148 |
# File 'lib/teamlab/Modules/Crm.rb', line 146 def get_invoice_by_id(id) @request.get(['invoice', id.to_s]) end |
#get_invoice_items_by_filter(options = {}) ⇒ Object
142 143 144 |
# File 'lib/teamlab/Modules/Crm.rb', line 142 def get_invoice_items_by_filter( = {}) @request.get(%w(invoiceitem filter), ) end |
#get_invoice_sample ⇒ Object
126 127 128 |
# File 'lib/teamlab/Modules/Crm.rb', line 126 def get_invoice_sample @request.get(%w(invoice sample)) end |
#get_invoice_taxes ⇒ Object
region General
110 111 112 |
# File 'lib/teamlab/Modules/Crm.rb', line 110 def get_invoice_taxes @request.get(%w(invoice tax)) end |
#get_invoices_by_filter(options = {}) ⇒ Object
130 131 132 |
# File 'lib/teamlab/Modules/Crm.rb', line 130 def get_invoices_by_filter( = {}) @request.get(%w(invoice filter), ) end |
#get_opportunity_by_id(id) ⇒ Object
29 30 31 |
# File 'lib/teamlab/Modules/Crm.rb', line 29 def get_opportunity_by_id(id) @request.get(['opportunity', id.to_s]) end |
#get_opportunity_list(options = {}) ⇒ Object
17 18 19 |
# File 'lib/teamlab/Modules/Crm.rb', line 17 def get_opportunity_list( = {}) @request.get(%w(opportunity filter), ) end |
#get_opportunity_stage(stage_id) ⇒ Object
25 26 27 |
# File 'lib/teamlab/Modules/Crm.rb', line 25 def get_opportunity_stage(stage_id) @request.get(['opportunity', 'stage', stage_id.to_s]) end |
#get_result_of_convertation(options = {}) ⇒ Object
21 22 23 |
# File 'lib/teamlab/Modules/Crm.rb', line 21 def get_result_of_convertation( = {}) @request.get(%w(settings currency convert), ) end |
#get_root_folder_id ⇒ Object
region Files
564 565 566 |
# File 'lib/teamlab/Modules/Crm.rb', line 564 def get_root_folder_id @request.get(%w(files root)) end |
#get_settings ⇒ Object
138 139 140 |
# File 'lib/teamlab/Modules/Crm.rb', line 138 def get_settings @request.get(%w(invoice settings)) end |
#get_simple_contacts(options = {}) ⇒ Object
150 151 152 |
# File 'lib/teamlab/Modules/Crm.rb', line 150 def get_simple_contacts( = {}) @request.get(%w(contact simple filter), ) end |
#get_summary_table(currency) ⇒ Object
37 38 39 |
# File 'lib/teamlab/Modules/Crm.rb', line 37 def get_summary_table(currency) @request.get(['settings', 'currency', currency.to_s, 'summarytable']) end |
#get_tags_for_entity_type(entity_type) ⇒ Object
588 589 590 |
# File 'lib/teamlab/Modules/Crm.rb', line 588 def (entity_type) @request.get([entity_type.to_s, 'tag']) end |
#get_task_by_id(task_id) ⇒ Object
386 387 388 |
# File 'lib/teamlab/Modules/Crm.rb', line 386 def get_task_by_id(task_id) @request.get(['task', task_id.to_s]) end |
#get_task_category(category_id) ⇒ Object
390 391 392 |
# File 'lib/teamlab/Modules/Crm.rb', line 390 def get_task_category(category_id) @request.get(['task', 'category', category_id.to_s]) end |
#get_task_list_by_filter(options = {}) ⇒ Object
378 379 380 |
# File 'lib/teamlab/Modules/Crm.rb', line 378 def get_task_list_by_filter( = {}) @request.get(%w(task filter), ) end |
#get_task_template(id) ⇒ Object
646 647 648 |
# File 'lib/teamlab/Modules/Crm.rb', line 646 def get_task_template(id) @request.get(['tasktemplatecontainer', 'tasktemplate', id.to_s]) end |
#get_task_template_container(id) ⇒ Object
642 643 644 |
# File 'lib/teamlab/Modules/Crm.rb', line 642 def get_task_template_container(id) @request.get(['tasktemplatecontainer', id.to_s]) end |
#get_task_template_container_list(entity_type) ⇒ Object
638 639 640 |
# File 'lib/teamlab/Modules/Crm.rb', line 638 def get_task_template_container_list(entity_type) @request.get([entity_type.to_s, 'tasktemplatecontainer']) end |
#get_task_template_list_by_container_id(id) ⇒ Object
650 651 652 |
# File 'lib/teamlab/Modules/Crm.rb', line 650 def get_task_template_list_by_container_id(id) @request.get(['tasktemplatecontainer', id.to_s, 'tasktemplate']) end |
#get_user_field_list(entity_type) ⇒ Object
746 747 748 |
# File 'lib/teamlab/Modules/Crm.rb', line 746 def get_user_field_list(entity_type) @request.get([entity_type.to_s, 'customfield', 'definitions']) end |
#get_user_field_values(entity_type, entity_id) ⇒ Object
742 743 744 |
# File 'lib/teamlab/Modules/Crm.rb', line 742 def get_user_field_values(entity_type, entity_id) @request.get([entity_type.to_s, entity_id.to_s, 'customfield']) end |
#group_contact_info(*items) ⇒ Object
466 467 468 |
# File 'lib/teamlab/Modules/Crm.rb', line 466 def group_contact_info(*items) @request.post(%w(contact data), items: items.flatten) end |
#group_contact_info_update(*items) ⇒ Object
502 503 504 |
# File 'lib/teamlab/Modules/Crm.rb', line 502 def group_contact_info_update(*items) @request.put(%w(contact data), items: items.flatten) end |
#link_contact_list_with_project(project_id, *contact_ids) ⇒ Object
482 483 484 |
# File 'lib/teamlab/Modules/Crm.rb', line 482 def link_contact_list_with_project(project_id, *contact_ids) @request.post(['contact', 'project', project_id.to_s], contactId: contact_ids.flatten) end |
#link_contact_with_project(contact_id, project_id) ⇒ Object
490 491 492 |
# File 'lib/teamlab/Modules/Crm.rb', line 490 def link_contact_with_project(contact_id, project_id) @request.post(['contact', contact_id.to_s, 'project', project_id.to_s]) end |
#merge_contacts(from_contact_id, to_contact_id) ⇒ Object
506 507 508 |
# File 'lib/teamlab/Modules/Crm.rb', line 506 def merge_contacts(from_contact_id, to_contact_id) @request.put(%w(contact merge), fromcontactid: from_contact_id, tocontactid: to_contact_id) end |
#quick_company_list_creation(*names) ⇒ Object
474 475 476 |
# File 'lib/teamlab/Modules/Crm.rb', line 474 def quick_company_list_creation(*names) @request.post(%w(contact company quick), companyName: names.flatten) end |
#quick_person_list_creation(data) ⇒ Object
470 471 472 |
# File 'lib/teamlab/Modules/Crm.rb', line 470 def quick_person_list_creation(data) @request.post(%w(contact person quick), data: data) end |
#remove_contact_from_project(contact_id, project_id) ⇒ Object
558 559 560 |
# File 'lib/teamlab/Modules/Crm.rb', line 558 def remove_contact_from_project(contact_id, project_id) @request.delete(['contact', contact_id.to_s, 'project', project_id.to_s]) end |
#remove_tag(entity_type, entity_id, tag_name) ⇒ Object
634 635 636 |
# File 'lib/teamlab/Modules/Crm.rb', line 634 def remove_tag(entity_type, entity_id, tag_name) @request.delete([entity_type.to_s, entity_id.to_s, 'tag'], tagName: tag_name) end |
#resume_case(case_id) ⇒ Object
714 715 716 |
# File 'lib/teamlab/Modules/Crm.rb', line 714 def resume_case(case_id) @request.put(['case', case_id.to_s, 'reopen']) end |
#resume_task(task_id) ⇒ Object
410 411 412 |
# File 'lib/teamlab/Modules/Crm.rb', line 410 def resume_task(task_id) @request.put(['task', task_id.to_s, 'reopen']) end |
#save_number_settings(options = {}) ⇒ Object
252 253 254 |
# File 'lib/teamlab/Modules/Crm.rb', line 252 def save_number_settings( = {}) @request.put(%w(invoice settings name), ) end |
#save_terms_settings(options = {}) ⇒ Object
264 265 266 |
# File 'lib/teamlab/Modules/Crm.rb', line 264 def save_terms_settings( = {}) @request.put(%w(invoice settings terms), ) end |
#set_access_to_batch_contact(options = {}) ⇒ Object
256 257 258 |
# File 'lib/teamlab/Modules/Crm.rb', line 256 def set_access_to_batch_contact( = {}) @request.put(%w(contact filter access), ) end |
#set_case_access_rights(case_ids, options = {}) ⇒ Object
702 703 704 |
# File 'lib/teamlab/Modules/Crm.rb', line 702 def set_case_access_rights(case_ids, = {}) @request.put(%w(case access), {caseId: case_ids}.merge()) end |
#set_case_access_rights_by_filter(options = {}) ⇒ Object
710 711 712 |
# File 'lib/teamlab/Modules/Crm.rb', line 710 def set_case_access_rights_by_filter( = {}) @request.put(%w(case filter access), ) end |
#set_contact_access_rights(contact_id, options = {}) ⇒ Object
518 519 520 |
# File 'lib/teamlab/Modules/Crm.rb', line 518 def set_contact_access_rights(contact_id, = {}) @request.put(['contact', contact_id.to_s, 'access'], ) end |
#set_contacts_access_rights(contact_ids, options = {}) ⇒ Object
510 511 512 |
# File 'lib/teamlab/Modules/Crm.rb', line 510 def set_contacts_access_rights(contact_ids, = {}) @request.put(%w(contact access), {contactId: contact_ids}.merge()) end |
#set_is_portal_configured(options = {}) ⇒ Object
218 219 220 |
# File 'lib/teamlab/Modules/Crm.rb', line 218 def set_is_portal_configured( = {}) @request.put(%w(settings), ) end |
#set_opportunity_access_rights(opportunity_ids, is_private, *users) ⇒ Object
53 54 55 |
# File 'lib/teamlab/Modules/Crm.rb', line 53 def set_opportunity_access_rights(opportunity_ids, is_private, *users) @request.put(%w(opportunity access), opportunityid: opportunity_ids.to_a.flatten, isPrivate: is_private, accessList: users.flatten) end |
#set_opportunity_access_rights_for_users(options = {}) ⇒ Object
65 66 67 |
# File 'lib/teamlab/Modules/Crm.rb', line 65 def set_opportunity_access_rights_for_users( = {}) @request.put(%w(opportunity filter access), ) end |
#set_rights_to_case(case_id, options = {}) ⇒ Object
722 723 724 |
# File 'lib/teamlab/Modules/Crm.rb', line 722 def set_rights_to_case(case_id, = {}) @request.put(['case', case_id.to_s, 'access'], ) end |
#set_rights_to_opportunity(opportunity_id, is_private, access_list) ⇒ Object
78 79 80 |
# File 'lib/teamlab/Modules/Crm.rb', line 78 def set_rights_to_opportunity(opportunity_id, is_private, access_list) @request.put(['opportunity', opportunity_id.to_s, 'access'], { isPrivate: is_private, accessList: access_list }) end |
#set_user_field_value(entity_type, entity_id, field_id, field_value) ⇒ Object
754 755 756 |
# File 'lib/teamlab/Modules/Crm.rb', line 754 def set_user_field_value(entity_type, entity_id, field_id, field_value) @request.post([entity_type.to_s, entity_id.to_s, 'customfield', field_id.to_s], fieldValue: field_value) end |
#update_case(case_id, title, options = {}) ⇒ Object
706 707 708 |
# File 'lib/teamlab/Modules/Crm.rb', line 706 def update_case(case_id, title, = {}) @request.put(['case', case_id.to_s], {title: title}.merge()) end |
#update_company(company_id, company_name, options = {}) ⇒ Object
522 523 524 |
# File 'lib/teamlab/Modules/Crm.rb', line 522 def update_company(company_id, company_name, = {}) @request.put(['contact', 'company', company_id.to_s], {companyName: company_name.to_s}.merge()) end |
#update_company_and_participants_status(company_id, contact_status_id) ⇒ Object
302 303 304 |
# File 'lib/teamlab/Modules/Crm.rb', line 302 def update_company_and_participants_status(company_id, contact_status_id) @request.put(['contact', 'company', company_id.to_s, 'status'], contactStatusId: contact_status_id) end |
#update_contact_address(contact_id, information_id, address, options = {}) ⇒ Object
534 535 536 |
# File 'lib/teamlab/Modules/Crm.rb', line 534 def update_contact_address(contact_id, information_id, address, = {}) @request.put(['contact', contact_id.to_s, 'data', 'address', information_id.to_s], {address: address}.merge()) end |
#update_contact_info(information_id, contact_id, data, options = {}) ⇒ Object
526 527 528 |
# File 'lib/teamlab/Modules/Crm.rb', line 526 def update_contact_info(information_id, contact_id, data, = {}) @request.put(['contact', contact_id.to_s, 'data', information_id.to_s], {data: data}.merge()) end |
#update_contact_status(id, title, options = {}) ⇒ Object
238 239 240 |
# File 'lib/teamlab/Modules/Crm.rb', line 238 def update_contact_status(id, title, = {}) @request.put(['contact', 'status', id.to_s], {title: title.to_s}.merge()) end |
#update_contact_status_by_id(contact_id, contact_status_id) ⇒ Object
284 285 286 |
# File 'lib/teamlab/Modules/Crm.rb', line 284 def update_contact_status_by_id(contact_id, contact_status_id) @request.put(['contact', contact_id, 'status'], {contactStatusid: contact_status_id}) end |
#update_contact_status_color(status_id, color) ⇒ Object
276 277 278 |
# File 'lib/teamlab/Modules/Crm.rb', line 276 def update_contact_status_color(status_id, color) @request.put(['contact', 'status', status_id.to_s, 'color'], color: color) end |
#update_contact_type(id, title, options = {}) ⇒ Object
234 235 236 |
# File 'lib/teamlab/Modules/Crm.rb', line 234 def update_contact_type(id, title, = {}) @request.put(['contact', 'type', id.to_s], {title: title}.merge()) end |
#update_contact_types_order(*titles) ⇒ Object
514 515 516 |
# File 'lib/teamlab/Modules/Crm.rb', line 514 def update_contact_types_order(*titles) @request.put(%w(contact type reorder), titles: titles.flatten) end |
#update_crm_contact_status_settings(options = {}) ⇒ Object
268 269 270 |
# File 'lib/teamlab/Modules/Crm.rb', line 268 def update_crm_contact_status_settings( = {}) @request.put(%w(contact status settings), ) end |
#update_crm_contact_tag_setting(options = {}) ⇒ Object
248 249 250 |
# File 'lib/teamlab/Modules/Crm.rb', line 248 def update_crm_contact_tag_setting( = {}) @request.put(%w(contact tag settings), ) end |
#update_history_categories_order(*titles) ⇒ Object
362 363 364 |
# File 'lib/teamlab/Modules/Crm.rb', line 362 def update_history_categories_order(*titles) @request.put(%w(history category reorder), {titles: titles.flatten}) end |
#update_history_category(id, title, options = {}) ⇒ Object
358 359 360 |
# File 'lib/teamlab/Modules/Crm.rb', line 358 def update_history_category(id, title, = {}) @request.put(['history', 'category', id.to_s], {title: title}.merge()) end |
#update_history_category_icon(id, icon_name) ⇒ Object
366 367 368 |
# File 'lib/teamlab/Modules/Crm.rb', line 366 def update_history_category_icon(id, icon_name) @request.put(['history', 'category', id.to_s, 'icon'], imageName: icon_name.to_s) end |
#update_invoice(id, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
244 245 246 |
# File 'lib/teamlab/Modules/Crm.rb', line 244 def update_invoice(id, = {}) @request.put(['invoice', id.to_s], ) end |
#update_invoice_item(id, title, description, price, stock_keeping_unit, options = {}) ⇒ Object
226 227 228 |
# File 'lib/teamlab/Modules/Crm.rb', line 226 def update_invoice_item(id, title, description, price, stock_keeping_unit, = {}) @request.put(['invoiceitem', id.to_s], {title: title, description: description, price: price, sku: stock_keeping_unit.to_s}.merge()) end |
#update_invoice_line(invoice_line_id, invoice_id, options = {}) ⇒ Object
288 289 290 |
# File 'lib/teamlab/Modules/Crm.rb', line 288 def update_invoice_line(invoice_line_id, invoice_id, = {}) @request.put(['invoiceline', invoice_line_id], {invoiceId: invoice_id}.merge()) end |
#update_invoice_patch_status(status, invoice_ids) ⇒ Object
272 273 274 |
# File 'lib/teamlab/Modules/Crm.rb', line 272 def update_invoice_patch_status(status, invoice_ids) @request.put(['invoice', 'status', status.to_s], {invoiceids: invoice_ids}) end |
#update_invoice_tax(id, name, options = {}) ⇒ Object
230 231 232 |
# File 'lib/teamlab/Modules/Crm.rb', line 230 def update_invoice_tax(id, name, = {}) @request.put(['invoice', 'tax', id.to_s], {name: name}.merge()) end |
#update_opportunity(opportunity_id, contact_id, title, responsible_id, stage_id, options = {}) ⇒ Object
69 70 71 72 |
# File 'lib/teamlab/Modules/Crm.rb', line 69 def update_opportunity(opportunity_id, contact_id, title, responsible_id, stage_id, = {}) @request.put(['opportunity', opportunity_id.to_s], { contactId: contact_id, title: title, responsibleid: responsible_id, stageid: stage_id }.merge()) end |
#update_opportunity_stage(id, title, color, options = {}) ⇒ Object
57 58 59 |
# File 'lib/teamlab/Modules/Crm.rb', line 57 def update_opportunity_stage(id, title, color, = {}) @request.put(['opportunity', 'stage', id.to_s], { title: title, color: color, }.merge()) end |
#update_opportunity_stage_color(stage_id, color) ⇒ Object
74 75 76 |
# File 'lib/teamlab/Modules/Crm.rb', line 74 def update_opportunity_stage_color(stage_id, color) @request.put(['opportunity', 'stage', stage_id.to_s, 'color'], { color: color }) end |
#update_opportunity_stages_order(options = {}) ⇒ Object
61 62 63 |
# File 'lib/teamlab/Modules/Crm.rb', line 61 def update_opportunity_stages_order( = {}) @request.put(%w(opportunity stage reorder), ) end |
#update_opportunity_to_stage(opportunity_id, stage_id) ⇒ Object
82 83 84 |
# File 'lib/teamlab/Modules/Crm.rb', line 82 def update_opportunity_to_stage(opportunity_id, stage_id) @request.put(['opportunity', opportunity_id.to_s, 'stage', stage_id.to_s], stageid: stage_id) end |
#update_person(id, first_name, last_name, options = {}) ⇒ Object
280 281 282 |
# File 'lib/teamlab/Modules/Crm.rb', line 280 def update_person(id, first_name, last_name, = {}) @request.put(['contact', 'person', id.to_s], {firstName: first_name, lastName: last_name}.merge()) end |
#update_person_and_its_company_status(person_id, contact_status_id) ⇒ Object
298 299 300 |
# File 'lib/teamlab/Modules/Crm.rb', line 298 def update_person_and_its_company_status(person_id, contact_status_id) @request.put(['contact', 'person', person_id.to_s, 'status'], contactStatusId: contact_status_id) end |
#update_selected_user_field(entity_type, user_field_id, label, field_type, options = {}) ⇒ Object
758 759 760 |
# File 'lib/teamlab/Modules/Crm.rb', line 758 def update_selected_user_field(entity_type, user_field_id, label, field_type, = {}) @request.put([entity_type.to_s, 'customfield', user_field_id.to_s], {fieldType: field_type, label: label}.merge()) end |
#update_statuses_contact_order(options = {}) ⇒ Object
260 261 262 |
# File 'lib/teamlab/Modules/Crm.rb', line 260 def update_statuses_contact_order( = {}) @request.put(%w(contact status reorder), ) end |
#update_task(task_id, title, deadline, category_id, options = {}) ⇒ Object
222 223 224 |
# File 'lib/teamlab/Modules/Crm.rb', line 222 def update_task(task_id, title, deadline, category_id, = {}) @request.put(['task', task_id.to_s], {title: title, deadline: deadline, categoryid: category_id}.merge()) end |
#update_task_categories_order(*titles) ⇒ Object
414 415 416 |
# File 'lib/teamlab/Modules/Crm.rb', line 414 def update_task_categories_order(*titles) @request.put(%w(task category reorder), titles: titles.flatten) end |
#update_task_category(category_id, title, options = {}) ⇒ Object
402 403 404 |
# File 'lib/teamlab/Modules/Crm.rb', line 402 def update_task_category(category_id, title, = {}) @request.put(['task', 'category', category_id.to_s], { title: title }.merge()) end |
#update_task_category_icon(id, image_name) ⇒ Object
418 419 420 |
# File 'lib/teamlab/Modules/Crm.rb', line 418 def update_task_category_icon(id, image_name) @request.put(['task', 'category', id.to_s, 'icon'], imageName: image_name.to_s) end |
#update_task_template(container_id, task_template_id, title, options = {}) ⇒ Object
TODO: OPTIONAL VARIABLES =====================================================
670 671 672 |
# File 'lib/teamlab/Modules/Crm.rb', line 670 def update_task_template(container_id, task_template_id, title, = {}) @request.put(['tasktemplatecontainer', container_id.to_s, 'tasktemplate'], {id: task_template_id.to_s, title: title}.merge()) end |
#update_task_template_container(container_id, title) ⇒ Object
664 665 666 |
# File 'lib/teamlab/Modules/Crm.rb', line 664 def update_task_template_container(container_id, title) @request.put(['tasktemplatecontainer', container_id.to_s], title: title) end |
#update_user_fields_order(entity_type, *field_ids) ⇒ Object
762 763 764 |
# File 'lib/teamlab/Modules/Crm.rb', line 762 def update_user_fields_order(entity_type, *field_ids) @request.put([entity_type.to_s, 'customfield', 'reorder'], {fieldIds: field_ids.flatten}) end |
#upload_file(entity_type, entity_id, file) ⇒ Object
580 581 582 |
# File 'lib/teamlab/Modules/Crm.rb', line 580 def upload_file(entity_type, entity_id, file) @request.post([entity_type.to_s, entity_id.to_s, 'files', 'upload'], somefile: File.new(file)) end |