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.
3 4 5 |
# File 'lib/teamlab/modules/crm.rb', line 3 def initialize @request = Teamlab::Request.new('crm') end |
Instance Method Details
#add_case_contact(case_id, contact_id) ⇒ Object
697 698 699 |
# File 'lib/teamlab/modules/crm.rb', line 697 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
493 494 495 |
# File 'lib/teamlab/modules/crm.rb', line 493 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
477 478 479 |
# File 'lib/teamlab/modules/crm.rb', line 477 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
209 210 211 |
# File 'lib/teamlab/modules/crm.rb', line 209 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
213 214 215 |
# File 'lib/teamlab/modules/crm.rb', line 213 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
48 49 50 |
# File 'lib/teamlab/modules/crm.rb', line 48 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
485 486 487 |
# File 'lib/teamlab/modules/crm.rb', line 485 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
621 622 623 |
# File 'lib/teamlab/modules/crm.rb', line 621 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 =====================================================
611 612 613 |
# File 'lib/teamlab/modules/crm.rb', line 611 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
205 206 207 |
# File 'lib/teamlab/modules/crm.rb', line 205 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 =====================================================
605 606 607 |
# File 'lib/teamlab/modules/crm.rb', line 605 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 =====================================================
617 618 619 |
# File 'lib/teamlab/modules/crm.rb', line 617 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
571 572 573 |
# File 'lib/teamlab/modules/crm.rb', line 571 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 =====================================================
293 294 295 |
# File 'lib/teamlab/modules/crm.rb', line 293 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
529 530 531 |
# File 'lib/teamlab/modules/crm.rb', line 529 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
717 718 719 |
# File 'lib/teamlab/modules/crm.rb', line 717 def close_case(case_id) @request.put(['case', case_id.to_s, 'close']) end |
#close_task(task_id) ⇒ Object
405 406 407 |
# File 'lib/teamlab/modules/crm.rb', line 405 def close_task(task_id) @request.put(['task', task_id.to_s, 'close']) end |
#create_case(title, options = {}) ⇒ Object
693 694 695 |
# File 'lib/teamlab/modules/crm.rb', line 693 def create_case(title, = {}) @request.post(%w(case), { title: title }.merge()) end |
#create_company(company_name, managers, options = {}) ⇒ Object
197 198 199 |
# File 'lib/teamlab/modules/crm.rb', line 197 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
189 190 191 |
# File 'lib/teamlab/modules/crm.rb', line 189 def create_contact_status(title, color, = {}) @request.post(%w(contact status), { title: title, color: color }.merge()) end |
#create_contact_type(title, options = {}) ⇒ Object
185 186 187 |
# File 'lib/teamlab/modules/crm.rb', line 185 def create_contact_type(title, = {}) @request.post(%w(contact type), { title: title }.merge()) end |
#create_event(contact_id, content, category_id, options = {}) ⇒ Object
349 350 351 |
# File 'lib/teamlab/modules/crm.rb', line 349 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
353 354 355 |
# File 'lib/teamlab/modules/crm.rb', line 353 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 =====================================================
167 168 169 |
# File 'lib/teamlab/modules/crm.rb', line 167 def create_invoice( = {}) @request.post(%w(invoice), ) end |
#create_invoice_item(title, description, price, stock_keeping_unit, options = {}) ⇒ Object
177 178 179 |
# File 'lib/teamlab/modules/crm.rb', line 177 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 =====================================================
173 174 175 |
# File 'lib/teamlab/modules/crm.rb', line 173 def create_invoice_line(invoice_id, = {}) @request.post(%w(invoiceline), { invoiceId: invoice_id }.merge()) end |
#create_invoice_tax(name, description, options = {}) ⇒ Object
181 182 183 |
# File 'lib/teamlab/modules/crm.rb', line 181 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
40 41 42 |
# File 'lib/teamlab/modules/crm.rb', line 40 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
44 45 46 |
# File 'lib/teamlab/modules/crm.rb', line 44 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
193 194 195 |
# File 'lib/teamlab/modules/crm.rb', line 193 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
599 600 601 |
# File 'lib/teamlab/modules/crm.rb', line 599 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
161 162 163 |
# File 'lib/teamlab/modules/crm.rb', line 161 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
393 394 395 |
# File 'lib/teamlab/modules/crm.rb', line 393 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
201 202 203 |
# File 'lib/teamlab/modules/crm.rb', line 201 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 =====================================================
659 660 661 |
# File 'lib/teamlab/modules/crm.rb', line 659 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
653 654 655 |
# File 'lib/teamlab/modules/crm.rb', line 653 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
575 576 577 |
# File 'lib/teamlab/modules/crm.rb', line 575 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
749 750 751 |
# File 'lib/teamlab/modules/crm.rb', line 749 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
313 314 315 |
# File 'lib/teamlab/modules/crm.rb', line 313 def delete_batch_contacts_by_filter( = {}) @request.delete(%w(contact filter), ) end |
#delete_batch_invoices(*invoice_ids) ⇒ Object
305 306 307 |
# File 'lib/teamlab/modules/crm.rb', line 305 def delete_batch_invoices(*invoice_ids) @request.delete(%w(invoice), [invoiceids: invoice_ids.flatten]) end |
#delete_batch_items(*ids) ⇒ Object
309 310 311 |
# File 'lib/teamlab/modules/crm.rb', line 309 def delete_batch_items(*ids) @request.delete(%w(invoiceitem), ids: ids.flatten) end |
#delete_case(case_id) ⇒ Object
733 734 735 |
# File 'lib/teamlab/modules/crm.rb', line 733 def delete_case(case_id) @request.delete(['case', case_id.to_s]) end |
#delete_case_contact(case_id, contact_id) ⇒ Object
737 738 739 |
# File 'lib/teamlab/modules/crm.rb', line 737 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
725 726 727 |
# File 'lib/teamlab/modules/crm.rb', line 725 def delete_case_group(*case_ids) @request.delete(%w(case), caseIds: case_ids.flatten) end |
#delete_case_group_by_filter(options = {}) ⇒ Object
729 730 731 |
# File 'lib/teamlab/modules/crm.rb', line 729 def delete_case_group_by_filter( = {}) @request.delete(%w(case filter), ) end |
#delete_contact(id) ⇒ Object
537 538 539 |
# File 'lib/teamlab/modules/crm.rb', line 537 def delete_contact(id) @request.delete(['contact', id.to_s]) end |
#delete_contact_address(contact_id, information_id) ⇒ Object
553 554 555 |
# File 'lib/teamlab/modules/crm.rb', line 553 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
497 498 499 |
# File 'lib/teamlab/modules/crm.rb', line 497 def delete_contact_group(*contact_ids) @request.put(%w(contact), contactids: contact_ids.flatten) end |
#delete_contact_info(contact_id, info_id) ⇒ Object
545 546 547 |
# File 'lib/teamlab/modules/crm.rb', line 545 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
333 334 335 |
# File 'lib/teamlab/modules/crm.rb', line 333 def delete_contact_status(contact_status_id) @request.delete('contact', 'status', contact_status_id) end |
#delete_contact_type(contact_type_id) ⇒ Object
541 542 543 |
# File 'lib/teamlab/modules/crm.rb', line 541 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
337 338 339 |
# File 'lib/teamlab/modules/crm.rb', line 337 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
369 370 371 |
# File 'lib/teamlab/modules/crm.rb', line 369 def (id) @request.delete(['history', id.to_s]) end |
#delete_file(id) ⇒ Object
583 584 585 |
# File 'lib/teamlab/modules/crm.rb', line 583 def delete_file(id) @request.post(['files', id.to_s]) end |
#delete_history_category(id) ⇒ Object
373 374 375 |
# File 'lib/teamlab/modules/crm.rb', line 373 def delete_history_category(id) @request.delete(['history', 'category', id.to_s]) end |
#delete_invoice(id) ⇒ Object
325 326 327 |
# File 'lib/teamlab/modules/crm.rb', line 325 def delete_invoice(id) @request.delete(['invoice', id.to_s]) end |
#delete_invoice_item(id) ⇒ Object
317 318 319 |
# File 'lib/teamlab/modules/crm.rb', line 317 def delete_invoice_item(id) @request.delete(['invoiceitem', id.to_s]) end |
#delete_invoice_line(id) ⇒ Object
329 330 331 |
# File 'lib/teamlab/modules/crm.rb', line 329 def delete_invoice_line(id) @request.delete(['invoiceline', id.to_s]) end |
#delete_invoice_tax(id) ⇒ Object
321 322 323 |
# File 'lib/teamlab/modules/crm.rb', line 321 def delete_invoice_tax(id) @request.delete(['invoice', 'tax', id.to_s]) end |
#delete_opportunity(opportunity_id) ⇒ Object
97 98 99 |
# File 'lib/teamlab/modules/crm.rb', line 97 def delete_opportunity(opportunity_id) @request.delete(['opportunity', opportunity_id.to_s]) end |
#delete_opportunity_contact(opportunity_id, contact_id) ⇒ Object
101 102 103 |
# File 'lib/teamlab/modules/crm.rb', line 101 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
85 86 87 |
# File 'lib/teamlab/modules/crm.rb', line 85 def delete_opportunity_group(*opportunity_ids) @request.delete(%w(opportunity), opportunityids: opportunity_ids.flatten) end |
#delete_opportunity_group_by_filter(options = {}) ⇒ Object
89 90 91 |
# File 'lib/teamlab/modules/crm.rb', line 89 def delete_opportunity_group_by_filter( = {}) @request.delete(%w(opportunity filter), ) end |
#delete_opportunity_stage(stage_id) ⇒ Object
93 94 95 |
# File 'lib/teamlab/modules/crm.rb', line 93 def delete_opportunity_stage(stage_id) @request.delete(['opportunity', 'stage', stage_id.to_s]) end |
#delete_person_from_company(company_id, person_id) ⇒ Object
549 550 551 |
# File 'lib/teamlab/modules/crm.rb', line 549 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
625 626 627 |
# File 'lib/teamlab/modules/crm.rb', line 625 def delete_tag(entity_type, tag_name) @request.delete([entity_type.to_s, 'tag'], tagName: tag_name) end |
#delete_task(id) ⇒ Object
421 422 423 |
# File 'lib/teamlab/modules/crm.rb', line 421 def delete_task(id) @request.delete(['task', id.to_s]) end |
#delete_task_category(category_id) ⇒ Object
425 426 427 |
# File 'lib/teamlab/modules/crm.rb', line 425 def delete_task_category(category_id) @request.delete(['task', 'category', category_id.to_s]) end |
#delete_task_template(id) ⇒ Object
677 678 679 |
# File 'lib/teamlab/modules/crm.rb', line 677 def delete_task_template(id) @request.delete(['tasktemplatecontainer', 'tasktemplate', id.to_s]) end |
#delete_task_template_container(container_id) ⇒ Object
673 674 675 |
# File 'lib/teamlab/modules/crm.rb', line 673 def delete_task_template_container(container_id) @request.delete(['tasktemplatecontainer', container_id.to_s]) end |
#delete_unused_tags(entity_type) ⇒ Object
629 630 631 |
# File 'lib/teamlab/modules/crm.rb', line 629 def (entity_type) @request.delete([entity_type.to_s, 'tag', 'unused']) end |
#delete_user_field(entity_type, field_id) ⇒ Object
765 766 767 |
# File 'lib/teamlab/modules/crm.rb', line 765 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
689 690 691 |
# File 'lib/teamlab/modules/crm.rb', line 689 def get_all_case_contacts(case_id) @request.get(['case', case_id.to_s, 'contact']) end |
#get_all_categories(info_type) ⇒ Object
453 454 455 |
# File 'lib/teamlab/modules/crm.rb', line 453 def get_all_categories(info_type) @request.get(['contact', 'data', info_type.to_s, 'category']) end |
#get_all_contact_info_types ⇒ Object
437 438 439 |
# File 'lib/teamlab/modules/crm.rb', line 437 def get_all_contact_info_types @request.get(%w(contact data infotype)) end |
#get_all_contact_tags(contact_id) ⇒ Object
591 592 593 |
# File 'lib/teamlab/modules/crm.rb', line 591 def (contact_id) @request.get(['contact', contact_id.to_s, 'tag']) end |
#get_all_contact_types ⇒ Object
429 430 431 |
# File 'lib/teamlab/modules/crm.rb', line 429 def get_all_contact_types @request.get(%w(contact type)) end |
#get_all_history_categories ⇒ Object
345 346 347 |
# File 'lib/teamlab/modules/crm.rb', line 345 def get_all_history_categories @request.get(%w(history category)) end |
#get_all_opportunity_contacts(opportunity_id) ⇒ Object
32 33 34 |
# File 'lib/teamlab/modules/crm.rb', line 32 def get_all_opportunity_contacts(opportunity_id) @request.get(['opportunity', opportunity_id.to_s, 'contact']) end |
#get_all_opportunity_stages ⇒ Object
region Opportunity
8 9 10 |
# File 'lib/teamlab/modules/crm.rb', line 8 def get_all_opportunity_stages @request.get(%w(opportunity stage)) end |
#get_all_task_categories ⇒ Object
381 382 383 |
# File 'lib/teamlab/modules/crm.rb', line 381 def get_all_task_categories @request.get(%w(task category)) end |
#get_case_by_id(id) ⇒ Object
685 686 687 |
# File 'lib/teamlab/modules/crm.rb', line 685 def get_case_by_id(id) @request.get(['case', id.to_s]) end |
#get_case_list(options = {}) ⇒ Object
681 682 683 |
# File 'lib/teamlab/modules/crm.rb', line 681 def get_case_list( = {}) @request.get(%w(case filter), ) end |
#get_cases_by_prefix(contact_id, prefix) ⇒ Object
117 118 119 |
# File 'lib/teamlab/modules/crm.rb', line 117 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
457 458 459 |
# File 'lib/teamlab/modules/crm.rb', line 457 def get_company_linked_persons_list(company_id) @request.get(['contact', 'company', company_id.to_s, 'person']) end |
#get_contact_by_id(id) ⇒ Object
433 434 435 |
# File 'lib/teamlab/modules/crm.rb', line 433 def get_contact_by_id(id) @request.get(['contact', id.to_s]) end |
#get_contact_info(contact_id, contact_info_id) ⇒ Object
449 450 451 |
# File 'lib/teamlab/modules/crm.rb', line 449 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
461 462 463 |
# File 'lib/teamlab/modules/crm.rb', line 461 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
153 154 155 |
# File 'lib/teamlab/modules/crm.rb', line 153 def get_contact_status_by_id(contact_status_id) @request.get(['contact', 'status', contact_status_id.to_s]) end |
#get_contact_statuses ⇒ Object
121 122 123 |
# File 'lib/teamlab/modules/crm.rb', line 121 def get_contact_statuses @request.get(%w(contact status)) end |
#get_contact_type(id) ⇒ Object
445 446 447 |
# File 'lib/teamlab/modules/crm.rb', line 445 def get_contact_type(id) @request.get(['contact', 'type', id.to_s]) end |
#get_contact_upcoming_tasks(*contact_ids) ⇒ Object
397 398 399 |
# File 'lib/teamlab/modules/crm.rb', line 397 def get_contact_upcoming_tasks(*contact_ids) @request.post(%w(contact task near), contactid: contact_ids.flatten) end |
#get_contacts_by_filter(options = {}) ⇒ Object
133 134 135 |
# File 'lib/teamlab/modules/crm.rb', line 133 def get_contacts_by_filter( = {}) @request.get(%w(contact filter), ) end |
#get_contacts_by_project_id(id) ⇒ Object
441 442 443 |
# File 'lib/teamlab/modules/crm.rb', line 441 def get_contacts_by_project_id(id) @request.get(['contact', 'project', id.to_s]) end |
#get_contacts_for_mail(*contact_ids) ⇒ Object
113 114 115 |
# File 'lib/teamlab/modules/crm.rb', line 113 def get_contacts_for_mail(*contact_ids) @request.get(%w(contact mail), contactids: contact_ids.flatten) end |
#get_currency_list ⇒ Object
12 13 14 |
# File 'lib/teamlab/modules/crm.rb', line 12 def get_currency_list @request.get(%w(settings currency)) end |
#get_entity_invoices(entity_type, entity_id) ⇒ Object
157 158 159 |
# File 'lib/teamlab/modules/crm.rb', line 157 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
595 596 597 |
# File 'lib/teamlab/modules/crm.rb', line 595 def (entity_type, entity_id) @request.get([entity_type.to_s, 'tag', entity_id.to_s]) end |
#get_event_list_by_filter(options = {}) ⇒ Object
341 342 343 |
# File 'lib/teamlab/modules/crm.rb', line 341 def get_event_list_by_filter( = {}) @request.get(%w(history filter), ) end |
#get_file_list(entity_type, entity_id) ⇒ Object
567 568 569 |
# File 'lib/teamlab/modules/crm.rb', line 567 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
145 146 147 |
# File 'lib/teamlab/modules/crm.rb', line 145 def get_invoice_by_id(id) @request.get(['invoice', id.to_s]) end |
#get_invoice_items_by_filter(options = {}) ⇒ Object
141 142 143 |
# File 'lib/teamlab/modules/crm.rb', line 141 def get_invoice_items_by_filter( = {}) @request.get(%w(invoiceitem filter), ) end |
#get_invoice_sample ⇒ Object
125 126 127 |
# File 'lib/teamlab/modules/crm.rb', line 125 def get_invoice_sample @request.get(%w(invoice sample)) end |
#get_invoice_taxes ⇒ Object
region General
109 110 111 |
# File 'lib/teamlab/modules/crm.rb', line 109 def get_invoice_taxes @request.get(%w(invoice tax)) end |
#get_invoices_by_filter(options = {}) ⇒ Object
129 130 131 |
# File 'lib/teamlab/modules/crm.rb', line 129 def get_invoices_by_filter( = {}) @request.get(%w(invoice filter), ) end |
#get_opportunity_by_id(id) ⇒ Object
28 29 30 |
# File 'lib/teamlab/modules/crm.rb', line 28 def get_opportunity_by_id(id) @request.get(['opportunity', id.to_s]) end |
#get_opportunity_list(options = {}) ⇒ Object
16 17 18 |
# File 'lib/teamlab/modules/crm.rb', line 16 def get_opportunity_list( = {}) @request.get(%w(opportunity filter), ) end |
#get_opportunity_stage(stage_id) ⇒ Object
24 25 26 |
# File 'lib/teamlab/modules/crm.rb', line 24 def get_opportunity_stage(stage_id) @request.get(['opportunity', 'stage', stage_id.to_s]) end |
#get_result_of_convertation(options = {}) ⇒ Object
20 21 22 |
# File 'lib/teamlab/modules/crm.rb', line 20 def get_result_of_convertation( = {}) @request.get(%w(settings currency convert), ) end |
#get_root_folder_id ⇒ Object
region Files
563 564 565 |
# File 'lib/teamlab/modules/crm.rb', line 563 def get_root_folder_id @request.get(%w(files root)) end |
#get_settings ⇒ Object
137 138 139 |
# File 'lib/teamlab/modules/crm.rb', line 137 def get_settings @request.get(%w(invoice settings)) end |
#get_simple_contacts(options = {}) ⇒ Object
149 150 151 |
# File 'lib/teamlab/modules/crm.rb', line 149 def get_simple_contacts( = {}) @request.get(%w(contact simple filter), ) end |
#get_summary_table(currency) ⇒ Object
36 37 38 |
# File 'lib/teamlab/modules/crm.rb', line 36 def get_summary_table(currency) @request.get(['settings', 'currency', currency.to_s, 'summarytable']) end |
#get_tags_for_entity_type(entity_type) ⇒ Object
587 588 589 |
# File 'lib/teamlab/modules/crm.rb', line 587 def (entity_type) @request.get([entity_type.to_s, 'tag']) end |
#get_task_by_id(task_id) ⇒ Object
385 386 387 |
# File 'lib/teamlab/modules/crm.rb', line 385 def get_task_by_id(task_id) @request.get(['task', task_id.to_s]) end |
#get_task_category(category_id) ⇒ Object
389 390 391 |
# File 'lib/teamlab/modules/crm.rb', line 389 def get_task_category(category_id) @request.get(['task', 'category', category_id.to_s]) end |
#get_task_list_by_filter(options = {}) ⇒ Object
377 378 379 |
# File 'lib/teamlab/modules/crm.rb', line 377 def get_task_list_by_filter( = {}) @request.get(%w(task filter), ) end |
#get_task_template(id) ⇒ Object
645 646 647 |
# File 'lib/teamlab/modules/crm.rb', line 645 def get_task_template(id) @request.get(['tasktemplatecontainer', 'tasktemplate', id.to_s]) end |
#get_task_template_container(id) ⇒ Object
641 642 643 |
# File 'lib/teamlab/modules/crm.rb', line 641 def get_task_template_container(id) @request.get(['tasktemplatecontainer', id.to_s]) end |
#get_task_template_container_list(entity_type) ⇒ Object
637 638 639 |
# File 'lib/teamlab/modules/crm.rb', line 637 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
649 650 651 |
# File 'lib/teamlab/modules/crm.rb', line 649 def get_task_template_list_by_container_id(id) @request.get(['tasktemplatecontainer', id.to_s, 'tasktemplate']) end |
#get_user_field_list(entity_type) ⇒ Object
745 746 747 |
# File 'lib/teamlab/modules/crm.rb', line 745 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
741 742 743 |
# File 'lib/teamlab/modules/crm.rb', line 741 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
465 466 467 |
# File 'lib/teamlab/modules/crm.rb', line 465 def group_contact_info(*items) @request.post(%w(contact data), items: items.flatten) end |
#group_contact_info_update(*items) ⇒ Object
501 502 503 |
# File 'lib/teamlab/modules/crm.rb', line 501 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
481 482 483 |
# File 'lib/teamlab/modules/crm.rb', line 481 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
489 490 491 |
# File 'lib/teamlab/modules/crm.rb', line 489 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
505 506 507 |
# File 'lib/teamlab/modules/crm.rb', line 505 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
473 474 475 |
# File 'lib/teamlab/modules/crm.rb', line 473 def quick_company_list_creation(*names) @request.post(%w(contact company quick), companyName: names.flatten) end |
#quick_person_list_creation(data) ⇒ Object
469 470 471 |
# File 'lib/teamlab/modules/crm.rb', line 469 def quick_person_list_creation(data) @request.post(%w(contact person quick), data: data) end |
#remove_contact_from_project(contact_id, project_id) ⇒ Object
557 558 559 |
# File 'lib/teamlab/modules/crm.rb', line 557 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
633 634 635 |
# File 'lib/teamlab/modules/crm.rb', line 633 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
713 714 715 |
# File 'lib/teamlab/modules/crm.rb', line 713 def resume_case(case_id) @request.put(['case', case_id.to_s, 'reopen']) end |
#resume_task(task_id) ⇒ Object
409 410 411 |
# File 'lib/teamlab/modules/crm.rb', line 409 def resume_task(task_id) @request.put(['task', task_id.to_s, 'reopen']) end |
#save_number_settings(options = {}) ⇒ Object
251 252 253 |
# File 'lib/teamlab/modules/crm.rb', line 251 def save_number_settings( = {}) @request.put(%w(invoice settings name), ) end |
#save_terms_settings(options = {}) ⇒ Object
263 264 265 |
# File 'lib/teamlab/modules/crm.rb', line 263 def save_terms_settings( = {}) @request.put(%w(invoice settings terms), ) end |
#set_access_to_batch_contact(options = {}) ⇒ Object
255 256 257 |
# File 'lib/teamlab/modules/crm.rb', line 255 def set_access_to_batch_contact( = {}) @request.put(%w(contact filter access), ) end |
#set_case_access_rights(case_ids, options = {}) ⇒ Object
701 702 703 |
# File 'lib/teamlab/modules/crm.rb', line 701 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
709 710 711 |
# File 'lib/teamlab/modules/crm.rb', line 709 def set_case_access_rights_by_filter( = {}) @request.put(%w(case filter access), ) end |
#set_contact_access_rights(contact_id, options = {}) ⇒ Object
517 518 519 |
# File 'lib/teamlab/modules/crm.rb', line 517 def set_contact_access_rights(contact_id, = {}) @request.put(['contact', contact_id.to_s, 'access'], ) end |
#set_contacts_access_rights(contact_ids, options = {}) ⇒ Object
509 510 511 |
# File 'lib/teamlab/modules/crm.rb', line 509 def set_contacts_access_rights(contact_ids, = {}) @request.put(%w(contact access), { contactId: contact_ids }.merge()) end |
#set_is_portal_configured(options = {}) ⇒ Object
217 218 219 |
# File 'lib/teamlab/modules/crm.rb', line 217 def set_is_portal_configured( = {}) @request.put(%w(settings), ) end |
#set_opportunity_access_rights(opportunity_ids, is_private, *users) ⇒ Object
52 53 54 |
# File 'lib/teamlab/modules/crm.rb', line 52 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
64 65 66 |
# File 'lib/teamlab/modules/crm.rb', line 64 def set_opportunity_access_rights_for_users( = {}) @request.put(%w(opportunity filter access), ) end |
#set_rights_to_case(case_id, options = {}) ⇒ Object
721 722 723 |
# File 'lib/teamlab/modules/crm.rb', line 721 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
77 78 79 |
# File 'lib/teamlab/modules/crm.rb', line 77 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
753 754 755 |
# File 'lib/teamlab/modules/crm.rb', line 753 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
705 706 707 |
# File 'lib/teamlab/modules/crm.rb', line 705 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
521 522 523 |
# File 'lib/teamlab/modules/crm.rb', line 521 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
301 302 303 |
# File 'lib/teamlab/modules/crm.rb', line 301 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
533 534 535 |
# File 'lib/teamlab/modules/crm.rb', line 533 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
525 526 527 |
# File 'lib/teamlab/modules/crm.rb', line 525 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
237 238 239 |
# File 'lib/teamlab/modules/crm.rb', line 237 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
283 284 285 |
# File 'lib/teamlab/modules/crm.rb', line 283 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
275 276 277 |
# File 'lib/teamlab/modules/crm.rb', line 275 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
233 234 235 |
# File 'lib/teamlab/modules/crm.rb', line 233 def update_contact_type(id, title, = {}) @request.put(['contact', 'type', id.to_s], { title: title }.merge()) end |
#update_contact_types_order(*titles) ⇒ Object
513 514 515 |
# File 'lib/teamlab/modules/crm.rb', line 513 def update_contact_types_order(*titles) @request.put(%w(contact type reorder), titles: titles.flatten) end |
#update_crm_contact_status_settings(options = {}) ⇒ Object
267 268 269 |
# File 'lib/teamlab/modules/crm.rb', line 267 def update_crm_contact_status_settings( = {}) @request.put(%w(contact status settings), ) end |
#update_crm_contact_tag_setting(options = {}) ⇒ Object
247 248 249 |
# File 'lib/teamlab/modules/crm.rb', line 247 def update_crm_contact_tag_setting( = {}) @request.put(%w(contact tag settings), ) end |
#update_history_categories_order(*titles) ⇒ Object
361 362 363 |
# File 'lib/teamlab/modules/crm.rb', line 361 def update_history_categories_order(*titles) @request.put(%w(history category reorder), titles: titles.flatten) end |
#update_history_category(id, title, options = {}) ⇒ Object
357 358 359 |
# File 'lib/teamlab/modules/crm.rb', line 357 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
365 366 367 |
# File 'lib/teamlab/modules/crm.rb', line 365 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 =====================================================
243 244 245 |
# File 'lib/teamlab/modules/crm.rb', line 243 def update_invoice(id, = {}) @request.put(['invoice', id.to_s], ) end |
#update_invoice_item(id, title, description, price, stock_keeping_unit, options = {}) ⇒ Object
225 226 227 |
# File 'lib/teamlab/modules/crm.rb', line 225 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
287 288 289 |
# File 'lib/teamlab/modules/crm.rb', line 287 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
271 272 273 |
# File 'lib/teamlab/modules/crm.rb', line 271 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
229 230 231 |
# File 'lib/teamlab/modules/crm.rb', line 229 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
68 69 70 71 |
# File 'lib/teamlab/modules/crm.rb', line 68 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
56 57 58 |
# File 'lib/teamlab/modules/crm.rb', line 56 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
73 74 75 |
# File 'lib/teamlab/modules/crm.rb', line 73 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
60 61 62 |
# File 'lib/teamlab/modules/crm.rb', line 60 def update_opportunity_stages_order( = {}) @request.put(%w(opportunity stage reorder), ) end |
#update_opportunity_to_stage(opportunity_id, stage_id) ⇒ Object
81 82 83 |
# File 'lib/teamlab/modules/crm.rb', line 81 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
279 280 281 |
# File 'lib/teamlab/modules/crm.rb', line 279 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
297 298 299 |
# File 'lib/teamlab/modules/crm.rb', line 297 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
757 758 759 |
# File 'lib/teamlab/modules/crm.rb', line 757 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
259 260 261 |
# File 'lib/teamlab/modules/crm.rb', line 259 def update_statuses_contact_order( = {}) @request.put(%w(contact status reorder), ) end |
#update_task(task_id, title, deadline, category_id, options = {}) ⇒ Object
221 222 223 |
# File 'lib/teamlab/modules/crm.rb', line 221 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
413 414 415 |
# File 'lib/teamlab/modules/crm.rb', line 413 def update_task_categories_order(*titles) @request.put(%w(task category reorder), titles: titles.flatten) end |
#update_task_category(category_id, title, options = {}) ⇒ Object
401 402 403 |
# File 'lib/teamlab/modules/crm.rb', line 401 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
417 418 419 |
# File 'lib/teamlab/modules/crm.rb', line 417 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 =====================================================
669 670 671 |
# File 'lib/teamlab/modules/crm.rb', line 669 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
663 664 665 |
# File 'lib/teamlab/modules/crm.rb', line 663 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
761 762 763 |
# File 'lib/teamlab/modules/crm.rb', line 761 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
579 580 581 |
# File 'lib/teamlab/modules/crm.rb', line 579 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 |