ZOHOCRMSDK2_0_docgo 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/src/ZOHOCRMSDK2_0_docgo.rb +370 -0
- data/src/com/zoho/api/authenticator/oauth_token.rb +285 -0
- data/src/com/zoho/api/authenticator/store/db_store.rb +194 -0
- data/src/com/zoho/api/authenticator/store/file_store.rb +238 -0
- data/src/com/zoho/api/authenticator/store/token_store.rb +35 -0
- data/src/com/zoho/api/authenticator/token.rb +12 -0
- data/src/com/zoho/api/logger/sdk_logger.rb +64 -0
- data/src/com/zoho/crm/api/attachments/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/attachments/action_response.rb +12 -0
- data/src/com/zoho/crm/api/attachments/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/attachments/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/attachments/attachment.rb +369 -0
- data/src/com/zoho/crm/api/attachments/attachments_operations.rb +198 -0
- data/src/com/zoho/crm/api/attachments/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/attachments/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/attachments/response_wrapper.rb +85 -0
- data/src/com/zoho/crm/api/attachments/success_response.rb +123 -0
- data/src/com/zoho/crm/api/blue_print/action_response.rb +12 -0
- data/src/com/zoho/crm/api/blue_print/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/blue_print/blue_print.rb +121 -0
- data/src/com/zoho/crm/api/blue_print/blue_print_operations.rb +69 -0
- data/src/com/zoho/crm/api/blue_print/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/blue_print/next_transition.rb +82 -0
- data/src/com/zoho/crm/api/blue_print/process_info.rb +253 -0
- data/src/com/zoho/crm/api/blue_print/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/blue_print/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/blue_print/success_response.rb +123 -0
- data/src/com/zoho/crm/api/blue_print/transition.rb +255 -0
- data/src/com/zoho/crm/api/blue_print/validation_error.rb +82 -0
- data/src/com/zoho/crm/api/bulk_read/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/bulk_read/action_response.rb +12 -0
- data/src/com/zoho/crm/api/bulk_read/action_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/bulk_read/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/bulk_read/bulk_read_operations.rb +76 -0
- data/src/com/zoho/crm/api/bulk_read/call_back.rb +83 -0
- data/src/com/zoho/crm/api/bulk_read/criteria.rb +137 -0
- data/src/com/zoho/crm/api/bulk_read/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/bulk_read/job_detail.rb +198 -0
- data/src/com/zoho/crm/api/bulk_read/query.rb +139 -0
- data/src/com/zoho/crm/api/bulk_read/request_wrapper.rb +102 -0
- data/src/com/zoho/crm/api/bulk_read/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/bulk_read/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/bulk_read/result.rb +139 -0
- data/src/com/zoho/crm/api/bulk_read/success_response.rb +123 -0
- data/src/com/zoho/crm/api/bulk_write/action_response.rb +12 -0
- data/src/com/zoho/crm/api/bulk_write/api_exception.rb +241 -0
- data/src/com/zoho/crm/api/bulk_write/bulk_write_operations.rb +114 -0
- data/src/com/zoho/crm/api/bulk_write/bulk_write_response.rb +218 -0
- data/src/com/zoho/crm/api/bulk_write/call_back.rb +83 -0
- data/src/com/zoho/crm/api/bulk_write/field_mapping.rb +158 -0
- data/src/com/zoho/crm/api/bulk_write/file.rb +159 -0
- data/src/com/zoho/crm/api/bulk_write/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/bulk_write/request_wrapper.rb +121 -0
- data/src/com/zoho/crm/api/bulk_write/resource.rb +197 -0
- data/src/com/zoho/crm/api/bulk_write/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/bulk_write/response_wrapper.rb +12 -0
- data/src/com/zoho/crm/api/bulk_write/result.rb +63 -0
- data/src/com/zoho/crm/api/bulk_write/success_response.rb +123 -0
- data/src/com/zoho/crm/api/contact_roles/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/contact_roles/action_response.rb +12 -0
- data/src/com/zoho/crm/api/contact_roles/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/contact_roles/api_exception.rb +131 -0
- data/src/com/zoho/crm/api/contact_roles/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/contact_roles/contact_role.rb +101 -0
- data/src/com/zoho/crm/api/contact_roles/contact_role_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/contact_roles/contact_roles_operations.rb +270 -0
- data/src/com/zoho/crm/api/contact_roles/record_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/contact_roles/record_action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/contact_roles/record_body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/contact_roles/record_response_handler.rb +12 -0
- data/src/com/zoho/crm/api/contact_roles/record_response_wrapper.rb +86 -0
- data/src/com/zoho/crm/api/contact_roles/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/contact_roles/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/contact_roles/success_response.rb +123 -0
- data/src/com/zoho/crm/api/currencies/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/currencies/action_response.rb +12 -0
- data/src/com/zoho/crm/api/currencies/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/currencies/api_exception.rb +129 -0
- data/src/com/zoho/crm/api/currencies/base_currency_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/currencies/base_currency_action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/currencies/base_currency_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/currencies/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/currencies/currencies_operations.rb +151 -0
- data/src/com/zoho/crm/api/currencies/currency.rb +292 -0
- data/src/com/zoho/crm/api/currencies/format.rb +102 -0
- data/src/com/zoho/crm/api/currencies/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/currencies/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/currencies/success_response.rb +123 -0
- data/src/com/zoho/crm/api/custom_views/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/custom_views/criteria.rb +137 -0
- data/src/com/zoho/crm/api/custom_views/custom_view.rb +329 -0
- data/src/com/zoho/crm/api/custom_views/custom_views_operations.rb +75 -0
- data/src/com/zoho/crm/api/custom_views/info.rb +158 -0
- data/src/com/zoho/crm/api/custom_views/range.rb +82 -0
- data/src/com/zoho/crm/api/custom_views/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/custom_views/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/custom_views/shared_details.rb +120 -0
- data/src/com/zoho/crm/api/custom_views/translation.rb +120 -0
- data/src/com/zoho/crm/api/dc/au_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/dc/cn_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/dc/datacenter.rb +23 -0
- data/src/com/zoho/crm/api/dc/eu_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/dc/in_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/dc/jp_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/dc/us_datacenter.rb +21 -0
- data/src/com/zoho/crm/api/exception/sdk_exception.rb +49 -0
- data/src/com/zoho/crm/api/fields/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/fields/association_details.rb +82 -0
- data/src/com/zoho/crm/api/fields/auto_number.rb +101 -0
- data/src/com/zoho/crm/api/fields/crypt.rb +158 -0
- data/src/com/zoho/crm/api/fields/currency.rb +82 -0
- data/src/com/zoho/crm/api/fields/field.rb +958 -0
- data/src/com/zoho/crm/api/fields/fields_operations.rb +71 -0
- data/src/com/zoho/crm/api/fields/formula.rb +82 -0
- data/src/com/zoho/crm/api/fields/lookup_field.rb +82 -0
- data/src/com/zoho/crm/api/fields/module.rb +159 -0
- data/src/com/zoho/crm/api/fields/multi_select_lookup.rb +158 -0
- data/src/com/zoho/crm/api/fields/pick_list_value.rb +177 -0
- data/src/com/zoho/crm/api/fields/private.rb +101 -0
- data/src/com/zoho/crm/api/fields/related_details.rb +139 -0
- data/src/com/zoho/crm/api/fields/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/fields/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/fields/tool_tip.rb +82 -0
- data/src/com/zoho/crm/api/fields/unique.rb +63 -0
- data/src/com/zoho/crm/api/fields/view_type.rb +120 -0
- data/src/com/zoho/crm/api/files/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/files/action_response.rb +12 -0
- data/src/com/zoho/crm/api/files/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/files/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/files/body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/files/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/files/file_operations.rb +75 -0
- data/src/com/zoho/crm/api/files/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/files/success_response.rb +123 -0
- data/src/com/zoho/crm/api/header.rb +12 -0
- data/src/com/zoho/crm/api/header_map.rb +57 -0
- data/src/com/zoho/crm/api/initializer.rb +255 -0
- data/src/com/zoho/crm/api/layouts/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/layouts/layout.rb +274 -0
- data/src/com/zoho/crm/api/layouts/layouts_operations.rb +61 -0
- data/src/com/zoho/crm/api/layouts/properties.rb +102 -0
- data/src/com/zoho/crm/api/layouts/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/layouts/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/layouts/section.rb +235 -0
- data/src/com/zoho/crm/api/modules/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/modules/action_response.rb +12 -0
- data/src/com/zoho/crm/api/modules/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/modules/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/modules/argument.rb +82 -0
- data/src/com/zoho/crm/api/modules/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/modules/module.rb +884 -0
- data/src/com/zoho/crm/api/modules/modules_operations.rb +109 -0
- data/src/com/zoho/crm/api/modules/related_list_properties.rb +101 -0
- data/src/com/zoho/crm/api/modules/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/modules/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/modules/success_response.rb +123 -0
- data/src/com/zoho/crm/api/modules/territory.rb +101 -0
- data/src/com/zoho/crm/api/notes/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/notes/action_response.rb +12 -0
- data/src/com/zoho/crm/api/notes/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/notes/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/notes/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/notes/info.rb +120 -0
- data/src/com/zoho/crm/api/notes/note.rb +351 -0
- data/src/com/zoho/crm/api/notes/notes_operations.rb +214 -0
- data/src/com/zoho/crm/api/notes/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/notes/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/notes/success_response.rb +123 -0
- data/src/com/zoho/crm/api/notification/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/notification/action_response.rb +12 -0
- data/src/com/zoho/crm/api/notification/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/notification/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/notification/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/notification/info.rb +120 -0
- data/src/com/zoho/crm/api/notification/notification.rb +253 -0
- data/src/com/zoho/crm/api/notification/notification_operations.rb +160 -0
- data/src/com/zoho/crm/api/notification/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/notification/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/notification/success_response.rb +123 -0
- data/src/com/zoho/crm/api/org/action_response.rb +12 -0
- data/src/com/zoho/crm/api/org/api_exception.rb +125 -0
- data/src/com/zoho/crm/api/org/file_body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/org/license_details.rb +158 -0
- data/src/com/zoho/crm/api/org/org.rb +633 -0
- data/src/com/zoho/crm/api/org/org_operations.rb +49 -0
- data/src/com/zoho/crm/api/org/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/org/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/org/success_response.rb +123 -0
- data/src/com/zoho/crm/api/param.rb +12 -0
- data/src/com/zoho/crm/api/parameter_map.rb +56 -0
- data/src/com/zoho/crm/api/profiles/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/profiles/category.rb +101 -0
- data/src/com/zoho/crm/api/profiles/permission_detail.rb +139 -0
- data/src/com/zoho/crm/api/profiles/profile.rb +292 -0
- data/src/com/zoho/crm/api/profiles/profiles_operations.rb +61 -0
- data/src/com/zoho/crm/api/profiles/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/profiles/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/profiles/section.rb +82 -0
- data/src/com/zoho/crm/api/query/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/query/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/query/query_operations.rb +36 -0
- data/src/com/zoho/crm/api/query/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/query/response_wrapper.rb +86 -0
- data/src/com/zoho/crm/api/record/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/action_response.rb +12 -0
- data/src/com/zoho/crm/api/record/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/record/api_exception.rb +145 -0
- data/src/com/zoho/crm/api/record/apply_feature_execution.rb +63 -0
- data/src/com/zoho/crm/api/record/body_wrapper.rb +177 -0
- data/src/com/zoho/crm/api/record/carry_over_tags.rb +101 -0
- data/src/com/zoho/crm/api/record/comment.rb +120 -0
- data/src/com/zoho/crm/api/record/consent.rb +187 -0
- data/src/com/zoho/crm/api/record/convert_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/convert_action_response.rb +12 -0
- data/src/com/zoho/crm/api/record/convert_action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/record/convert_body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/record/criteria.rb +137 -0
- data/src/com/zoho/crm/api/record/deleted_record.rb +159 -0
- data/src/com/zoho/crm/api/record/deleted_records_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/deleted_records_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/record/download_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/field.rb +2111 -0
- data/src/com/zoho/crm/api/record/file_body_wrapper.rb +68 -0
- data/src/com/zoho/crm/api/record/file_details.rb +329 -0
- data/src/com/zoho/crm/api/record/file_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/info.rb +120 -0
- data/src/com/zoho/crm/api/record/inventory_line_items.rb +237 -0
- data/src/com/zoho/crm/api/record/lead_converter.rb +196 -0
- data/src/com/zoho/crm/api/record/line_item_product.rb +67 -0
- data/src/com/zoho/crm/api/record/line_tax.rb +120 -0
- data/src/com/zoho/crm/api/record/mass_update.rb +142 -0
- data/src/com/zoho/crm/api/record/mass_update_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/mass_update_action_response.rb +12 -0
- data/src/com/zoho/crm/api/record/mass_update_action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/record/mass_update_body_wrapper.rb +158 -0
- data/src/com/zoho/crm/api/record/mass_update_response.rb +12 -0
- data/src/com/zoho/crm/api/record/mass_update_response_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/mass_update_response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/record/mass_update_success_response.rb +123 -0
- data/src/com/zoho/crm/api/record/options.rb +12 -0
- data/src/com/zoho/crm/api/record/participants.rb +118 -0
- data/src/com/zoho/crm/api/record/pricing_details.rb +67 -0
- data/src/com/zoho/crm/api/record/record.rb +194 -0
- data/src/com/zoho/crm/api/record/record_operations.rb +961 -0
- data/src/com/zoho/crm/api/record/recurring_activity.rb +63 -0
- data/src/com/zoho/crm/api/record/remind_at.rb +63 -0
- data/src/com/zoho/crm/api/record/reminder.rb +82 -0
- data/src/com/zoho/crm/api/record/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/record/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/record/success_response.rb +163 -0
- data/src/com/zoho/crm/api/record/successful_convert.rb +103 -0
- data/src/com/zoho/crm/api/record/territory.rb +82 -0
- data/src/com/zoho/crm/api/related_lists/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/related_lists/related_list.rb +253 -0
- data/src/com/zoho/crm/api/related_lists/related_lists_operations.rb +61 -0
- data/src/com/zoho/crm/api/related_lists/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/related_lists/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/related_records/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/related_records/action_response.rb +12 -0
- data/src/com/zoho/crm/api/related_records/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/related_records/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/related_records/body_wrapper.rb +64 -0
- data/src/com/zoho/crm/api/related_records/file_body_wrapper.rb +66 -0
- data/src/com/zoho/crm/api/related_records/related_records_operations.rb +524 -0
- data/src/com/zoho/crm/api/related_records/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/related_records/response_wrapper.rb +86 -0
- data/src/com/zoho/crm/api/related_records/success_response.rb +123 -0
- data/src/com/zoho/crm/api/request_proxy.rb +17 -0
- data/src/com/zoho/crm/api/roles/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/roles/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/roles/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/roles/role.rb +197 -0
- data/src/com/zoho/crm/api/roles/roles_operations.rb +47 -0
- data/src/com/zoho/crm/api/sdk_config.rb +15 -0
- data/src/com/zoho/crm/api/share_records/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/share_records/action_response.rb +12 -0
- data/src/com/zoho/crm/api/share_records/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/share_records/api_exception.rb +131 -0
- data/src/com/zoho/crm/api/share_records/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/share_records/delete_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/share_records/delete_action_response.rb +12 -0
- data/src/com/zoho/crm/api/share_records/delete_action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/share_records/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/share_records/response_wrapper.rb +85 -0
- data/src/com/zoho/crm/api/share_records/share_record.rb +159 -0
- data/src/com/zoho/crm/api/share_records/share_records_operations.rb +130 -0
- data/src/com/zoho/crm/api/share_records/shared_through.rb +102 -0
- data/src/com/zoho/crm/api/share_records/success_response.rb +125 -0
- data/src/com/zoho/crm/api/tags/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/tags/action_response.rb +12 -0
- data/src/com/zoho/crm/api/tags/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/tags/api_exception.rb +133 -0
- data/src/com/zoho/crm/api/tags/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/tags/conflict_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/tags/count_handler.rb +12 -0
- data/src/com/zoho/crm/api/tags/count_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/tags/info.rb +82 -0
- data/src/com/zoho/crm/api/tags/merge_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/tags/record_action_handler.rb +12 -0
- data/src/com/zoho/crm/api/tags/record_action_response.rb +12 -0
- data/src/com/zoho/crm/api/tags/record_action_wrapper.rb +122 -0
- data/src/com/zoho/crm/api/tags/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/tags/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/tags/success_response.rb +125 -0
- data/src/com/zoho/crm/api/tags/tag.rb +159 -0
- data/src/com/zoho/crm/api/tags/tags_operations.rb +382 -0
- data/src/com/zoho/crm/api/taxes/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/taxes/action_response.rb +12 -0
- data/src/com/zoho/crm/api/taxes/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/taxes/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/taxes/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/taxes/preference.rb +82 -0
- data/src/com/zoho/crm/api/taxes/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/taxes/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/taxes/success_response.rb +123 -0
- data/src/com/zoho/crm/api/taxes/tax.rb +139 -0
- data/src/com/zoho/crm/api/taxes/taxes_operations.rb +132 -0
- data/src/com/zoho/crm/api/territories/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/territories/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/territories/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/territories/territories_operations.rb +47 -0
- data/src/com/zoho/crm/api/territories/territory.rb +236 -0
- data/src/com/zoho/crm/api/user_signature.rb +29 -0
- data/src/com/zoho/crm/api/users/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/users/action_response.rb +12 -0
- data/src/com/zoho/crm/api/users/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/users/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/users/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/users/customize_info.rb +158 -0
- data/src/com/zoho/crm/api/users/info.rb +120 -0
- data/src/com/zoho/crm/api/users/request_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/users/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/users/response_wrapper.rb +84 -0
- data/src/com/zoho/crm/api/users/shift.rb +82 -0
- data/src/com/zoho/crm/api/users/success_response.rb +123 -0
- data/src/com/zoho/crm/api/users/tab_theme.rb +82 -0
- data/src/com/zoho/crm/api/users/territory.rb +101 -0
- data/src/com/zoho/crm/api/users/theme.rb +158 -0
- data/src/com/zoho/crm/api/users/user.rb +698 -0
- data/src/com/zoho/crm/api/users/users_operations.rb +177 -0
- data/src/com/zoho/crm/api/util/api_http_connector.rb +114 -0
- data/src/com/zoho/crm/api/util/api_response.rb +18 -0
- data/src/com/zoho/crm/api/util/choice.rb +11 -0
- data/src/com/zoho/crm/api/util/common_api_handler.rb +241 -0
- data/src/com/zoho/crm/api/util/constants.rb +646 -0
- data/src/com/zoho/crm/api/util/converter.rb +238 -0
- data/src/com/zoho/crm/api/util/data_type_converter.rb +170 -0
- data/src/com/zoho/crm/api/util/downloader.rb +86 -0
- data/src/com/zoho/crm/api/util/form_data_converter.rb +159 -0
- data/src/com/zoho/crm/api/util/header_param_validator.rb +57 -0
- data/src/com/zoho/crm/api/util/json_converter.rb +729 -0
- data/src/com/zoho/crm/api/util/model.rb +7 -0
- data/src/com/zoho/crm/api/util/module_fields_handler.rb +80 -0
- data/src/com/zoho/crm/api/util/stream_wrapper.rb +39 -0
- data/src/com/zoho/crm/api/util/utility.rb +871 -0
- data/src/com/zoho/crm/api/variable_groups/api_exception.rb +123 -0
- data/src/com/zoho/crm/api/variable_groups/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/variable_groups/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/variable_groups/variable_group.rb +139 -0
- data/src/com/zoho/crm/api/variable_groups/variable_groups_operations.rb +65 -0
- data/src/com/zoho/crm/api/variables/action_handler.rb +12 -0
- data/src/com/zoho/crm/api/variables/action_response.rb +12 -0
- data/src/com/zoho/crm/api/variables/action_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/variables/api_exception.rb +127 -0
- data/src/com/zoho/crm/api/variables/body_wrapper.rb +63 -0
- data/src/com/zoho/crm/api/variables/response_handler.rb +12 -0
- data/src/com/zoho/crm/api/variables/response_wrapper.rb +65 -0
- data/src/com/zoho/crm/api/variables/success_response.rb +123 -0
- data/src/com/zoho/crm/api/variables/variable.rb +175 -0
- data/src/com/zoho/crm/api/variables/variables_operations.rb +234 -0
- data/src/resources/JSONDetails.json +1 -0
- data/src/version.rb +3 -0
- metadata +500 -0
@@ -0,0 +1,369 @@
|
|
1
|
+
require_relative '../record/record'
|
2
|
+
require_relative '../users/user'
|
3
|
+
require_relative '../util/model'
|
4
|
+
|
5
|
+
module ZOHOCRMSDK
|
6
|
+
module Attachments
|
7
|
+
class Attachment
|
8
|
+
include Util::Model
|
9
|
+
|
10
|
+
# Creates an instance of Attachment
|
11
|
+
def initialize
|
12
|
+
@owner = nil
|
13
|
+
@modified_time = nil
|
14
|
+
@file_name = nil
|
15
|
+
@created_time = nil
|
16
|
+
@size = nil
|
17
|
+
@parent_id = nil
|
18
|
+
@editable = nil
|
19
|
+
@file_id = nil
|
20
|
+
@type = nil
|
21
|
+
@se_module = nil
|
22
|
+
@modified_by = nil
|
23
|
+
@state = nil
|
24
|
+
@id = nil
|
25
|
+
@created_by = nil
|
26
|
+
@link_url = nil
|
27
|
+
@description = nil
|
28
|
+
@category = nil
|
29
|
+
@key_modified = Hash.new
|
30
|
+
end
|
31
|
+
|
32
|
+
# The method to get the owner
|
33
|
+
# @return An instance of Users::User
|
34
|
+
|
35
|
+
def owner
|
36
|
+
@owner
|
37
|
+
end
|
38
|
+
|
39
|
+
# The method to set the value to owner
|
40
|
+
# @param owner [Users::User] An instance of Users::User
|
41
|
+
|
42
|
+
def owner=(owner)
|
43
|
+
if owner!=nil and !owner.is_a? Users::User
|
44
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: owner EXPECTED TYPE: User', nil, nil)
|
45
|
+
end
|
46
|
+
@owner = owner
|
47
|
+
@key_modified['Owner'] = 1
|
48
|
+
end
|
49
|
+
|
50
|
+
# The method to get the modified_time
|
51
|
+
# @return An instance of DateTime
|
52
|
+
|
53
|
+
def modified_time
|
54
|
+
@modified_time
|
55
|
+
end
|
56
|
+
|
57
|
+
# The method to set the value to modified_time
|
58
|
+
# @param modified_time [DateTime] An instance of DateTime
|
59
|
+
|
60
|
+
def modified_time=(modified_time)
|
61
|
+
if modified_time!=nil and !modified_time.is_a? DateTime
|
62
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: DateTime', nil, nil)
|
63
|
+
end
|
64
|
+
@modified_time = modified_time
|
65
|
+
@key_modified['Modified_Time'] = 1
|
66
|
+
end
|
67
|
+
|
68
|
+
# The method to get the file_name
|
69
|
+
# @return A String value
|
70
|
+
|
71
|
+
def file_name
|
72
|
+
@file_name
|
73
|
+
end
|
74
|
+
|
75
|
+
# The method to set the value to file_name
|
76
|
+
# @param file_name [String] A String
|
77
|
+
|
78
|
+
def file_name=(file_name)
|
79
|
+
if file_name!=nil and !file_name.is_a? String
|
80
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: file_name EXPECTED TYPE: String', nil, nil)
|
81
|
+
end
|
82
|
+
@file_name = file_name
|
83
|
+
@key_modified['File_Name'] = 1
|
84
|
+
end
|
85
|
+
|
86
|
+
# The method to get the created_time
|
87
|
+
# @return An instance of DateTime
|
88
|
+
|
89
|
+
def created_time
|
90
|
+
@created_time
|
91
|
+
end
|
92
|
+
|
93
|
+
# The method to set the value to created_time
|
94
|
+
# @param created_time [DateTime] An instance of DateTime
|
95
|
+
|
96
|
+
def created_time=(created_time)
|
97
|
+
if created_time!=nil and !created_time.is_a? DateTime
|
98
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: DateTime', nil, nil)
|
99
|
+
end
|
100
|
+
@created_time = created_time
|
101
|
+
@key_modified['Created_Time'] = 1
|
102
|
+
end
|
103
|
+
|
104
|
+
# The method to get the size
|
105
|
+
# @return A Integer value
|
106
|
+
|
107
|
+
def size
|
108
|
+
@size
|
109
|
+
end
|
110
|
+
|
111
|
+
# The method to set the value to size
|
112
|
+
# @param size [Integer] A Integer
|
113
|
+
|
114
|
+
def size=(size)
|
115
|
+
if size!=nil and !size.is_a? Integer
|
116
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: size EXPECTED TYPE: Integer', nil, nil)
|
117
|
+
end
|
118
|
+
@size = size
|
119
|
+
@key_modified['Size'] = 1
|
120
|
+
end
|
121
|
+
|
122
|
+
# The method to get the parent_id
|
123
|
+
# @return An instance of Record::Record
|
124
|
+
|
125
|
+
def parent_id
|
126
|
+
@parent_id
|
127
|
+
end
|
128
|
+
|
129
|
+
# The method to set the value to parent_id
|
130
|
+
# @param parent_id [Record::Record] An instance of Record::Record
|
131
|
+
|
132
|
+
def parent_id=(parent_id)
|
133
|
+
if parent_id!=nil and !parent_id.is_a? Record::Record
|
134
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: parent_id EXPECTED TYPE: Record', nil, nil)
|
135
|
+
end
|
136
|
+
@parent_id = parent_id
|
137
|
+
@key_modified['Parent_Id'] = 1
|
138
|
+
end
|
139
|
+
|
140
|
+
# The method to get the editable
|
141
|
+
# @return A Boolean value
|
142
|
+
|
143
|
+
def editable
|
144
|
+
@editable
|
145
|
+
end
|
146
|
+
|
147
|
+
# The method to set the value to editable
|
148
|
+
# @param editable [Boolean] A Boolean
|
149
|
+
|
150
|
+
def editable=(editable)
|
151
|
+
if editable!=nil and ! [true, false].include?editable
|
152
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: editable EXPECTED TYPE: Boolean', nil, nil)
|
153
|
+
end
|
154
|
+
@editable = editable
|
155
|
+
@key_modified['$editable'] = 1
|
156
|
+
end
|
157
|
+
|
158
|
+
# The method to get the file_id
|
159
|
+
# @return A String value
|
160
|
+
|
161
|
+
def file_id
|
162
|
+
@file_id
|
163
|
+
end
|
164
|
+
|
165
|
+
# The method to set the value to file_id
|
166
|
+
# @param file_id [String] A String
|
167
|
+
|
168
|
+
def file_id=(file_id)
|
169
|
+
if file_id!=nil and !file_id.is_a? String
|
170
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: file_id EXPECTED TYPE: String', nil, nil)
|
171
|
+
end
|
172
|
+
@file_id = file_id
|
173
|
+
@key_modified['$file_id'] = 1
|
174
|
+
end
|
175
|
+
|
176
|
+
# The method to get the type
|
177
|
+
# @return A String value
|
178
|
+
|
179
|
+
def type
|
180
|
+
@type
|
181
|
+
end
|
182
|
+
|
183
|
+
# The method to set the value to type
|
184
|
+
# @param type [String] A String
|
185
|
+
|
186
|
+
def type=(type)
|
187
|
+
if type!=nil and !type.is_a? String
|
188
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: String', nil, nil)
|
189
|
+
end
|
190
|
+
@type = type
|
191
|
+
@key_modified['$type'] = 1
|
192
|
+
end
|
193
|
+
|
194
|
+
# The method to get the se_module
|
195
|
+
# @return A String value
|
196
|
+
|
197
|
+
def se_module
|
198
|
+
@se_module
|
199
|
+
end
|
200
|
+
|
201
|
+
# The method to set the value to se_module
|
202
|
+
# @param se_module [String] A String
|
203
|
+
|
204
|
+
def se_module=(se_module)
|
205
|
+
if se_module!=nil and !se_module.is_a? String
|
206
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: se_module EXPECTED TYPE: String', nil, nil)
|
207
|
+
end
|
208
|
+
@se_module = se_module
|
209
|
+
@key_modified['$se_module'] = 1
|
210
|
+
end
|
211
|
+
|
212
|
+
# The method to get the modified_by
|
213
|
+
# @return An instance of Users::User
|
214
|
+
|
215
|
+
def modified_by
|
216
|
+
@modified_by
|
217
|
+
end
|
218
|
+
|
219
|
+
# The method to set the value to modified_by
|
220
|
+
# @param modified_by [Users::User] An instance of Users::User
|
221
|
+
|
222
|
+
def modified_by=(modified_by)
|
223
|
+
if modified_by!=nil and !modified_by.is_a? Users::User
|
224
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', nil, nil)
|
225
|
+
end
|
226
|
+
@modified_by = modified_by
|
227
|
+
@key_modified['Modified_By'] = 1
|
228
|
+
end
|
229
|
+
|
230
|
+
# The method to get the state
|
231
|
+
# @return A String value
|
232
|
+
|
233
|
+
def state
|
234
|
+
@state
|
235
|
+
end
|
236
|
+
|
237
|
+
# The method to set the value to state
|
238
|
+
# @param state [String] A String
|
239
|
+
|
240
|
+
def state=(state)
|
241
|
+
if state!=nil and !state.is_a? String
|
242
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: state EXPECTED TYPE: String', nil, nil)
|
243
|
+
end
|
244
|
+
@state = state
|
245
|
+
@key_modified['$state'] = 1
|
246
|
+
end
|
247
|
+
|
248
|
+
# The method to get the id
|
249
|
+
# @return A Integer value
|
250
|
+
|
251
|
+
def id
|
252
|
+
@id
|
253
|
+
end
|
254
|
+
|
255
|
+
# The method to set the value to id
|
256
|
+
# @param id [Integer] A Integer
|
257
|
+
|
258
|
+
def id=(id)
|
259
|
+
if id!=nil and !id.is_a? Integer
|
260
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
261
|
+
end
|
262
|
+
@id = id
|
263
|
+
@key_modified['id'] = 1
|
264
|
+
end
|
265
|
+
|
266
|
+
# The method to get the created_by
|
267
|
+
# @return An instance of Users::User
|
268
|
+
|
269
|
+
def created_by
|
270
|
+
@created_by
|
271
|
+
end
|
272
|
+
|
273
|
+
# The method to set the value to created_by
|
274
|
+
# @param created_by [Users::User] An instance of Users::User
|
275
|
+
|
276
|
+
def created_by=(created_by)
|
277
|
+
if created_by!=nil and !created_by.is_a? Users::User
|
278
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', nil, nil)
|
279
|
+
end
|
280
|
+
@created_by = created_by
|
281
|
+
@key_modified['Created_By'] = 1
|
282
|
+
end
|
283
|
+
|
284
|
+
# The method to get the link_url
|
285
|
+
# @return A String value
|
286
|
+
|
287
|
+
def link_url
|
288
|
+
@link_url
|
289
|
+
end
|
290
|
+
|
291
|
+
# The method to set the value to link_url
|
292
|
+
# @param link_url [String] A String
|
293
|
+
|
294
|
+
def link_url=(link_url)
|
295
|
+
if link_url!=nil and !link_url.is_a? String
|
296
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: link_url EXPECTED TYPE: String', nil, nil)
|
297
|
+
end
|
298
|
+
@link_url = link_url
|
299
|
+
@key_modified['$link_url'] = 1
|
300
|
+
end
|
301
|
+
|
302
|
+
# The method to get the description
|
303
|
+
# @return A String value
|
304
|
+
|
305
|
+
def description
|
306
|
+
@description
|
307
|
+
end
|
308
|
+
|
309
|
+
# The method to set the value to description
|
310
|
+
# @param description [String] A String
|
311
|
+
|
312
|
+
def description=(description)
|
313
|
+
if description!=nil and !description.is_a? String
|
314
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: description EXPECTED TYPE: String', nil, nil)
|
315
|
+
end
|
316
|
+
@description = description
|
317
|
+
@key_modified['description'] = 1
|
318
|
+
end
|
319
|
+
|
320
|
+
# The method to get the category
|
321
|
+
# @return A String value
|
322
|
+
|
323
|
+
def category
|
324
|
+
@category
|
325
|
+
end
|
326
|
+
|
327
|
+
# The method to set the value to category
|
328
|
+
# @param category [String] A String
|
329
|
+
|
330
|
+
def category=(category)
|
331
|
+
if category!=nil and !category.is_a? String
|
332
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: category EXPECTED TYPE: String', nil, nil)
|
333
|
+
end
|
334
|
+
@category = category
|
335
|
+
@key_modified['category'] = 1
|
336
|
+
end
|
337
|
+
|
338
|
+
# The method to check if the user has modified the given key
|
339
|
+
# @param key [String] A String
|
340
|
+
# @return A Integer value
|
341
|
+
|
342
|
+
def is_key_modified(key)
|
343
|
+
if key!=nil and !key.is_a? String
|
344
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
345
|
+
end
|
346
|
+
if @key_modified.key?(key)
|
347
|
+
return @key_modified[key]
|
348
|
+
end
|
349
|
+
|
350
|
+
nil
|
351
|
+
end
|
352
|
+
|
353
|
+
# The method to mark the given key as modified
|
354
|
+
# @param key [String] A String
|
355
|
+
# @param modification [Integer] A Integer
|
356
|
+
|
357
|
+
def set_key_modified(key, modification)
|
358
|
+
if key!=nil and !key.is_a? String
|
359
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
360
|
+
end
|
361
|
+
if modification!=nil and !modification.is_a? Integer
|
362
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
363
|
+
end
|
364
|
+
@key_modified[key] = modification
|
365
|
+
end
|
366
|
+
|
367
|
+
end
|
368
|
+
end
|
369
|
+
end
|
@@ -0,0 +1,198 @@
|
|
1
|
+
require_relative '../param'
|
2
|
+
require_relative '../parameter_map'
|
3
|
+
require_relative '../exception/sdk_exception'
|
4
|
+
require_relative '../util/api_response'
|
5
|
+
require_relative '../util/common_api_handler'
|
6
|
+
require_relative '../util/constants'
|
7
|
+
|
8
|
+
module ZOHOCRMSDK
|
9
|
+
module Attachments
|
10
|
+
class AttachmentsOperations
|
11
|
+
|
12
|
+
# Creates an instance of AttachmentsOperations with the given parameters
|
13
|
+
# @param module_api_name [String] A String
|
14
|
+
# @param record_id [Integer] A Integer
|
15
|
+
def initialize(module_api_name, record_id)
|
16
|
+
if !module_api_name.is_a? String
|
17
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: String', nil, nil)
|
18
|
+
end
|
19
|
+
if !record_id.is_a? Integer
|
20
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: Integer', nil, nil)
|
21
|
+
end
|
22
|
+
@module_api_name = module_api_name
|
23
|
+
@record_id = record_id
|
24
|
+
end
|
25
|
+
|
26
|
+
# The method to download attachment
|
27
|
+
# @param id [Integer] A Integer
|
28
|
+
# @return An instance of APIResponse
|
29
|
+
# @raise SDKException
|
30
|
+
def download_attachment(id)
|
31
|
+
if !id.is_a? Integer
|
32
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
33
|
+
end
|
34
|
+
handler_instance = Handler::CommonAPIHandler.new
|
35
|
+
api_path = ''
|
36
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
37
|
+
api_path = api_path + @module_api_name.to_s
|
38
|
+
api_path = api_path + '/'
|
39
|
+
api_path = api_path + @record_id.to_s
|
40
|
+
api_path = api_path + '/Attachments/'
|
41
|
+
api_path = api_path + id.to_s
|
42
|
+
handler_instance.api_path = api_path
|
43
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
44
|
+
handler_instance.category_method = 'READ'
|
45
|
+
require_relative 'response_handler'
|
46
|
+
handler_instance.api_call(ResponseHandler.name, 'application/x-download')
|
47
|
+
end
|
48
|
+
|
49
|
+
# The method to delete attachment
|
50
|
+
# @param id [Integer] A Integer
|
51
|
+
# @return An instance of APIResponse
|
52
|
+
# @raise SDKException
|
53
|
+
def delete_attachment(id)
|
54
|
+
if !id.is_a? Integer
|
55
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: Integer', nil, nil)
|
56
|
+
end
|
57
|
+
handler_instance = Handler::CommonAPIHandler.new
|
58
|
+
api_path = ''
|
59
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
60
|
+
api_path = api_path + @module_api_name.to_s
|
61
|
+
api_path = api_path + '/'
|
62
|
+
api_path = api_path + @record_id.to_s
|
63
|
+
api_path = api_path + '/Attachments/'
|
64
|
+
api_path = api_path + id.to_s
|
65
|
+
handler_instance.api_path = api_path
|
66
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
67
|
+
handler_instance.category_method = Constants::REQUEST_METHOD_DELETE
|
68
|
+
require_relative 'action_handler'
|
69
|
+
handler_instance.api_call(ActionHandler.name, 'application/json')
|
70
|
+
end
|
71
|
+
|
72
|
+
# The method to get attachments
|
73
|
+
# @param param_instance [ParameterMap] An instance of ParameterMap
|
74
|
+
# @return An instance of APIResponse
|
75
|
+
# @raise SDKException
|
76
|
+
def get_attachments(param_instance=nil)
|
77
|
+
if param_instance!=nil and !param_instance.is_a? ParameterMap
|
78
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
|
79
|
+
end
|
80
|
+
handler_instance = Handler::CommonAPIHandler.new
|
81
|
+
api_path = ''
|
82
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
83
|
+
api_path = api_path + @module_api_name.to_s
|
84
|
+
api_path = api_path + '/'
|
85
|
+
api_path = api_path + @record_id.to_s
|
86
|
+
api_path = api_path + '/Attachments'
|
87
|
+
handler_instance.api_path = api_path
|
88
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_GET
|
89
|
+
handler_instance.category_method = 'READ'
|
90
|
+
handler_instance.param = param_instance
|
91
|
+
require_relative 'response_handler'
|
92
|
+
handler_instance.api_call(ResponseHandler.name, 'application/json')
|
93
|
+
end
|
94
|
+
|
95
|
+
# The method to upload attachment
|
96
|
+
# @param request [FileBodyWrapper] An instance of FileBodyWrapper
|
97
|
+
# @return An instance of APIResponse
|
98
|
+
# @raise SDKException
|
99
|
+
def upload_attachment(request)
|
100
|
+
if request!=nil and !request.is_a? FileBodyWrapper
|
101
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: FileBodyWrapper', nil, nil)
|
102
|
+
end
|
103
|
+
handler_instance = Handler::CommonAPIHandler.new
|
104
|
+
api_path = ''
|
105
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
106
|
+
api_path = api_path + @module_api_name.to_s
|
107
|
+
api_path = api_path + '/'
|
108
|
+
api_path = api_path + @record_id.to_s
|
109
|
+
api_path = api_path + '/Attachments'
|
110
|
+
handler_instance.api_path = api_path
|
111
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_POST
|
112
|
+
handler_instance.category_method = 'CREATE'
|
113
|
+
handler_instance.content_type = 'multipart/form-data'
|
114
|
+
handler_instance.request = request
|
115
|
+
handler_instance.mandatory_checker = true
|
116
|
+
require_relative 'action_handler'
|
117
|
+
handler_instance.api_call(ActionHandler.name, 'application/json')
|
118
|
+
end
|
119
|
+
|
120
|
+
# The method to upload link attachment
|
121
|
+
# @param param_instance [ParameterMap] An instance of ParameterMap
|
122
|
+
# @return An instance of APIResponse
|
123
|
+
# @raise SDKException
|
124
|
+
def upload_link_attachment(param_instance=nil)
|
125
|
+
if param_instance!=nil and !param_instance.is_a? ParameterMap
|
126
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
|
127
|
+
end
|
128
|
+
handler_instance = Handler::CommonAPIHandler.new
|
129
|
+
api_path = ''
|
130
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
131
|
+
api_path = api_path + @module_api_name.to_s
|
132
|
+
api_path = api_path + '/'
|
133
|
+
api_path = api_path + @record_id.to_s
|
134
|
+
api_path = api_path + '/Attachments'
|
135
|
+
handler_instance.api_path = api_path
|
136
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_POST
|
137
|
+
handler_instance.category_method = 'CREATE'
|
138
|
+
handler_instance.mandatory_checker = true
|
139
|
+
handler_instance.param = param_instance
|
140
|
+
require_relative 'action_handler'
|
141
|
+
handler_instance.api_call(ActionHandler.name, 'application/json')
|
142
|
+
end
|
143
|
+
|
144
|
+
# The method to delete attachments
|
145
|
+
# @param param_instance [ParameterMap] An instance of ParameterMap
|
146
|
+
# @return An instance of APIResponse
|
147
|
+
# @raise SDKException
|
148
|
+
def delete_attachments(param_instance=nil)
|
149
|
+
if param_instance!=nil and !param_instance.is_a? ParameterMap
|
150
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', nil, nil)
|
151
|
+
end
|
152
|
+
handler_instance = Handler::CommonAPIHandler.new
|
153
|
+
api_path = ''
|
154
|
+
api_path = api_path + "/crm/v#{Initializer.get_initializer.api_version}/"
|
155
|
+
api_path = api_path + @module_api_name.to_s
|
156
|
+
api_path = api_path + '/'
|
157
|
+
api_path = api_path + @record_id.to_s
|
158
|
+
api_path = api_path + '/Attachments'
|
159
|
+
handler_instance.api_path = api_path
|
160
|
+
handler_instance.http_method = Constants::REQUEST_METHOD_DELETE
|
161
|
+
handler_instance.category_method = Constants::REQUEST_METHOD_DELETE
|
162
|
+
handler_instance.param = param_instance
|
163
|
+
require_relative 'action_handler'
|
164
|
+
handler_instance.api_call(ActionHandler.name, 'application/json')
|
165
|
+
end
|
166
|
+
|
167
|
+
class GetAttachmentsParam
|
168
|
+
@@fields = Param.new('fields', 'com.zoho.crm.api.Attachments.GetAttachmentsParam')
|
169
|
+
def self.fields
|
170
|
+
@@fields
|
171
|
+
end
|
172
|
+
@@page = Param.new('page', 'com.zoho.crm.api.Attachments.GetAttachmentsParam')
|
173
|
+
def self.page
|
174
|
+
@@page
|
175
|
+
end
|
176
|
+
@@per_page = Param.new('per_page', 'com.zoho.crm.api.Attachments.GetAttachmentsParam')
|
177
|
+
def self.per_page
|
178
|
+
@@per_page
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
class UploadLinkAttachmentParam
|
183
|
+
@@attachmentUrl = Param.new('attachmentUrl', 'com.zoho.crm.api.Attachments.UploadLinkAttachmentParam')
|
184
|
+
def self.attachmentUrl
|
185
|
+
@@attachmentUrl
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
class DeleteAttachmentsParam
|
190
|
+
@@ids = Param.new('ids', 'com.zoho.crm.api.Attachments.DeleteAttachmentsParam')
|
191
|
+
def self.ids
|
192
|
+
@@ids
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require_relative '../util/stream_wrapper'
|
2
|
+
require_relative '../util/model'
|
3
|
+
|
4
|
+
module ZOHOCRMSDK
|
5
|
+
module Attachments
|
6
|
+
require_relative 'response_handler'
|
7
|
+
class FileBodyWrapper
|
8
|
+
include Util::Model
|
9
|
+
include ResponseHandler
|
10
|
+
|
11
|
+
# Creates an instance of FileBodyWrapper
|
12
|
+
def initialize
|
13
|
+
@file = nil
|
14
|
+
@key_modified = Hash.new
|
15
|
+
end
|
16
|
+
|
17
|
+
# The method to get the file
|
18
|
+
# @return An instance of Util::StreamWrapper
|
19
|
+
|
20
|
+
def file
|
21
|
+
@file
|
22
|
+
end
|
23
|
+
|
24
|
+
# The method to set the value to file
|
25
|
+
# @param file [Util::StreamWrapper] An instance of Util::StreamWrapper
|
26
|
+
|
27
|
+
def file=(file)
|
28
|
+
if file!=nil and !file.is_a? Util::StreamWrapper
|
29
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: file EXPECTED TYPE: Util::StreamWrapper', nil, nil)
|
30
|
+
end
|
31
|
+
@file = file
|
32
|
+
@key_modified['file'] = 1
|
33
|
+
end
|
34
|
+
|
35
|
+
# The method to check if the user has modified the given key
|
36
|
+
# @param key [String] A String
|
37
|
+
# @return A Integer value
|
38
|
+
|
39
|
+
def is_key_modified(key)
|
40
|
+
if key!=nil and !key.is_a? String
|
41
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
42
|
+
end
|
43
|
+
if @key_modified.key?(key)
|
44
|
+
return @key_modified[key]
|
45
|
+
end
|
46
|
+
|
47
|
+
nil
|
48
|
+
end
|
49
|
+
|
50
|
+
# The method to mark the given key as modified
|
51
|
+
# @param key [String] A String
|
52
|
+
# @param modification [Integer] A Integer
|
53
|
+
|
54
|
+
def set_key_modified(key, modification)
|
55
|
+
if key!=nil and !key.is_a? String
|
56
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: String', nil, nil)
|
57
|
+
end
|
58
|
+
if modification!=nil and !modification.is_a? Integer
|
59
|
+
raise SDKException.new(Constants::DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: Integer', nil, nil)
|
60
|
+
end
|
61
|
+
@key_modified[key] = modification
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|